Skip to content

Commit

Permalink
Use masked-out SST to determine units of SST, preventing an error whe…
Browse files Browse the repository at this point in the history
…re 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)
  • Loading branch information
alex-huth committed Feb 2, 2024
1 parent 9c8266d commit 89cf3e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/icebergs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 89cf3e6

Please sign in to comment.