forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 63
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
+*Non-Boussinesq tracer initialization in Z-units #556
Merged
marshallward
merged 4 commits into
NOAA-GFDL:dev/gfdl
from
Hallberg-NOAA:ALE_remap_scalar_in_Z
Feb 7, 2024
Merged
+*Non-Boussinesq tracer initialization in Z-units #556
marshallward
merged 4 commits into
NOAA-GFDL:dev/gfdl
from
Hallberg-NOAA:ALE_remap_scalar_in_Z
Feb 7, 2024
Conversation
This file contains 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
Hallberg-NOAA
added
enhancement
New feature or request
answer-changing
A change in results (actual or potential)
labels
Jan 28, 2024
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev/gfdl #556 +/- ##
============================================
- Coverage 37.21% 37.21% -0.01%
============================================
Files 271 271
Lines 80405 80430 +25
Branches 14992 14995 +3
============================================
+ Hits 29925 29931 +6
- Misses 44919 44937 +18
- Partials 5561 5562 +1 ☔ View full report in Codecov by Sentry. |
This commit add the new optional arguments h_neglect and h_neglect_edge to ALE_remap_scalar to allow for the thicknesses used in this routine to be provided in any self-consistent units, including [Z ~> m], instead of just [H ~> m or kg m-2]. To help make use of this new capability, this commit also adds the new functions set_h_neglect and set_dz_neglect to the MOM_regridding module. build_grid_rho and build_grid_HyCOM1 have been refactored to use set_h_neglect in place of the corresponding duplicated code blocks. This commit also adds the new optional argument h_in_Z_units to MOM_initialize_tracer_from_Z, which in turn uses this new capability for ALE_remap_scalar to use vertical layer extents (in Z units) rather than thicknesses (in H units). Although there are new optional arguments to public interfaces, they are not yet being exercised with this commit so no answers are changed. Moreover, even if they were being exercised, all Boussinesq solutions would give identical answers.
Revise MOM_temp_salt_initialize_from_Z in cases when Z_INIT_REMAP_GENERAL is False to call ALE_remap_scalar with vertical layer extents (in Z units) rather than layer thicknesses (in H units). When in fully non-Boussinesq mode, this same routine uses dz_to_thickness (using the full equation of state) rather than dz_to_thickness_simple to initialize the layer thicknesses. Boussinesq answers are bitwise identical, but answers can change in some fully non-Boussinesq cases.
Revised initialize_MOM_generic_tracer to use thickness_to_dz to get the layer vertical extents and then provide these to MOM_initialize_tracer_from_Z to read in initial generic tracer concentrations from Z-space files. The previous approach inappropriately used an simple multiplicative rescaling (via a call to dz_to_thickness_simple in MOM_initialize_tracer_from_Z) by a factor that includes the Boussinesq reference density when in non-Boussinesq mode. A new thermo_vars_type arguments was added to initialize_MOM_generic_tracer to allow for this change. Also revised MOM_generic_tracer_column_physics to use thickness_to_dz instead of a simple multiplicative rescaling to get the layer vertical extents (in m) that are used in calls to generic_tracer_source. The multiplicative factor that was used previously (GV%H_to_m) includes the Boussinesq reference density and hence is inappropriate in non-Boussinesq mode; using thickness_to_dz avoids this. Also added comments documenting the meaning and units of about 30 real variables in the MOM_generic_tracer routines. There is a new mandatory argument to initialize_MOM_generic_tracer. All Boussinseq mode answers are bitwise identical, but in non-Boussinesq mode mode generic tracer answers are changed by avoiding the use of the Boussinesq reference density in several places.
Hallberg-NOAA
force-pushed
the
ALE_remap_scalar_in_Z
branch
from
February 2, 2024 14:10
8946460
to
46ef67c
Compare
marshallward
approved these changes
Feb 7, 2024
This was referenced May 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
The series of 3 commits in this pull request adds the ability to remap and initialize tracers and similar scalars using input and output grids that are defined in depth space or other arbitrary vertical grids, rather than assuming that we are working with thicknesses (in H units). The specific changes to enable this new capability include adding new optional arguments to
ALE_remap_scalar()
andMOM_initialize_tracer_from_Z()
, along with the new functionsset_h_neglect()
andset_dz_neglect()
in theMOM_regridding
module. This new capability is exercised for temperatures and salinities that are initialized withMOM_temp_salt_initialize_from_Z()
whenZ_INIT_REMAP_GENERAL = False
.The MOM_generic tracer code was also revised to use
thickness_to_dz()
to convert the models grid and then initialize the generic tracers from a Z-space file working entirely with the layer vertical extents (in Z-units) rather than the layer thicknesses (in H-units). Similar changes were also made toMOM_generic_tracer_column_physics()
for the vertical layer extents that are used in calls togeneric_tracer_source()
.There are no changes in answers in Boussinesq mode, but when this new capability is used in fully non-Boussinesq mode it avoids using the Boussinesq reference density and it does change answers. All answers in the existing regression test suite are bitwise identical. There are two new publicly visible functions, a new mandatory argument to
initialize_MOM_generic_tracer()
and new optional arguments to 2 other routines.The commits in this PR include: