File indexing completed on 2018-03-02 18:37:26 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
b3097ed02d Jean*0001 #include "AIM_OPTIONS.h"
0002
0003
0004
0005
0006 SUBROUTINE SUFLUX_LAND(
0007 I PSA, FMASK, EMISloc,
0008 I Tsurf, dTskin, SWAV, SSR, SLRD,
e749d70ece Jean*0009 I T1, T0, Q0, DENVV,
b3097ed02d Jean*0010 O SHF, EVAP, SLRU,
e749d70ece Jean*0011 O Shf0, dShf, Evp0, dEvp, Slr0, dSlr, sFlx,
b3097ed02d Jean*0012 O TSFC, TSKIN,
0013 I bi,bj,myThid)
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 IMPLICIT NONE
0026
0027
0028
0029
0030 #include "AIM_SIZE.h"
0031 #include "EEPARAMS.h"
0032
0033
0034 #include "AIM_PARAMS.h"
0035
0036
0037 #include "com_physcon.h"
0038
0039
0040 #include "com_sflcon.h"
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
e749d70ece Jean*0053
b3097ed02d Jean*0054
0055
e749d70ece Jean*0056
b3097ed02d Jean*0057
0058
0059
0060
e749d70ece Jean*0061
0062
b3097ed02d Jean*0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075 _RL PSA(NGP), FMASK(NGP), EMISloc
0076 _RL Tsurf(NGP), dTskin(NGP), SWAV(NGP)
0077 _RL SSR(NGP), SLRD(NGP)
e749d70ece Jean*0078 _RL T1(NGP), T0(NGP), Q0(NGP), DENVV(NGP)
b3097ed02d Jean*0079
0080 _RL SHF(NGP), EVAP(NGP), SLRU(NGP)
e749d70ece Jean*0081 _RL Shf0(NGP), dShf(NGP), Evp0(NGP), dEvp(NGP)
0082 _RL Slr0(NGP), dSlr(NGP), sFlx(NGP,0:2)
b3097ed02d Jean*0083 _RL TSFC(NGP), TSKIN(NGP)
0084
0085 INTEGER bi,bj,myThid
0086
0087
0088 #ifdef ALLOW_AIM
0089
0090
e749d70ece Jean*0091
0092 _RL CDENVV(NGP), RDTH, FSLAND
0093 _RL Fstb0, dTstb, dFstb
b3097ed02d Jean*0094 _RL QSAT0(NGP,2)
0095 _RL QDUMMY(1), RDUMMY(1), TS2
0096 INTEGER J
0097
0098
0099
0100
0101
0102
0103 DO J=1,NGP
0104 TSKIN(J) = Tsurf(J) + dTskin(J)
0105 TSFC(J)=273.16 _d 0 + dTskin(J)
0106 ENDDO
0107
0108
0109
0110
e749d70ece Jean*0111
b3097ed02d Jean*0112
e749d70ece Jean*0113 RDTH = FSTAB/DTHETA
b3097ed02d Jean*0114
0115 DO J=1,NGP
e749d70ece Jean*0116 FSLAND=1.+MIN(DTHETA,MAX(-DTHETA,TSKIN(J)-T1(J)))*RDTH
0117 CDENVV(J)=CHL*DENVV(J)*FSLAND
b3097ed02d Jean*0118 ENDDO
0119
e749d70ece Jean*0120 IF ( dTstab.GT.0. _d 0 ) THEN
0121
0122
0123
0124 DO J=1,NGP
0125 Fstb0 = 1.+MIN(DTHETA,MAX(-DTHETA,TSFC(J) -T1(J)))*RDTH
0126 Shf0(J) = CHL*DENVV(J)*Fstb0
0127 dTstb = ( DTHETA+dTstab-ABS(TSKIN(J)-T1(J)) )/dTstab
0128 dFstb = RDTH*MIN(1. _d 0, MAX(0. _d 0, dTstb*0.5 _d 0))
0129 dShf(J) = CHL*DENVV(J)*dFstb
0130 ENDDO
0131 ENDIF
0132
0133
b3097ed02d Jean*0134
0135 CALL SHTORH (2, NGP, TSKIN, PSA, 1. _d 0, QDUMMY, dEvp,
0136 & QSAT0(1,1), myThid)
0137 CALL SHTORH (0, NGP, TSFC, PSA, 1. _d 0, QDUMMY, RDUMMY,
0138 & QSAT0(1,2), myThid)
0139
e98c426c93 Jean*0140 #ifdef ALLOW_DEW_ON_LAND
0141
0142 IF ( dTstab.GT.0. _d 0 ) THEN
0143
0144 DO J=1,NGP
0145 EVAP(J) = CDENVV(J)*SWAV(J)*(QSAT0(J,1)-Q0(J))
0146 Evp0(J) = Shf0(J)*SWAV(J)*(QSAT0(J,2)-Q0(J))
0147 dEvp(J) = CDENVV(J)*SWAV(J)*dEvp(J)
0148 & + dShf(J)*SWAV(J)*(QSAT0(J,1)-Q0(J))
0149 ENDDO
0150 ELSE
0151 DO J=1,NGP
0152 EVAP(J) = CDENVV(J)*SWAV(J)*(QSAT0(J,1)-Q0(J))
0153 Evp0(J) = CDENVV(J)*SWAV(J)*(QSAT0(J,2)-Q0(J))
0154 dEvp(J) = CDENVV(J)*SWAV(J)*dEvp(J)
0155 ENDDO
0156 ENDIF
0157 #else /* ALLOW_DEW_ON_LAND */
0158
e749d70ece Jean*0159 IF ( dTstab.GT.0. _d 0 ) THEN
0160
0161 DO J=1,NGP
0162 EVAP(J) = CDENVV(J)*SWAV(J)*MAX(0. _d 0,QSAT0(J,1)-Q0(J))
0163 Evp0(J) = Shf0(J)*SWAV(J)*MAX(0. _d 0,QSAT0(J,2)-Q0(J))
0164 dEvp(J) = CDENVV(J)*SWAV(J)*dEvp(J)
0165 & + dShf(J)*SWAV(J)*MAX(0. _d 0,QSAT0(J,1)-Q0(J))
0166 ENDDO
0167 ELSE
0168 DO J=1,NGP
b3097ed02d Jean*0169
0170
0171
0172 EVAP(J) = CDENVV(J)*SWAV(J)*MAX(0. _d 0,QSAT0(J,1)-Q0(J))
0173 Evp0(J) = CDENVV(J)*SWAV(J)*MAX(0. _d 0,QSAT0(J,2)-Q0(J))
0174 dEvp(J) = CDENVV(J)*SWAV(J)*dEvp(J)
e749d70ece Jean*0175 ENDDO
0176 ENDIF
e98c426c93 Jean*0177 #endif /* ALLOW_DEW_ON_LAND */
e749d70ece Jean*0178
0179
0180
0181 IF ( dTstab.GT.0. _d 0 ) THEN
0182
0183 DO J=1,NGP
0184 SHF(J) = CDENVV(J)*CP*(TSKIN(J)-T0(J))
0185 Shf0(J) = Shf0(J)*CP*(TSFC(J) -T0(J))
0186 dShf(J) = CDENVV(J)*CP
0187 & + dShf(J)*CP*(TSKIN(J)-T0(J))
0188 dShf(J) = MAX( dShf(J), 0. _d 0 )
e98c426c93 Jean*0189
0190
0191
0192 dEvp(J) = MAX( dEvp(J), -dShf(J)/ALHC )
e749d70ece Jean*0193 ENDDO
0194 ELSE
0195 DO J=1,NGP
0196 SHF(J) = CDENVV(J)*CP*(TSKIN(J)-T0(J))
0197 Shf0(J) = CDENVV(J)*CP*(TSFC(J) -T0(J))
0198 dShf(J) = CDENVV(J)*CP
0199 ENDDO
0200 ENDIF
b3097ed02d Jean*0201
0202
0203
0204 DO J=1,NGP
0205 TS2 = TSFC(J)*TSFC(J)
0206 Slr0(J) = SBC*TS2*TS2
0207 TS2 = TSKIN(J)*TSKIN(J)
0208 SLRU(J) = SBC*TS2*TS2
0209 dSlr(J) = 4. _d 0 *SBC*TS2*TSKIN(J)
0210 ENDDO
0211
0212
0213 DO J=1,NGP
e749d70ece Jean*0214 sFlx(J,0)= ( SSR(J) + SLRD(J) - EMISloc*Slr0(J) )
0215 & - ( Shf0(J) + ALHC*Evp0(J) )
0216 sFlx(J,1)= ( SSR(J) + SLRD(J) - EMISloc*SLRU(J) )
0217 & - ( SHF(J)+ ALHC*EVAP(J) )
0218 sFlx(J,2)= - EMISloc*dSlr(J)
0219 & - ( dShf(J) + ALHC*dEvp(J) )
b3097ed02d Jean*0220 ENDDO
0221
0222
0223
0224
0225
0226
0227 #endif /* ALLOW_AIM */
0228
0229 RETURN
0230 END