NOAA-GFDL/MOM6

Z_INIT_HOMOGENIZE=True uses non-reproducing and potentially incorrect averages

Closed this issue · 0 comments

The averaging to generate spatially homogeneous initial conditions that is triggered in the horiz_inter_and_extrap_tracer() routines or in MOM_temp_salt_initialize_from_Z() by setting Z_INIT_HOMOGENIZE=True uses simple sums that are non-reproducing across rotation, PE-count or layout, and does not account for the possibility that some of the values come from land points. Ideally this would be modified to use properly masked and area-weighted reproducing sums, as is done in global_layer_mean(), but this would lead to answer changes at the level of roundoff.

The one known experiment where Z_INIT_HOMOGENIZE=True is used - MOM6-examples/ocean_only/single_column - is only ever run on a single PE and has just 4 columns that are (always?) ocean points, so this might not be too bad of an issue there, but it is easy to envision other cases where the current version of the code could lead to undesirable consequences.