SURFEX v7.3
General documentation of Surfex
|
00001 ! ######################################### 00002 SUBROUTINE CANOPY_EVOL(KI,KLVL,PTSTEP, KIMPL, & 00003 PZZ,PWIND,PTA,PQA,PPA,PRHOA, & 00004 PSFLUX_U,PSFLUX_T,PSFLUX_Q, & 00005 PFORC_U,PDFORC_UDU,PFORC_E,PDFORC_EDE,PFORC_T,PDFORC_TDT, & 00006 PFORC_Q,PDFORC_QDQ, & 00007 PZ,PZF,PDZ,PDZF,PU,PTKE,PT,PQ,PLMO,PLM,PLEPS,PP,PUSTAR, & 00008 PALFAU,PBETAU,PALFATH,PBETATH,PALFAQ,PBETAQ, ONEUTRAL ) 00009 ! ######################################### 00010 ! 00011 !!**** *CANOPY_EVOL* - evolution of canopy 00012 !! 00013 !! 00014 !! PURPOSE 00015 !! ------- 00016 !! 00017 !!** METHOD 00018 !! ------ 00019 !! 00020 !! EXTERNAL 00021 !! -------- 00022 !! 00023 !! 00024 !! IMPLICIT ARGUMENTS 00025 !! ------------------ 00026 !! 00027 !! REFERENCE 00028 !! --------- 00029 !! 00030 !! 00031 !! AUTHOR 00032 !! ------ 00033 !! V. Masson *Meteo France* 00034 !! 00035 !! MODIFICATIONS 00036 !! ------------- 00037 !! Original 07/2006 00038 !------------------------------------------------------------------------------- 00039 ! 00040 !* 0. DECLARATIONS 00041 ! ------------ 00042 ! 00043 USE MODD_CSTS, ONLY : XG, XRD, XCPD, XP00 00044 USE MODD_SURF_PAR, ONLY : XUNDEF 00045 USE MODD_CANOPY_TURB, ONLY : XCMFS, XCSHF 00046 ! 00047 USE MODI_RMC01_SURF 00048 USE MODI_CANOPY_EVOL_WIND 00049 USE MODI_CANOPY_EVOL_TKE 00050 USE MODI_CANOPY_EVOL_TEMP 00051 ! 00052 USE MODE_SBLS 00053 ! 00054 USE YOMHOOK ,ONLY : LHOOK, DR_HOOK 00055 USE PARKIND1 ,ONLY : JPRB 00056 ! 00057 IMPLICIT NONE 00058 ! 00059 !* 0.1 Declarations of arguments 00060 ! ------------------------- 00061 ! 00062 INTEGER, INTENT(IN) :: KI ! number of horizontal points 00063 INTEGER, INTENT(IN) :: KLVL ! number of levels in canopy 00064 REAL, INTENT(IN) :: PTSTEP ! atmospheric time-step (s) 00065 INTEGER, INTENT(IN) :: KIMPL ! implicitation code: 00066 ! ! 1 : computes only alfa and beta coupling 00067 ! ! coefficients for all variables 00068 ! ! 2 : computes temporal evolution of the 00069 ! ! variables 00070 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PZZ ! Mixing length generic profile at mid levels (-) 00071 REAL, DIMENSION(KI), INTENT(IN) :: PWIND ! wind speed (m/s) 00072 REAL, DIMENSION(KI), INTENT(IN) :: PTA ! Air temperature (K) 00073 REAL, DIMENSION(KI), INTENT(IN) :: PQA ! Air humidity (kg/m3) 00074 REAL, DIMENSION(KI), INTENT(IN) :: PPA ! Pressure at forcing level (Pa) 00075 REAL, DIMENSION(KI), INTENT(IN) :: PRHOA ! Air density at forcing level (kg/m3) 00076 REAL, DIMENSION(KI), INTENT(IN) :: PSFLUX_U ! surface flux u'w' (m2/s2) 00077 REAL, DIMENSION(KI), INTENT(IN) :: PSFLUX_T ! surface flux w'T' (Km/s) 00078 REAL, DIMENSION(KI), INTENT(IN) :: PSFLUX_Q ! surface flux w'q' (kg/m2/s) 00079 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PFORC_U ! tendency of wind due to canopy drag (m/s2) 00080 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PDFORC_UDU! formal derivative of the tendency of 00081 ! ! wind due to canopy drag (1/s) 00082 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PFORC_E ! tendency of TKE due to canopy drag (m2/s3) 00083 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PDFORC_EDE! formal derivative of the tendency of 00084 ! ! TKE due to canopy drag (1/s) 00085 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PFORC_T ! tendency of Temp due to canopy drag (T/s) 00086 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PDFORC_TDT! formal derivative of the tendency of 00087 ! ! Temp due to canopy drag (1/s) 00088 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PFORC_Q ! tendency of Hum. due to canopy drag (kg/m3/s) 00089 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PDFORC_QDQ! formal derivative of the tendency of 00090 ! ! Hum. due to canopy drag (1/s) 00091 ! 00092 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PZ ! heights of canopy levels (m) 00093 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PZF ! heights of bottom of canopy levels (m) 00094 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PDZ ! depth of canopy levels (m) 00095 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: PDZF ! depth between canopy levels (m) 00096 REAL, DIMENSION(KI,KLVL), INTENT(INOUT) :: PU ! wind speed at canopy levels (m/s) 00097 REAL, DIMENSION(KI,KLVL), INTENT(INOUT) :: PTKE ! TKE at canopy levels (m2/s2) 00098 REAL, DIMENSION(KI,KLVL), INTENT(INOUT) :: PT ! Temperature at canopy levels (K) 00099 REAL, DIMENSION(KI,KLVL), INTENT(INOUT) :: PQ ! Humidity at canopy levels (kg/m3) 00100 REAL, DIMENSION(KI,KLVL), INTENT(INOUT) :: PLMO ! Monin-Obhukov length (m) 00101 REAL, DIMENSION(KI,KLVL), INTENT(OUT) :: PLM ! mixing length (m) 00102 REAL, DIMENSION(KI,KLVL), INTENT(OUT) :: PLEPS ! dissipative length (m) 00103 REAL, DIMENSION(KI,KLVL), INTENT(INOUT) :: PP ! Pressure at canopy levels (Pa) 00104 REAL, DIMENSION(KI), INTENT(OUT) :: PUSTAR ! friction velocity at forcing level (m/s) 00105 ! 00106 REAL, DIMENSION(KI), INTENT(OUT) :: PALFAU ! V+(1) = alfa u'w'(1) + beta 00107 REAL, DIMENSION(KI), INTENT(OUT) :: PBETAU ! V+(1) = alfa u'w'(1) + beta 00108 REAL, DIMENSION(KI), INTENT(OUT) :: PALFATH ! Th+(1) = alfa w'th'(1) + beta 00109 REAL, DIMENSION(KI), INTENT(OUT) :: PBETATH ! Th+(1) = alfa w'th'(1) + beta 00110 REAL, DIMENSION(KI), INTENT(OUT) :: PALFAQ ! Q+(1) = alfa w'q'(1) + beta 00111 REAL, DIMENSION(KI), INTENT(OUT) :: PBETAQ ! Q+(1) = alfa w'q'(1) + beta 00112 ! 00113 LOGICAL, OPTIONAL, INTENT(IN) :: ONEUTRAL 00114 ! 00115 !* 0.2 Declarations of local variables 00116 ! ------------------------------- 00117 ! 00118 LOGICAL :: GNEUTRAL 00119 ! 00120 INTEGER :: JLAYER ! loop counter on layers 00121 INTEGER :: JI ! loop counter 00122 ! 00123 REAL, DIMENSION(KI,KLVL) :: ZK ! mixing coefficient 00124 REAL, DIMENSION(KI,KLVL) :: ZDKDDVDZ ! formal derivative of mixing coefficient according to variable vertical gradient 00125 REAL, DIMENSION(KI,KLVL) :: ZTH ! potential temperature at full levels 00126 REAL, DIMENSION(KI) :: ZTHA ! potential temperature at forcing level 00127 REAL, DIMENSION(KI,KLVL) :: ZEXN ! Exner function at full levels 00128 REAL, DIMENSION(KI,KLVL) :: ZUW ! friction at mid levels 00129 REAL, DIMENSION(KI) :: ZSFLUX_TH ! Surface flux w'Th' (mK/s) 00130 REAL, DIMENSION(KI,KLVL) :: ZFORC_TH ! tendency of Temp due to canopy drag (T/s) 00131 REAL, DIMENSION(KI,KLVL) :: ZDFORC_THDTH ! formal derivative of the tendency of 00132 ! ! Temp due to canopy drag (1/s) 00133 REAL, DIMENSION(KI,KLVL) :: ZWTH ! w'Th' at mid levels 00134 REAL, DIMENSION(KI,KLVL) :: ZWQ ! w'q' at mid levels 00135 REAL, DIMENSION(KI,KLVL) :: ZSFTH ! heat flux at atmospheric forcing level 00136 REAL, DIMENSION(KI,KLVL) :: ZSFRV ! vapor flux at atmospheric forcing level 00137 REAL :: ZZ0 ! a value of z0 just for first time-step init. 00138 REAL, DIMENSION(KI,KLVL) :: ZRHOA ! air density profile 00139 REAL(KIND=JPRB) :: ZHOOK_HANDLE 00140 !------------------------------------------------------------------------------- 00141 IF (LHOOK) CALL DR_HOOK('CANOPY_EVOL',0,ZHOOK_HANDLE) 00142 ! 00143 GNEUTRAL = .FALSE. 00144 ! 00145 IF (PRESENT(ONEUTRAL)) GNEUTRAL = ONEUTRAL 00146 ! 00147 !* 1. First time step initialization 00148 ! ------------------------------ 00149 ! 00150 !* first time step (i.e. wind profile is initially zero) : 00151 ! set a neutral wind profile in relation with forcing wind 00152 DO JI=1,KI 00153 IF(PWIND(JI)>0. .AND. PU(JI,KLVL-1)==0.) THEN 00154 ZZ0 = PZ(JI,1)/2. 00155 PU(JI,:) = PWIND(JI) * LOG (PZ(JI,:)/ZZ0) / LOG (PZ(JI,KLVL)/ZZ0) 00156 END IF 00157 END DO 00158 !------------------------------------------------------------------------------- 00159 ! 00160 !* 5. mixing and dissipative lengths (at full levels) 00161 ! ------------------------------ 00162 ! 00163 CALL RMC01_SURF(PZZ,PLMO,PLM,PLEPS,GNEUTRAL) 00164 ! 00165 !------------------------------------------------------------------------------- 00166 ! 00167 !* 6. time evolution of wind in canopy 00168 ! -------------------------------- 00169 ! 00170 !* 6.1 mixing coefficient for wind at mid layers (at half levels) 00171 ! --------------------------- 00172 ! 00173 ZK = -999. 00174 DO JLAYER=2,KLVL 00175 ZK(:,JLAYER) = 0.5 * XCMFS * PLM(:,JLAYER) * SQRT(PTKE(:,JLAYER) ) & 00176 + 0.5 * XCMFS * PLM(:,JLAYER-1) * SQRT(PTKE(:,JLAYER-1)) 00177 END DO 00178 ! 00179 ! 00180 !* 6.2 mixing coefficient vertical derivative at mid layers (at half levels) 00181 ! -------------------------------------- 00182 ! 00183 !* there is no formal dependency on wind 00184 ZDKDDVDZ = 0. 00185 ! 00186 ! 00187 !* 6.3 time evolution of wind in canopy 00188 ! -------------------------------- 00189 ! 00190 CALL CANOPY_EVOL_WIND(KI,KLVL,PTSTEP,KIMPL,PWIND,ZK,ZDKDDVDZ,PSFLUX_U,PFORC_U,PDFORC_UDU,PDZ,PDZF,PU,ZUW,PALFAU,PBETAU) 00191 ! 00192 !* 6.4 Friction velocity at top of SBL layers 00193 ! -------------------------------------- 00194 ! 00195 PUSTAR = SQRT(ABS(ZUW(:,KLVL))) 00196 ! 00197 !------------------------------------------------------------------------------- 00198 ! 00199 IF (GNEUTRAL) THEN 00200 ! 00201 ZTH = 300. 00202 ZWTH = 0. 00203 ZWQ = 0. 00204 ! 00205 ELSE 00206 ! 00207 !* 7. time evolution of temperature in canopy 00208 ! --------------------------------------- 00209 ! 00210 !* 7.3 convertion into potential temperature (at half levels) 00211 ! ------------------------------------- 00212 ! 00213 DO JLAYER=1,KLVL 00214 PP(:,JLAYER) = PPA(:) + XG * PRHOA(:) * (PZ(:,KLVL) - PZ(:,JLAYER)) 00215 END DO 00216 ZEXN = (PP/XP00)**(XRD/XCPD) 00217 ! 00218 ZTH = XUNDEF 00219 WHERE(PT/=XUNDEF) ZTH(:,:) = PT(:,:) / ZEXN(:,:) 00220 ! 00221 ZTHA(:) = PTA(:) / ZEXN(:,KLVL) 00222 ! 00223 !* 7.1 mixing coefficient for wind at mid layers (at half levels) 00224 ! --------------------------- 00225 ! 00226 ZK = -999. 00227 DO JLAYER=2,KLVL 00228 ZK(:,JLAYER) = 0.5 * XCSHF * PLM(:,JLAYER) * SQRT(PTKE(:,JLAYER) ) & 00229 + 0.5 * XCSHF * PLM(:,JLAYER-1) * SQRT(PTKE(:,JLAYER-1)) 00230 END DO 00231 ! 00232 !* 7.2 mixing coefficient vertical derivative at mid layers (at half levels) 00233 ! -------------------------------------- 00234 ! 00235 !* there is no formal dependency on temperature 00236 ZDKDDVDZ = 0. 00237 ! 00238 !* 7.4 conversion of canopy tendency into potential temperature tendency 00239 ! ----------------------------------------------------------------- 00240 ! 00241 ZSFLUX_TH = PSFLUX_T / ZEXN(:,1) 00242 ZFORC_TH = PFORC_T / ZEXN 00243 ZDFORC_THDTH = PDFORC_TDT 00244 ! 00245 ! 00246 !* 7.5 time evolution of temperature in canopy 00247 ! --------------------------------------- 00248 ! 00249 CALL CANOPY_EVOL_TEMP(KI,KLVL,PTSTEP,KIMPL,ZTHA,ZK,ZDKDDVDZ,ZSFLUX_TH,ZFORC_TH,ZDFORC_THDTH,PDZ,PDZF,ZTH,ZWTH,PALFATH,PBETATH) 00250 ! 00251 !* 7.6 convertion into absolute temperature 00252 ! ------------------------------------ 00253 ! 00254 WHERE(PT/=XUNDEF) PT(:,:) = ZTH(:,:) * ZEXN(:,:) 00255 ! 00256 !------------------------------------------------------------------------------- 00257 ! 00258 !* 8. time evolution of Humidity in canopy 00259 ! ------------------------------------ 00260 ! 00261 CALL CANOPY_EVOL_TEMP(KI,KLVL,PTSTEP,KIMPL,PQA,ZK,ZDKDDVDZ,PSFLUX_Q,PFORC_Q,PDFORC_QDQ,PDZ,PDZF,PQ,ZWQ,PALFAQ,PBETAQ) 00262 ! 00263 !------------------------------------------------------------------------------- 00264 IF (KIMPL==1 .AND. LHOOK) CALL DR_HOOK('CANOPY_EVOL',1,ZHOOK_HANDLE) 00265 IF (KIMPL==1) RETURN 00266 !------------------------------------------------------------------------------- 00267 ! 00268 ENDIF 00269 ! 00270 !* 9. time evolution of TKE in canopy 00271 ! ------------------------------- 00272 ! 00273 CALL CANOPY_EVOL_TKE(KI,KLVL,PTSTEP,PRHOA,PZ,PZF,PDZ,PDZF,PFORC_E,PDFORC_EDE, & 00274 PU,ZTH,ZUW,ZWTH,ZWQ,PLEPS,PTKE ) 00275 ! 00276 !------------------------------------------------------------------------------- 00277 ! 00278 IF (.NOT.GNEUTRAL) THEN 00279 ! 00280 !* 10. Monin-Obuhkov length 00281 ! -------------------- 00282 ! 00283 !* MO length is estimated using the heat and vapor turbulent fluxes at atmospheric level 00284 ! (it avoids the problems of vertical variation of the fluxes in the canopy) 00285 ! However, friction flux MUST be taken as the maximum flux on the 00286 ! profile, in order to avoid unrealistically small MO length when using 00287 ! small time-steps 00288 ! 00289 ZRHOA(:,:) = SPREAD(PRHOA(:),2,KLVL) 00290 ! 00291 ZSFTH(:,:) = ZWTH(:,:) 00292 ZSFRV(:,:) = ZWQ (:,:) / ZRHOA(:,:) 00293 ! 00294 PLMO(:,:) = LMO(SQRT(ABS(ZUW)),PT,PQ,ZSFTH,ZSFRV) 00295 ! 00296 DO JLAYER=1,KLVL 00297 WHERE (PLMO(:,JLAYER)>0.) PLMO(:,JLAYER) = MAX(PLMO(:,JLAYER),PZ(:,KLVL)) 00298 WHERE (PLMO(:,JLAYER)<0.) PLMO(:,JLAYER) = MIN(PLMO(:,JLAYER),-PZ(:,KLVL)) 00299 ENDDO 00300 ! 00301 !------------------------------------------------------------------------------- 00302 ! 00303 !* 11. Security at atmospheric forcing level 00304 ! ------------------------------------- 00305 ! 00306 PT(:,KLVL) = PTA(:) 00307 ! 00308 PQ(:,KLVL) = PQA(:) 00309 ! 00310 ENDIF 00311 ! 00312 PU(:,KLVL) = PWIND(:) 00313 ! 00314 IF (LHOOK) CALL DR_HOOK('CANOPY_EVOL',1,ZHOOK_HANDLE) 00315 ! 00316 !------------------------------------------------------------------------------- 00317 END SUBROUTINE CANOPY_EVOL 00318