SURFEX v7.3
General documentation of Surfex
|
00001 ! ######### 00002 SUBROUTINE PREP_VER_TEB 00003 ! ################################################################################# 00004 ! 00005 !!**** *PREP_VER_TEB* - change in TEB variables due to altitude change 00006 !! 00007 !! PURPOSE 00008 !! ------- 00009 ! 00010 !!** METHOD 00011 !! ------ 00012 !! 00013 !! REFERENCE 00014 !! --------- 00015 !! 00016 !! 00017 !! AUTHOR 00018 !! ------ 00019 !! V. Masson 00020 !! 00021 !! MODIFICATIONS 00022 !! ------------- 00023 !! Original 01/2004 00024 !!------------------------------------------------------------------ 00025 ! 00026 00027 ! 00028 USE MODD_TEB_n, ONLY : XZS, XT_CANYON, XQ_CANYON, XT_ROAD, XT_ROOF, XT_WALL_A, XT_WALL_B, & 00029 TSNOW_ROOF, TSNOW_ROAD, XTI_ROAD, XD_WALL, XD_ROOF, CBEM 00030 USE MODD_BEM_n, ONLY : XT_FLOOR, XT_MASS, XD_FLOOR 00031 USE MODD_PREP, ONLY : XZS_LS, XT_CLIM_GRAD 00032 USE MODD_CSTS, ONLY : XRD, XG, XP00 00033 ! 00034 USE MODE_THERMOS 00035 USE MODI_PREP_VER_SNOW 00036 ! 00037 ! 00038 USE YOMHOOK ,ONLY : LHOOK, DR_HOOK 00039 USE PARKIND1 ,ONLY : JPRB 00040 ! 00041 IMPLICIT NONE 00042 ! 00043 !* 0.1 declarations of arguments 00044 ! 00045 ! 00046 !* 0.2 declarations of local variables 00047 ! 00048 INTEGER :: JL ! loop counter 00049 REAL, DIMENSION(:), ALLOCATABLE :: ZT0 ! estimated temperature at sea level 00050 REAL, DIMENSION(:), ALLOCATABLE :: ZP_LS ! estimated pressure at XZS_LS 00051 REAL, DIMENSION(:), ALLOCATABLE :: ZT_LS ! temperature at XZS_LS 00052 REAL, DIMENSION(:), ALLOCATABLE :: ZP ! estimated pressure at XZS 00053 REAL, DIMENSION(:,:), ALLOCATABLE :: ZGRID ! wall or roof grid 00054 REAL, DIMENSION(:), ALLOCATABLE :: ZD ! wall or roof total thickness 00055 REAL(KIND=JPRB) :: ZHOOK_HANDLE 00056 ! 00057 !------------------------------------------------------------------------------------- 00058 ! 00059 !* 1.1 Water reservoirs 00060 ! 00061 !* nothing done 00062 ! 00063 !* 1.2 Building temperature 00064 ! 00065 !* nothing done 00066 ! 00067 !* 1.3 Road deep temperature 00068 ! 00069 IF (LHOOK) CALL DR_HOOK('PREP_VER_TEB',0,ZHOOK_HANDLE) 00070 XTI_ROAD = XTI_ROAD + XT_CLIM_GRAD * (XZS - XZS_LS) 00071 ! 00072 !* 1.4 Road Temperature profile 00073 ! 00074 DO JL=1,SIZE(XT_ROAD,2) 00075 XT_ROAD(:,JL) = XT_ROAD(:,JL) + XT_CLIM_GRAD * (XZS - XZS_LS) 00076 END DO 00077 ! 00078 !* 1.5 Wall Temperature profile 00079 ! 00080 !* wall grid 00081 ALLOCATE(ZD (SIZE(XD_WALL,1))) 00082 ALLOCATE(ZGRID(SIZE(XD_WALL,1),SIZE(XD_WALL,2))) 00083 ZGRID(:,:) = 0. 00084 ZD (:) = 0. 00085 ! 00086 DO JL=1,SIZE(XD_WALL,2) 00087 ZGRID(:,JL) = ZD(:) + XD_WALL(:,JL)/2. 00088 ZD (:) = ZD(:) + XD_WALL(:,JL) 00089 END DO 00090 ! 00091 !* surface temperature shift is given by climatological gradient 00092 !* shift of temperatures within the wall is attenuated 00093 !* shift is zero from internal wall to half of wall 00094 DO JL=1,SIZE(XT_WALL_A,2) 00095 XT_WALL_A(:,JL) = XT_WALL_A(:,JL) + XT_CLIM_GRAD * (XZS - XZS_LS) & 00096 * MAX(1.-2.*ZGRID(:,JL)/ZD(:),0.) 00097 XT_WALL_B(:,JL) = XT_WALL_B(:,JL) + XT_CLIM_GRAD * (XZS - XZS_LS) & 00098 * MAX(1.-2.*ZGRID(:,JL)/ZD(:),0.) 00099 END DO 00100 ! 00101 DEALLOCATE(ZD) 00102 DEALLOCATE(ZGRID) 00103 ! 00104 !* 1.6 Roof Temperature profile 00105 ! 00106 !* roof grid 00107 ALLOCATE(ZD (SIZE(XD_ROOF,1))) 00108 ALLOCATE(ZGRID(SIZE(XD_ROOF,1),SIZE(XD_ROOF,2))) 00109 ZGRID(:,:) = 0. 00110 ZD (:) = 0. 00111 ! 00112 DO JL=1,SIZE(XD_ROOF,2) 00113 ZGRID(:,JL) = ZD(:) + XD_ROOF(:,JL)/2. 00114 ZD (:) = ZD(:) + XD_ROOF(:,JL) 00115 END DO 00116 ! 00117 !* surface temperature shift is given by climatological gradient 00118 !* shift of temperatures within the wall is attenuated 00119 !* shift is zero from internal wall to half of wall 00120 DO JL=1,SIZE(XT_ROOF,2) 00121 XT_ROOF(:,JL) = XT_ROOF(:,JL) + XT_CLIM_GRAD * (XZS - XZS_LS) & 00122 * MAX(1.-2.*ZGRID(:,JL)/ZD(:),0.) 00123 END DO 00124 ! 00125 DEALLOCATE(ZD) 00126 DEALLOCATE(ZGRID) 00127 ! 00128 ! 00129 IF (CBEM=='BEM') THEN 00130 ! 00131 !* 1.6bis Floor Temperature profile 00132 ! 00133 !* Floor grid 00134 ALLOCATE(ZD (SIZE(XD_FLOOR,1))) 00135 ALLOCATE(ZGRID(SIZE(XD_FLOOR,1),SIZE(XD_FLOOR,2))) 00136 ZGRID(:,:) = 0. 00137 ZD (:) = 0. 00138 ! 00139 DO JL=1,SIZE(XD_FLOOR,2) 00140 ZGRID(:,JL) = ZD(:) + XD_FLOOR(:,JL)/2. 00141 ZD (:) = ZD(:) + XD_FLOOR(:,JL) 00142 END DO 00143 ! 00144 !* deep ground temperature shift is given by climatological gradient 00145 !* shift of temperatures within the floor is attenuated 00146 !* shift is zero from internal floor layer to half of floor 00147 DO JL=1,SIZE(XT_FLOOR,2) 00148 XT_FLOOR(:,JL) = XT_FLOOR(:,JL) + XT_CLIM_GRAD * (XZS - XZS_LS) & 00149 * MAX(2.*ZGRID(:,JL)/ZD(:)-1.,0.) 00150 END DO 00151 ! 00152 DEALLOCATE(ZD) 00153 DEALLOCATE(ZGRID) 00154 ! 00155 !* 1.6bis Mass Temperature profile 00156 ! 00157 !* mass grid 00158 ALLOCATE(ZD (SIZE(XD_FLOOR,1))) 00159 ALLOCATE(ZGRID(SIZE(XD_FLOOR,1),SIZE(XD_FLOOR,2))) 00160 ZGRID(:,:) = 0. 00161 ZD (:) = 0. 00162 ! 00163 DO JL=1,SIZE(XD_FLOOR,2) 00164 ZGRID(:,JL) = ZD(:) + XD_FLOOR(:,JL)/2. 00165 ZD (:) = ZD(:) + XD_FLOOR(:,JL) 00166 END DO 00167 ! 00168 !* deep ground temperature shift is given by climatological gradient 00169 !* shift of temperatures within the floor is attenuated 00170 !* shift is zero from internal floor layer to half of floor 00171 DO JL=1,SIZE(XT_MASS,2) 00172 XT_MASS(:,JL) = XT_MASS(:,JL) + XT_CLIM_GRAD * (XZS - XZS_LS) & 00173 * MAX(2.*ZGRID(:,JL)/ZD(:)-1.,0.) 00174 END DO 00175 ! 00176 DEALLOCATE(ZD) 00177 DEALLOCATE(ZGRID) 00178 ! 00179 ENDIF 00180 ! 00181 !* 1.7 Snow variables 00182 ! 00183 CALL PREP_VER_SNOW(TSNOW_ROOF,XZS_LS,XZS) 00184 CALL PREP_VER_SNOW(TSNOW_ROAD,XZS_LS,XZS) 00185 ! 00186 ! 00187 !* 1.8 Canyon air temperature 00188 ! 00189 !* estimation of temperature at sea level 00190 ! 00191 ALLOCATE(ZT0(SIZE(XQ_CANYON))) 00192 ZT0 = XT_CANYON - XT_CLIM_GRAD * XZS_LS 00193 ! 00194 !* shift of canyon air temperature 00195 ! 00196 ALLOCATE(ZT_LS(SIZE(XQ_CANYON))) 00197 ZT_LS = XT_CANYON 00198 ! 00199 XT_CANYON = XT_CANYON + XT_CLIM_GRAD * (XZS - XZS_LS) 00200 ! 00201 !* 1.9 Canyon air humidity 00202 ! 00203 ! 00204 ! 00205 !* estimation of pressure at large-scale orography 00206 ! 00207 ALLOCATE(ZP_LS(SIZE(XQ_CANYON))) 00208 ZP_LS = XP00 * EXP(-(XG/XRD/ZT0)*XZS_LS+(XG*XT_CLIM_GRAD/(2.*XRD*ZT0))*XZS_LS**2) 00209 ! 00210 !* estimation of pressure at output orography 00211 ! 00212 ALLOCATE(ZP(SIZE(XQ_CANYON))) 00213 ZP = XP00 * EXP(-(XG/XRD/ZT0)*XZS +(XG*XT_CLIM_GRAD/(2.*XRD*ZT0))*XZS **2) 00214 ! 00215 !* conservation of estimated relative humidity 00216 ! 00217 XQ_CANYON = XQ_CANYON * QSAT(XT_CANYON,ZP) / QSAT(ZT_LS,ZP_LS) 00218 ! 00219 DEALLOCATE(ZP_LS) 00220 DEALLOCATE(ZP ) 00221 DEALLOCATE(ZT0 ) 00222 DEALLOCATE(ZT_LS) 00223 IF (LHOOK) CALL DR_HOOK('PREP_VER_TEB',1,ZHOOK_HANDLE) 00224 ! 00225 !------------------------------------------------------------------------------------- 00226 ! 00227 END SUBROUTINE PREP_VER_TEB