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

Update pio and netcdf error checks #927

Merged
merged 35 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ba848b9
add gadi standalone setup
anton-seaice Dec 5, 2023
3551dbd
updates for cice standalone on gadi
anton-seaice Dec 5, 2023
4f871cb
fixes
anton-seaice Dec 5, 2023
8c728e5
this builds now for pio2 but is messy
anton-seaice Dec 6, 2023
5d95777
testing
anton-seaice Dec 11, 2023
028a376
Update test-cice.yml
anton-seaice Dec 11, 2023
7f38886
workflows
anton-seaice Dec 11, 2023
7a2c072
workflows
anton-seaice Dec 11, 2023
50f0656
workflows
anton-seaice Dec 11, 2023
2a7b25b
cice.settings?
anton-seaice Dec 11, 2023
3ea282c
Update test-cice.yml
anton-seaice Dec 11, 2023
eddf67b
Update test-cice.yml
anton-seaice Dec 11, 2023
851bdbd
Parallel IO on MacOS Conda:
anton-seaice Nov 30, 2023
2c78c32
simple netcdf4
anton-seaice Dec 1, 2023
ba4e795
pio error handling
anton-seaice Dec 14, 2023
d8227b1
tidy up io error handling
anton-seaice Dec 18, 2023
f3c96aa
tidy up io error handling
anton-seaice Dec 19, 2023
6b55fc2
tidyup
anton-seaice Dec 19, 2023
73576fc
Merge branch 'ESCOMP:main' into io_error
anton-seaice Jan 8, 2024
47446cf
Merge branch 'io_error' of https://github.com/ACCESS-NRI/CICE into io…
apcraig Jan 11, 2024
dc14ce9
Update pio and netcdf error checking
apcraig Jan 13, 2024
10da928
- Update some ERROR statements, reduce some line lengths
apcraig Jan 15, 2024
e1b071a
Update git workflow script
apcraig Jan 15, 2024
85e09a7
Update git workflow script
apcraig Jan 15, 2024
22a9aa5
Update git workflow script
apcraig Jan 15, 2024
ac9afc3
Update git workflow script
apcraig Jan 15, 2024
b8779d9
update conda_macos for compilation with parallelio
apcraig Jan 15, 2024
fa2d619
error messages cleanup
anton-seaice Jan 16, 2024
a39b881
Update error messages
apcraig Jan 16, 2024
5268d5c
typo in ice_pio
anton-seaice Jan 16, 2024
a2d2c13
Merge pull request #114 from anton-seaice/ioerrchk3
apcraig Jan 16, 2024
a4a4930
update uvm comment
apcraig Jan 18, 2024
9c4038c
Updates based on reviews
apcraig Jan 19, 2024
75e9b81
Update documentation
apcraig Jan 19, 2024
b8e6b0a
Update documentation
apcraig Jan 19, 2024
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
5 changes: 4 additions & 1 deletion .github/workflows/test-cice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,11 @@ jobs:
run: |
cd $HOME/cice-dirs/input
wget --progress=dot:giga https://zenodo.org/record/3728358/files/CICE_data_gx3_grid_ic-20200320.tar.gz && tar xvfz CICE_data_gx3_grid_ic-20200320.tar.gz
wget --progress=dot:giga https://zenodo.org/record/3728364/files/CICE_data_gx3_forcing_JRA55-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_JRA55-20200320.tar.gz
wget --progress=dot:giga https://zenodo.org/records/10419929/files/CICE_data_gx3_forcing_JRA55_200501_20231220.tar.gz && tar xvfz CICE_data_gx3_forcing_JRA55_200501_20231220.tar.gz
pwd
cd CICE_data/forcing/gx3/JRA55/8XDAILY
ln -s JRA55_gx3_03hr_forcing_200501.nc JRA55_gx3_03hr_forcing_2005.nc
cd $HOME/cice-dirs/input
ls -alR
# - name: run case
# run: |
Expand Down
2 changes: 1 addition & 1 deletion cicecore/cicedyn/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
!
! The following variables are currently hard-wired as snapshots
! (instantaneous rather than time-averages):
! divu, shear, vort, sig1, sig2, sigP, trsig, mlt_onset,
! divu, shear, vort, sig1, sig2, sigP, trsig, mlt_onset,
! frz_onset, hisnap, aisnap
!
! Options for histfreq: '1','h','d','m','y','x', where x means that
Expand Down
2 changes: 1 addition & 1 deletion cicecore/cicedyn/analysis/ice_history_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
!
! The following variables are currently hard-wired as snapshots
! (instantaneous rather than time-averages):
! divu, shear, vort, sig1, sig2, sigP, trsig, mlt_onset,
! divu, shear, vort, sig1, sig2, sigP, trsig, mlt_onset,
! frz_onset, hisnap, aisnap
!
! Options for histfreq: '1','h','d','m','y','x', where x means that
Expand Down
2 changes: 1 addition & 1 deletion cicecore/cicedyn/dynamics/ice_dyn_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ subroutine deformations (nx_block, ny_block, &
tarear ! 1/tarea

real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout) :: &
vort , & ! vorticity (1/s)
vort , & ! vorticity (1/s)
shear , & ! strain rate II component (1/s)
divu , & ! strain rate I component, velocity divergence (1/s)
rdg_conv , & ! convergence term for ridging (1/s)
Expand Down
2 changes: 1 addition & 1 deletion cicecore/cicedyn/dynamics/ice_transport_remap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ subroutine construct_fields (nx_block, ny_block, &

! center of mass (mxav,myav) for each cell

mxav(i,j) = mx(i,j)*xxav / mm(i,j)
mxav(i,j) = mx(i,j)*xxav / mm(i,j)
myav(i,j) = my(i,j)*yyav / mm(i,j)

enddo
Expand Down
10 changes: 9 additions & 1 deletion cicecore/cicedyn/general/ice_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module ice_forcing
daymo, days_per_year, compute_days_between
use ice_fileunits, only: nu_diag, nu_forcing
use ice_exit, only: abort_ice
use ice_read_write, only: ice_open, ice_read, &
use ice_read_write, only: ice_open, ice_read, ice_check_nc, &
ice_get_ncvarsize, ice_read_vec_nc, &
ice_open_nc, ice_read_nc, ice_close_nc
use ice_timers, only: ice_timer_start, ice_timer_stop, timer_readwrite, &
Expand Down Expand Up @@ -3701,11 +3701,15 @@ subroutine ocn_data_ncar_init

! status = nf90_inq_dimid(fid,'nlon',dimid)
status = nf90_inq_dimid(fid,'ni',dimid)
call ice_check_nc(status, subname//' ERROR: inq dimid ni', file=__FILE__, line=__LINE__)
status = nf90_inquire_dimension(fid,dimid,len=nlon)
call ice_check_nc(status, subname//' ERROR: inq dim ni', file=__FILE__, line=__LINE__)

! status = nf90_inq_dimid(fid,'nlat',dimid)
status = nf90_inq_dimid(fid,'nj',dimid)
call ice_check_nc(status, subname//' ERROR: inq dimid nj', file=__FILE__, line=__LINE__)
status = nf90_inquire_dimension(fid,dimid,len=nlat)
call ice_check_nc(status, subname//' ERROR: inq dim nj', file=__FILE__, line=__LINE__)

if( nlon .ne. nx_global ) then
call abort_ice (error_message=subname//'ice: ocn frc file nlon ne nx_global', &
Expand Down Expand Up @@ -3862,11 +3866,15 @@ subroutine ocn_data_ncar_init_3D

! status = nf90_inq_dimid(fid,'nlon',dimid)
status = nf90_inq_dimid(fid,'ni',dimid)
call ice_check_nc(status, subname//' ERROR: inq dimid ni', file=__FILE__, line=__LINE__)
status = nf90_inquire_dimension(fid,dimid,len=nlon)
call ice_check_nc(status, subname//' ERROR: inq dim ni', file=__FILE__, line=__LINE__)

! status = nf90_inq_dimid(fid,'nlat',dimid)
status = nf90_inq_dimid(fid,'nj',dimid)
call ice_check_nc(status, subname//' ERROR: inq dimid nj', file=__FILE__, line=__LINE__)
status = nf90_inquire_dimension(fid,dimid,len=nlat)
call ice_check_nc(status, subname//' ERROR: inq dim nj', file=__FILE__, line=__LINE__)

if( nlon .ne. nx_global ) then
call abort_ice (error_message=subname//'ice: ocn frc file nlon ne nx_global', &
Expand Down
54 changes: 27 additions & 27 deletions cicecore/cicedyn/infrastructure/ice_blocks.F90
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ subroutine create_blocks(nx_global, ny_global, ew_boundary_type, &
do jblock=1,nblocks_y
js = (jblock-1)*block_size_y + 1
if (js > ny_global) call abort_ice(subname// &
'ERROR: Bad block decomp: ny_block too large?')
' ERROR: Bad block decomp: ny_block too large?')
je = js + block_size_y - 1
if (je > ny_global) je = ny_global ! pad array

Expand All @@ -182,7 +182,7 @@ subroutine create_blocks(nx_global, ny_global, ew_boundary_type, &

is = (iblock-1)*block_size_x + 1
if (is > nx_global) call abort_ice(subname// &
'ERROR: Bad block decomp: nx_block too large?')
' ERROR: Bad block decomp: nx_block too large?')
ie = is + block_size_x - 1
if (ie > nx_global) ie = nx_global

Expand Down Expand Up @@ -223,7 +223,7 @@ subroutine create_blocks(nx_global, ny_global, ew_boundary_type, &
case ('tripoleT')
j_global(j,n) = -j_global(j,n) + 1 ! open
case default
call abort_ice(subname//'ERROR: unknown n-s bndy type')
call abort_ice(subname//' ERROR: unknown n-s bndy type')
end select
endif

Expand All @@ -247,7 +247,7 @@ subroutine create_blocks(nx_global, ny_global, ew_boundary_type, &
case ('tripoleT')
j_global(j,n) = -j_global(j,n)
case default
call abort_ice(subname//'ERROR: unknown n-s bndy type')
call abort_ice(subname//' ERROR: unknown n-s bndy type')
end select

!*** set last physical point if padded domain
Expand Down Expand Up @@ -275,7 +275,7 @@ subroutine create_blocks(nx_global, ny_global, ew_boundary_type, &
case ('closed')
i_global(i,n) = 0
case default
call abort_ice(subname//'ERROR: unknown e-w bndy type')
call abort_ice(subname//' ERROR: unknown e-w bndy type')
end select
endif

Expand All @@ -295,7 +295,7 @@ subroutine create_blocks(nx_global, ny_global, ew_boundary_type, &
case ('closed')
i_global(i,n) = 0
case default
call abort_ice(subname//'ERROR: unknown e-w bndy type')
call abort_ice(subname//' ERROR: unknown e-w bndy type')
end select

!*** last physical point in padded domain
Expand Down Expand Up @@ -427,7 +427,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
inbr = nblocks_x - iBlock + 1
jnbr = -jBlock
case default
call abort_ice(subname//'ERROR: unknown north boundary')
call abort_ice(subname//' ERROR: unknown north boundary')
end select
endif

Expand All @@ -448,7 +448,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('tripoleT')
jnbr = 0 ! do not write into the neighbor's ghost cells
case default
call abort_ice(subname//'ERROR: unknown south boundary')
call abort_ice(subname//' ERROR: unknown south boundary')
end select
endif

Expand All @@ -465,7 +465,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('cyclic')
inbr = 1
case default
call abort_ice(subname//'ERROR: unknown east boundary')
call abort_ice(subname//' ERROR: unknown east boundary')
end select
endif

Expand All @@ -482,7 +482,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('cyclic')
inbr = nblocks_x
case default
call abort_ice(subname//'ERROR: unknown west boundary')
call abort_ice(subname//' ERROR: unknown west boundary')
end select
endif

Expand All @@ -499,7 +499,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('cyclic')
inbr = 1
case default
call abort_ice(subname//'ERROR: unknown east boundary')
call abort_ice(subname//' ERROR: unknown east boundary')
end select
endif
if (jnbr > nblocks_y) then
Expand All @@ -521,7 +521,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
if (inbr == 0) inbr = nblocks_x
jnbr = -jBlock
case default
call abort_ice(subname//'ERROR: unknown north boundary')
call abort_ice(subname//' ERROR: unknown north boundary')
end select
endif

Expand All @@ -538,7 +538,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('cyclic')
inbr = nblocks_x
case default
call abort_ice(subname//'ERROR: unknown west boundary')
call abort_ice(subname//' ERROR: unknown west boundary')
end select
endif
if (jnbr > nblocks_y) then
Expand All @@ -560,7 +560,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
if (inbr > nblocks_x) inbr = 1
jnbr = -jBlock
case default
call abort_ice(subname//'ERROR: unknown north boundary')
call abort_ice(subname//' ERROR: unknown north boundary')
end select
endif

Expand All @@ -577,7 +577,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('cyclic')
inbr = 1
case default
call abort_ice(subname//'ERROR: unknown east boundary')
call abort_ice(subname//' ERROR: unknown east boundary')
end select
endif
if (jnbr < 1) then
Expand All @@ -593,7 +593,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('tripoleT')
jnbr = 0 ! do not write into the neighbor's ghost cells
case default
call abort_ice(subname//'ERROR: unknown south boundary')
call abort_ice(subname//' ERROR: unknown south boundary')
end select
endif

Expand All @@ -609,7 +609,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('cyclic')
inbr = nblocks_x
case default
call abort_ice(subname//'ERROR: unknown west boundary')
call abort_ice(subname//' ERROR: unknown west boundary')
end select
endif
if (jnbr < 1) then
Expand All @@ -625,7 +625,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('tripoleT')
jnbr = 0 ! do not write into the neighbor's ghost cells
case default
call abort_ice(subname//'ERROR: unknown south boundary')
call abort_ice(subname//' ERROR: unknown south boundary')
end select
endif

Expand All @@ -642,7 +642,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('cyclic')
inbr = inbr - nblocks_x
case default
call abort_ice(subname//'ERROR: unknown east boundary')
call abort_ice(subname//' ERROR: unknown east boundary')
end select
endif

Expand All @@ -658,7 +658,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('cyclic')
inbr = nblocks_x + inbr
case default
call abort_ice(subname//'ERROR: unknown west boundary')
call abort_ice(subname//' ERROR: unknown west boundary')
end select
endif

Expand All @@ -675,7 +675,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('cyclic')
inbr = inbr - nblocks_x
case default
call abort_ice(subname//'ERROR: unknown east boundary')
call abort_ice(subname//' ERROR: unknown east boundary')
end select
endif
if (jnbr > nblocks_y) then
Expand All @@ -697,7 +697,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
if (inbr <= 0) inbr = inbr + nblocks_x
jnbr = -jBlock
case default
call abort_ice(subname//'ERROR: unknown north boundary')
call abort_ice(subname//' ERROR: unknown north boundary')
end select
endif

Expand All @@ -714,7 +714,7 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
case ('cyclic')
inbr = nblocks_x + inbr
case default
call abort_ice(subname//'ERROR: unknown west boundary')
call abort_ice(subname//' ERROR: unknown west boundary')
end select
endif
if (jnbr > nblocks_y) then
Expand All @@ -736,13 +736,13 @@ function ice_blocksGetNbrID(blockID, direction, iBoundary, jBoundary) &
if (inbr > nblocks_x) inbr = inbr - nblocks_x
jnbr = -jBlock
case default
call abort_ice(subname//'ERROR: unknown north boundary')
call abort_ice(subname//' ERROR: unknown north boundary')
end select
endif

case default

call abort_ice(subname//'ERROR: unknown direction')
call abort_ice(subname//' ERROR: unknown direction')
return

end select
Expand Down Expand Up @@ -789,7 +789,7 @@ function get_block(block_id,local_id)
!----------------------------------------------------------------------

if (block_id < 1 .or. block_id > nblocks_tot) then
call abort_ice(subname//'ERROR: invalid block_id')
call abort_ice(subname//' ERROR: invalid block_id')
endif

get_block = all_blocks(block_id)
Expand Down Expand Up @@ -834,7 +834,7 @@ subroutine get_block_parameter(block_id, local_id, &
!----------------------------------------------------------------------

if (block_id < 1 .or. block_id > nblocks_tot) then
call abort_ice(subname//'ERROR: invalid block_id')
call abort_ice(subname//' ERROR: invalid block_id')
endif

if (present(local_id)) local_id = all_blocks(block_id)%local_id
Expand Down
Loading
Loading