forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MASS_WEIGHT_IN_PGF_VANISHED_ONLY to modify mass weighting in PGF (#…
…810) * Add MASS_WEIGHT_IN_PGF_VANISHED_ONLY to modify mass weighting This commit introduces the runtime variable `MASS_WEIGHT_IN_PGF_VANISHED_ONLY` which has default False. If true, then the `MASS_WEIGHT_IN_PRESSURE_GRADIENT` and `MASS_WEIGHT_IN_PRESSURE_GRADIENT_TOP` effect of weighting T/S integrals in slanted grid cell FV PGF calculation is turned off if both sides of the grid cell are nonvanished, where nonvanished means thickness greater than `RESET_INTXPA_H_NONVANISHED` which defaults to 1e-6 m. Since the benefit of `MASS_WEIGHT_IN_PRESSURE_GRADIENT` happens in vanished layers (creating a fake PGF away from vanished layer, which is arrested by upwinded viscosity) the benefit is still there, but now we can use `MASS_WEIGHT_IN_PRESSURE_GRADIENT` for coordinates that also have slanted layers in the open ocean that are not vanished, e.g. sigma coordinates or SIGMA_SHELF_ZSTAR coordinates in the ice shelf where we DO trust T and S values. Additionally, this is required near a grounding line in a 3D z-coord ice shelf as some strange looking slanted non-vanished cells can emerge, and MWIPG being on would create fake PGFs in non-vanished cells (and therefore generating spurious currents). Reccommend `MASS_WEIGHT_IN_PGF_VANISHED_ONLY` to be set to True, as well as `MASS_WEIGHT_IN_PRESSURE_GRADIENT` and `MASS_WEIGHT_IN_PRESSURE_GRADIENT_TOP` if you have vanishing layers with min thickness < 0.1m. Also modifies MassWt_u and MassWt_v diagnostics to reflect usage of MASS_WEIGHT_IN_PRESSURE_GRADIENT. This commit should not change answers since it defaults to False. However, my implementation is not very efficient and should probably be optimised. * Minor style updates to previous commit of Add MASS_WEIGHT_IN_PGF_VANISHED_ONLY to modify mass weighting * Address comments from Bob by adding scaling to dimensional numbers, replacing Boussinesq rho in nonBoussinesq code, and removing white space to follow 2-space indenting.
- Loading branch information
1 parent
d5fd567
commit 84a7bc0
Showing
2 changed files
with
211 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.