From 0acd4539f2fd240b56c8ea85a4ee760f3224df2d Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Mon, 8 Jun 2026 13:00:29 -0700 Subject: [PATCH 1/2] Add geoidchange as a field passed back to MALI This commit modifies the main sl_solver routine to optionally pass back a geoidchange field. This allows it to be passed to MALI when run in coupled mode. --- sl_model_mod.f90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sl_model_mod.f90 b/sl_model_mod.f90 index 3eb2a75..67e7d89 100644 --- a/sl_model_mod.f90 +++ b/sl_model_mod.f90 @@ -827,13 +827,14 @@ subroutine sl_solver_init(itersl, starttime, mali_iceload, mali_bedrock, mali_ma end subroutine sl_solver_init !======================================================================================================================== - subroutine sl_solver(itersl, iter, dtime, starttime, mali_iceload, mali_mask, slchange) + subroutine sl_solver(itersl, iter, dtime, starttime, mali_iceload, mali_mask, slchange, geoidchange) ! Compute sea-level change associated with past ice loading changes real :: starttime integer :: iter, itersl, dtime real, dimension(:,:), optional :: mali_iceload, mali_mask ! variables for coupled ISM-SLM simulations real, dimension(:,:), intent(out), optional :: slchange ! variable exchanged with the ISM + real, dimension(:,:), intent(out), optional :: geoidchange ! variable exchanged with the ISM !=========================================================== ! BEGIN TIMING & EXECUTION @@ -1555,6 +1556,7 @@ subroutine sl_solver(itersl, iter, dtime, starttime, mali_iceload, mali_mask, sl ! this is the information passed to the ice sheet model !call write_sl(topoxy_m1(:,:)-topoxy(:,:), 'bedrock', folder_coupled) slchange = topoxy_m1(:,:)-topoxy(:,:) + geoidchange = deltaslxy(:,:)+rr(:,:,nfiles) !write out the current ice load as a new file call write_sl(icexy(:,:,nfiles), icemodel_out, outputfolder_ice, suffix=numstr) endif !endif coupling From d275266ad7fe87c7ac4c2df8c6bc13c1e7b2853f Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Mon, 15 Jun 2026 10:43:03 -0700 Subject: [PATCH 2/2] Add logic to check that calcRG is active --- sl_model_mod.f90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sl_model_mod.f90 b/sl_model_mod.f90 index 67e7d89..efea456 100644 --- a/sl_model_mod.f90 +++ b/sl_model_mod.f90 @@ -1556,7 +1556,12 @@ subroutine sl_solver(itersl, iter, dtime, starttime, mali_iceload, mali_mask, sl ! this is the information passed to the ice sheet model !call write_sl(topoxy_m1(:,:)-topoxy(:,:), 'bedrock', folder_coupled) slchange = topoxy_m1(:,:)-topoxy(:,:) - geoidchange = deltaslxy(:,:)+rr(:,:,nfiles) + ! write out geoid change only if it is available + if (calcRG) then + geoidchange = gg(:,:,nfiles) + else + geoidchange = 1.0e36 ! insert bad value if geoid change was not calculated + endif !write out the current ice load as a new file call write_sl(icexy(:,:,nfiles), icemodel_out, outputfolder_ice, suffix=numstr) endif !endif coupling