21 |
#include "DIAGNOSTICS.h" |
#include "DIAGNOSTICS.h" |
22 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
23 |
#include "PARAMS.h" |
#include "PARAMS.h" |
|
#ifdef ALLOW_FIZHI |
|
|
#include "chronos.h" |
|
|
#endif |
|
24 |
|
|
25 |
C !INPUT PARAMETERS: |
C !INPUT PARAMETERS: |
26 |
_RL myTime |
_RL myTime |
36 |
INTEGER thisdate(4), prevdate(4) |
INTEGER thisdate(4), prevdate(4) |
37 |
#endif |
#endif |
38 |
#ifdef ALLOW_FIZHI |
#ifdef ALLOW_FIZHI |
|
integer nsecf2,mmdd,hhmmss |
|
39 |
logical alarm2 |
logical alarm2 |
40 |
character *9 tagname |
character *9 tagname |
41 |
#endif |
#endif |
61 |
DO n = 1,nlists |
DO n = 1,nlists |
62 |
freqSec = freq(n) |
freqSec = freq(n) |
63 |
phiSec = phase(n) |
phiSec = phase(n) |
|
#ifdef ALLOW_FIZHI |
|
|
if( useFIZHI) then |
|
|
mmdd = int(freq(n)) |
|
|
hhmmss = int((freq(n) - int(freq(n)))*1.e6) |
|
|
freqSec = nsecf2(hhmmss,mmdd,nymd) |
|
|
endif |
|
|
#endif |
|
64 |
|
|
65 |
IF ( freqSec.LT.0. ) THEN |
IF ( freqSec.LT.0. ) THEN |
66 |
C-- write snap-shot with suffix = myIter to be consistent with |
C-- write snap-shot with suffix = myIter to be consistent with |
105 |
ENDIF |
ENDIF |
106 |
ENDDO |
ENDDO |
107 |
|
|
108 |
|
C--- Check to see IF its time for Statistics Diag. Output |
109 |
|
|
110 |
|
DO n = 1,diagSt_nbLists |
111 |
|
freqSec = diagSt_freq(n) |
112 |
|
phiSec = diagSt_phase(n) |
113 |
|
|
114 |
|
IF ( freqSec.LT.0. ) THEN |
115 |
|
C-- write snap-shot with suffix = myIter to be consistent with |
116 |
|
C time-average diagnostics (e.g., freq=-1 & freq=1): |
117 |
|
c wrIter = myIter |
118 |
|
c wrTime = myTime |
119 |
|
C-- write snap-shot with suffix = myIter-1 to be consistent with |
120 |
|
C state-variable time-step: |
121 |
|
wrIter = myItM1 |
122 |
|
wrTime = myTime - deltaTclock |
123 |
|
ELSE |
124 |
|
wrIter = myIter |
125 |
|
wrTime = myTime |
126 |
|
ENDIF |
127 |
|
dump2fileNow = DIFF_PHASE_MULTIPLE( phiSec, freqSec, |
128 |
|
& wrTime, deltaTclock ) |
129 |
|
IF ( dump2fileNow ) THEN |
130 |
|
CALL DIAGSTATS_OUTPUT(n,wrIter,myThid) |
131 |
|
ENDIF |
132 |
|
ENDDO |
133 |
|
|
134 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
135 |
C- wait for everyone before setting arrays to zero: |
C- wait for everyone before setting arrays to zero: |
136 |
_BARRIER |
_BARRIER |
137 |
|
|
138 |
|
C-- Clear storage space: |
139 |
|
|
140 |
DO n = 1,nlists |
DO n = 1,nlists |
141 |
freqSec = freq(n) |
freqSec = freq(n) |
142 |
phiSec = phase(n) |
phiSec = phase(n) |
143 |
#ifdef ALLOW_FIZHI |
|
|
if( useFIZHI) then |
|
|
mmdd = int(freq(n)) |
|
|
hhmmss = int((freq(n) - int(freq(n)))*1.e6) |
|
|
freqSec = nsecf2(hhmmss,mmdd,nymd) |
|
|
endif |
|
|
#endif |
|
144 |
wrTime = myTime |
wrTime = myTime |
145 |
IF ( freqSec.LT.0. ) wrTime = myTime - deltaTclock |
IF ( freqSec.LT.0. ) wrTime = myTime - deltaTclock |
146 |
dump2fileNow = DIFF_PHASE_MULTIPLE( phiSec, freqSec, |
dump2fileNow = DIFF_PHASE_MULTIPLE( phiSec, freqSec, |
154 |
IF ( dump2fileNow ) CALL CLRINDX(n,myThid) |
IF ( dump2fileNow ) CALL CLRINDX(n,myThid) |
155 |
ENDDO |
ENDDO |
156 |
|
|
157 |
|
DO n = 1,diagSt_nbLists |
158 |
|
freqSec = diagSt_freq(n) |
159 |
|
phiSec = diagSt_phase(n) |
160 |
|
wrTime = myTime |
161 |
|
IF ( freqSec.LT.0. ) wrTime = myTime - deltaTclock |
162 |
|
dump2fileNow = DIFF_PHASE_MULTIPLE( phiSec, freqSec, |
163 |
|
& wrTime, deltaTclock ) |
164 |
|
IF ( dump2fileNow ) CALL DIAGSTATS_CLEAR(n,myThid) |
165 |
|
ENDDO |
166 |
|
|
167 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
168 |
ENDIF |
ENDIF |
169 |
|
|