Skip to content

Eliminated Zd_to_m from the grid types and elsewhere#883

Merged
adcroft merged 12 commits into
mom-ocean:dev/gfdlfrom
Hallberg-NOAA:eliminate_Zd_to_m
Nov 19, 2018
Merged

Eliminated Zd_to_m from the grid types and elsewhere#883
adcroft merged 12 commits into
mom-ocean:dev/gfdlfrom
Hallberg-NOAA:eliminate_Zd_to_m

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Collaborator

Replaced all instances of dimensional rescaling via G%Zd_to_m with rescaling
via a unit_scale_type. Also rescaled a few additional variables from m to Z for
dimensional consistency testing. No answers or parameter_doc files are changed.
The list of commits in this PR include:

  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.
  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.
  Added a unit_scale_type argument to MOM_sum_output_init, depth_list_setup,
read_depth_list and write_depth_list, and used elements of this type to rescale
depth variables in place of G%Zd_to_m.  All answers are bitwise identical.
  Added an optional unit_scale_type argument to initialize_masks and
write_ocean_geometry_file, and used elements of this type to rescale depth
variables in place of G%Zd_to_m.  All answers are bitwise identical.
  Eliminated Zd_to_m from dyn_horgrid_type and ocean_grid_type.  Instead, any
dimensional rescaling uses elements of unit_scale_types.  All answers are
bitwise identical.
  Recast two internal variables used in the call to set_dtbt from within
barotropic_init to have units of Z instead of m and m2 Z-1 s-2 instead of m s-2,
simplifying the code, and expanding dimensional consistency testing.  All
answers are bitwise identical in the MOM6 test cases, including rescaling Z over
a large range.
  Rescaled ustar_gustless and the ustar argument to get_Langmuir_number from m/s
to Z/s, and added a unit_scale_type argument to set_derived_forcing fields. Also
rolled some unit conversion factors into Irho0, simplifying several lines of the
code in extract_IOB_stresses.  All answers are bitwise identical.
@Hallberg-NOAA
Copy link
Copy Markdown
Collaborator Author

This PR is being tested with https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/6346 .

@adcroft adcroft merged commit f909e93 into mom-ocean:dev/gfdl Nov 19, 2018
@Hallberg-NOAA Hallberg-NOAA deleted the eliminate_Zd_to_m branch July 30, 2021 19:01
Hallberg-NOAA added a commit to Hallberg-NOAA/MOM6 that referenced this pull request Nov 7, 2022
  Corrected a bug in converting depths read from an input file from units of cm
to m when the ER03 version of tidal mixing is used.  This commit will change
answers when INT_TIDE_DISSIPATION = True, USE_CVMix_TIDAL = True, and
TIDAL_ENERGY_TYPE = "ER03".  There are no such configurations in the
MOM6-examples pipeline tests, and it is not clear whether or where such a
configuration has ever been used.

  This bug was introduced into dev/gfdl on Nov. 19, 2018 as a part of PR mom-ocean#883 in
commit NOAA-GFDL@967e470, which was supposed to
be a refactoring of this portion of the code without changing answers, but
introduced this bug.  This commit should restore solutions with impacted
configurations to what they would have been before that earlier commit.
Hallberg-NOAA added a commit to Hallberg-NOAA/MOM6 that referenced this pull request Nov 16, 2022
  Corrected a bug in converting depths read from an input file from units of cm
to m when the ER03 version of tidal mixing is used.  This commit will change
answers when INT_TIDE_DISSIPATION = True, USE_CVMix_TIDAL = True, and
TIDAL_ENERGY_TYPE = "ER03".  There are no such configurations in the
MOM6-examples pipeline tests, and it is not clear whether or where such a
configuration has ever been used.

  This bug was introduced into dev/gfdl on Nov. 19, 2018 as a part of PR mom-ocean#883 in
commit NOAA-GFDL@967e470, which was supposed to
be a refactoring of this portion of the code without changing answers, but
introduced this bug.  This commit should restore solutions with impacted
configurations to what they would have been before that earlier commit.
marshallward referenced this pull request in NOAA-GFDL/MOM6 Nov 16, 2022
  Corrected a bug in converting depths read from an input file from units of cm
to m when the ER03 version of tidal mixing is used.  This commit will change
answers when INT_TIDE_DISSIPATION = True, USE_CVMix_TIDAL = True, and
TIDAL_ENERGY_TYPE = "ER03".  There are no such configurations in the
MOM6-examples pipeline tests, and it is not clear whether or where such a
configuration has ever been used.

  This bug was introduced into dev/gfdl on Nov. 19, 2018 as a part of PR #883 in
commit 967e470, which was supposed to
be a refactoring of this portion of the code without changing answers, but
introduced this bug.  This commit should restore solutions with impacted
configurations to what they would have been before that earlier commit.
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.

2 participants