Skip to content

Commit

Permalink
Revised warning and error message tags for consistency.
Browse files Browse the repository at this point in the history
[ERR] usually means LIS cannot continue, so messages for less serious
events have been changed to [WARN].

Also changed "Error:" to "[ERR]" for consistency.
  • Loading branch information
emkemp committed Jul 23, 2024
1 parent 303dfe1 commit 0c8cac0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions lis/metforcing/nldas-2.0/read_nldas20a.F90
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ subroutine read_nldas20a(n,kk,findex,order,month,name,ferror)
if (file_exists) then
iret = nf90_open(path=name,mode=NF90_NOWRITE,ncid=ftn)
if (iret.ne.0) then
write(LIS_logunit,*) "[ERR] Could not open file: ",trim(name)
write(LIS_logunit,*) "[WARN] Could not open file: ",trim(name)
ferror = 0
return
endif
Expand Down Expand Up @@ -183,7 +183,7 @@ subroutine read_nldas20a(n,kk,findex,order,month,name,ferror)
enddo
deallocate(lb)
else
write(LIS_logunit,*) "[ERR] Could not find file: ",trim(name)
write(LIS_logunit,*) "[WARN] Could not find file: ",trim(name)
ferror = 0
endif

Expand Down
4 changes: 2 additions & 2 deletions lis/metforcing/nldas-2.0/read_nldas20b.F90
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ subroutine read_nldas20b(n,kk,findex,order,name,ferror)
if (file_exists) then
iret = nf90_open(path=name,mode=NF90_NOWRITE,ncid=ftn)
if (iret.ne.0) then
write(LIS_logunit,*) "[ERR] Could not open file: ",trim(name)
write(LIS_logunit,*) "[WARN] Could not open file: ",trim(name)
ferror = 0
return
endif
Expand Down Expand Up @@ -292,7 +292,7 @@ subroutine read_nldas20b(n,kk,findex,order,name,ferror)
enddo
deallocate(lb)
else
write(LIS_logunit,*) "[ERR] Could not find file: ",trim(name)
write(LIS_logunit,*) "[WARN] Could not find file: ",trim(name)
ferror = 0
endif

Expand Down
26 changes: 13 additions & 13 deletions lis/metforcing/nldas-2.0/timeinterp_nldas20.F90
Original file line number Diff line number Diff line change
Expand Up @@ -117,47 +117,47 @@ subroutine timeinterp_nldas20(n,findex)
call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_Tair%varname(1),tmpField,rc=status)
call LIS_verify(status, &
"Error: Enable Tair in the forcing variables list")
"[ERR] Enable Tair in the forcing variables list")

call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_Qair%varname(1),q2Field,rc=status)
call LIS_verify(status, &
"Error: Enable Qair in the forcing variables list")
"[ERR] Enable Qair in the forcing variables list")

call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_SWdown%varname(1),swdField,rc=status)
call LIS_verify(status, &
"Error: Enable SWdown in the forcing variables list")
"[ERR] Enable SWdown in the forcing variables list")

call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_LWdown%varname(1),lwdField,rc=status)
call LIS_verify(status, &
"Error: Enable LWdown in the forcing variables list")
"[ERR] Enable LWdown in the forcing variables list")

call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_Wind_E%varname(1),uField,rc=status)
call LIS_verify(status, &
"Error: Enable Wind_E in the forcing variables list")
"[ERR] Enable Wind_E in the forcing variables list")

call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_Wind_N%varname(1),vField,rc=status)
call LIS_verify(status, &
"Error: Enable Wind_N in the forcing variables list")
"[ERR] Enable Wind_N in the forcing variables list")

call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_Psurf%varname(1),psurfField,rc=status)
call LIS_verify(status, &
"Error: Enable Psurf in the forcing variables list")
"[ERR] Enable Psurf in the forcing variables list")

call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_Rainf%varname(1),pcpField,rc=status)
call LIS_verify(status, &
"Error: Enable Rainf in the forcing variables list")
"[ERR] Enable Rainf in the forcing variables list")

call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_CRainf%varname(1),cpcpField,rc=status)
call LIS_verify(status, &
"Error: Enable CRainf in the forcing variables list")
"[ERR] Enable CRainf in the forcing variables list")

forcing_z = .false.
forcing_ch = .false.
Expand All @@ -166,7 +166,7 @@ subroutine timeinterp_nldas20(n,findex)
call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_Forc_Hgt%varname(1),fhgtField,rc=status)
call LIS_verify(status, &
"Error: Enable Forc_Hgt in the forcing variables list")
"[ERR] Enable Forc_Hgt in the forcing variables list")
forcing_z = .true.
else
write(LIS_logunit,*) &
Expand All @@ -185,7 +185,7 @@ subroutine timeinterp_nldas20(n,findex)
call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_Ch%varname(1),acondField,rc=status)
call LIS_verify(status, &
"Error: Enable Ch in the forcing variables list")
"[ERR] Enable Ch in the forcing variables list")
forcing_ch = .true.
else
write(LIS_logunit,*) &
Expand All @@ -205,7 +205,7 @@ subroutine timeinterp_nldas20(n,findex)
call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_PET%varname(1),PETField,rc=status)
call LIS_verify(status, &
"Error: Enable PET in the forcing variables list")
"[ERR] Enable PET in the forcing variables list")
forcing_pet = .true.
else
forcing_pet = .false.
Expand All @@ -215,7 +215,7 @@ subroutine timeinterp_nldas20(n,findex)
call ESMF_StateGet(LIS_FORC_Base_State(n,findex), &
LIS_FORC_CAPE%varname(1),CAPEField,rc=status)
call LIS_verify(status, &
"Error: Enable CAPE in the forcing variables list")
"[ERR] Enable CAPE in the forcing variables list")
forcing_cape = .true.
else
forcing_cape = .false.
Expand Down

0 comments on commit 0c8cac0

Please sign in to comment.