Skip to content

Commit

Permalink
Merge pull request #1458 from dmocko/fix/noahmp401-alarms
Browse files Browse the repository at this point in the history
Fixing Noah-MP-4.0.1 LSM restart and model alarms for multiple nests
  • Loading branch information
jvgeiger authored Nov 21, 2023
2 parents d31401f + 69a8aa4 commit 1e86b03
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_lsmMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -304,18 +304,18 @@ subroutine NoahMP401_ini()

call LIS_update_timestep(LIS_rc, n, NOAHMP401_struc(n)%ts)

call LIS_registerAlarm("NoahMP401 model alarm",&
write(fnest,'(i3.3)') n
call LIS_registerAlarm("NoahMP401 model alarm "//trim(fnest),&
NOAHMP401_struc(n)%ts, &
NOAHMP401_struc(n)%ts)

call LIS_registerAlarm("NoahMP401 restart alarm", &
call LIS_registerAlarm("NoahMP401 restart alarm "//trim(fnest), &
NOAHMP401_struc(n)%ts,&
NOAHMP401_struc(n)%rstInterval)

! EMK Add alarm to reset tair_agl_min for RHMin. This should
! match the output interval, since that is used for calculating
! Tair_F_min.
write(fnest,'(i3.3)') n
call LIS_registerAlarm("NoahMP401 RHMin alarm "//trim(fnest),&
NOAHMP401_struc(n)%ts,&
LIS_sfmodel_struc(n)%outInterval)
Expand Down
4 changes: 2 additions & 2 deletions lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ subroutine NoahMP401_main(n)

! check NoahMP401 alarm. If alarm is ring, run model.

alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP401 model alarm")
write(fnest,'(i3.3)') n
alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP401 model alarm "//trim(fnest))

if (alarmCheck) Then
do t = 1, LIS_rc%npatch(n, LIS_rc%lsm_index)
Expand Down Expand Up @@ -1433,7 +1434,6 @@ subroutine NoahMP401_main(n)

! EMK...See if noahmp401_struc(n)%noahmp401(t)%tair_agl_min needs to be
! reset for calculating RHMin.
write(fnest,'(i3.3)') n
alarmCheck = LIS_isAlarmRinging(LIS_rc, &
"NoahMP401 RHMin alarm "//trim(fnest))
if (alarmCheck) then
Expand Down
4 changes: 3 additions & 1 deletion lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_writerst.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ subroutine NoahMP401_writerst(n)
logical :: alarmCheck
integer :: ftn
integer :: status
character*3 :: fnest

! set restart alarm
alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP401 restart alarm")
write(fnest,'(i3.3)') n
alarmCheck = LIS_isAlarmRinging(LIS_rc, "NoahMP401 restart alarm "//trim(fnest))

! set restart file format (read from LIS configration file_
wformat = trim(NOAHMP401_struc(n)%rformat)
Expand Down

0 comments on commit 1e86b03

Please sign in to comment.