Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dry run #2

Closed
wants to merge 1,416 commits into from
Closed

dry run #2

wants to merge 1,416 commits into from

Conversation

feiyulu
Copy link
Owner

@feiyulu feiyulu commented May 6, 2019

No description provided.

Hallberg-NOAA and others added 30 commits November 6, 2018 18:59
  Added a comment in USER_initialize_thickness and removed a constant that is
being multiplied by 0.  All answers are bitwise identical.
…e-2018-10-15

Merge dev/master candidate 2018 10 15
  Corrected an openMP directives that omitted a recently added unit_scale_type
variable.  All answers are bitwise identical, and the code once again compiles
with openMP enabled.
  Recast the internal calculations in the MOM6 ice shelf code and several
persistent ice shelf state variables to use vertical height units of Z in place
of m for dimensional consistency testing.  This includes adding new
unit_scale_type arguments to several routines and new elements to the ice shelf
control structure.  All answers are bitwise identical in the MOM6 test cases,
including rescaling Z over a large range.
  Changed the units of fluxes%ustar and forces%ustar from m/s to Z/s for
dimensional consistency testing.  This includes adding new unit_scale_type
arguments to several routines and new elements to the top-level ocean model
control structures.  All answers are bitwise identical in the MOM6 test cases,
including rescaling Z over a large range.
  Split two lines that had become longer than 120 characters with the recent
addtion of new subroutine arguments and scaling factors.  All answers are
bitwise identical.
        so as to include topographic beta effect in computing Rhines scale
  Changed the units of fluxes%ustar_shelf and fluxes%ustar_berg from m/s to Z/s for
dimensional consistency testing.  All answers are bitwise identical in the MOM6 test cases,
including rescaling Z over a large range.
        to remove the redundant copy of G%bathyT, lat, and lon
  Corrected the grid staggering locations indicated in 6 comments, the text of a
seventh and added units in an eighth.  All answers are bitwise identical.
  Use US%m_to_Z in place of G%Zd_to_m to convert units from m to Z in
set_up_ALE_sponge_vel_field_varying, whic required adding a unit_scale_type
argument.  All answers are bitwise identical.
  Recast internal depth and height variables in MOM_internal_tides to use units
of Z instead of m.  This required adding a unit_scale_type arguments to
internal_tides_init and itidal_lowmode_loss, and a modified call from
diabatic_driver_init.  All answers are bitwise identical.
  Recast internal depth and height variables in MOM_tidal_mixing to use units of
Z instead of m.  This required adding a unit_scale_type arguments to the
internal subroutines read_tidal_energy and read_tidal_constituents.  Also
eliminated the use of where statements and array syntax, which are strongly
discouraged because they can operate on uninitialized points in the halo
regions.  All answers are bitwise identical.
  Use US%m_to_Z in place of 1/G%Zd_to_m to convert units from m to Z in
tracer_Z_init.  This required adding a unit_scale_type argument to tracer_Z_init
and 4 subroutines that used the previous interface to tracer_Z_init.  All
answers are bitwise identical.
This is necessary to allow for instabilities and turbulence to develop
in a zonally symmetric channel configuration..
  Added a unit_scale_type argument to diag_remap_update and a pointer to a
unit_scale_type structure to diag_mediator_init and store a this pointer in
the diag_ctrl type, all to accomodate rescaling of depths via US%Z_to_m instead
of G%Zd_to_m.  All answers are bitwise identical.
  Added a unit_scale_type argument to MOM_initialize_fixed and moved the call to
rescale_dyn_horgrid_bathymetry into MOM_initialize_fixed immediately after the
call to MOM_initialize_topography.  Also added a unit_scale_type argument to
mask_outside_OBCs and open_boundary_config to accomodate rescaling of depths via
US%Z_to_m instead of G%Zd_to_m.  All answers are bitwise identical.
jkrasting and others added 26 commits April 12, 2019 10:27
- Cosmetic clean up of comments
- added adjustl() to string comparison - for some reason a leading
  whitespace was present with Intel compiler but not GNU.
Feature to flag and trap cases where obsolete restart fields are attempted to be used
- Uses stages to parallelize testing process
- Adds a doxygen job that tests for doxygen errors
- Reduces dependency on other repositories
  - No longer uses scripst from MOM6-examples/tools/tests/Travis-MOM6/
  - Still uses configurations from MOM6-examples/ocean_only/
- Adds test building/using a debug executable
- Adds a .testing/ directory
- Uses the latest xenial image on Travis (with openmpi)

Todo:
- Add code coverage (needs more experiments)
- Break dependence on MOM6-examples (long term project)
- Add other portable tests (e.g. parameter scaling, rotation, etc)
- Like the original cased tracer, the ca13csed tracer used in
  generic_BLING.F90 needs to be initialized to zero at all
  subsurface layers (when do_13c = .true.)
  With the xanadu release of FMS, the coupler_types module within FMS has
finally been properly scoped without adding unnecssary dependencies.  The
coupler_types.F90 files in the MOM6 config_src/solo_driver directories are no
longer needed.  In addition, the routines inside coupler_util.F90 files have not
been used anywhere in MOM6 for some time, their functionality being provided via
interfaces inside the coupler_types_mod.  These 5 files have now been removed.
All answers are bitwise identical.
  Added unit_scale_type arguments to several subroutines in the nuopc_driver
