Skip to content

Add ISSM ice sheet model GridComp to Landice#1203

Draft
agstub wants to merge 178 commits intodevelopfrom
feature/agstub/issm-gridcomp
Draft

Add ISSM ice sheet model GridComp to Landice#1203
agstub wants to merge 178 commits intodevelopfrom
feature/agstub/issm-gridcomp

Conversation

@agstub
Copy link
Copy Markdown

@agstub agstub commented Feb 5, 2026

This PR adds a new gridcomp that runs ISSM, the Ice-sheet and Sea-level System Model. The ISSM gridcomp is a child of the Landice gridcomp. This PR was spurred by discussions in this issue, which provides an overview and outlines some other changes and development issues.

  • The branch works with the GEOS-ESM/ISSM tag geos/v1.0.0 which is now included in ESMA_env tag v5.22.0 via modules on NCCS and NAS.
  • Aaron Stubblefield (@agstub) verified these zero-diff tests on 05/05/2026.

Overview of the new ISSM gridcomp:
Imports:

  • ICESMB (ice surface mass balance) from landice, described below. (Note this is imported through a private internal state because ISSM GridComp has a new mesh tile space that will not necessarily allocate enough space for direct landice import.)

Exports:

  • ICESURF (ice surface elevation)
  • ICETHICK (ice thickness)
  • ICEVEL (ice flow speed)
  • ICEVX (ice velocity in local projection x-direction)
  • ICEVY (ice velocity in local projection y-direction)
  • ICESMB (ice smb on mesh elements, time averaged between ISSM time steps)

Internals:

  • ICESURF (ice surface elevation)
  • ICETHICK (ice thickness)
  • IMLS (ice-mask level set --> ice front/terminus position)
  • OMLS (ocean-mask level set --> grounding line position)

The ISSM gridcomp does three main things:

  1. It calls (C++) IRF methods that are defined in this branch of GMAO's fork of ISSM. The IRF methods are defined here.
  2. It creates an ESMF_Mesh version of ISSM's internal (unstructured, triangular) mesh for regridding imports/exports between mesh and the attached grid. The gridded versions of fields are then transformed to/from landice tile space via MAPL_LocStreamTransform.
  3. Reads any restarts provided by GEOS for the Internals listed above (i.e. the ice sheet geometry...)

Other notes:

*In the mesh tile space, fields are defined on mesh nodes (triangle vertices) to allow for restarts as ISSM works with piecewise linear finite elements (at least for most common configurations).

*The gridcomp will run any number of glaciers (binary input files) that are available. Current test configuration runs Antarctica and Greenland, for example.

Major changes to landice:

  1. Added ISSM as a child of Landice. Currently, it is the only child of Landice.
  2. Added a new Initialize method that puts the landice tile locstream in the child (ISSM) gridcomp's internal state, and then call's MAPL_GenericInitialize. Landice originally just relies on MAPL_GenericInitialize, so there should be no issues when not running ISSM. Note: The new initialize method is basically a copy of Land gridcomp's Initialize method (with only some comments changed).
  3. Added a new ICESMB export, calculated as ACCUM (net ice accumulation rate) minus RUNOFF (runoff total flux). This is provided to ISSM gridcomp via a private internal state (T_ISSM_TILE_STATE).
  4. Receive landice tile versions of the variables ICESURF, ICETHICK, and ICEVEL via the private internal state (T_ISSM_TILE_STATE) so that gridded version of these can be output with HISTORY.

