Skip to content

Commit

Permalink
explain lakedepth corruption safeguards
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelTrahanNOAA committed Dec 18, 2023
1 parent 929b716 commit b1bb75a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions physics/clm_lake.f90
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ subroutine calculate_z_dz_lake(i,input_lakedepth,clm_lakedepth,z_lake,dz_lake)
real(kind_lake) :: depthratio

if (input_lakedepth(i) == spval .or. input_lakedepth(i) < 0.1) then
! This is a safeguard against:
! 1. missing in the lakedepth database (== spval)
! 2. errors in model cycling or unexpected changes in the orography database (< 0.1)
clm_lakedepth(i) = zlak(nlevlake) + 0.5_kind_lake*dzlak(nlevlake)
z_lake(1:nlevlake) = zlak(1:nlevlake)
dz_lake(1:nlevlake) = dzlak(1:nlevlake)
Expand Down

0 comments on commit b1bb75a

Please sign in to comment.