directory, added a unit_scale_type element to the nuopc_driver versoin of
ocean_state_type, and use this argument to appropriately rescale forces%ustar
for dimensional consistency testing.  These changes are required to go with the
dev-master-candidate-2018-04-22 updates to MOM6.  With these changes, the code
in origin/dev-master-candidate-2018-04-22 compiles up through the nuopc_driver
version of MOM_ocean_model.o.
This patch appends a checksum for the dependencies of the depth and area
lists stored in the Depth_list.nc file, which are used to compute
diagnostics based on APE.

The data in Depth_list.nc depends on the grid fields, and may not be
reproducible when such grids are constructed internally using compiled
code within the executable.  This issue was observed in the
'double_gyre' experiment when a PGI-compiled executable was tested using
a Depth_list.nc file generated by a GNU-compiled executable.

By appending a checksum for the grid fields used to compute
Depth_list.nc, we can ensure that the data is consistent with the
experiment grid data.  Grid data which is read from external files, such
as mosaic or topography fields, are unaffected by this issue.

This patch improves the reproducibilty of standard diagnostics, such as
total energy, but has no impact on the reproducibility of the internal
model dynamics, which does not depend on Depth_list.nc.

Checksums are computed for the G%bathyT and masked G%areaT grid fields
using the FMS mpp_checksum subroutine, which require collective
operations, and are stored as hex strings in global attributes of the
netCDF file.  Strings are used to remain consistent with FMS restart
checksums, and to avoid an observed re-casting of 8-byte integers to
4-bytes by the netCDF library.  Attribute names are based on the grid
variable names.

Two flags have been introduced to control this behavior:

REQUIRE_DEPTH_LIST_CHECKSUMS (default: True)
    This flag will abort the run if the Depth_list.nc file is present
    and checksums are absent from the file.  Although this could impose
    greater restrictions on existing runs, few runs are configured to
    save the depth list file (READ_DEPTH_LIST) and the default behavior
    is to reconstruct these lists on every run.

UPDATE_DEPTH_LIST_CHECKSUMS (default: False)
    When REQUIRE_DEPTH_LIST_CHECKSUMS is set to false, this flag will
    automatically update the checksums of the Depth_list.nc file.  While
    this can affect the reproducibility of APE diagnostics, it will
    ensure the reproducibility of such diagnostics in subsequent runs.
Additional documentation of the parameters used to store Depth_list.nc
attribute names was added.
The depth checksum is now replaced with masked depth, mask2dT * bathyT,
and the calculation of the depth list has also been updated to use the
masked depth.

Various style conformance changes, such as contraction of do and if
terminations (enddo, endif) and reduction of whitespace in various
multiline function call, has also been applied.

Finally, the attribute name docstrings were updated for clarity.
- There is no source code change in this commit.
- The switch to the xanadu version of FMS and coupler moves source code
  between repositories, and therefore requires new build paths which are
  wired into the testing scripts. This commit checks out a specific
  version of the gitlab testing scripts along with a xanadu commit of
  MOM6-examples (which is on branch xanadu-fms).
- Once the dev/gfdl branch of MOM6-examples has been rolled forward to
  xanadu we will return the commit used for gitlab testing to the
  HEAD of dev/gfdl.
Using the masked depth (mask2dT * bathyT) was observed to change energy
values within floating point precision, so the changes have been
reverted.  This may be revised at a later time, when we are prepared to
update the energy stats to the new values in the regression tests.

The depth checksum attribute has also been renamed to reflect this
change.  This will allow us to re-define the variable as masked at some
later date, and can distinguish between the masked and unmasked
checksums during testing.
gitlab: specify MOM6-examples and script commits
The calculation of beta in the MEKE module had an explicit division by
zero when computing the lateral topography derivatives, which were
raising floating point exceptions in the debug builds.  This occurs in
the MEKE_equilibrium and MEKE_lengthScales functions.

This issue was not observed in the production tests due to
MEKE_TOPOGRAPHIC_BETA always being set to zero.  When FPEs are disabled,
the 0 * (1./0.) operation produces a NaN which is passed to a max()
function, which ignores the NaN and always returns the other value.

We resolve this by explicitly checking for zero values in bathyT and
setting the topographic beta to zero when this term is zero.  While this
could potentially change the value of the Rhines scale, these values
only occur over land, which are in general masked, and should not affect
the calculation.

The unoptimized expressions were retained, but recommended changes which
reduce the number of divisions were included in comments.

No value changes were observed in our test suite, and the patch should
be bitwise reproducible.

Minor changes:
- We do not calculate the topographic beta term if the scaling factor,
  MEKE_TOPOGRAPHIC_BETA is zero

- the default value of beta was unset in MEKE_lengthScales was unset
  when CS%use_old_lscale is True, so we set this to zero.

- Minor whitespace and index syntax changes
@feiyulu feiyulu closed this May 6, 2019
feiyulu pushed a commit that referenced this pull request May 7, 2019
feiyulu pushed a commit that referenced this pull request May 7, 2019
Latest changes from MOM dev/gfdl
feiyulu pushed a commit that referenced this pull request Sep 13, 2019
…_salt_coeffs

Optional use of differing restoring piston velocities for temp and salt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.