Eliminated Zd_to_m from the grid types and elsewhere#883
Merged
Conversation
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.
Collaborator
Author
|
This PR is being tested with https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/6346 . |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: