File indexing completed on 2024-12-17 18:32:25 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
09a6f3668a Jeff*0001 #include "ctrparam.h"
0002 #include "ATM2D_OPTIONS.h"
0003
0004 SUBROUTINE CALC_FILELOAD( curTime, iloop, aloop,
0005 & wght0, wght1,
0006 & intime0, intime1,
0007 & ifTime, myThid)
0008
0009
0010
0011
0012
0013 IMPLICIT NONE
0014
0015 #include "ATMSIZE.h"
0016 #include "SIZE.h"
0017 #include "EEPARAMS.h"
0018 #include "ATM2D_VARS.h"
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
9274434acc Jean*0030 _RL curTime
09a6f3668a Jeff*0031 INTEGER iloop
0032 INTEGER aloop
0033 _RL wght0
0034 _RL wght1
0035 INTEGER intime0
0036 INTEGER intime1
0037 LOGICAL ifTime
0038 INTEGER myThid
0039
0040
0041
0042
0043 _RL dmonth(0:13)
0044 DATA dmonth /-1339200.D0, 1339200.D0, 3888000.D0, 6436800.D0,
0045 & 9072000.D0, 11707200.D0, 14342400.D0, 16977600.D0,
0046 & 19656000.D0, 22291200.D0, 24926400.D0, 27561600.D0,
0047 & 30196800.D0, 32875200.D0/
0048
0049
0050
0051
0052
0053 _RL secYr
0054 DATA secYr /31536000.D0/
0055 _RL ifcyc
0056 INTEGER mn
0057
0058 iftime=.FALSE.
0059 ifcyc=mod(curTime,secYr)
9274434acc Jean*0060
09a6f3668a Jeff*0061 DO mn=1,13
0062
9274434acc Jean*0063 IF ((ifcyc.GT.dmonth(mn-1)).AND.(ifcyc.LE.dmonth(mn)))
09a6f3668a Jeff*0064 & intime1=mn
0065
0066 ENDDO
0067
0068
0069
9274434acc Jean*0070
09a6f3668a Jeff*0071 intime0=intime1-1
9274434acc Jean*0072 wght1=(ifcyc - dmonth(intime0)) /
09a6f3668a Jeff*0073 & (dmonth(intime1) - dmonth(intime0))
0074 wght0= 1. _d 0-wght1
0075
0076 IF (ifcyc.LE.dmonth(intime0) + dtatmo) ifTime=.TRUE.
0077 IF ((iloop.EQ.1).AND.(aloop.EQ.1)) ifTime= .TRUE.
0078
0079 IF (intime0.EQ.0) intime0=12
0080 IF (intime1.EQ.13) intime1=1
9274434acc Jean*0081
09a6f3668a Jeff*0082 RETURN
0083 END