Skip to content

Commit

Permalink
Adding error handling debug statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaxmonsky committed Jul 19, 2024
1 parent c81084a commit 223f3fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dynamics/utils/hycoef.F90
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ subroutine hycoef_read(File)
end if
end if
ierr = PIO_Inq_dimlen(File, lev_dimid, flev)
if (ierr /= PIO_NOERR) then
call endrun(routine//': ERROR: Failed to inquire dimension length of flev in ncdata or restart file.')
end if
if (pver /= flev) then
write(iulog,*) routine//': ERROR: file lev does not match model. lev (file, model):',flev, pver
call endrun(routine//': ERROR: file lev does not match model.')
Expand All @@ -429,6 +432,9 @@ subroutine hycoef_read(File)
end if
end if
ierr = PIO_Inq_dimlen(File, lev_dimid, filev)
if (ierr /= PIO_NOERR) then
call endrun(routine//': ERROR: Failed to inquire dimension length of filev in ncdata or restart file.')
end if
if (pverp /= filev) then
write(iulog,*) routine//':ERROR: file ilev does not match model ilev (file, model):',filev, pverp
call endrun(routine//':ERROR: file ilev does not match model.')
Expand Down

0 comments on commit 223f3fe

Please sign in to comment.