From 259e57bf4f86800d8378f45292d5eee38be1e62a Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 11 Sep 2024 13:16:18 -0600 Subject: [PATCH] pio_errorhandling call was in the wrong location --- cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 b/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 index b487c243d..2d98716b2 100644 --- a/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 +++ b/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 @@ -741,6 +741,8 @@ subroutine read_restart_field(nu,nrec,work,atype,vname,ndim3,diag, & call ice_pio_check(pio_inq_varndims(File, vardesc, ndims), & subname// " ERROR: missing varndims "//trim(vname),file=__FILE__,line=__LINE__) + call pio_seterrorhandling(File, PIO_INTERNAL_ERROR) + if (ndim3 == ncat .and. ndims == 3) then call pio_read_darray(File, vardesc, iodesc3d_ncat, work, status) #ifdef CESMCOUPLED @@ -768,8 +770,6 @@ subroutine read_restart_field(nu,nrec,work,atype,vname,ndim3,diag, & call ice_pio_check(status, & subname//" ERROR: reading var "//trim(vname),file=__FILE__,line=__LINE__) - call pio_seterrorhandling(File, PIO_INTERNAL_ERROR) - if (diag) then if (ndim3 > 1) then do n=1,ndim3