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