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

+Rescale SST and SSS as seen at the driver level #172

Merged

Conversation

Hallberg-NOAA
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA commented Jul 20, 2022

This PR consists of a sequence of commits that add dimensional rescaling for
temperature and salinity and related variables that are visible at the driver
level, most prominently including the SST and SSS fields in the surface type.
Appropriate dimensional rescaling is also applied to the Stokes drifts and
Stokes-band wavenumbers in the mech_forcing type. These changes include a
correction to the documented units of one diagnostic variable, so there are some
small changes to the contents of the available_diags files. All answers are
bitwise identical.

The commits in this PR include:

  • cc999f5c8 +Rescaled the Stokes drift velocity variables
  • bba7a42de Use cons_temp_to_pot_temp to call gsw_pt_from_ct
  • 51a134e9d +Rescale sfc_state%SST and sfc_state%SSS
  • 4f4813373 +Rescale fluxes%C_p
  • af61a1e56 +Rescale 2 elements of the surface type
  • 07b52082e Use MOM6 framework modules in mct & nuopc drivers

@codecov
Copy link

codecov bot commented Jul 20, 2022

Codecov Report

Merging #172 (cca9b66) into dev/gfdl (6835709) will decrease coverage by 0.00%.
The diff coverage is 18.00%.

❗ Current head cca9b66 differs from pull request most recent head 0d7b50a. Consider uploading reports for the commit 0d7b50a to get more accurate results

@@             Coverage Diff              @@
##           dev/gfdl     #172      +/-   ##
============================================
- Coverage     37.40%   37.40%   -0.01%     
============================================
  Files           259      259              
  Lines         71840    71848       +8     
  Branches      13442    13443       +1     
============================================
+ Hits          26871    26873       +2     
- Misses        40025    40031       +6     
  Partials       4944     4944              
Impacted Files Coverage Δ
...g_src/drivers/solo_driver/MESO_surface_forcing.F90 0.00% <0.00%> (ø)
...g_src/drivers/solo_driver/user_surface_forcing.F90 0.00% <ø> (ø)
src/core/MOM_forcing_type.F90 42.17% <0.00%> (ø)
src/core/MOM_variables.F90 46.96% <ø> (ø)
src/diagnostics/MOM_sum_output.F90 65.01% <0.00%> (ø)
src/ice_shelf/MOM_ice_shelf.F90 0.00% <0.00%> (ø)
src/tracer/MOM_CFC_cap.F90 17.93% <0.00%> (ø)
src/tracer/MOM_OCMIP2_CFC.F90 0.00% <0.00%> (ø)
src/tracer/MOM_generic_tracer.F90 0.00% <0.00%> (ø)
src/user/BFB_surface_forcing.F90 0.00% <0.00%> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

  Modified the coupler_types, data_override and time_interp modules used in the
mct_cap and nuopc_cap driver code to use the appropriate modules from the MOM6
framework directory, which are properly documented and extensible, and will
accommodate and buffer changes in the underlying FMS or other infrastructure
code.  These changes should have been in place previously, but are required to
allow for rescaling of the fields being read via time_interp_external or
data_override.    Some unused module use references to mpp_chksum from mpp_mod
were also removed.  These changes mirror changes that had previously been
applied to the FMS_cap driver code.  All answers should be bitwise identical,
but this has not been specifically tested via the GFDL testing procedures.
  Applied dimensional rescaling of the ocean_heat and ocean_salt elements of the
surface type.  Although this surface_state is a public type, neither of these
particular elements are used outside of MOM6 and these fields are not reused
after they are set.  They are instead being retained because they may become
useful in the future.  All answers are bitwise identical.
  Applied temperature rescaling to the heat capacity element, C_p, of the
forcing type.  All answers are bitwise identical, but the rescaled units of
one element of a public type were altered.
  Rescaled the SST and SSS element of the surface type, usually sfc_state%SST
and sfc_state%SSS, from units of [degC] and [ppt] to [degC ~> C] and [ppt ~> S],
as well as a handful of other temperature and salinity variables related to the
surface forcing (usually targets of restoring), and cancelled out a number of
common US%C_to_degC or US%S_to_ppt conversion factors.  Several unused variables
were also removed, and a missing allocate and restart registration were added
for the running-mean salinity in the (as yet unused) MOM_controlled_forcing
module.  All answers are bitwise identical, but there are changes to the
rescaled units of two elements of a public type.
  Use cons_temp_to_pot_temp and abs_saln_to_prac_saln to do the conversions for
several diagnostics, working with rescaled variables on array segments, rather
than calling gsw_pt_from_ct and gsw_sp_from_sr once from each point.  All
answers are bitwise identical.
  Dimensionally rescaled the Stokes drift velocity variables in the mech_forcing
type from [m s-1] to [L T-1 ~> m s-1], and the surface wave wavenumber variable
from [rad m-1] to [rad Z-1 ~> rad m-1], eliminating several scaling factors from
the code in the process, and attaching a scaling factor to a hard-coded
dimensional velocity.  All answers in the MOM6-examples test suite are bitwise
identical.
@Hallberg-NOAA Hallberg-NOAA force-pushed the rescale_TS_in_drivers branch from 5de841f to cc999f5 Compare July 21, 2022 21:29
@Hallberg-NOAA
Copy link
Member Author

The force-push done to this PR was to re-order the commits, so that the code after each of the commits in this PR should compile correctly and pass all tests.

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit 2d574b6 into NOAA-GFDL:dev/gfdl Aug 3, 2022
@Hallberg-NOAA Hallberg-NOAA deleted the rescale_TS_in_drivers branch February 2, 2023 14:15
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