File indexing completed on 2018-03-02 18:39:07 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
b614ad87ad Jean*0001 #include "DIAG_OPTIONS.h"
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 SUBROUTINE DIAGSTATS_LM_CALC(
0012 O statArr,
0013 I inpArr, frcArr, scaleFact, power, useFract,
c8eb4002b4 Jean*0014 I useReg, regMskVal,
b614ad87ad Jean*0015 I nStats,sizI1,sizI2,sizJ1,sizJ2, iRun,jRun,
0016 I regMask, arrMask, arrArea,
0017 I specialVal, exclSpVal,
0018 I k,bi,bj, parsFld, myThid )
0019
0020
0021
0022
0023
0024
0025 IMPLICIT NONE
0026
0027 #include "EEPARAMS.h"
0028 #include "SIZE.h"
0029 #ifdef ALLOW_FIZHI
0030 #include "fizhi_SIZE.h"
0031 #include "gridalt_mapping.h"
0032 #endif
0033
0034
0035
0036
0037
0038
0039
0040
0041
c8eb4002b4 Jean*0042
0043
b614ad87ad Jean*0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057 INTEGER nStats,sizI1,sizI2,sizJ1,sizJ2
0058 INTEGER iRun, jRun
0059 _RL statArr(0:nStats)
0060 _RL inpArr (sizI1:sizI2,sizJ1:sizJ2)
0061 _RL frcArr (sizI1:sizI2,sizJ1:sizJ2)
0062 _RL scaleFact
0063 INTEGER power
0064 LOGICAL useFract
c8eb4002b4 Jean*0065 INTEGER useReg
b614ad87ad Jean*0066 _RS regMskVal
0067 _RS regMask(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0068 _RS arrMask(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0069 _RS arrArea(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0070 _RL specialVal
0071 LOGICAL exclSpVal
0072 INTEGER k, bi, bj
0073 CHARACTER*16 parsFld
0074 INTEGER myThid
0075
0076
0077 #ifdef ALLOW_FIZHI
0078
0079 LOGICAL useWeight
0080 INTEGER kl
0081 _RL drLoc
c605a819b3 Jean*0082 #ifndef REAL4_IS_SLOW
0083 INTEGER i,j
0084 _RS tmp_hFac(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0085 #endif
b614ad87ad Jean*0086
0087
0088
0089 IF ( parsFld(10:10).EQ.'L' ) THEN
0090 kl = 1 + Nrphys - k
0091 useWeight = .TRUE.
0092 ELSE
0093 kl = 1
0094 useWeight = .FALSE.
0095 ENDIF
0096 drLoc = 1. _d 0
0097
c605a819b3 Jean*0098 #ifdef REAL4_IS_SLOW
cfc143f431 Jean*0099 CALL DIAGSTATS_CALC(
b614ad87ad Jean*0100 O statArr,
0101 I inpArr, frcArr, scaleFact, power, useFract,
c8eb4002b4 Jean*0102 I useReg, regMskVal,
b614ad87ad Jean*0103 I nStats,sizI1,sizI2,sizJ1,sizJ2,iRun,jRun,
0104 I regMask, arrMask,
cfc143f431 Jean*0105 I dpphys(1-OLx,1-OLy,kl,bi,bj), arrArea,
b614ad87ad Jean*0106 I drLoc, specialVal, exclSpVal, useWeight, myThid )
c605a819b3 Jean*0107 #else /* REAL4_IS_SLOW */
0108
0109 DO j=1-OLy,sNy+OLy
0110 DO i=1-OLx,sNx+OLx
0111 tmp_hFac(i,j) = dpphys(i,j,kl,bi,bj)
0112 ENDDO
0113 ENDDO
cfc143f431 Jean*0114 CALL DIAGSTATS_CALC(
c605a819b3 Jean*0115 O statArr,
0116 I inpArr, frcArr, scaleFact, power, useFract,
c8eb4002b4 Jean*0117 I useReg, regMskVal,
c605a819b3 Jean*0118 I nStats,sizI1,sizI2,sizJ1,sizJ2,iRun,jRun,
0119 I regMask, arrMask, tmp_hFac, arrArea,
0120 I drLoc, specialVal, exclSpVal, useWeight, myThid )
0121 #endif /* REAL4_IS_SLOW */
b614ad87ad Jean*0122
0123
0124 #endif /* ALLOW_FIZHI */
0125
0126 RETURN
0127 END
0128
0129
0130
0131
0132
0133
0134 SUBROUTINE DIAGSTATS_G_CALC(
0135 O statArr,
0136 I inpArr, frcArr, scaleFact, power, useFract,
c8eb4002b4 Jean*0137 I useReg, regMskVal,
b614ad87ad Jean*0138 I nStats,sizI1,sizI2,sizJ1,sizJ2, iRun,jRun,
0139 I regMask, arrArea,
0140 I specialVal, exclSpVal,
0141 I k,bi,bj, parsFld, myThid )
0142
0143
0144
0145
0146
0147
0148 IMPLICIT NONE
0149
0150 #include "EEPARAMS.h"
0151 #ifdef ALLOW_LAND
0152 # include "LAND_SIZE.h"
0153 # include "LAND_PARAMS.h"
0154 # ifdef ALLOW_AIM
0155 # include "AIM_FFIELDS.h"
0156 # endif
0157 #else
0158 # include "SIZE.h"
0159 #endif
0160
0161
0162
0163
0164
0165
0166
0167
0168
c8eb4002b4 Jean*0169
0170
b614ad87ad Jean*0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183 INTEGER nStats,sizI1,sizI2,sizJ1,sizJ2
0184 INTEGER iRun, jRun
0185 _RL statArr(0:nStats)
0186 _RL inpArr (sizI1:sizI2,sizJ1:sizJ2)
0187 _RL frcArr (sizI1:sizI2,sizJ1:sizJ2)
0188 _RL scaleFact
0189 INTEGER power
0190 LOGICAL useFract
c8eb4002b4 Jean*0191 INTEGER useReg
b614ad87ad Jean*0192 _RS regMskVal
0193 _RS regMask(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0194 _RS arrArea(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0195 _RL specialVal
0196 LOGICAL exclSpVal
0197 INTEGER k, bi, bj
0198 CHARACTER*16 parsFld
0199 INTEGER myThid
0200
0201
0202 #ifdef ALLOW_LAND
0203
0204 LOGICAL useWeight
0205 INTEGER kl
0206 _RL drLoc
0207
0208
0209
0210 IF ( parsFld(10:10).EQ.'G' ) THEN
0211 kl = MIN(k,land_nLev)
0212 drLoc = land_dzF(kl)
0213 ELSE
0214 drLoc = 1. _d 0
0215 ENDIF
0216 useWeight = .TRUE.
0217
cfc143f431 Jean*0218 CALL DIAGSTATS_CALC(
b614ad87ad Jean*0219 O statArr,
0220 I inpArr, frcArr, scaleFact, power, useFract,
c8eb4002b4 Jean*0221 I useReg, regMskVal,
b614ad87ad Jean*0222 I nStats,sizI1,sizI2,sizJ1,sizJ2,iRun,jRun,
cfc143f431 Jean*0223 I regMask, aim_landFr(1-OLx,1-OLy,bi,bj),
0224 I aim_landFr(1-OLx,1-OLy,bi,bj), arrArea,
b614ad87ad Jean*0225 I drLoc, specialVal, exclSpVal, useWeight, myThid )
0226
0227
0228 #endif /* ALLOW_LAND */
0229
0230 RETURN
0231 END