adds frazil (both the teos and basic options) - #466
Conversation
| LocAccMIce(ICell) = LocAccMIce(ICell) * RhoSw; | ||
| LocAccMLiq(ICell) = LocAccMLiq(ICell) * RhoSw; | ||
| LocAccMSalt(ICell) = LocAccMSalt(ICell) * RhoSw * PPt2Salt; | ||
| LocAccELiq(ICell) = LocAccELiq(ICell) * RhoSw; | ||
| LocAccEIce(ICell) = LocAccEIce(ICell) * RhoSw; |
There was a problem hiding this comment.
@andrewdnolan Let's chat about these terms so that we agree on the definitions and conversions for the SfcCoupling class.
| // Convert to coupler units | ||
| LocAccMIce(ICell) = LocAccMIce(ICell) * RhoSw; | ||
| LocAccMLiq(ICell) = LocAccMLiq(ICell) * RhoSw; | ||
| LocAccMSalt(ICell) = LocAccMSalt(ICell) * RhoSw * PPt2Salt; | ||
| LocAccELiq(ICell) = LocAccELiq(ICell) * RhoSw; | ||
| LocAccEIce(ICell) = LocAccEIce(ICell) * RhoSw; |
There was a problem hiding this comment.
@andrewdnolan Let's chat about these terms so that we agree on the definitions and conversions for the SfcCoupling class.
9803a1e to
fe027da
Compare
|
One key test is to run is the omega_pr with frazil tendencies turned off. This will give us confidence that we can merge this and leave frazil off if we have any concerns. |
|
@alicebarthel It's my understanding that we could start testing this in single column configurations. Github is reporting some conflicts. Is it doable to rebase this onto develop? |
fe027da to
6bd16c7
Compare
incl flux hijack and surface salt redistribution (manual toggle)
6bd16c7 to
c284dac
Compare
|
@cbegeman rebased on |
| VelocityVertAdvTendencyEnable: true | ||
| TracerVertAdvTendencyEnable: true | ||
| PressureGradTendencyEnable: true | ||
| FrazilTendencyEnable: true |
There was a problem hiding this comment.
| FrazilTendencyEnable: true | |
| FrazilTendencyEnable: false |
This needs to be off by default else the omega_pr tests will fail against baseline, and any test using constant/linear eos and frazil will fail. FYI @katsmith133 @cbegeman
This PR adds the basic and teos frazil option (latter documented in #462).
General implementation (documented in the docs):
The Frazil class calculates the frazil in a vertical column. We calculate the (cell, layer) tendencies and accumulate frazil fields that are necessary for frazil calculation in the layers above. The tendency class then simply calls frazil (if tendencies are turned on) and uses the tendencies. The column-integrated frazil fields (mass, energy, salt) will be passed to the coupler explicitly.
Teos frazil:
The frazil is thermodynamically consistent with the teos-10 ocean in omega. For now it relies on gsw submodules (cpu only) but will be updated once Eos features are added.
For conservation, we keep track of pure (fresh) ice mass, brine water mass, and brine salt mass separately within the ocean to allow melt to be energetically-consistent. It is fully conservative by construction.
Basic frazil :
pm-cpuandpm-gpuso could be an option while we wait for the eos port that will enable the teos frazil option to run on gpus.Caveats about the physics of basic frazil:
IceRefSaland is conservative in salt (and mass). There is a manual option to use porosity rather than constantIceRefSal. The simple ctest shows that this is very non-conservative in salt (order of magnitude difference!). The redistribution of the excess salt in the top layer reconciles this but is likely a strong surface forcing. I don't recommend this as a good approach either but we could later quantify this in single-column tests with more realistic conditions.Scope and future work:
To do:
LOG_INFOto allow testing on gpus (uses basic, thus non conservative). For production runs with teos frazil (when ready), conservationCheck should be changed back toLOG_ERRORto fail if non-conservative.Checklist
basicoption only) pass onpm-cpuandpm-gpu.