Skip to content

Commit

Permalink
Update error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
apcraig committed Jan 16, 2024
1 parent fa2d619 commit a39b881
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ subroutine ice_write_hist (ns)

if (days_per_year == 360) then
status = nf90_put_att(ncid,varid,'calendar','360_day')
call ice_check_nc(status, subname// ' ERROR: time calendar', &
call ice_check_nc(status, subname// ' ERROR: time calendar 360', &
file=__FILE__, line=__LINE__)
elseif (days_per_year == 365 .and. .not.use_leap_years ) then
status = nf90_put_att(ncid,varid,'calendar','noleap')
call ice_check_nc(status, subname// ' ERROR: time calendar', &
call ice_check_nc(status, subname// ' ERROR: time calendar noleap', &
file=__FILE__, line=__LINE__)
elseif (use_leap_years) then
status = nf90_put_att(ncid,varid,'calendar','Gregorian')
call ice_check_nc(status, subname// ' ERROR: time calendar', &
call ice_check_nc(status, subname// ' ERROR: time calendar Gregorian', &
file=__FILE__, line=__LINE__)
else
call abort_ice(subname//' ERROR: invalid calendar settings', file=__FILE__, line=__LINE__)
Expand Down Expand Up @@ -268,15 +268,15 @@ subroutine ice_write_hist (ns)
file=__FILE__, line=__LINE__)
if (days_per_year == 360) then
status = nf90_put_att(ncid,varid,'calendar','360_day')
call ice_check_nc(status, subname// ' ERROR: time calendar1', &
call ice_check_nc(status, subname// ' ERROR: time calendar 360 time bounds', &
file=__FILE__, line=__LINE__)
elseif (days_per_year == 365 .and. .not.use_leap_years ) then
status = nf90_put_att(ncid,varid,'calendar','noleap')
call ice_check_nc(status, subname// ' ERROR: time calendar2', &
call ice_check_nc(status, subname// ' ERROR: time calendar noleap time bounds', &
file=__FILE__, line=__LINE__)
elseif (use_leap_years) then
status = nf90_put_att(ncid,varid,'calendar','Gregorian')
call ice_check_nc(status, subname// ' ERROR: time calendar3', &
call ice_check_nc(status, subname// ' ERROR: time calendar Gregorian time bounds', &
file=__FILE__, line=__LINE__)
else
call abort_ice(subname//' ERROR: invalid calendar settings', file=__FILE__, line=__LINE__)
Expand Down
14 changes: 7 additions & 7 deletions cicecore/cicedyn/infrastructure/io/io_pio2/ice_history_write.F90
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ subroutine ice_write_hist (ns)
subname//' ERROR: defining dim time',file=__FILE__,line=__LINE__)

call ice_pio_check(pio_def_dim(File,'nvertices',nverts,nvertexid), &
subname//' ERROR: defining dim nverticies',file=__FILE__,line=__LINE__)
subname//' ERROR: defining dim nvertices',file=__FILE__,line=__LINE__)

call ice_pio_check(pio_def_dim(File,'nf',nfsd_hist,fmtid), &
subname//' ERROR: defining dim nf',file=__FILE__,line=__LINE__)
Expand All @@ -246,13 +246,13 @@ subroutine ice_write_hist (ns)

if (days_per_year == 360) then
call ice_pio_check(pio_put_att(File,varid,'calendar','360_day'), &
subname//' ERROR: defining att calendar1',file=__FILE__,line=__LINE__)
subname//' ERROR: defining att calendar 360',file=__FILE__,line=__LINE__)
elseif (days_per_year == 365 .and. .not.use_leap_years ) then
call ice_pio_check(pio_put_att(File,varid,'calendar','noleap'), &
subname//' ERROR: defining att calendar2',file=__FILE__,line=__LINE__)
subname//' ERROR: defining att calendar noleap',file=__FILE__,line=__LINE__)
elseif (use_leap_years) then
call ice_pio_check(pio_put_att(File,varid,'calendar','Gregorian'), &
subname//' ERROR: defining att calendar3',file=__FILE__,line=__LINE__)
subname//' ERROR: defining att calendar Gregorian',file=__FILE__,line=__LINE__)
else
call abort_ice(subname//' ERROR: invalid calendar settings')
endif
Expand All @@ -273,13 +273,13 @@ subroutine ice_write_hist (ns)

if (days_per_year == 360) then
call ice_pio_check(pio_put_att(File,varid,'calendar','360_day'), &
subname//' ERROR: defining att calendar1 tb',file=__FILE__,line=__LINE__)
subname//' ERROR: defining att calendar 360 time bounds',file=__FILE__,line=__LINE__)
elseif (days_per_year == 365 .and. .not.use_leap_years ) then
call ice_pio_check(pio_put_att(File,varid,'calendar','noleap'), &
subname//' ERROR: defining att calendar2 tb',file=__FILE__,line=__LINE__)
subname//' ERROR: defining att calendar noleap time bounds',file=__FILE__,line=__LINE__)
elseif (use_leap_years) then
call ice_pio_check(pio_put_att(File,varid,'calendar','Gregorian'), &
subname//' ERROR: defining att calendar3 tb',file=__FILE__,line=__LINE__)
subname//' ERROR: defining att calendar Gregorian time bounds',file=__FILE__,line=__LINE__)
else
call abort_ice(subname//' ERROR: invalid calendar settings')
endif
Expand Down
3 changes: 2 additions & 1 deletion cicecore/drivers/nuopc/cmeps/ice_mesh_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,9 @@ subroutine ice_mesh_init_tlon_tlat_area_hm()

use ice_grid , only : tlon, tlat, hm, tarea, ULON, ULAT, HTN, HTE, ANGLE, ANGLET
use ice_grid , only : uarea, uarear, tarear!, tinyarea
use ice_grid , only : dxT, dyT, dxU, dyU, dyhx, dxhy, cyp, cxp, cym, cxm
use ice_grid , only : dxT, dyT, dxU, dyU
use ice_grid , only : makemask
use ice_dyn_shared, only : dyhx, dxhy, cyp, cxp, cym, cxm
use ice_boundary , only : ice_HaloUpdate
use ice_domain , only : blocks_ice, nblocks, halo_info, distrb_info
use ice_constants , only : c0, c1, p25
Expand Down

0 comments on commit a39b881

Please sign in to comment.