Skip to content

Commit

Permalink
allow mask variables to be retrieved (NOAA-EMC#588)
Browse files Browse the repository at this point in the history
Retrieve mask_value_water and mask_value_land if present in nems.configure and med_present is true.
  • Loading branch information
DeniseWorthen authored and JessicaMeixner-NOAA committed Jan 24, 2022
1 parent f41c73e commit b7301f7
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions model/src/wmesmfmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,34 @@ subroutine InitializeP1 ( gcomp, impState, expState, extClock, rc )
if (ESMF_LogFoundError(rc, PASSTHRU)) return
end if
end if

call NUOPC_CompAttributeGet(gcomp, name="mask_value_water", &
value=cvalue, isPresent=isPresent, isSet=isSet, rc=rc)
if (ESMF_LogFoundError(rc, PASSTHRU)) return
if (isPresent .and. isSet) then
maskvaluewater = ESMF_UtilString2Int(cvalue, rc=rc)
if (ESMF_LogFoundError(rc, PASSTHRU)) return
if (verbosity.gt.0) then
write(logmsg,*) maskvaluewater
call ESMF_LogWrite(trim(cname)//': mask_value_water = '// &
trim(logmsg), ESMF_LOGMSG_INFO, rc=rc)
if (ESMF_LogFoundError(rc, PASSTHRU)) return
end if
end if

call NUOPC_CompAttributeGet(gcomp, name="mask_value_land", &
value=cvalue, isPresent=isPresent, isSet=isSet, rc=rc)
if (ESMF_LogFoundError(rc, PASSTHRU)) return
if (isPresent .and. isSet) then
maskvalueland = ESMF_UtilString2Int(cvalue, rc=rc)
if (ESMF_LogFoundError(rc, PASSTHRU)) return
if (verbosity.gt.0) then
write(logmsg,*) maskvalueland
call ESMF_LogWrite(trim(cname)//': mask_value_land = '// &
trim(logmsg), ESMF_LOGMSG_INFO, rc=rc)
if (ESMF_LogFoundError(rc, PASSTHRU)) return
end if
end if
end if
!
! -------------------------------------------------------------------- /
Expand Down

0 comments on commit b7301f7

Please sign in to comment.