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 Time Manager #566

Merged
merged 17 commits into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from 15 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
2 changes: 1 addition & 1 deletion cice.setup
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ cd ${testname_base}
source ./cice.settings
if (\${dobuild} == true) then
if (\${doreuse} == true) then
set ciceexe = "../ciceexe.\${ICE_ENVNAME}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}"
set ciceexe = "../ciceexe.\${ICE_TARGET}.\${ICE_ENVNAME}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}"
./cice.build --exe \${ciceexe}
if !(-e \${ciceexe}) cp -p \${ICE_RUNDIR}/cice \${ciceexe}
else
Expand Down
6 changes: 3 additions & 3 deletions cicecore/cicedynB/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ subroutine accum_hist (dt)
use ice_domain_size, only: nfsd
use ice_grid, only: tmask, lmask_n, lmask_s, dxu, dyu
use ice_calendar, only: new_year, write_history, &
write_ic, time, histfreq, nstreams, month, &
write_ic, timesecs, histfreq, nstreams, month, &
new_month
use ice_dyn_eap, only: a11, a12, e11, e12, e22, s11, s12, s22, &
yieldstress11, yieldstress12, yieldstress22
Expand Down Expand Up @@ -1864,7 +1864,7 @@ subroutine accum_hist (dt)
avgct(ns) = avgct(ns) + c1
! if (avgct(ns) == c1) time_beg(ns) = (time-dt)/int(secday)
if (avgct(ns) == c1) then
time_beg(ns) = (time-dt)/int(secday)
time_beg(ns) = (timesecs-dt)/int(secday)
time_beg(ns) = real(time_beg(ns),kind=real_kind)
endif
endif
Expand Down Expand Up @@ -3966,7 +3966,7 @@ subroutine accum_hist (dt)
enddo ! iblk
!$OMP END PARALLEL DO

time_end(ns) = time/int(secday)
time_end(ns) = timesecs/int(secday)
time_end(ns) = real(time_end(ns),kind=real_kind)

!---------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions cicecore/cicedynB/analysis/ice_history_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ subroutine construct_filename(ncfile,suffix,ns)

use ice_calendar, only: sec, nyr, month, daymo, &
mday, write_ic, histfreq, histfreq_n, &
year_init, new_year, new_month, new_day, &
new_year, new_month, new_day, &
dt
use ice_restart_shared, only: lenstr

Expand All @@ -667,7 +667,7 @@ subroutine construct_filename(ncfile,suffix,ns)
character (len=1) :: cstream
character(len=*), parameter :: subname = '(construct_filename)'

iyear = nyr + year_init - 1 ! set year_init=1 in ice_in to get iyear=nyr
iyear = nyr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this changes the definition of iyear? The way it was: nyr = 1, 2, 3... iyear = 1996, 1997, 1998... (if year_init = 1996)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nyr is now the model year. There is no longer this dependence on year_init. year_init just defines the model start year and plays no other role. I think this was one of the main things that needed to change to make it easier to use and more robust. I preserved use of the variables, nyr, month, mday, sec. We could change "nyr" to "year" and "mday" to "day" or something else if it makes things clearer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since nyr has always (to me) meant 'number of the year' (i.e. a counter, POP convention again), could we use just 'year'? Or is that used for something else? iyear signalled the value of year as an integer quantity (although it might have been a real-values variable - I don't remember that kind of detail), e.g. 1996. mday meant day of the month - I think that one's okay.

imonth = month
iday = mday
isec = sec - dt
Expand Down
Loading