To Do:

  • Discussions with @weiyuan-jiang and @mathomp4 suggest we may need to modify CMakeLists.txt for landice (and issm?) to "stub" the build in case the ISSM module is not present. See PR: v11: Build ISSM based on detection of ISSM #1206

  • Added output on mesh tiles via HISTORY: Feature/jiang/issm gridcomp #1209

  • Added capability to run over multiple ice sheets, see PRs:

  • Run ISSM over multiple input files (multiple ice sheets or glaciers) ISSM#3

  • Run ISSM over multiple input files (multiple ice sheets or glaciers) #1216

  • Fix exports: get issm exports in landice tile space #1212

  • Decide if ISSM should be instead be a sibling of Landice for future coupling with ocean (decided to stick with child for now)

  • Add element coordinates to mesh tile locstream add elementCoords for the output #1227

  • Add internal states for various fields needed to generate restarts for ISSM (i.e. new binary input files)

  • Fixed issue with mesh in Antarctica where triangles crossing +/-180 longitude led to regridding error artifacts (specifically with gridded output). Now we mask out the triangles along this thin 'seam' and fill them in from neighboring cells via creep extrapolation. note: this no longer seems relevant when fields are defined on mesh nodes (rather than element faces), but I will elect to keep it in there in case future developments need regridding onto element faces.

  • Switch from output on element faces (average values over elements) to output on triangle vertices (pointwise values) because this is consistent with how ISSM reads inputs into elements. switch to ISSM fields defined on mesh nodes for geos restarts #1378

  • Actually read in restarts and test that they work correctly on the ISSM side (standalone ESMF tests worked, so as long as ordering is correct when restarts are read, should be ok....)

  • replace ISSM_EXPDIR with scratch directory (SCRDIR), and copy or link the binary input files to this dir (i.e. in ldas or gcm scripts that set up the scratch directory)

  • Remove elementConn argument to RunISSM and InputFromRestarts. These indices can be easily calculated on the ISSM side.

  • Edit make_bcs, preprocessing, etc as suggested

Related Issues and PRs:
Will update these as progress is made:

@agstub
Copy link
Copy Markdown
Author

agstub commented May 4, 2026

Hi @mathomp4 and @weiyuan-jiang I had a build/module related question!

We now use a derived type from issm gridcomp in landice (T_ISSM_TILE_STATE, ISSM_TILE_WRAP) to pass imports/exports via private internal state (because we re-defined the issm tile space to correspond to the issm mesh, not landice tiles). I introduced a preprocessor definition HAVE_ISSM in landice so that these types are not used if ISSM is not found. This works fine when building with/without ISSM on NCCS, but it seems to be causing the automated build tests on this page to fail.

I was wondering if this signals an actual issue or if there's a better solution like putting these derived types in a shared module since both issm and landice use them?

@mathomp4
Copy link
Copy Markdown
Member

mathomp4 commented May 4, 2026

Hi @mathomp4 and @weiyuan-jiang I had a build/module related question!

We now use a derived type from issm gridcomp in landice (T_ISSM_TILE_STATE, ISSM_TILE_WRAP) to pass imports/exports via private internal state (because we re-defined the issm tile space to correspond to the issm mesh, not landice tiles). I introduced a preprocessor definition HAVE_ISSM in landice so that these types are not used if ISSM is not found. This works fine when building with/without ISSM on NCCS, but it seems to be causing the automated build tests on this page to fail.

I was wondering if this signals an actual issue or if there's a better solution like putting these derived types in a shared module since both issm and landice use them?

@agstub I think I have a thought. I believe GNU's preprocessor (by default) requires preprocessor macros like #ifdef etc. to start on the first column. So this:

  #ifdef HAVE_ISSM
  use GEOS_IssmGridCompMod,   only : IssmSetServices  => SetServices
  use GEOS_IssmGridCompMod,   only : T_ISSM_TILE_STATE
  use GEOS_IssmGridCompMod,   only : ISSM_TILE_WRAP
  #endif

should be:

#ifdef HAVE_ISSM
  use GEOS_IssmGridCompMod,   only : IssmSetServices  => SetServices
  use GEOS_IssmGridCompMod,   only : T_ISSM_TILE_STATE
  use GEOS_IssmGridCompMod,   only : ISSM_TILE_WRAP
#endif

It looks like Intel's preprocessor isn't as strict. And there might be ways to make GNU's less strict, but usually, we just do first-column-#.

@agstub agstub added 0 diff The changes in this pull request have verified to be zero-diff with the target branch. and removed Draft labels May 5, 2026
@agstub agstub marked this pull request as ready for review May 5, 2026 21:23
@agstub agstub requested review from a team as code owners May 5, 2026 21:23
@gmao-rreichle gmao-rreichle marked this pull request as draft May 6, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0 diff The changes in this pull request have verified to be zero-diff with the target branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants