File indexing completed on 2018-03-02 18:37:18 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
d676f916b2 Jean*0001 #include "AIM_OPTIONS.h"
0002
90299b0597 Jean*0003
0004
0005
0006 SUBROUTINE AIM_DIAGNOSTICS( bi, bj, myTime, myIter, myThid )
0007
0008
d676f916b2 Jean*0009
90299b0597 Jean*0010
d676f916b2 Jean*0011
0012
90299b0597 Jean*0013
0014
0015
d676f916b2 Jean*0016 IMPLICIT NONE
0017
90299b0597 Jean*0018
d676f916b2 Jean*0019
abe521d840 Jean*0020 #include "AIM_SIZE.h"
d676f916b2 Jean*0021
0022 #include "EEPARAMS.h"
0023 #include "PARAMS.h"
d2b04ae38b Jean*0024 #include "GRID.h"
d676f916b2 Jean*0025
65007c221b Jean*0026 #include "AIM_PARAMS.h"
1a72cb671e Jean*0027
10308cbe80 Jean*0028 #include "AIM_TAVE.h"
d676f916b2 Jean*0029 #include "com_physvar.h"
b6caddd47f Jean*0030 #include "com_forcing.h"
d676f916b2 Jean*0031
90299b0597 Jean*0032
d676f916b2 Jean*0033
90299b0597 Jean*0034
0035
0036
0037
0038 INTEGER bi, bj
d676f916b2 Jean*0039 _RL myTime
90299b0597 Jean*0040 INTEGER myIter, myThid
0041
d676f916b2 Jean*0042
0043 #ifdef ALLOW_AIM
90299b0597 Jean*0044
0045 LOGICAL DIFFERENT_MULTIPLE
0046 EXTERNAL DIFFERENT_MULTIPLE
0047 #ifdef ALLOW_DIAGNOSTICS
0048 LOGICAL DIAGNOSTICS_IS_ON
0049 EXTERNAL DIAGNOSTICS_IS_ON
0050 #endif
d676f916b2 Jean*0051
90299b0597 Jean*0052
d676f916b2 Jean*0053
3a474aa258 Jean*0054 INTEGER I,J,K, I2,Katm
d676f916b2 Jean*0055 _RL DDTT
ab33782b56 Jean*0056 CHARACTER*(10) suff
e749d70ece Jean*0057 #ifdef ALLOW_DIAGNOSTICS
0058 _RL tmpVar(NGP)
0059 #endif
90299b0597 Jean*0060 #ifdef ALLOW_MNC
b22b541fe9 Ed H*0061 CHARACTER*(1) pf
90299b0597 Jean*0062 #endif
d676f916b2 Jean*0063
0064
0065
e749d70ece Jean*0066
e204a6fa13 Jean*0067
0068
044a9a9d92 Jean*0069 DO J=1,NGP
e749d70ece Jean*0070 dTsurf(J,1,myThid) = fMask1(J,1,myThid)*dTsurf(J,1,myThid)
e204a6fa13 Jean*0071
e749d70ece Jean*0072 & + fMask1(J,3,myThid)*dTsurf(J,3,myThid)
0073 dTsurf(J,1,myThid) = ABS(dTsurf(J,1,myThid))
044a9a9d92 Jean*0074 ENDDO
e749d70ece Jean*0075
ab33782b56 Jean*0076 IF ( DIFFERENT_MULTIPLE( aim_tendFreq,
0077 & myTime+deltaTClock, deltaTClock )
abe521d840 Jean*0078 & ) THEN
044a9a9d92 Jean*0079
78ad6fc820 Ed H*0080
0081 IF ( aim_snapshot_mdsio ) THEN
044a9a9d92 Jean*0082
ab33782b56 Jean*0083 IF ( rwSuffixType.EQ.0 ) THEN
0084 WRITE(suff,'(I10.10)') myIter+1
0085 ELSE
0086 CALL RW_GET_SUFFIX( suff,
0087 & myTime+deltaTClock, myIter+1, myThid )
0088 ENDIF
044a9a9d92 Jean*0089
ab33782b56 Jean*0090 CALL AIM_WRITE_PHYS( 'aim_dT_RSW.', suff, Nr, TT_RSW,
044a9a9d92 Jean*0091 & 0, bi, bj, 1, myIter, myThid )
ab33782b56 Jean*0092 CALL AIM_WRITE_PHYS( 'aim_dT_RLW.', suff, Nr, TT_RLW,
044a9a9d92 Jean*0093 & 0, bi, bj, 1, myIter, myThid )
ab33782b56 Jean*0094 CALL AIM_WRITE_PHYS( 'aim_dT_CNV.', suff, Nr, TT_CNV,
044a9a9d92 Jean*0095 & 0, bi, bj, 1, myIter, myThid )
ab33782b56 Jean*0096 CALL AIM_WRITE_PHYS( 'aim_dT_PBL.', suff, Nr, TT_PBL,
044a9a9d92 Jean*0097 & 0, bi, bj, 1, myIter, myThid )
ab33782b56 Jean*0098 CALL AIM_WRITE_PHYS( 'aim_dT_LSC.', suff, Nr, TT_LSC,
044a9a9d92 Jean*0099 & 0, bi, bj, 1, myIter, myThid )
ab33782b56 Jean*0100 CALL AIM_WRITE_PHYS( 'aim_dQ_CNV.', suff, Nr, QT_CNV,
044a9a9d92 Jean*0101 & 0, bi, bj, 1, myIter, myThid )
ab33782b56 Jean*0102 CALL AIM_WRITE_PHYS( 'aim_dQ_PBL.', suff, Nr, QT_PBL,
044a9a9d92 Jean*0103 & 0, bi, bj, 1, myIter, myThid )
ab33782b56 Jean*0104 CALL AIM_WRITE_PHYS( 'aim_dQ_LSC.', suff, Nr, QT_LSC,
044a9a9d92 Jean*0105 & 0, bi, bj, 1, myIter, myThid )
e749d70ece Jean*0106 #ifdef ALLOW_CLR_SKY_DIAG
044a9a9d92 Jean*0107
0108 IF ( aim_clrSkyDiag ) THEN
ab33782b56 Jean*0109 CALL AIM_WRITE_PHYS( 'aim_dT_clskySW.', suff, Nr, TT_SWclr,
044a9a9d92 Jean*0110 & 0, bi, bj, 1, myIter, myThid )
ab33782b56 Jean*0111 CALL AIM_WRITE_PHYS( 'aim_dT_clskyLW.', suff, Nr, TT_LWclr,
044a9a9d92 Jean*0112 & 0, bi, bj, 1, myIter, myThid )
0113 ENDIF
e749d70ece Jean*0114 #endif /* ALLOW_CLR_SKY_DIAG */
78ad6fc820 Ed H*0115
044a9a9d92 Jean*0116
78ad6fc820 Ed H*0117 ENDIF
0118
0119 #ifdef ALLOW_MNC
044a9a9d92 Jean*0120
0121
0122 IF ( .FALSE. ) THEN
0123
0124
0125
90299b0597 Jean*0126 IF ( writeBinaryPrec .EQ. precFloat64 ) THEN
0127 pf(1:1) = 'D'
0128 ELSE
0129 pf(1:1) = 'R'
0130 ENDIF
0131
044a9a9d92 Jean*0132 IF ( bi.EQ.1 .AND. bj.EQ.1 ) THEN
0133 WRITE(suff,'(a)') 'aim_tend'
0134 CALL MNC_CW_SET_UDIM(suff, -1, myThid)
0135 CALL MNC_CW_RL_W_S('D',suff,0,0,'T',myTime,myThid)
0136 CALL MNC_CW_SET_UDIM(suff, 0, myThid)
0137 CALL MNC_CW_I_W_S('I',suff,0,0,'iter',myIter,myThid)
0138 ENDIF
0139
0140 CALL MNC_CW_RL_W(pf,suff,bi,bj,'aim_dT_RSW',TT_RSW,myThid)
0141 CALL MNC_CW_RL_W(pf,suff,bi,bj,'aim_dT_RLW',TT_RLW,myThid)
0142 CALL MNC_CW_RL_W(pf,suff,bi,bj,'aim_dT_CNV',TT_CNV,myThid)
0143 CALL MNC_CW_RL_W(pf,suff,bi,bj,'aim_dT_PBL',TT_PBL,myThid)
0144 CALL MNC_CW_RL_W(pf,suff,bi,bj,'aim_dT_LSC',TT_LSC,myThid)
0145 CALL MNC_CW_RL_W(pf,suff,bi,bj,'aim_dQ_CNV',QT_CNV,myThid)
0146 CALL MNC_CW_RL_W(pf,suff,bi,bj,'aim_dQ_PBL',QT_PBL,myThid)
0147 CALL MNC_CW_RL_W(pf,suff,bi,bj,'aim_dQ_LSC',QT_LSC,myThid)
0148
0149
78ad6fc820 Ed H*0150 ENDIF
044a9a9d92 Jean*0151 #endif /* ALLOW_MNC */
78ad6fc820 Ed H*0152
044a9a9d92 Jean*0153
d676f916b2 Jean*0154 ENDIF
0155
044a9a9d92 Jean*0156 IF ( DIFFERENT_MULTIPLE( aim_diagFreq,
0157 & myTime+deltaTClock, deltaTClock )
abe521d840 Jean*0158 & ) THEN
044a9a9d92 Jean*0159
78ad6fc820 Ed H*0160
0161 IF ( aim_snapshot_mdsio ) THEN
044a9a9d92 Jean*0162
ab33782b56 Jean*0163 IF ( rwSuffixType.EQ.0 ) THEN
0164 WRITE(suff,'(I10.10)') myIter+1
0165 ELSE
0166 CALL RW_GET_SUFFIX( suff,
0167 & myTime+deltaTClock, myIter+1, myThid )
0168 ENDIF
d676f916b2 Jean*0169
0170
ab33782b56 Jean*0171 CALL AIM_WRITE_PHYS( 'aim_RelHum.', suff, Nr, RH,
044a9a9d92 Jean*0172 & 0, bi, bj, 1, myIter, myThid )
d676f916b2 Jean*0173
0174
ab33782b56 Jean*0175 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 4, DRAG,
044a9a9d92 Jean*0176 & 1, bi, bj, 1, myIter, myThid )
ab33782b56 Jean*0177 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, SPEED0,
044a9a9d92 Jean*0178 & 1, bi, bj, 2, myIter, myThid )
ab33782b56 Jean*0179 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, TSR,
044a9a9d92 Jean*0180 & 1, bi, bj, 3, myIter, myThid )
ab33782b56 Jean*0181 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, OLR,
044a9a9d92 Jean*0182 & 1, bi, bj, 4, myIter, myThid )
ab33782b56 Jean*0183 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 4, SSR,
044a9a9d92 Jean*0184 & 1, bi, bj, 5, myIter, myThid )
ab33782b56 Jean*0185 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 4, SLR,
044a9a9d92 Jean*0186 & 1, bi, bj, 6, myIter, myThid )
ab33782b56 Jean*0187 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 4, SHF,
044a9a9d92 Jean*0188 & 1, bi, bj, 7, myIter, myThid )
ab33782b56 Jean*0189 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 4, EVAP,
044a9a9d92 Jean*0190 & 1, bi, bj, 8, myIter, myThid )
ab33782b56 Jean*0191 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, PRECNV,
044a9a9d92 Jean*0192 & 1, bi, bj, 9, myIter, myThid )
ab33782b56 Jean*0193 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, PRECLS,
044a9a9d92 Jean*0194 & 1, bi, bj,10, myIter, myThid )
ab33782b56 Jean*0195 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, CLOUDC,
044a9a9d92 Jean*0196 & 1, bi, bj,11, myIter, myThid )
ab33782b56 Jean*0197 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, CLTOP,
044a9a9d92 Jean*0198 & 1, bi, bj,12, myIter, myThid )
ab33782b56 Jean*0199 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, CBMF,
044a9a9d92 Jean*0200 & 1, bi, bj,13, myIter, myThid )
ab33782b56 Jean*0201 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, T0,
044a9a9d92 Jean*0202 & 1, bi, bj,14, myIter, myThid )
ab33782b56 Jean*0203 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, Q0,
044a9a9d92 Jean*0204 & 1, bi, bj,15, myIter, myThid )
ab33782b56 Jean*0205 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 1, EnPrec,
044a9a9d92 Jean*0206 & 1, bi, bj,16, myIter, myThid )
ab33782b56 Jean*0207 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 4, alb1,
044a9a9d92 Jean*0208 & 1, bi, bj,17, myIter, myThid )
ab33782b56 Jean*0209 CALL AIM_WRITE_PHYS( 'aimPhyDiag.', suff, 3, dTsurf,
044a9a9d92 Jean*0210 & 1, bi, bj,18, myIter, myThid )
e749d70ece Jean*0211 #ifdef ALLOW_CLR_SKY_DIAG
0212
044a9a9d92 Jean*0213 IF ( aim_clrSkyDiag ) THEN
ab33782b56 Jean*0214 CALL AIM_WRITE_PHYS('aimPhyDiag.', suff, 1, TSWclr,
044a9a9d92 Jean*0215 & 1, bi, bj,19, myIter, myThid )
ab33782b56 Jean*0216 CALL AIM_WRITE_PHYS('aimPhyDiag.', suff, 1, OLWclr,
044a9a9d92 Jean*0217 & 1, bi, bj,20, myIter, myThid )
ab33782b56 Jean*0218 CALL AIM_WRITE_PHYS('aimPhyDiag.', suff, 1, SSWclr,
044a9a9d92 Jean*0219 & 1, bi, bj,21, myIter, myThid )
ab33782b56 Jean*0220 CALL AIM_WRITE_PHYS('aimPhyDiag.', suff, 1, SLWclr,
044a9a9d92 Jean*0221 & 1, bi, bj,22, myIter, myThid )
0222 ENDIF
e749d70ece Jean*0223 #endif /* ALLOW_CLR_SKY_DIAG */
044a9a9d92 Jean*0224
0225
78ad6fc820 Ed H*0226 ENDIF
0227
0228 #ifdef ALLOW_MNC
0229 IF ( useMNC .AND. aim_snapshot_mnc ) THEN
044a9a9d92 Jean*0230
0231
90299b0597 Jean*0232 IF ( writeBinaryPrec .EQ. precFloat64 ) THEN
0233 pf(1:1) = 'D'
0234 ELSE
0235 pf(1:1) = 'R'
0236 ENDIF
0237
044a9a9d92 Jean*0238 IF ( bi.EQ.1 .AND. bj.EQ.1 ) THEN
37b353148c Davi*0239 WRITE(suff,'(a)') 'aim_phys'
044a9a9d92 Jean*0240 CALL MNC_CW_SET_UDIM(suff, -1, myThid)
37b353148c Davi*0241 CALL MNC_CW_RL_W_S('D',suff,0,0,'T',myTime+deltaTClock,myThid)
044a9a9d92 Jean*0242 CALL MNC_CW_SET_UDIM(suff, 0, myThid)
37b353148c Davi*0243 CALL MNC_CW_I_W_S('I',suff,0,0,'iter',myIter+1,myThid)
044a9a9d92 Jean*0244 ENDIF
0245
0246 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0247 & 'aim_DRAG0',DRAG(1,0,myThid),myThid)
044a9a9d92 Jean*0248 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0249 & 'aim_SPEED0',SPEED0(1,myThid),myThid)
044a9a9d92 Jean*0250 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0251 & 'aim_TSR',TSR(1,myThid),myThid)
044a9a9d92 Jean*0252 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0253 & 'aim_OLR',OLR(1,myThid),myThid)
044a9a9d92 Jean*0254 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0255 & 'aim_SSR0',SSR(1,0,myThid),myThid)
044a9a9d92 Jean*0256 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0257 & 'aim_SLR0',SLR(1,0,myThid),myThid)
044a9a9d92 Jean*0258 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0259 & 'aim_SHF0',SHF(1,0,myThid),myThid)
044a9a9d92 Jean*0260 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0261 & 'aim_EVAP0',EVAP(1,0,myThid),myThid)
044a9a9d92 Jean*0262 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0263 & 'aim_PRECNV',PRECNV(1,myThid),myThid)
044a9a9d92 Jean*0264 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0265 & 'aim_PRECLS',PRECLS(1,myThid),myThid)
044a9a9d92 Jean*0266 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0267 & 'aim_CLOUDC',CLOUDC(1,myThid),myThid)
044a9a9d92 Jean*0268 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0269 & 'aim_CLTOP',CLTOP(1,myThid),myThid)
044a9a9d92 Jean*0270 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0271 & 'aim_CBMF',CBMF(1,myThid),myThid)
044a9a9d92 Jean*0272 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0273 & 'aim_T0',T0(1,myThid),myThid)
044a9a9d92 Jean*0274 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0275 & 'aim_Q0',Q0(1,myThid),myThid)
044a9a9d92 Jean*0276 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0277 & 'aim_EnPrec',EnPrec(1,myThid),myThid)
044a9a9d92 Jean*0278 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0279 & 'aim_alb10',alb1(1,0,myThid),myThid)
044a9a9d92 Jean*0280 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0281 & 'aim_dTsurf1',dTsurf(1,1,myThid),myThid)
044a9a9d92 Jean*0282 #ifdef ALLOW_CLR_SKY_DIAG
0283
0284 IF ( aim_clrSkyDiag ) THEN
0285 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0286 & 'aim_TSWclr',TSWclr(1,myThid),myThid)
044a9a9d92 Jean*0287 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0288 & 'aim_OLWclr',OLWclr(1,myThid),myThid)
044a9a9d92 Jean*0289 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0290 & 'aim_SSWclr',SSWclr(1,myThid),myThid)
044a9a9d92 Jean*0291 CALL MNC_CW_RL_W(pf,suff,bi,bj,
78ad6fc820 Ed H*0292 & 'aim_SLWclr',SLWclr(1,myThid),myThid)
044a9a9d92 Jean*0293 ENDIF
0294 #endif /* ALLOW_CLR_SKY_DIAG */
abe521d840 Jean*0295
044a9a9d92 Jean*0296
78ad6fc820 Ed H*0297 ENDIF
044a9a9d92 Jean*0298 #endif /* ALLOW_MNC */
78ad6fc820 Ed H*0299
044a9a9d92 Jean*0300
d676f916b2 Jean*0301 ENDIF
0302
0303
0304
e749d70ece Jean*0305
0306 DO J=1,NGP
ab33782b56 Jean*0307 CLTOP(J,myThid)=CLTOP(J,myThid)*CLOUDC(J,myThid)
e749d70ece Jean*0308 ENDDO
0309
3a474aa258 Jean*0310 #ifdef ALLOW_AIM_TAVE
d676f916b2 Jean*0311
ab33782b56 Jean*0312 IF ( aim_taveFreq.GT.0. ) THEN
d676f916b2 Jean*0313
e204a6fa13 Jean*0314 DDTT = deltaTClock
d676f916b2 Jean*0315
0316 DO J=1,sNy
0317 DO I=1,sNx
0318 I2 = I+(J-1)*sNx
0319 TSRtave(i,j,bi,bj) = TSRtave(i,j,bi,bj)
0320 & + TSR(I2,myThid)*DDTT
0321 OLRtave(i,j,bi,bj) = OLRtave(i,j,bi,bj)
0322 & + OLR(I2,myThid)*DDTT
0323 SSRtave(i,j,bi,bj) = SSRtave(i,j,bi,bj)
b3097ed02d Jean*0324 & + SSR(I2,0,myThid)*DDTT
d676f916b2 Jean*0325 SLRtave(i,j,bi,bj) = SLRtave(i,j,bi,bj)
b3097ed02d Jean*0326 & + SLR(I2,0,myThid)*DDTT
d676f916b2 Jean*0327 SHFtave(i,j,bi,bj) = SHFtave(i,j,bi,bj)
b3097ed02d Jean*0328 & + SHF(I2,0,myThid)*DDTT
d676f916b2 Jean*0329 EVAPtave(i,j,bi,bj) = EVAPtave(i,j,bi,bj)
b3097ed02d Jean*0330 & + EVAP(I2,0,myThid)*DDTT
d676f916b2 Jean*0331 PRECNVtave(i,j,bi,bj) = PRECNVtave(i,j,bi,bj)
0332 & + PRECNV(I2,myThid)*DDTT
0333 PRECLStave(i,j,bi,bj) = PRECLStave(i,j,bi,bj)
0334 & + PRECLS(I2,myThid)*DDTT
0335 CLOUDCtave(i,j,bi,bj) = CLOUDCtave(i,j,bi,bj)
0336 & + CLOUDC(I2,myThid)*DDTT
3a474aa258 Jean*0337 CLTOPtave(i,j,bi,bj) = CLTOPtave(i,j,bi,bj)
0338 & + CLTOP(I2,myThid)*DDTT
0339 CBMFtave(i,j,bi,bj) = CBMFtave(i,j,bi,bj)
0340 & + CBMF(I2,myThid)*DDTT
0341 DRAGtave(i,j,bi,bj) = DRAGtave(i,j,bi,bj)
b3097ed02d Jean*0342 & + DRAG(I2,0,myThid)*DDTT
3a474aa258 Jean*0343 aimV0tave(i,j,bi,bj) = aimV0tave(i,j,bi,bj)
0344 & + SPEED0(I2,myThid)*DDTT
0345 aimT0tave(i,j,bi,bj) = aimT0tave(i,j,bi,bj)
0346 & + T0(I2,myThid)*DDTT
0347 aimQ0tave(i,j,bi,bj) = aimQ0tave(i,j,bi,bj)
0348 & + Q0(I2,myThid)*DDTT
b3097ed02d Jean*0349 EnFxPrtave(i,j,bi,bj) = EnFxPrtave(i,j,bi,bj)
0350 & + EnPrec(I2,myThid)
0351 & *(PRECNV(I2,myThid)+
0352 & PRECLS(I2,myThid))*DDTT
e749d70ece Jean*0353 albedotave(i,j,bi,bj) = albedotave(i,j,bi,bj)
0354 & + alb1(I2,0,myThid)*DDTT
0355 dTsurftave(i,j,bi,bj) = dTsurftave(i,j,bi,bj)
0356 & + dTsurf(I2,1,myThid)*DDTT
3a474aa258 Jean*0357 ENDDO
0358 ENDDO
0359
0360
0361 DO k=1,Nr
0362 Katm = _KD2KA( k )
0363 DO j=1,sNy
0364 DO i=1,sNx
0365 I2 = i+(j-1)*sNx
0366 aimRHtave(i,j,k,bi,bj) = aimRHtave(i,j,k,bi,bj)
0367 & + RH(I2,Katm,myThid)*DDTT
0368 ENDDO
d676f916b2 Jean*0369 ENDDO
0370 ENDDO
0371
0372
10308cbe80 Jean*0373 aim_timeAve(bi,bj) = aim_timeAve(bi,bj)+DDTT
d676f916b2 Jean*0374
0375 ENDIF
0376
3a474aa258 Jean*0377 #endif /* ALLOW_AIM_TAVE */
d676f916b2 Jean*0378
9340658285 Jean*0379
abe521d840 Jean*0380
0381 #ifdef ALLOW_DIAGNOSTICS
ab33782b56 Jean*0382 IF ( useDiagnostics ) THEN
9340658285 Jean*0383 CALL DIAGNOSTICS_FILL( TT_RSW(1,1,myThid),
1392931580 Jean*0384 & 'RADSW ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0385 CALL DIAGNOSTICS_FILL( TT_RLW(1,1,myThid),
1392931580 Jean*0386 & 'RADLW ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0387 CALL DIAGNOSTICS_FILL( TT_CNV(1,1,myThid),
1392931580 Jean*0388 & 'DTCONV ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0389 CALL DIAGNOSTICS_FILL( TT_PBL(1,1,myThid),
1392931580 Jean*0390 & 'TURBT ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0391 CALL DIAGNOSTICS_FILL( TT_LSC(1,1,myThid),
1392931580 Jean*0392 & 'DTLS ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0393 CALL DIAGNOSTICS_FILL( QT_CNV(1,1,myThid),
1392931580 Jean*0394 & 'DQCONV ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0395 CALL DIAGNOSTICS_FILL( QT_PBL(1,1,myThid),
1392931580 Jean*0396 & 'TURBQ ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0397 CALL DIAGNOSTICS_FILL( QT_LSC(1,1,myThid),
1392931580 Jean*0398 & 'DQLS ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0399 CALL DIAGNOSTICS_FILL( RH(1,1,myThid),
1392931580 Jean*0400 & 'RELHUM ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0401 CALL DIAGNOSTICS_FILL( TSR(1,myThid),
abe521d840 Jean*0402 & 'TSR ', 1, 1 , 3,bi,bj, myThid )
9340658285 Jean*0403 CALL DIAGNOSTICS_FILL( OLR(1,myThid),
0404 & 'OLR ', 1, 1 , 3,bi,bj, myThid )
0405 CALL DIAGNOSTICS_FILL( SSR(1,0,myThid),
0406 & 'RADSWG ', 1, 1 , 3,bi,bj, myThid )
0407 CALL DIAGNOSTICS_FILL( SLR(1,0,myThid),
0408 & 'RADLWG ', 1, 1 , 3,bi,bj, myThid )
0409 CALL DIAGNOSTICS_FILL( SHF(1,0,myThid),
0410 & 'HFLUX ', 1, 1 , 3,bi,bj, myThid )
0411 CALL DIAGNOSTICS_FILL( EVAP(1,0,myThid),
0412 & 'EVAP ', 1, 1 , 3,bi,bj, myThid )
0413 CALL DIAGNOSTICS_FILL( PRECNV(1,myThid),
0414 & 'PRECON ', 1, 1 , 3,bi,bj, myThid )
0415 CALL DIAGNOSTICS_FILL( PRECLS(1,myThid),
0416 & 'PRECLS ', 1, 1 , 3,bi,bj, myThid )
0417 CALL DIAGNOSTICS_FILL( CLOUDC(1,myThid),
0418 & 'CLDFRC ', 1, 1 , 3,bi,bj, myThid )
0419 CALL DIAGNOSTICS_FILL( CLTOP(1,myThid),
0420 & 'CLDPRS ', 1, 1 , 3,bi,bj, myThid )
abe521d840 Jean*0421
0422
9340658285 Jean*0423 CALL DIAGNOSTICS_FILL( CBMF(1,myThid),
0424 & 'CLDMAS ', 1, 1 , 3,bi,bj, myThid )
0425 CALL DIAGNOSTICS_FILL( DRAG(1,0,myThid),
abe521d840 Jean*0426 & 'DRAG ', 1, 1 , 3,bi,bj, myThid )
9340658285 Jean*0427 CALL DIAGNOSTICS_FILL( SPEED0(1,myThid),
0428 & 'WINDS ', 1, 1 , 3,bi,bj, myThid )
0429 CALL DIAGNOSTICS_FILL( T0(1,myThid),
0430 & 'TS ', 1, 1 , 3,bi,bj, myThid )
0431 CALL DIAGNOSTICS_FILL( Q0(1,myThid),
0432 & 'QS ', 1, 1 , 3,bi,bj, myThid )
0433 IF ( DIAGNOSTICS_IS_ON('ENPREC ',myThid) ) THEN
0434 DO J=1,NGP
0435 tmpVar(J) = EnPrec(J,myThid)
0436 & *(PRECNV(J,myThid)+PRECLS(J,myThid))
0437 ENDDO
0438 CALL DIAGNOSTICS_FILL( tmpVar,
0439 & 'ENPREC ', 1, 1 , 3,bi,bj, myThid )
0440 ENDIF
0441 CALL DIAGNOSTICS_FILL( alb1(1,0,myThid),
0442 & 'ALBVISDF', 1, 1 , 3,bi,bj, myThid )
0443 CALL DIAGNOSTICS_FILL( dTsurf(1,1,myThid),
5cbcb662ee Andr*0444 & 'DTSIMPL ', 1, 1 , 3,bi,bj, myThid )
e749d70ece Jean*0445 #ifdef ALLOW_CLR_SKY_DIAG
abe521d840 Jean*0446 IF ( aim_clrSkyDiag ) THEN
9340658285 Jean*0447 CALL DIAGNOSTICS_FILL( TT_SWclr(1,1,myThid),
1392931580 Jean*0448 & 'SWCLR ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0449 CALL DIAGNOSTICS_FILL( TT_LWclr(1,1,myThid),
1392931580 Jean*0450 & 'LWCLR ',-1, Nr, 3,bi,bj, myThid )
9340658285 Jean*0451 CALL DIAGNOSTICS_FILL( TSWclr(1,myThid),
abe521d840 Jean*0452 & 'TSRCLR ', 1, 1 , 3,bi,bj, myThid )
9340658285 Jean*0453 CALL DIAGNOSTICS_FILL( OLWclr(1,myThid),
0454 & 'OLRCLR ', 1, 1 , 3,bi,bj, myThid )
0455 CALL DIAGNOSTICS_FILL( SSWclr(1,myThid),
0456 & 'SWGCLR ', 1, 1 , 3,bi,bj, myThid )
0457 CALL DIAGNOSTICS_FILL( SLWclr(1,myThid),
0458 & 'LWGCLR ', 1, 1 , 3,bi,bj, myThid )
e749d70ece Jean*0459 ENDIF
0460 #endif /* ALLOW_CLR_SKY_DIAG */
0461
0462 ENDIF
0463 #endif /* ALLOW_DIAGNOSTICS */
6c0f3858f1 Andr*0464
d676f916b2 Jean*0465 #endif /* ALLOW_AIM */
0466
0467 RETURN
0468 END