/[MITgcm]/MITgcm/pkg/cal/cal_stepsforday.F
ViewVC logotype

Diff of /MITgcm/pkg/cal/cal_stepsforday.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.20.2 by adcroft, Tue Oct 7 20:46:37 2003 UTC revision 1.3 by jmc, Tue Mar 16 00:11:46 2010 UTC
# Line 24  c       extensively. Line 24  c       extensively.
24  c  c
25  c     started: Christian Eckert eckert@mit.edu  06-Apr-2000  c     started: Christian Eckert eckert@mit.edu  06-Apr-2000
26  c  c
27  c     changed:  c     changed:
28  c  c
29  c     ==================================================================  c     ==================================================================
30  c     SUBROUTINE cal_StepsForDay  c     SUBROUTINE cal_StepsForDay
# Line 102  c--         This can only happen if we e Line 102  c--         This can only happen if we e
102                firststep = 1                firststep = 1
103                laststep  = modelintsteps                laststep  = modelintsteps
104  c--           Note: This holds only if modelenddate was determined  c--           Note: This holds only if modelenddate was determined
105  c--                 such that it coincides with the model's final time.  c--                 such that it coincides with the model final time.
106              else              else
107  c--           We do not end at midnight of the first day of  c--           We do not end at midnight of the first day of
108  c--           the next month.  c--           the next month.
# Line 135  c--       Somewhere between first and la Line 135  c--       Somewhere between first and la
135  c--       The first steps in iday.  c--       The first steps in iday.
136            fullsteps = int((secondsperday - startsecs)/mdstep)            fullsteps = int((secondsperday - startsecs)/mdstep)
137            numsteps  = fullsteps            numsteps  = fullsteps
138  c--       What's left in the first day (frac1).  c--       What is left in the first day (frac1).
139            frac1     = (secondsperday - startsecs) - fullsteps*mdstep            frac1     = (secondsperday - startsecs) - fullsteps*mdstep
140            fullsteps = int(secondsperday/modelstep)            fullsteps = int(secondsperday/modelstep)
141  c--       What's left in a complete day (frac2).  c--       What is left in a complete day (frac2).
142            frac2     = secondsperday - fullsteps*mdstep            frac2     = secondsperday - fullsteps*mdstep
143  c--       What's left up to the current day (frac3).  c--       What is left up to the current day (frac3).
144            frac3     = frac1 + frac2*(iday - 1)            frac3     = frac1 + frac2*(iday - 1)
145            numsteps  = numsteps + (iday - 1)*fullsteps +            numsteps  = numsteps + (iday - 1)*fullsteps +
146       &                frac3/mdstep       &                frac3/mdstep
# Line 152  c--       The last day of integration. Line 152  c--       The last day of integration.
152  c--       The first step in iday.  c--       The first step in iday.
153            fullsteps = int((secondsperday - startsecs)/mdstep)            fullsteps = int((secondsperday - startsecs)/mdstep)
154            numsteps  = fullsteps            numsteps  = fullsteps
155  c--       What's left in the first day (frac1).  c--       What is left in the first day (frac1).
156            frac1     = (secondsperday - startsecs) - fullsteps*mdstep            frac1     = (secondsperday - startsecs) - fullsteps*mdstep
157            fullsteps = int(secondsperday/modelstep)            fullsteps = int(secondsperday/modelstep)
158  c--       What's left in a complete day (frac2).  c--       What is left in a complete day (frac2).
159            frac2     = secondsperday - fullsteps*mdstep            frac2     = secondsperday - fullsteps*mdstep
160  c--       What's left up to the day before the last (frac3).  c--       What is left up to the day before the last (frac3).
161            frac3     = frac1 + frac2*(iday - 2)            frac3     = frac1 + frac2*(iday - 2)
162            numsteps  = numsteps + (iday - 2)*fullsteps            numsteps  = numsteps + (iday - 2)*fullsteps
163  c--       The last step in iday.  c--       The last step in iday.

Legend:
Removed from v.1.1.20.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22