File indexing completed on 2018-03-02 18:38:16 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
6d54cf9ca1 Ed H*0001 #include "CAL_OPTIONS.h"
a63ed37559 Patr*0002
0003 subroutine cal_StepsPerDay(
0004 I myiter,
0005 I mytime,
0006 O numsteps,
0007 I mythid
0008 & )
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 implicit none
0035
0036
0037
0038 #include "cal.h"
0039
0040
0041
0042 integer myiter
0043 _RL mytime
0044 integer numsteps
0045 integer mythid
0046
0047
0048
0049 integer currentdate(4)
0050 integer present
0051 integer presentsecs
0052 integer final
0053 integer finalsecs
0054 integer ierr
b809ce8096 Jean*0055 integer modelstepsperday
a63ed37559 Patr*0056
0057
0058
0059 call cal_GetDate( myiter, mytime, currentdate, mythid )
0060
0061 present = currentdate(1)
0062 presentsecs = (currentdate(2)/10000)*secondsperhour +
0063 & mod(currentdate(2)/100,100)*secondsperminute +
0064 & mod(currentdate(2),100)
0065 final = modelenddate(1)
0066
0067 if (present .lt. final) then
b809ce8096 Jean*0068
0069
0070 modelstepsperday = secondsperday/nint(modelstep)
a63ed37559 Patr*0071 numsteps = modelstepsperday -
0072 & int(presentsecs/modelstep)
0073 else if (present .eq. final) then
0074 finalsecs = (modelenddate(2)/10000)*secondsperhour +
0075 & mod(modelenddate(2)/100,100)*secondsperminute +
0076 & mod(modelenddate(2),100)
0077 numsteps = int((finalsecs - presentsecs)/modelstep)
0078 else
0079
0080 ierr = 1101
0081 call cal_PrintError( ierr, mythid )
0082 stop ' stopped in cal_StepsPerDay.'
0083
0084 endif
0085
0086 return
0087 end