NOAA-GFDL / GFDL_atmos_cubed_sphere

The GFDL atmos_cubed_sphere dynamical core code
Other
57 stars 118 forks source link

Fix uninitialized values in `cs_profile` when `iv == -3` #302

Closed spencerkclark closed 1 year ago

spencerkclark commented 1 year ago

Description

Following the suggestion from @lharris4 in https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere/issues/301#issuecomment-1775426281, this assigns values to gam(i,km) consistent with the interior of the column when iv == -3 in cs_profile. It should be expected to change answers for non-hydrostatic simulations where fv_core_nml.kord_wz < -7.

Fixes #301

How Has This Been Tested?

This has not been tested for scientific correctness, though I have tested that the change proposed here addresses the non-reproducibility issue identified in #301. I now get bitwise-identical results every time I run the model in this configuration.

Checklist:

Please check all whether they apply or not

spencerkclark commented 1 year ago

@lharris4 thanks for quickly providing the suggestion for the fix!

FYI my force push was only to update the commit message to indicate all values of kord_wz for which this is relevant, instead of referring just to kord_wz = -9.

spencerkclark commented 1 year ago

FYI my force push was only to update the commit message to indicate all values of kord_wz for which this is relevant, instead of referring just to kord_wz = -9.

Apologies for potentially interfering with the CI with this rapid re-push.

lharris4 commented 1 year ago

@spencerkclark No problem, thank you for taking care of this.