Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate floating condition when calculating beta when marine check is on #10

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions sl_model_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -671,10 +671,27 @@ subroutine sl_solver_init(itersl, starttime, mali_iceload, mali_bedrock, mali_ma
close(201)

!========================== beta function =========================
if (checkmarine) then
write(unit_num,*) 'Performing Marine Check for initial beta'
do j = 1,2*nglv
do i = 1,nglv
if (tinit_0(i,j) > 0) then
! If not marine...
icestarxy(i,j) = icexy(i,j,1)
elseif (icexy(i,j,1) > (abs(tinit_0(i,j)) * rhow / rhoi)) then
!...else if marine, but thick enough to be grounded
icestarxy(i,j) = icexy(i,j,1)
else
!...if floating ice
icestarxy(i,j) = 0.0
endif
enddo
enddo
endif
! calculate initial beta
do j = 1,2*nglv
do i = 1,nglv
if (icexy(i,j,1)==0) then
if (icestarxy(i,j) < epsilon(0.0)) then
beta0(i,j)=1
else
beta0(i,j)=0
Expand Down Expand Up @@ -757,15 +774,15 @@ subroutine sl_solver_init(itersl, starttime, mali_iceload, mali_bedrock, mali_ma
icestarxy(i,j) = icexy(i,j,1)
else
!...if floating ice
icestarxy(i,j) = 0
icestarxy(i,j) = 0.0
endif
enddo
enddo
! Decompose ice field
call spat2spec(icestarxy(:,:),icestarlm(:,:),spheredat)
else ! If not checking for floating ice
call spat2spec(icexy(:,:,1),icestarlm(:,:),spheredat) ! Decompose ice field
icestarxy(:,:) = icexy(:,:,1)
endif
call spat2spec(icestarxy(:,:),icestarlm(:,:),spheredat)

ice_volume = icestarlm(0,0)*4*pi*radius**2

Expand Down Expand Up @@ -1084,15 +1101,15 @@ subroutine sl_solver(itersl, iter, dtime, starttime, mali_iceload, mali_mask, sl
icestarxy(i,j) = icexy(i,j,n)
else
!...if floating ice
icestarxy(i,j) = 0
icestarxy(i,j) = 0.0
endif
enddo
enddo
! Decompose ice field
call spat2spec(icestarxy(:,:),icestarlm(:,:),spheredat)
else ! If not checking for floating ice
call spat2spec(icexy(:,:,n),icestarlm(:,:),spheredat) ! Decompose ice field
icestarxy(:,:) = icexy(:,:,n)
endif
call spat2spec(icestarxy(:,:),icestarlm(:,:),spheredat)

if (n == 1) then
dicestarlm(:,:) = 0.0 ! No change at first timestep
Expand All @@ -1115,7 +1132,7 @@ subroutine sl_solver(itersl, iter, dtime, starttime, mali_iceload, mali_mask, sl
! Calculate current beta based on iceload at the current timestep
do j = 1, 2 * nglv
do i = 1, nglv
if (icexy(i, j, nfiles) < epsilon(0.0)) then
if (icestarxy(i,j) < epsilon(0.0)) then
beta(i,j) = 1
else
beta(i,j) = 0
Expand Down