Add FastIsostasy#183
Conversation
This commit adds the change in geoid as a new field to MALI and has it passed back and processed from the SLM. This is a diagnostic field used to calculate components of sea level change.
|
Status: Code compiles with Plan instructions
Plan: Couple MALI with FastIsostasy (Fortran)TL;DR: Use the Fortran version of FastIsostasy (palma-ice/FastIsostasy) — not the Julia version — and follow the existing SLM coupling pattern already in Key Discovery: A Fortran version already existsFastIsostasy includes a pure Fortran implementation specifically designed for coupling with ice-sheet models. Its API is: call isos_init(isos, path_par, "isos", nx, ny, dx, dy)
call isos_init_ref(isos, z_bed_ref, H_ice_ref)
call isos_init_state(isos, z_bed, H_ice, time, bsl)
! In time loop:
call isos_update(isos, H_ice, time, bsl)
z_bed = isos%out%z_bedThe docs for it include specific guidance for coupling to an ice-sheet model: https://github.com/palma-ice/FastIsostasy#coupling-fastisostasy-to-your-favorite-ice-sheet-model Why this is tractableMALI already has a complete coupling template in
The FastIsostasy coupling would replicate this pattern almost exactly, substituting FastIsostasy's PhasesPhase 1: Build System
Phase 2: Registry & Config
Phase 3: Core Coupling — most complex, but heavily templated
Phase 4: Grid/Weight Files
Phase 5: Restart
Phase 6: Testing
Relevant Files
Main Challenge: Grid InterpolationMALI uses an unstructured MPAS mesh; FastIsostasy uses a regular Cartesian (stereographic) grid. The SLM coupling already solves this exact problem using pre-computed sparse interpolation weight files (generated by ESMF_RegridWeightGen or TempestRemap). The same tooling applies — you just need to generate weights for the FastIsostasy target grid rather than the SLM's Gauss-Legendre grid. This will be done outside of MALI in a separate preprocessing step and does not need to be implemented here. However, the MALI implementation should assume a similar format for mapping files as for the existing SLM. Build and test loop
I made a cursory review of the implementation. The coupling code looks correct in that it mirrors the coupling code for the SLM heavily, as intended, but I have not done a line by line review. The Makefile/build changes look reasonable, but some cleanup is needed to generalize it to any machine. Note that the FastIsostasy build is really slow for two reasons: 1. it uses config which is generally slow and 2. the FFTW library it depends on is very slow to compile and we may want to support optionally pointing to a pre-build lib of it. Next steps are to build mapping files, set up a FI namelist, and attempt a run. |
This PR adds FastIsostasy as an alternate GIA model to the existing global 1d Sea Level Model. The implementation makes use of a lot of the existing coupling code and builds off of FastIsostasy documentation on coupling here:
https://github.com/palma-ice/FastIsostasy/blob/main/README.md#coupling-fastisostasy-to-your-favorite-ice-sheet-model
Note: Currently based on #180 and needs to be rebased after that is merged.