Add an option to calculate bottom pressure from initialization for SAL#914
Conversation
|
I have examined the code revisions, and they look correct to me (apart from one spelling error where "initialization" is spelled as "initialiaztion" on line 239 of MOM_self_attr_load.F90), but obviously we have a problem with the TC testing giving a series of errors. My suggestion is to fix this spelling error and see whether the TC testing errors go away on their own. If they do not, we will need to figure out why the TC testing is not working. |
|
Thanks for reviewing the PR @Hallberg-NOAA . What puzzles me is that all the Mac tests passed. And also, all TC tests that I ran on Gaea C6 passed as well. For what it worths, I retriggered the TC tests (by closing and re-opening the PR) earlier, but got the same results. I wonder if it is related to the halo of
Modifying |
@herrwang0 The MacOS tests are passing because we disabled floating point exceptions some time ago, due to an error in the HDF5 library (which I believe has since been fixed). If those were re-enabled, then I believe MacOS would also fail. When you run this manually, the default flags are very simple and do not enable floating point exceptions. This something we turn on for GitHub Actions. If you add (If using Intel, then I believe the flag is |
6d38637 to
2286168
Compare
|
The bug is now identified and fixed thanks to the help from @marshallward . |
A new subroutine is added in MOM_interface_heights to calculate mass per unit area [R Z ~> kg m-2] and bottom pressure [R L2 T-2 ~> Pa]. The subroutine packages the original code for the diagnostics of these two quantities in MOM_diagnostics and will be used for self-attraction and loading.
A new option is added to calculate reference bottom pressure from the initial state of the model run, based on tihckness, temperature and salinity. * The `init` option is only allowed for new runs. When the option is used. A netCDF file, `INPUTDIR/REF_PBOT_FILE`, is written to store the variable `REF_PBOT_VARNAME`, which can be used for restart runs. * For restart runs, only `file` option is allowed. If `init` is specified, a warning message is given and `SAL_REF_PBOT_CONFIG` is changed into `file`. * The check for restart runs does not work for unsplit mode, as restart control structure is not accessible to unsplit dyncores. This will be fixed later * Note that any initial surface pressure from the atmosphere and ice is not accounted for with this option.
2286168 to
efe0e28
Compare
Hallberg-NOAA
left a comment
There was a problem hiding this comment.
With the revisions to correct the bug that was showing up in TC testing, this PR is now looking to me like it is ready to be merged in.
|
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/28092 with the expected warnings about updated parameter descriptions in some MOM_parameter_doc files. |
As of now, self-attraction and loading (SAL) needs an external file for reference bottom pressure. This PR adds a second option to calculate the reference bottom pressure based on the initial ocean state.
A new subroutine
find_col_massis added inMOM_interface_heights. The subroutine packs the code for calculating diagnosticscol_massandpbo.A new runtime parameter
SAL_REF_PBOT_CONFIGis added with two available options:fileandinit.fileoption reads variableREF_PBOT_VARNAMEfrom fileREF_PBOT_FILE.initoption calculates bottom pressure using subroutinefind_col_mass. When this option is used, the calculated bottom pressure is saved as variableREF_PBOT_VARNAMEin fileREF_PBOT_FILE, which can be used for restart runs.initoption is reserved only for new runs. Ifinitoption is used by a restart run, a warning is issued, thefileoption is instead logged, and the model will look for fileREF_PBOT_FILE. The consideration here is to avoid changing parameters for a run done in segments.There are two commits in this PR:
418438c: A new subroutine
find_col_massis added in MOM_interface_heights, which is used forcol_massandpbodiagnostics.380f1b0: Added an
initoption to calculate reference bottom pressure for SAL.