From 223f3fef827783beb93463ebe6b01cbc1f13a327 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Fri, 19 Jul 2024 08:20:17 -0600 Subject: [PATCH] Adding error handling debug statements. --- src/dynamics/utils/hycoef.F90 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dynamics/utils/hycoef.F90 b/src/dynamics/utils/hycoef.F90 index e5a21758..59777ef2 100644 --- a/src/dynamics/utils/hycoef.F90 +++ b/src/dynamics/utils/hycoef.F90 @@ -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.') @@ -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.')