Skip to content

adds frazil (both the teos and basic options) - #466

Open
alicebarthel wants to merge 15 commits into
E3SM-Project:developfrom
alicebarthel:omega/add-frazil-basic-rebased
Open

adds frazil (both the teos and basic options)#466
alicebarthel wants to merge 15 commits into
E3SM-Project:developfrom
alicebarthel:omega/add-frazil-basic-rebased

Conversation

@alicebarthel

@alicebarthel alicebarthel commented Jul 10, 2026

Copy link
Copy Markdown

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 :

  • basicFrazil mirrors the mpas-o implementation logic into omega (non BFB due to eos and fundamental equation differences, it is a mass-based cousin of the mpas-o implementation);
  • it runs on pm-cpu and pm-gpu so 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:

  • it is non-conservative in energy by construction so would not recommend this for production runs. I manually changed the conservationCheck to be logging not failing to understand the behavior, but we probably want to switch it back for production runs with teos frazil that we know should be conservative.
  • by default it uses a constant salinity of IceRefSal and is conservative in salt (and mass). There is a manual option to use porosity rather than constant IceRefSal. 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:

  • we could easily make an intermediate version of frazil that uses constant latent heat yet tracks the thermodynamics more closely (e.g. tier 1: remove the enthalpy of melted equivalent in formation --> conservative. Tier 2: account for brine liquid mass and energy based on porosity). If the full teos frazil version is too expensive, we could consider this.
  • @njeffery is developing a better mpaso frazil so we could update the omega basicFrazil to mirror it later.
  • note: the "low salinity" check that was in mpaso has not been implemented here. A low salinity check will be implemented in the sea ice.

To do:

  • turn off frazil tendencies by default to allow a comparison with baseline. Polaris tests with constant or linear eos need frazil turned off since frazil will fail without the teos eos.
  • the conservationCheck currently uses LOG_INFO to allow testing on gpus (uses basic, thus non conservative). For production runs with teos frazil (when ready), conservationCheck should be changed back to LOG_ERROR to fail if non-conservative.

Checklist

  • Documentation:
  • Linting
  • Building
    • CMake build does not produce any new warnings from changes in this PR
  • Testing
    • CTest unit tests (for basic option only) pass on pm-cpu and pm-gpu.
    • New tests:
      • CTest unit tests: added unit testing for basicFormation.
      • Polaris tests: TBD in single column.

Comment on lines +378 to +382
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;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@andrewdnolan Let's chat about these terms so that we agree on the definitions and conversions for the SfcCoupling class.

Comment on lines +489 to +494
// 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;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@andrewdnolan Let's chat about these terms so that we agree on the definitions and conversions for the SfcCoupling class.

@alicebarthel
alicebarthel requested a review from katsmith133 July 13, 2026 15:38
@alicebarthel
alicebarthel force-pushed the omega/add-frazil-basic-rebased branch from 9803a1e to fe027da Compare July 13, 2026 16:42
@alicebarthel

alicebarthel commented Jul 14, 2026

Copy link
Copy Markdown
Author

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.
I did a rebase onto the current develop on a different branch (else omega_pr failed) and have a job in the queue to test that (55877874).

@alicebarthel
alicebarthel marked this pull request as ready for review July 14, 2026 00:42
@alicebarthel alicebarthel changed the title adds an mpaso-like frazil option adds frazil (both the teos and basic options) Jul 14, 2026
@cbegeman

Copy link
Copy Markdown

@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?

@alicebarthel
alicebarthel force-pushed the omega/add-frazil-basic-rebased branch from fe027da to 6bd16c7 Compare July 14, 2026 17:01
@alicebarthel
alicebarthel force-pushed the omega/add-frazil-basic-rebased branch from 6bd16c7 to c284dac Compare July 14, 2026 17:04
@alicebarthel

Copy link
Copy Markdown
Author

@cbegeman rebased on develop

VelocityVertAdvTendencyEnable: true
TracerVertAdvTendencyEnable: true
PressureGradTendencyEnable: true
FrazilTendencyEnable: true

@alicebarthel alicebarthel Jul 14, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Suggested change
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks, @alicebarthel !

@andrewdnolan andrewdnolan mentioned this pull request Jul 22, 2026
13 tasks
@katsmith133 katsmith133 mentioned this pull request Aug 10, 2026
24 tasks
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