Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate GIS and AIS coupling modes #136

Open
wants to merge 133 commits into
base: master
Choose a base branch
from

Conversation

matthewhoffman
Copy link

This is a discussion PR for creating separate GIS and AIS coupling modes.

Needs to be rebased after E3SM-Project#6632 is merged.

trhille and others added 30 commits April 10, 2024 13:39
Do not update FCT masks between RK stages. The masking for FCT is now
calculated in the first RK stage and not updated again in the time step.
and re-arrange an if-loop for improving efficiency
correction is applied to the TF field.

Also include (unrelated) clean-ups
such that smoothing happens synchronously with horizontal
extrapolation and with a local weight for a cell, where the local weight value
gets defined depending on the cell's validity.
when the extrapolation scheme is on
Also make the invalid value a config option
trhille and others added 19 commits November 21, 2024 12:42
Only recalculate layerNormalVelocity when using RK time integration.
Recalculating when using forward Euler integration led to an inconstency
in edgeMask because of face-melting. This commit leads to a slight
inconsistency between forward Euler and RK treatments, which should
be fixed in the future, likely by moving face-melting to after advection
and before the velocity solve, similar to the treatment of calving.
…/develop

Even though we do a velocity solve during each Runge-Kutta stage, those
updated velocities were not being used for advection because
layerNormalVelocity was not being updated after each velocity solve.
This merge fixes that major bug in RK time integration.

* trhille/mali/fix_layerNormalVelocity_bug:
  Only recalculate layerNormalVelocity when using RK time integration
  Update layerNormalVelocity in each RK stage
The ISMIP6 code for interpolating TF vertically does not give correct
values for depths below the deepest data z-level.  This commit handles
that case by using the deepest TF value corrected by the freezing
temperature depth-dependence.  It also handles the less critical
situation of depths above the shallowest data level by using the
shallowest value unmodified.
"disabling" might be misleading because these flags "maximize" cloud fraction by setting them to 1 everywhere
* Moved to its own folder
* Do not add scripts subdir when building EAMxx
* Move data/*yaml in query-cf-database folder
The folder eamxx/data no longer exists, and did not contain any input
data for EAM in the first place
@matthewhoffman matthewhoffman added the in progress Still being worked on, don't merge yet! label Jan 4, 2025
matthewhoffman and others added 8 commits January 3, 2025 19:00
These flags change the input P3 cloud fraction by setting them to 1 everywhere. Currently 
they default to False, but we will likely enable them as part of the effort to address 
the popcorn convection problem.

[BFB]
Co-authored-by: Xylar Asay-Davis <xylarstorm@gmail.com>
…evelop

The ISMIP6 code for interpolating TF vertically does not give correct
values for depths below the deepest data z-level. This commit handles
that case by using the deepest TF value corrected by the freezing
temperature depth-dependence. It also handles the less critical
situation of depths above the shallowest data level by using the
shallowest value unmodified.

* origin/matthewhoffman/mali/tf-vert-interp-fix:
  Update error message
  Update zOcean error check
  Improve error checking in ocean extrap
  Fix new indexing error introduced trying to fix indexing errors
  Fix indexing errors
  Modify TFocean vertical interpolation for depths outside of data range
OCN to GLC thermal forcing coupling

This pull request introduces coupling from OCN to GLC to pass thermal
forcing at a prescribed ocean depth (300 m) from MPAS-Ocean to MALI,
where MALI uses it to calculate grounded marine melting through an
existing 'facemelting' parameterization. Facemelting as a function of
ocean thermal state is a critical OCN/GLC coupling for Greenland, but it
is relevant to Antarctica as well. This OCN-GLC thermal forcing coupling
is activated whenever OCN is present and GLC is active.

This PR has pieces in MPAS-Ocean, the coupler, and MALI:
* In MPAS-Ocean, a new avgThermalForcingAtCritDepth field is added and
  calculated. The depth at which to calculate the thermal forcing is
  namelist configurable. The default is 300 m.
* In MALI, the field passed from the coupler is collected in
  ismip6_2dThermalForcing and used in the existing facemelting
  parameterization. Namelist and streams are updated to use facemelting
  in all simulations and output relevant variables. For compsets where
  TF is not being coupled, it will have values of 0 and result in no
  facemelting being applied; it is safe to have this option generally
  turned on.
* In the coupler, a new remapping object is created that handles the TF
  mapping independently of any other fields passed from OCN to GLC. New
  mapping files are added. Any coupling variables related to the
  existing ice-shelf coupling now include the 'shelf' suffix and all
  coupling variables related to this new thermal-forcing coupling have
  the 'tf' suffix.
* A new compset is created that is a standard G-case but with active
  MALI. New mapping files are added between the relevant grids for the
  new mapper.
* The new OCN2GLC_TF_SMAPNAME mapping should be a nearest source to
  destination mapping with the MPAS-Ocean source mesh masked to only
  include grid cells that are deeper than the critical depth to avoid
  extrapolating undefined values. A tool to generate that map file is
  added to MPAS-Dev/MPAS-Tools
* Two new model_grids are added that are compatible with this feature
  and include the special mapping file required:
  TL319_IcoswISC30E3r5_gis1to10kmR2 and TL319_oQU240wLI_gis20
* The new coupling is controlled by a new namelist option in MPAS-Ocean:
    config_glc_thermal_forcing_coupling_mode
  It defaults to 'off' and there are no compsets that explicitly set it
  for now, making this a stealth feature.

[NML] for new mappings, new ocean variable
[non-BFB] for configurations with active MALI
…6861)

Doing some cleaning: these files were built along with eamxx in certain conditions, despite being never used.
Merge remote-tracking branch 'MALI-Dev/develop' into matthewhoffman/mali/separate-gis-ais-modes

* MALI-Dev/develop: (84 commits)
  Update error message
  Update zOcean error check
  Improve error checking in ocean extrap
  Fix new indexing error introduced trying to fix indexing errors
  Fix indexing errors
  Modify TFocean vertical interpolation for depths outside of data range
  Only recalculate layerNormalVelocity when using RK time integration
  Update layerNormalVelocity in each RK stage
  Remove variables that are not needed for restarts
  Update variable descriptions in Registry
  Clean up variable names
  Minor cleanup from code review
  Fix segfault in hydro init due to using cellMask before accessing it
  Remove effectivePressureSGH from ocean connection
  Apply suggestions/debugging from review
  Replace verbose per-iteration log message with a summary
  Handle seafloor and lakes in extrapolation module
  Revert "Modified which ocean layers are picked for creating TFocean and added check for invalid TF values"
  Modified which ocean layers are picked for creating TFocean and added check for invalid TF values
  Modified ocean extrapolation routine to take in a 3d ocean cavity mask
  ...
@matthewhoffman matthewhoffman force-pushed the matthewhoffman/mali/separate-gis-ais-modes branch from c41f3ed to bc49872 Compare January 8, 2025 03:11
This commit revises the previous commit to use a more specific naming
convention and also adds it as a new command line argument to
build-namelist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Still being worked on, don't merge yet!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants