Skip to content

Conversation

@claireyung
Copy link
Collaborator

@claireyung claireyung commented Jan 12, 2026

do not merge
Belatedly, here is a cleaned-up version of ice-shelf-dev branch with better commits and without all my attempts at debugging NUOPC, also incorporating other ACCESS-NRI changes since we made the branch last July. Draft PR, not intended for merging, just for seeing what changes were made.

Some of these commits may be useful for contribution to the mom-ocean consortium. See below list of explanations and commits for more details.

  • fb92898 and 7288298 - allow ice shelves to be initialised with NUOPC. Probably useful for other NUOPC MOM6 nodes, note currently I set something public so it can be accessed in a different file which is not ideal so probably needs some work.
  • 5f1297e - hardcoded name changes to allow ice shelf config to be restarted when using NUOPC. Potentially useful for other nodes but not in this form (see conversation about the rpointer not working here mom nuopc cap changes required for running with ice shelves #29)
  • 595cb35 and f342772 - updates documentation of tidal amplitude to make clear the parameters also affect melt parameterisation and not just internal tide dissipation, and introduces a new parameter to allow the tidal amplitude to be scaled before going in melt parameterisation (issue discussed here spin-up of ice shelf melt rate - config and IC choices claireyung/mom6-panAn-iceshelf-tools#42). Would be nice to contribute this to MOM6 consortium
  • 9325f20 and 1797e4e - recent GFDL bug fixes that I cherry-picked to ice-shelf-dev. Already being contributed by GFDL
  • 1935ac5 - allows frazil to be turned off under ice shelves. Unsure if broadly useful to others since leads to supercooled water, but does allow for refreezing of ice shelves.
  • 151c5a3 - adds ability to override melt with data fluxes. Using this for my PhD project, probably not useful to others.

Separately, mom-ocean@f6ab4fd i(i/j indexing bug with HMIX_UV_SFC_PROP) is already in the ACCESS-NRI/MOM6 2025.07 branch, but this should also be contributed back to MOM6 consortium.

NOTE: I have checked that it compiles using spack develop, but I have not yet tested these on an ice shelf config and still need to do this. Presumably simulations will not be reproducible with the ice shelf dev branch exe.

@dougiesquire
Copy link
Collaborator

Thanks @claireyung. Do you mind if we change the base branch for this PR to 2026.01? As of today, that is now the default branch

@claireyung
Copy link
Collaborator Author

Go for it, sorry I should have waited til today then....

@dougiesquire
Copy link
Collaborator

Go for it, sorry I should have waited til today then....

Oh, not your fault! We didn't know yesterday that we'd be changing the default branch.

@dougiesquire dougiesquire changed the base branch from 2025.07 to 2026.01 January 13, 2026 05:15
claireyung and others added 9 commits January 13, 2026 16:58
- turn FATAL error when ESMF mask and MOM6 mask differ intol WARNING, so that we can set up a MOM6 domain including ice shelves but avoid ESMF and the mediator transferrring atmospheric data into the ice shelves
- use ocean_state%fluxes%frac_shelf_h when computing the So_omask for the mediator from MOM6 data, so that the coupler does not get sent fields in regions it does not expect. A ceiling is used for frac_shelf_h (fraction of ice shelf values) - partial ice shelf coverage may need to be better thought out.
- for above to work, the ocean_state_type is made public.
- Also initialise ice shelf fluxes and forces separately. Otherwise, shelf_sfc_mass_flux field is initialised which should only be used with dynamic ice shelf (and results in crash when it can't find the file if you're running from a restart.)
See also ACCESS-NRI#29

Hardcode ice shelf restart to be in 'RESTART/' in nuopc cap. Also hardcodes the name of the ice shelf restart Shelf.res.nc in initialize_ice_shelf.
This parameter scales the friction velocity computed due to prescribed tides
either through UTIDE = constant value or through TIDEAMP = True and associated
TIDEAMP_FILE. Jourdain et al. 2019 suggest a value of 0.66 to estimate tidal ice shelf
boundary layer velocity from total barotropic tide amplitude. Default is set to 1 so
should not change answers
Parameters READ_TIDEAMP and UTIDE not only affect INT_TIDE_DISSIPATION but also ice shelf melt rates
via the ice shelf basal melt rate friction velocity calculation. In this commit the effect on
ice shelves is added to the description of the parameters to make this clearer.
Fix the 3-equation iteration for the buoyancy flux between the ocean and an
overlying ice-shelf when ICE_SHELF_BUOYANCY_FLUX_ITT_BUGFIX is true and
SHELF_3EQ_GAMMA it false.  This code now uses proper bounding of the
self-consistent solution, avoiding further amplifying the fluxes in the cases
when the differences between the diffusivities of heat and salt to make the
buoyancy flux destabilizing for finite turbulent mixing.  Both the
false-position iterations and the (appropriately chosen) Newton's method
iterations have been extensively examined and determined to be working correctly
via print statements that have subsequently been removed for efficiency.

  Previously, the code to determine the 3-equation solution for the buoyancy
flux between the ocean and an ice shelf had been skipping iteration altogether
or doing un-bounded Newton's method iterations with a sign error in part of the
derivative, including taking the square root of negative numbers, leading to the
issue described at NOAA-GFDL#945.  That issue has
now been corrected and can be closed once this commit has been merged into
the dev/gfdl branch of MOM6.

  This commit also changes the names of the runtime parameters to correct the
ice shelf flux iteration bugs from ICE_SHELF_BUOYANCY_FLUX_ITT_BUG and
ICE_SHELF_SALT_FLUX_ITT_BUG to ICE_SHELF_BUOYANCY_FLUX_ITT_BUGFIX and
ICE_SHELF_SALT_FLUX_ITT_BUGFIX to avoid confusion with other ..._BUG parameters
where `true` is to turn the bugs on, whereas here `true` fixes them.  The old
names are retained via `old_name` arguments to the `get_param()` calls, so no
existing configurations will be disrupted by these changes.

  Additionally, an expression to determine a scaling factor to limit ice-shelf
bottom slopes in `calc_shelf_driving_stress()` was refactored to avoid the
possibility of division by zero.

  This commit will change (and correct) answers for cases with
ICE_SHELF_BUOYANCY_FLUX_ITT_BUGFIX set to true, but as these would often fail
with a NaN from taking the square root of a negative value, it is very unlikely
that any such configurations are actively being used, and there seems little
point in retaining the previous answers.  No answers are changed in cases that
do not use an active ice shelf.

Co-authored-by: Alistair Adcroft <adcroft@users.noreply.github.com>
* Fix for ice-shelf friction velocity bugs

Fixed an incorrect area used to calculate cell-centered ocean surface velocity under the ice_shelf, which can impact the calculation of ice-shelf friction velocity. Added missing flags to some allocate_surface_state calls so that sfc_state%taux_shelf and sfc_state%tauy_shelf are allocated. This is required for the surface-stress-based (rather than surface-velocity-based) calculation of ice-shelf friction velocity. Also added taux_shelf and tauy_shelf as diagnostics for the surface stress under the ice shelf.

* Removed unneeded taux_shelf and tauy_shelf diagnostics

* Added ustar_from_vel_bugfix flag, which if true, fixes the ustar from ocean velocity bug
…er ice shelves

If True, frazil scheme is not applied where frac_shelf_h > 0. If False, frazil calculated everywhere as usual if FRAZIL = True. Defaults to False so shouldn't change answers.
This commit modifies the nuopc cap and ice shelf code to add an option to
override the prognostically calculated ice shelf basal melt with an input
file, defined in data_table, using the data override functionality. To
use this, set DATA_OVERRIDE_MELT = True. If False, should not change answers.
@dougiesquire dougiesquire force-pushed the access-nri/2025.07-12jan26+iceshelfchanges branch from 31b8c75 to 151c5a3 Compare January 13, 2026 05:59
@dougiesquire
Copy link
Collaborator

Sorry, by doing this I changed all the commit hashes, so your description no longer references commits on this branch

@claireyung
Copy link
Collaborator Author

Sorry, by doing this I changed all the commit hashes, so your description no longer references commits on this branch

All good, I just updated the description :)

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.

5 participants