File indexing completed on 2018-03-02 18:41:40 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
89992793c5 Jean*0001 #include "LAND_OPTIONS.h"
0002
0003
0004
0005
0006 SUBROUTINE LAND_MONITOR( land_frc, myTime, myIter, myThid )
0007
daeebd690b Ed H*0008
0009
d1c48a721f Jean*0010
89992793c5 Jean*0011
0012 IMPLICIT NONE
0013 #include "LAND_SIZE.h"
0014 #include "EEPARAMS.h"
0015 #include "PARAMS.h"
0016 #include "GRID.h"
0017 #include "LAND_PARAMS.h"
0018 #include "LAND_VARS.h"
0019 #ifdef ALLOW_MONITOR
d1c48a721f Jean*0020 # include "MONITOR.h"
89992793c5 Jean*0021 #endif
0022
0023
0024
0025
0026
0027
0028 _RS land_frc(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
0029 _RL myTime
0030 INTEGER myIter
0031 INTEGER myThid
0032
0033
0034 #ifdef ALLOW_LAND
0035 #ifdef ALLOW_MONITOR
0036
49aab2cab9 Jean*0037
94a46dfe0d Jean*0038 LOGICAL DIFFERENT_MULTIPLE
0039 EXTERNAL DIFFERENT_MULTIPLE
49aab2cab9 Jean*0040 LOGICAL MASTER_CPU_IO
0041 EXTERNAL MASTER_CPU_IO
89992793c5 Jean*0042
0043
0044
b8b300fc52 Jean*0045
89992793c5 Jean*0046
0047
0048
0049
d1c48a721f Jean*0050
89992793c5 Jean*0051
0052
0053
0054
0055
0056
d1c48a721f Jean*0057
89992793c5 Jean*0058
0059
0060
0061 INTEGER nLatBnd
0062 PARAMETER ( nLatBnd = 3 )
0063 CHARACTER*(MAX_LEN_MBUF) msgBuf
0064 CHARACTER*10 mon_var
0065 CHARACTER*2 mon_sufx(0:nLatBnd)
0066 INTEGER n, k
0067 _RS yBand(nLatBnd), locDr(land_nLev)
0068 _RL theMin(nLatBnd), theMax(nLatBnd)
0069 _RL theMean(nLatBnd), theVar(nLatBnd), theVol(nLatBnd)
b8b300fc52 Jean*0070 _RL theMeanG, theVolG
89992793c5 Jean*0071 _RL theEng(nLatBnd), theEnergy
0072
0073 DATA yBand / 0. , -24. , 24. /
0074 DATA mon_sufx / '_G' , '_S' , '_T' , '_N' /
0075
0076
0077
d1c48a721f Jean*0078 IF ( DIFFERENT_MULTIPLE(land_monFreq,myTime,deltaTClock)
89992793c5 Jean*0079 & .OR. myIter.EQ.nIter0 ) THEN
0080
49aab2cab9 Jean*0081 IF ( MASTER_CPU_IO(myThid) ) THEN
d1c48a721f Jean*0082
c3cd6c250f Jean*0083
d1c48a721f Jean*0084
0085 IF ( land_mon_stdio ) THEN
0086 mon_write_stdout = .TRUE.
0087 ELSE
0088 mon_write_stdout = .FALSE.
0089 ENDIF
0090 mon_write_mnc = .FALSE.
0091 #ifdef ALLOW_MNC
0092 IF ( useMNC .AND. land_mon_mnc ) THEN
0093 DO k = 1,MAX_LEN_MBUF
0094 mon_fname(k:k) = ' '
0095 ENDDO
0096 mon_fname(1:12) = 'monitor_land'
0097 CALL MNC_CW_APPEND_VNAME(
0098 & 'T', '-_-_--__-__t', 0,0, myThid)
0099 CALL MNC_CW_SET_UDIM(mon_fname, -1, myThid)
0100 CALL MNC_CW_I_W_S(
0101 & 'I',mon_fname,1,1,'T', myIter, myThid)
0102 CALL MNC_CW_SET_UDIM(mon_fname, 0, myThid)
0103 mon_write_mnc = .TRUE.
0104 ENDIF
0105 #endif /* ALLOW_MNC */
0106
0107 IF ( mon_write_stdout ) THEN
0108 WRITE(msgBuf,'(2A)') '// ===========================',
0109 & '============================'
0110 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0111 WRITE(msgBuf,'(A)') '// Begin MONITOR Land statistics'
0112 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0113 WRITE(msgBuf,'(2A)') '// ===========================',
0114 & '============================'
0115 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0116 ENDIF
0117
49aab2cab9 Jean*0118
daeebd690b Ed H*0119 ENDIF
89992793c5 Jean*0120
0121 CALL MON_SET_PREF('land_',myThid)
0122 CALL MON_OUT_RL('time_sec', myTime,mon_string_none,myThid)
d1c48a721f Jean*0123
904d19525b Jean*0124 DO k=1,land_nLev
0125 locDr(k)= 1.
0126 ENDDO
0127
89992793c5 Jean*0128
0129 CALL MON_STATS_LATBND_RL(
0130 I 1, 1, 1, nLatBnd, yBand,
b8b300fc52 Jean*0131 I land_hSnow, land_frc, maskInC, rA, yC, locDr,
89992793c5 Jean*0132 O theMin, theMax, theMean, theVar, theVol,
0133 I myThid )
0134 theVolG = 0.
0135 theMeanG= 0.
0136 DO n=1,nLatBnd
0137 theVolG = theVolG + theVol(n)
0138 theMeanG = theMeanG + theMean(n)*theVol(n)
0139 theEng(n)= -land_rhoSnow*land_Lfreez*theMean(n)*theVol(n)
0140 ENDDO
0141 IF (theVolG.GT.0.) theMeanG = theMeanG / theVolG
0142
0143 mon_var='SnwH_ave'
0144 CALL MON_OUT_RL(mon_var,theMeanG , mon_sufx(0), myThid)
0145 CALL MON_OUT_RL(mon_var,theMean(1), mon_sufx(1), myThid)
0146 CALL MON_OUT_RL(mon_var,theMean(2), mon_sufx(2), myThid)
0147 CALL MON_OUT_RL(mon_var,theMean(3), mon_sufx(3), myThid)
0148 mon_var='SnwH_max'
0149 CALL MON_OUT_RL(mon_var, theMax(1), mon_sufx(1), myThid)
0150 CALL MON_OUT_RL(mon_var, theMax(2), mon_sufx(2), myThid)
0151 CALL MON_OUT_RL(mon_var, theMax(3), mon_sufx(3), myThid)
0152
0153 IF ( myIter.EQ.1+nIter0 ) THEN
0154 _BEGIN_MASTER(myThid)
0155 WRITE(msgBuf,'(A,1PE16.9,A,0P9F7.2)') '%MON LAND : Area=',
0156 & theVolG, ' ; Lat sep=', (yBand(n),n=2,nLatBnd)
0157 CALL PRINT_MESSAGE( msgBuf, mon_ioUnit, SQUEEZE_RIGHT , 1)
d1c48a721f Jean*0158 WRITE(msgBuf,'(A,1P9E16.9)') '%MON LAND : LatA=',
89992793c5 Jean*0159 & (theVol(n),n=1,nLatBnd)
0160 CALL PRINT_MESSAGE( msgBuf, mon_ioUnit, SQUEEZE_RIGHT , 1)
0161 _END_MASTER(myThid)
0162 ENDIF
0163
0164
0165 CALL MON_STATS_LATBND_RL(
0166 I 1, 1, 1, nLatBnd, yBand,
b8b300fc52 Jean*0167 I land_skinT, land_frc, maskInC, rA, yC, locDr,
89992793c5 Jean*0168 O theMin, theMax, theMean, theVar, theVol,
0169 I myThid )
0170 theVolG = 0.
0171 theMeanG= 0.
0172 DO n=1,nLatBnd
0173 theVolG = theVolG + theVol(n)
0174 theMeanG = theMeanG + theMean(n)*theVol(n)
0175 ENDDO
0176 IF (theVolG.GT.0.) theMeanG = theMeanG / theVolG
0177
0178 mon_var='Tsrf_ave'
0179 CALL MON_OUT_RL(mon_var,theMeanG , mon_sufx(0), myThid)
0180 CALL MON_OUT_RL(mon_var,theMean(1), mon_sufx(1), myThid)
0181 CALL MON_OUT_RL(mon_var,theMean(2), mon_sufx(2), myThid)
0182 CALL MON_OUT_RL(mon_var,theMean(3), mon_sufx(3), myThid)
0183 mon_var='Tsrf_min'
0184 CALL MON_OUT_RL(mon_var, theMin(1), mon_sufx(1), myThid)
0185 CALL MON_OUT_RL(mon_var, theMin(2), mon_sufx(2), myThid)
0186 CALL MON_OUT_RL(mon_var, theMin(3), mon_sufx(3), myThid)
0187 mon_var='Tsrf_max'
0188 CALL MON_OUT_RL(mon_var, theMax(1), mon_sufx(1), myThid)
0189 CALL MON_OUT_RL(mon_var, theMax(2), mon_sufx(2), myThid)
0190 CALL MON_OUT_RL(mon_var, theMax(3), mon_sufx(3), myThid)
0191
0192
0193 CALL MON_STATS_LATBND_RL(
0194 I land_nLev, 1, 1, nLatBnd, yBand,
b8b300fc52 Jean*0195 I land_groundT, land_frc, maskInC, rA, yC, locDr,
89992793c5 Jean*0196 O theMin, theMax, theMean, theVar, theVol,
0197 I myThid )
0198 theVolG = 0.
0199 theMeanG= 0.
0200 DO n=1,nLatBnd
0201 theVolG = theVolG + theVol(n)
0202 theMeanG = theMeanG + theMean(n)*theVol(n)
0203 ENDDO
0204 IF (theVolG.GT.0.) theMeanG = theMeanG / theVolG
0205
0206 mon_var='Tgr1_ave'
0207 CALL MON_OUT_RL(mon_var,theMeanG , mon_sufx(0), myThid)
0208 CALL MON_OUT_RL(mon_var,theMean(1), mon_sufx(1), myThid)
0209 CALL MON_OUT_RL(mon_var,theMean(2), mon_sufx(2), myThid)
0210 CALL MON_OUT_RL(mon_var,theMean(3), mon_sufx(3), myThid)
0211 mon_var='Tgr1_min'
0212 CALL MON_OUT_RL(mon_var, theMin(1), mon_sufx(1), myThid)
0213 CALL MON_OUT_RL(mon_var, theMin(2), mon_sufx(2), myThid)
0214 CALL MON_OUT_RL(mon_var, theMin(3), mon_sufx(3), myThid)
0215 mon_var='Tgr1_max'
0216 CALL MON_OUT_RL(mon_var, theMax(1), mon_sufx(1), myThid)
0217 CALL MON_OUT_RL(mon_var, theMax(2), mon_sufx(2), myThid)
0218 CALL MON_OUT_RL(mon_var, theMax(3), mon_sufx(3), myThid)
d1c48a721f Jean*0219
89992793c5 Jean*0220
0221 CALL MON_STATS_LATBND_RL(
0222 I land_nLev, 1, 2, nLatBnd, yBand,
b8b300fc52 Jean*0223 I land_groundT, land_frc, maskInC, rA, yC, locDr,
89992793c5 Jean*0224 O theMin, theMax, theMean, theVar, theVol,
0225 I myThid )
0226 theVolG = 0.
0227 theMeanG= 0.
0228 DO n=1,nLatBnd
0229 theVolG = theVolG + theVol(n)
0230 theMeanG = theMeanG + theMean(n)*theVol(n)
0231 ENDDO
0232 IF (theVolG.GT.0.) theMeanG = theMeanG / theVolG
0233
0234 mon_var='Tgr2_ave'
0235 CALL MON_OUT_RL(mon_var,theMeanG , mon_sufx(0), myThid)
0236 CALL MON_OUT_RL(mon_var,theMean(1), mon_sufx(1), myThid)
0237 CALL MON_OUT_RL(mon_var,theMean(2), mon_sufx(2), myThid)
0238 CALL MON_OUT_RL(mon_var,theMean(3), mon_sufx(3), myThid)
0239 mon_var='Tgr2_min'
0240 CALL MON_OUT_RL(mon_var, theMin(1), mon_sufx(1), myThid)
0241 CALL MON_OUT_RL(mon_var, theMin(2), mon_sufx(2), myThid)
0242 CALL MON_OUT_RL(mon_var, theMin(3), mon_sufx(3), myThid)
0243 mon_var='Tgr2_max'
0244 CALL MON_OUT_RL(mon_var, theMax(1), mon_sufx(1), myThid)
0245 CALL MON_OUT_RL(mon_var, theMax(2), mon_sufx(2), myThid)
0246 CALL MON_OUT_RL(mon_var, theMax(3), mon_sufx(3), myThid)
d1c48a721f Jean*0247
904d19525b Jean*0248
0249 DO k=1,land_nLev
0250 locDr(k)= land_dzF(k)
0251 ENDDO
0252 CALL MON_STATS_LATBND_RL(
0253 I land_nLev, 1, 0, nLatBnd, yBand,
b8b300fc52 Jean*0254 I land_enthalp, land_frc, maskInC, rA, yC, locDr,
904d19525b Jean*0255 O theMin, theMax, theMean, theVar, theVol,
0256 I myThid )
0257 theEnergy = 0.
0258 DO n=1,nLatBnd
0259 theEng(n) = theEng(n) + theMean(n)*theVol(n)
0260 theEnergy = theEnergy + theEng(n)
0261 ENDDO
0262 mon_var='TotEnerg'
0263 CALL MON_OUT_RL(mon_var,theEnergy, mon_sufx(0), myThid)
0264 CALL MON_OUT_RL(mon_var,theEng(1), mon_sufx(1), myThid)
0265 CALL MON_OUT_RL(mon_var,theEng(2), mon_sufx(2), myThid)
0266 CALL MON_OUT_RL(mon_var,theEng(3), mon_sufx(3), myThid)
0267
89992793c5 Jean*0268
0269 CALL MON_STATS_LATBND_RL(
0270 I land_nLev, 1, 0, nLatBnd, yBand,
b8b300fc52 Jean*0271 I land_groundW, land_frc, maskInC, rA, yC, locDr,
89992793c5 Jean*0272 O theMin, theMax, theMean, theVar, theVol,
0273 I myThid )
0274 theVolG = 0.
0275 theMeanG= 0.
0276 DO n=1,nLatBnd
0277 theVolG = theVolG + theVol(n)
0278 theMeanG = theMeanG + theMean(n)*theVol(n)
0279 ENDDO
0280 IF (theVolG.GT.0.) theMeanG = theMeanG / theVolG
0281
0282 mon_var='grdW_ave'
0283 CALL MON_OUT_RL(mon_var,theMeanG , mon_sufx(0), myThid)
0284 CALL MON_OUT_RL(mon_var,theMean(1), mon_sufx(1), myThid)
0285 CALL MON_OUT_RL(mon_var,theMean(2), mon_sufx(2), myThid)
0286 CALL MON_OUT_RL(mon_var,theMean(3), mon_sufx(3), myThid)
0287 mon_var='grdW_min'
0288 CALL MON_OUT_RL(mon_var, theMin(1), mon_sufx(1), myThid)
0289 CALL MON_OUT_RL(mon_var, theMin(2), mon_sufx(2), myThid)
0290 CALL MON_OUT_RL(mon_var, theMin(3), mon_sufx(3), myThid)
0291
0292
0293
0294
0295
49aab2cab9 Jean*0296 IF ( MASTER_CPU_IO(myThid) ) THEN
d1c48a721f Jean*0297
c3cd6c250f Jean*0298
d1c48a721f Jean*0299
0300 IF (mon_write_stdout) THEN
0301 WRITE(msgBuf,'(2A)') '// ===========================',
0302 & '============================'
0303 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0304 WRITE(msgBuf,'(A)') '// End MONITOR Land statistics'
0305 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0306 WRITE(msgBuf,'(2A)') '// ===========================',
0307 & '============================'
0308 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0309 ENDIF
0310
0311 mon_write_stdout = .FALSE.
0312 mon_write_mnc = .FALSE.
0313
49aab2cab9 Jean*0314
d1c48a721f Jean*0315 ENDIF
9bd025660c Jean*0316
d1c48a721f Jean*0317
89992793c5 Jean*0318 ENDIF
0319
0320 #endif /* ALLOW_MONITOR */
0321 #endif /* ALLOW_LAND */
d1c48a721f Jean*0322
89992793c5 Jean*0323 RETURN
0324 END