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

+Non-Boussinesq revisions to wave_interface #432

Merged

Conversation

Hallberg-NOAA
Copy link
Member

The surface gravity waves invariably work with depths in meters to match the units of the horizontal wavenumbers, even in non-Boussinesq mode, so several of the variables that are passed to or used in the MOM_wave_interface module have been revised to use units of [Z ~> m] and not [H ~> m or kg m-2]. There are changes to the names or units of a total of 8 arguments to Stokes_PGF, Update_Stokes_Drift, Get_StokesSL_LiFoxKemper, Get_SL_Average_Prof and get_Langmuir_Number, and a new argument to StokesMixing. To accommodate these changes, there are now calls to thickness_to_dz that precede the Update_Stokes_Drift or Stokes_PGF calls and a new 3d array in step_MOM.

Additionally, four hard-coded dimensional constants in Stokes_PGF were given the needed scaling factors to pass dimensional consistency testing. This change also required the addition of a unit_scale_type argument to Stokes_PGF, and corresponding changes to the calls to this routine from step_MOM_dyn_split_RK2. Three comments pointing out probable bugs or instances of inaccurate algorithms were also added. Incorrect units were also fixed in the comments describing one internal variable in Update_Stokes_Drift.

Also added the new runtime parameter RHO_SFC_WAVES to set the surface seawater density that is used in comparison with the typical density of air set by RHO_AIR to estimate the 10-meter wind speed from the ocean friction velocity and the COARE 3.5 stress relationships inside of get_StokesSL_LiFoxKemper() when the Li and Fox-Kemper (2017) wave model (i.e. LF17) is used. As a part of this change, there is a new verticalGrid_type argument to the internal routine set_LF17_wave_params(). By default, RHO_SFC_WAVES is set to RHO_0.

Other specific changes include:

  • Changed the units of the publicly visible KvS element of the wave_parameters_CS from [Z2 T-1] to [H Z T-1]

  • Replaced the layer thickness argument (h with units of [H ~> m or kg m-2]) to Update_Stokes_Drift(), Get_SL_Average_Prof(), get_Langmuir_Number() and Stokes_PGF() with a vertical layer extent argument (dz in units of [Z ~> m])

  • Add a vertical layer extent argument (dz) to StokesMixing()

  • Add a unit_scale_type argument to Stokes_PGF()

  • Multiply a hard-coded length scale in Stokes_PGF by the correct unit scaling factor and added comments to highlight these hard-coded lengths

  • Corrected the unit description of the DecayScale internal variable

  • Changed the units of 3 internal variables and added 1 new internal variable in StokesMixing.

  • Added two new arrays to step_MOM for the layer vertical extent and friction velocity being set via thickness_to_dz and find_ustar and being passed to Update_Stokes_Drift

  • Added new arrays for the layer vertical extent and calls to thickness_to_dz in KPP_compute_BLD and energetic_PBL, as well as a new dz argument to ePBL_column to provide an altered argument to get_Langmuir_Number

  • Use find_ustar to set the friction velocity passed to Update_Stokes_Drift

  • Update fluxes%ustar or fluxes%tau_mag halos as necessary when the waves are in use

A total of 28 unit conversion factors were eliminated with these changes.

All answers are bitwise identical in Boussinesq mode, but they are changed in non-Boussinesq mode by the use of the layer specific volume to convert between thicknesses and vertical extents. The units of several arguments to publicly visible routines are altered as is a publicly visible element in wave_parameters_CS and there is a new runtime parameter that appears in some MOM_parameter_doc files.

  The surface gravity waves invariably work with depths in meters to match the
units of the horizontal wavenumbers, even in non-Boussinesq mode, so several of
the variables that are passed to or used in the MOM_wave_interface module have
been revised to use units of [Z ~> m] and not [H ~> m or kg m-2].  There are
changes to the names or units of a total of 8 arguments to Stokes_PGF,
Update_Stokes_Drift, Get_StokesSL_LiFoxKemper, Get_SL_Average_Prof and
get_Langmuir_Number, and a new argument to StokesMixing.  To accommodate these
changes, there are now calls to thickness_to_dz that precede the
Update_Stokes_Drift or Stokes_PGF calls and a new 3d array in step_MOM.

  Additionally, four hard-coded dimensional constants in Stokes_PGF were given
the needed scaling factors to pass dimensional consistency testing.  This change
also required the addition of a unit_scale_type argument to Stokes_PGF, and
corresponding changes to the calls to this routine from step_MOM_dyn_split_RK2.
Three comments pointing out probable bugs or instances of inaccurate algorithms
were also added.  Incorrect units were also fixed in the comments describing one
internal variable in Update_Stokes_Drift.

  Also added the new runtime parameter RHO_SFC_WAVES to set the surface seawater
density that is used in comparison with the typical density of air set by
RHO_AIR to estimate the 10-meter wind speed from the ocean friction velocity and
the COARE 3.5 stress relationships inside of get_StokesSL_LiFoxKemper() when the
Li and Fox-Kemper (2017) wave model (i.e. LF17) is used.  As a part of this
change, there is a new verticalGrid_type argument to the internal routine
set_LF17_wave_params().  By default, RHO_SFC_WAVES is set to RHO_0.

  Other specific changes include:

 - Changed the units of the publicly visible KvS element of the
   wave_parameters_CS from [Z2 T-1] to [H Z T-1]

 - Replaced the layer thickness argument (h with units of [H ~> m or kg m-2]) to
   Update_Stokes_Drift(), Get_SL_Average_Prof(), get_Langmuir_Number() and
   Stokes_PGF() with a vertical layer extent argument (dz in units of [Z ~> m])

 - Add a vertical layer extent argument (dz) to StokesMixing()

 - Add a unit_scale_type argument to Stokes_PGF()

 - Multiply a hard-coded length scale in Stokes_PGF by the correct unit scaling
   factor and added comments to highlight these hard-coded lengths

 - Corrected the unit description of the DecayScale internal variable

 - Changed the units of 3 internal variables and added 1 new internal variable
   in StokesMixing

 - Added two new arrays to step_MOM for the layer vertical extent and friction
   velocity being set via thickness_to_dz and find_ustar and being passed to
   Update_Stokes_Drift

 - Added new arrays for the layer vertical extent and calls to thickness_to_dz
   in KPP_compute_BLD and energetic_PBL, as well as a new dz argument to
   ePBL_column to provide an altered argument to get_Langmuir_Number

 - Use find_ustar to set the friction velocity passed to Update_Stokes_Drift

 - Update fluxes%ustar or fluxes%tau_mag halos as necessary when the waves are
   in use

  A total of 28 unit conversion factors were eliminated with these changes.

  All answers are bitwise identical in Boussinesq mode, but they are changed in
non-Boussinesq mode by the use of the layer specific volume to convert between
thicknesses and vertical extents.  The units of several arguments to publicly
visible routines are altered as is a publicly visible element in
wave_parameters_CS and there is a new runtime parameter that appears in some
MOM_parameter_doc files.
@Hallberg-NOAA Hallberg-NOAA added enhancement New feature or request answer-changing A change in results (actual or potential) Parameter change Input parameter changes (addition, removal, or description) labels Aug 3, 2023
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #432 (be61659) into dev/gfdl (45cd5c6) will decrease coverage by 0.01%.
The diff coverage is 12.82%.

❗ Current head be61659 differs from pull request most recent head 27abbfa. Consider uploading reports for the commit 27abbfa to get more accurate results

@@             Coverage Diff              @@
##           dev/gfdl     #432      +/-   ##
============================================
- Coverage     38.08%   38.07%   -0.01%     
============================================
  Files           269      269              
  Lines         76959    76977      +18     
  Branches      14206    14207       +1     
============================================
+ Hits          29307    29312       +5     
- Misses        42339    42351      +12     
- Partials       5313     5314       +1     
Files Changed Coverage Δ
src/core/MOM_dynamics_split_RK2.F90 64.81% <0.00%> (-0.19%) ⬇️
src/parameterizations/vertical/MOM_CVMix_KPP.F90 0.77% <0.00%> (-0.01%) ⬇️
src/user/MOM_wave_interface.F90 1.24% <0.00%> (-0.01%) ⬇️
src/core/MOM.F90 50.90% <23.07%> (-0.17%) ⬇️
...c/parameterizations/vertical/MOM_energetic_PBL.F90 53.51% <87.50%> (+0.23%) ⬆️

... and 1 file with indirect coverage changes

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

Copy link

@breichl breichl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look correct to me.

@marshallward
Copy link
Member

@marshallward marshallward merged commit f01d256 into NOAA-GFDL:dev/gfdl Aug 6, 2023
@Hallberg-NOAA Hallberg-NOAA deleted the nonBous_wave_interface branch September 27, 2023 16:22
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 Parameter change Input parameter changes (addition, removal, or description)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants