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

+*Use thickness_to_dz in tracer modules #423

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

Hallberg-NOAA
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA commented Jul 23, 2023

Use thickness_to_dz to convert layer thicknesses to depths in 4 tracer modules (DOME_tracer, dye_example, ideal_age_example and nw2_tracers) so that this conversion is done correctly in non-Boussineq mode, and there is no longer any dependency on the Boussinesq reference density in that mode.

This change includes the addition of a thermo_var_ptrs argument to 5 routines (initialize_DOME_tracer, initialize_dye_tracer, dye_tracer_column_physics, ideal_age_tracer_column_physics and count_BL_layers) and changes to the units of some internal variables, and the addition of 6 new 2-d or 3-d arrays with the vertical distance across layers. An unused param_file_type argument to initialize_DOME_tracer was also eliminated.

Comments were also added to describe the units of 5 of the variables in the ideal age tracer control structure and 7 internal variables in that same module, and there was some minor cleanup of the formatting cf calls in tracer_flow_control_init.

There was some minor refactoring in the ns2_tracers module to use SZK_(GV) instead of SZK_(G) to declare the vertical extent of some arrays, and the vertical indexing convention for interfaces in nw2_tracer_dist was revised from starting at 0 to start at 1 for consistency with all the other code in MOM6.

Also moved the code to do halo updates for the physical model state variables and call calc_derived_thermo before calling tracer_flow_control_init, because some routines there are now using the layer average specific volume to convert between thicknesses and heights when in non-Boussinesq mode.

All answers in Boussinesq mode are bitwise identical, but these passive tracer modules have slightly different answers in non-Boussinesq mode. There are changes to the non-optional arguments to 4 public interfaces.

  Use thickness_to_dz to convert layer thicknesses to depths in 4 tracer modules
(DOME_tracer, dye_example, ideal_age_example and nw2_tracers) so that this
conversion is done correctly in non-Boussineq mode, and there is no longer any
dependency on the Boussinesq reference density in that mode.

  This change includes the addition of a thermo_var_ptrs argument to 5 routines
(initialize_DOME_tracer, initialize_dye_tracer, dye_tracer_column_physics
ideal_age_tracer_column_physics and count_BL_layers) and changes to the units of
some internal variables, and the addition of 6 new 2-d or 3-d arrays with the
vertical distance across layers.  An unused param_file_type argument to
initialize_DOME_tracer was also eliminated.

  Comments were also added to describe the units of 5 of the variables in the
ideal age tracer control structure and 7 internal variables in that same module,
and there was some minor cleanup of the formatting cf calls in
tracer_flow_control_init.

  There was some minor refactoring in the ns2_tracers module to use SZK_(GV)
instead of SZK_(G) to declare the vertical extent of some arrays, and the
vertical indexing convention for interfaces in nw2_tracer_dist was revised from
starting at 0 to start at 1 for consistency with all the other code in MOM6.

  Also moved the code to do halo updates for the physical model state variables
and call calc_derived_thermo before calling tracer_flow_control_init, because
some routines there are now using the layer average specific volume to convert
between thicknesses and heights when in non-Boussinesq mode.

  All answers in Boussinesq mode are bitwise identical, but these passive tracer
modules have slightly different answers in non-Boussinesq mode.  There are
changes to the non-optional arguments to 4 public interfaces.
@Hallberg-NOAA Hallberg-NOAA added enhancement New feature or request answer-changing A change in results (actual or potential) labels Jul 23, 2023
@codecov
Copy link

codecov bot commented Jul 23, 2023

Codecov Report

Merging #423 (e6cecc9) into dev/gfdl (25feaf2) will decrease coverage by 0.02%.
Report is 13 commits behind head on dev/gfdl.
The diff coverage is 38.52%.

❗ Current head e6cecc9 differs from pull request most recent head 3098c8d. Consider uploading reports for the commit 3098c8d to get more accurate results

@@             Coverage Diff              @@
##           dev/gfdl     #423      +/-   ##
============================================
- Coverage     38.17%   38.15%   -0.02%     
============================================
  Files           269      269              
  Lines         76553    76773     +220     
  Branches      14076    14127      +51     
============================================
+ Hits          29226    29296      +70     
- Misses        42077    42196     +119     
- Partials       5250     5281      +31     
Files Changed Coverage Δ
config_src/external/drifters/MOM_particles.F90 0.00% <0.00%> (ø)
src/ALE/MOM_regridding.F90 28.92% <ø> (ø)
src/parameterizations/lateral/MOM_MEKE.F90 43.21% <0.00%> (ø)
...meterizations/vertical/MOM_internal_tide_input.F90 0.00% <0.00%> (ø)
...c/parameterizations/vertical/MOM_set_viscosity.F90 60.91% <0.00%> (-0.07%) ⬇️
src/tracer/dye_example.F90 0.00% <0.00%> (ø)
src/tracer/nw2_tracers.F90 0.00% <0.00%> (ø)
src/diagnostics/MOM_sum_output.F90 64.27% <5.88%> (-0.57%) ⬇️
src/core/MOM.F90 50.97% <12.50%> (-0.13%) ⬇️
src/diagnostics/MOM_wave_speed.F90 37.51% <18.18%> (+0.17%) ⬆️
... and 18 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@marshallward marshallward self-requested a review July 24, 2023 15:44
@marshallward marshallward self-assigned this Jul 24, 2023
@marshallward marshallward removed their request for review July 24, 2023 15:48
@marshallward
Copy link
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/20051 ✔️ 🟡

@marshallward marshallward merged commit fffb6f3 into NOAA-GFDL:dev/gfdl Jul 27, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answer-changing A change in results (actual or potential) enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants