82 |
IF ( periodicExternalForcing ) THEN |
IF ( periodicExternalForcing ) THEN |
83 |
|
|
84 |
C Now calculate whether it is time to update the forcing arrays |
C Now calculate whether it is time to update the forcing arrays |
85 |
rdt=1. _d 0 / deltaTclock |
rdt = 1. _d 0 / deltaTclock |
86 |
nForcingPeriods=int(externForcingCycle/externForcingPeriod+0.5) |
nForcingPeriods = NINT(externForcingCycle/externForcingPeriod) |
87 |
Imytm=int(myTime*rdt+0.5) |
Imytm = NINT(myTime*rdt) |
88 |
Ifprd=int(externForcingPeriod*rdt+0.5) |
Ifprd = NINT(externForcingPeriod*rdt) |
89 |
Ifcyc=int(externForcingCycle*rdt+0.5) |
Ifcyc = NINT(externForcingCycle*rdt) |
90 |
Iftm=mod( Imytm+Ifcyc-Ifprd/2 ,Ifcyc) |
Iftm = MOD( Imytm+Ifcyc-Ifprd/2, Ifcyc) |
91 |
|
|
92 |
intime0=int(Iftm/Ifprd) |
intime0 = 1 + INT(Iftm/Ifprd) |
93 |
intime1=mod(intime0+1,nForcingPeriods) |
intime1 = 1 + MOD(intime0,nForcingPeriods) |
94 |
aWght=float( Iftm-Ifprd*intime0 )/float( Ifprd ) |
c aWght = DFLOAT( Iftm-Ifprd*(intime0 - 1) ) / DFLOAT( Ifprd ) |
95 |
bWght=1.-aWght |
aWght = FLOAT( Iftm-Ifprd*(intime0 - 1) ) |
96 |
|
bWght = FLOAT( Ifprd ) |
97 |
intime0=intime0+1 |
aWght = aWght / bWght |
98 |
intime1=intime1+1 |
bWght = 1. _d 0 - aWght |
99 |
|
|
100 |
IF ( |
IF ( |
101 |
& Iftm-Ifprd*(intime0-1) .EQ. 0 |
& Iftm-Ifprd*(intime0-1) .EQ. 0 |