From 89cf3e63fde1ddbc613eecbff528178be4a89a47 Mon Sep 17 00:00:00 2001 From: alex-huth Date: Fri, 2 Feb 2024 11:22:09 -0500 Subject: [PATCH] Use masked-out SST to determine units of SST, preventing an error where some PEs erroneously trigger (or not) a K to C SST conversion due to unrealistic SST values under ice shelves (which occur on zero-thickness ocean surface layers and are unused otherwise) --- src/icebergs.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/icebergs.F90 b/src/icebergs.F90 index c228aef..7a896fe 100644 --- a/src/icebergs.F90 +++ b/src/icebergs.F90 @@ -5337,7 +5337,7 @@ subroutine icebergs_run(bergs, time, calving, uo, vo, ui, vi, tauxa, tauya, ssh, endif call mpp_update_domains(grd%ssh, grd%domain) - max_SST = maxval(sst(:,:)) + max_SST = maxval(sst(:,:) * grd%msk(grd%isc:grd%iec,grd%jsc:grd%jec)) if (max_SST > 120.0) then ! The input sst is in degrees Kelvin, otherwise the water would be boiling. grd%sst(grd%isc:grd%iec,grd%jsc:grd%jec) = sst(:,:)-273.15 ! Note convert from Kelvin to Celsius else ! The input sst is already in degrees Celsius.