Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CESM1_PIO for fill value check #675

Merged
merged 2 commits into from
Dec 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions cicecore/cicedynB/infrastructure/io/io_pio2/ice_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,8 @@ subroutine read_restart_field(nu,nrec,work,atype,vname,ndim3,diag, &
status = pio_inq_varid(File,trim(vname),vardesc)

if (status /= PIO_noerr) then
call abort_ice(subname//"ERROR: CICE restart? Missing variable: "//trim(vname))
call abort_ice(subname// &
"ERROR: CICE restart? Missing variable: "//trim(vname))
endif

status = pio_inq_varndims(File, vardesc, ndims)
Expand All @@ -728,7 +729,10 @@ subroutine read_restart_field(nu,nrec,work,atype,vname,ndim3,diag, &
! if (ndim3 == ncat .and. ncat>1) then
if (ndim3 == ncat .and. ndims == 3) then
call pio_read_darray(File, vardesc, iodesc3d_ncat, work, status)
where (work == PIO_FILL_DOUBLE) work = c0
!#ifndef CESM1_PIO
!! This only works for PIO2
! where (work == PIO_FILL_DOUBLE) work = c0
!#endif
if (present(field_loc)) then
do n=1,ndim3
call ice_HaloUpdate (work(:,:,n,:), halo_info, &
Expand All @@ -738,7 +742,10 @@ subroutine read_restart_field(nu,nrec,work,atype,vname,ndim3,diag, &
! elseif (ndim3 == 1) then
elseif (ndim3 == 1 .and. ndims == 2) then
call pio_read_darray(File, vardesc, iodesc2d, work, status)
where (work == PIO_FILL_DOUBLE) work = c0
!#ifndef CESM1_PIO
!! This only works for PIO2
! where (work == PIO_FILL_DOUBLE) work = c0
!#endif
if (present(field_loc)) then
call ice_HaloUpdate (work(:,:,1,:), halo_info, &
field_loc, field_type)
Expand Down