Skip to content

Commit

Permalink
Erroring out in read_model_time when the model time has a year of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mjs2369 committed Oct 3, 2024
1 parent 56ad321 commit b8b9555
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions models/cice-scm/model_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -821,13 +821,10 @@ function read_model_time(filename)
call nc_check( nf90_get_att(ncid, NF90_GLOBAL, 'sec', sec), &
'read_model_time', 'get_att sec')

! FIXME: we don't allow a real year of 0 - add one for now, but
! THIS MUST BE FIXED IN ANOTHER WAY!
if (nyr == 0) then
call error_handler(E_MSG, 'read_model_time', &
'WARNING!!! year 0 not supported; setting to year 1', &
call error_handler(E_ERR, 'read_model_time', &
'A model time with year 0 is not supported', &
source)
nyr = 1
endif

hour = int(sec/3600)
Expand Down

0 comments on commit b8b9555

Please sign in to comment.