Add ISSM ice sheet model GridComp to Landice#1203
Conversation
switch to ISSM fields defined on mesh nodes for geos restarts
merge develop into feature/agstub/issm-gridcomp
This reverts commit f4b6ec1.
|
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 HAVE_ISSM
use GEOS_IssmGridCompMod, only : IssmSetServices => SetServices
use GEOS_IssmGridCompMod, only : T_ISSM_TILE_STATE
use GEOS_IssmGridCompMod, only : ISSM_TILE_WRAP
#endifshould 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
#endifIt 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-#. |
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.
Overview of the new ISSM gridcomp:
Imports:
Exports:
Internals:
The ISSM gridcomp does three main things:
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:
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: