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

*+Add forcing%tau_mag_gustless & tau_mag opt args #445

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

Hallberg-NOAA
Copy link
Member

Added the new tau_mag_gustless element to the forcing type, and set this array in set_derived_forcing_fields if it is associated. Also added new tau_mag optional arguments to the public routines allocate_forcing_by_group() and allocate_mech_forcing_by_group(), with similar mandatory arguments added to the private subroutines get_forcing_groups() and get_mech_forcing_groups(). Tests for an associated pointer were added before all calls setting the ustar, tau_mag or ustar_gustless arrays, preparing for these ustar pointers only to be set when the model is run in Boussinesq mode when the ustar actually make sense.

Also use specific volume derivatives to calculate non-Boussinesq mode buoyancy fluxes in calculateBuoyancy_Flux1d, leaving the Boussinesq buoyancy flux calculations unchanged.

All answers are bitwise identical in Boussinesq mode, but there is a new element in a transparent type and new optional arguments publicly visible subroutines, and answers will change in non-Boussinesq cases that depend on the surface buoyancyFlux that is returned by calculateBuoyancy_Flux1d.

@Hallberg-NOAA Hallberg-NOAA added enhancement New feature or request answer-changing A change in results (actual or potential) labels Aug 6, 2023
@codecov
Copy link

codecov bot commented Aug 6, 2023

Codecov Report

Merging #445 (52677d2) into dev/gfdl (3ce1368) will decrease coverage by 0.02%.
The diff coverage is 5.71%.

❗ Current head 52677d2 differs from pull request most recent head 283a4a2. Consider uploading reports for the commit 283a4a2 to get more accurate results

@@             Coverage Diff              @@
##           dev/gfdl     #445      +/-   ##
============================================
- Coverage     38.06%   38.04%   -0.02%     
============================================
  Files           269      269              
  Lines         77133    77175      +42     
  Branches      14233    14254      +21     
============================================
+ Hits          29358    29361       +3     
- Misses        42456    42493      +37     
- Partials       5319     5321       +2     
Files Changed Coverage Δ
src/core/MOM_forcing_type.F90 40.44% <5.71%> (-0.94%) ⬇️

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

  Added the new tau_mag_gustless element to the forcing type, and set this array
in set_derived_forcing_fields if it is associated.  Also added new tau_mag
optional arguments to the public routines allocate_forcing_by_group() and
allocate_mech_forcing_by_group(), with similar mandatory arguments added to the
private subroutines get_forcing_groups() and get_mech_forcing_groups().  Tests
for an associated pointer were added before all calls setting the ustar, tau_mag
or ustar_gustless arrays, preparing for these ustar pointers only to be set when
the model is run in Boussinesq mode when the ustar actually make sense.

  Also use specific volume derivatives to calculate non-Boussinesq mode buoyancy
fluxes in calculateBuoyancy_Flux1d, leaving the Boussinesq buoyancy flux
calculations unchanged.

  All answers are bitwise identical in Boussinesq mode, but there is a new
element in a transparent type and new optional arguments publicly visible
subroutines, and answers will change in non-Boussinesq cases that depend on the
surface buoyancyFlux that is returned by calculateBuoyancy_Flux1d.
Copy link
Member

@marshallward marshallward 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 all look good

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit c4ff021 into NOAA-GFDL:dev/gfdl Aug 11, 2023
10 checks passed
marshallward pushed a commit that referenced this pull request Aug 13, 2023
  Added the name to the do_taumag argument in a call to allocate_forcing_type
in allocate_forcing_by_ref to account for the fact that there are unused
wave-related optional arguments in this interface.  When this was omitted in
the current code, the wrong arrays are being allocated during rotation tests
with resultant segmentation faults in those tests.  This commit corrects a bug
that was recently added with MOM6 dev/gfdl PR #445.
@Hallberg-NOAA Hallberg-NOAA deleted the tau_mag_gustless branch September 27, 2023 16:11
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