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

User/bgr/fix buoy flux merged #548

Merged
merged 6 commits into from
Jul 7, 2017

Conversation

breichl
Copy link
Collaborator

@breichl breichl commented Jul 6, 2017

Expands on commit #544 as motivated by #543

  • In MOM_forcing_type.F90:

    • Adds optional calculation/output of 'rate' terms needed to compute buoyancy flux (needed to reproduce result of call w/ dt=1).
    • Intentionally neglects heat contribution in useRiverHeatContent and useCalvingHeatContent independent of the values in the code (commented code is included to clarify when/where).
  • In MOM_diabatic_aux.F90:

    • Adds optional output "SkinBuoyFlux" to applyboundaryfluxesinout to compute surface buoyancy flux for ePBL.
    • Adds calculation of "SkinBuoyFlux" based on logical triggered by presence of optional output. This calculation is added after boundary fluxes are applied because of the order that CalculateBuoyancyFlux2d was called in previous version of code (by MOM_diabatic_driver after applyboundaryfluxesinout).
  • In MOM_diabatic_driver.F90:

    • Add Request of output of SkinBuoyFlux to applyboundaryfluxesinout call.
    • Removes call to "CalculateBuoyancyFlux2d" from ePBL if-block.
    • Removes dependency of initialization of KPP buoyancy terms for ePBL flag.

@StephenGriffies has confirmed these changes correct the issue reported as NOAA-GFDL/MOM6-examples#128 (hdfs diagnostic broken).

This commit does not change answers, but similar to #544, this is not a permanent fix as the code could be simplified to remove '_rate' terms (will introduce round-off answer changes) and a more permanent solution for useRiverHeatContent and useCalvingHeatContent. These points are described within code comments.

- Previously applyboundaryfluxesinout and extractbuoyancyflux2d both called extractfluxes1d.  The second call was to get the surface buoyancy flux for ePBL and ignored calving/river contributions to the heat flux.  This caused a diagnostic of the net heat flux to incorrectly also ignore these terms, corrupting this diagnostic.
- This fix adds optional output of surface buoyancy flux to applyboundaryfluxesinout, therefore, no additional subroutine calls needed to get surface buoyancy flux for ePBL.
- To avoid any change of answers this step required adding '_rate' outputs of netheat, netsalt, netmassinout, and pen_sw to extractfluxes1d.  The net_heat_rate ignores calving and river contributions because the previous version ignored these terms.  By adding the '_rate' outputs (w/ dt=1) we can preserve the old answers completely (avoiding a roundoff error), though this is less important of a point than ignoring the calving/river contributions to the heat flux.
- A lengthy comment is added to diabatic_aux to detail the change and describe potential for simplifying (which would change answers).  In principle all the '_rate' terms that are added here can be eliminated without compromising the mathematics, but we must confirm if we wish to include the calving/river contributions in the buoyancy flux used by ePBL.  Otherwise, a second net_heat term is needed that is hard-coded to ignore calving/river contributions when computing the buoyancy flux used by ePBL.
- Fixed conflicts in MOM_forcing_type.F90 and MOM_diabatic_driver.F90
- Cleaned up comments
Copy link
Collaborator

@adcroft adcroft left a comment

Choose a reason for hiding this comment

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

@adcroft adcroft merged commit ea1a338 into mom-ocean:dev/gfdl Jul 7, 2017
nikizadehgfdl pushed a commit to nikizadehgfdl/MOM6 that referenced this pull request Oct 9, 2017
- Round-off changes due to symmetry-dix in bracketing.
- Changes answers for many experiments.

- NOAA-GFDL/MOM@cec7499 Merge branch 'nicjhan-531-transform-bracketing-fix' into dev/gfdl
- NOAA-GFDL/MOM@e2cdbb3 Merge branch '531-transform-bracketing-fix' of https://github.com/nicjhan/MOM6 into nicjhan-531-transform-bracketing-fix
- NOAA-GFDL/MOM@c8d3ac0 Merge pull request mom-ocean#549 from Hallberg-NOAA/dev/gfdl
- NOAA-GFDL/MOM@e344fb9 Merge branch 'dev/gfdl' of github.com:NOAA-GFDL/MOM6 into dev/gfdl
- NOAA-GFDL/MOM@ea1a338 Merge pull request mom-ocean#548 from breichl/user/bgr/Fix_BuoyFlux_merged
- NOAA-GFDL/MOM@0f5a5ed (*)close_param_file always closes the input files
- NOAA-GFDL/MOM@da325d6 Merge pull request mom-ocean#547 from CarolineCardinale/dev/gfdl
- NOAA-GFDL/MOM@7756722 Merge pull request mom-ocean#546 from Hallberg-NOAA/dev/gfdl
- NOAA-GFDL/MOM@8a5704d Add missing comment to MOM_forcing_type.F90
- NOAA-GFDL/MOM@1bdfa54 Merge branch 'dev/gfdl' into user/bgr/Fix_BuoyFlux_merged
- NOAA-GFDL/MOM@94c1735 Added Doxygen Comments
- NOAA-GFDL/MOM@0357baa (*)Convert GV%Angstrom to units of H
- NOAA-GFDL/MOM@c0e00a4 Added chksum calls for h_u and h_v in btcalc
- NOAA-GFDL/MOM@d4999e3 Corrected the chksum scaling for pbce
- NOAA-GFDL/MOM@3d1d9c0 Merge branch 'user/bgr/BuoyFluxFix' into user/bgr/Fix_BuoyFlux_merged
- NOAA-GFDL/MOM@eaefd55 Remove apostrophe from comments in MOM_forcing_type.F90
- NOAA-GFDL/MOM@7c0b9a2 Adding code changes that are part of previous commit.
- NOAA-GFDL/MOM@9bd84c2 Code fix to remove 2nd call to extractfluxes1d when using ePBL.
- NOAA-GFDL/MOM@10e5fc2 Bracketing fix for transform test. Changes answers.
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