Changeset 4205 for palm/trunk
 Timestamp:
 Aug 30, 2019 1:25:00 PM (3 years ago)
 Location:
 palm/trunk/SOURCE
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/plant_canopy_model_mod.f90
r4188 r4205 27 27 !  28 28 ! $Id$ 29 ! Missing working precision + bugfix in calculation of wind speed 30 ! 31 ! 4188 20190826 14:15:47Z suehring 29 32 ! Minor adjustment in error number 30 33 ! … … 235 238 IMPLICIT NONE 236 239 ! input parameters 237 INTEGER(iwp), INTENT(IN) ::i, j, k, kk !< indices of the pc gridbox238 REAL(wp), INTENT(IN) ::pcbsw !< sw radiation in gridbox (W)239 REAL(wp), INTENT(IN) ::pcblw !< lw radiation in gridbox (W)240 REAL(wp), INTENT(OUT) ::pcbtr !< transpiration rate dq/dt (kg/kg/s)241 REAL(wp), INTENT(OUT) ::pcblh !< latent heat from transpiration dT/dt (K/s)240 INTEGER(iwp), INTENT(IN) :: i, j, k, kk !< indices of the pc gridbox 241 REAL(wp), INTENT(IN) :: pcbsw !< sw radiation in gridbox (W) 242 REAL(wp), INTENT(IN) :: pcblw !< lw radiation in gridbox (W) 243 REAL(wp), INTENT(OUT) :: pcbtr !< transpiration rate dq/dt (kg/kg/s) 244 REAL(wp), INTENT(OUT) :: pcblh !< latent heat from transpiration dT/dt (K/s) 242 245 243 246 ! variables and parameters for calculation of transpiration rate 244 REAL(wp) ::sat_press, sat_press_d, temp, v_lad245 REAL(wp) ::d_fact, g_b, g_s, wind_speed, evapor_rate246 REAL(wp) ::f1, f2, f3, f4, vpd, rswc, e_eq, e_imp, rad247 REAL(wp), PARAMETER :: gama_psychr = 66!< psychrometric constant (Pa/K)248 REAL(wp), PARAMETER :: g_s_max = 0.01!< maximum stomatal conductivity (m/s)249 REAL(wp), PARAMETER :: m_soil = 0.4_wp!< soil water content (needs to adjust or take from LSM)250 REAL(wp), PARAMETER :: m_wilt = 0.01_wp!< wilting point soil water content (needs to adjust or take from LSM)251 REAL(wp), PARAMETER :: m_sat = 0.51_wp!< saturation soil water content (needs to adjust or take from LSM)252 REAL(wp), PARAMETER :: t2_min = 0.0_wp!< minimal temperature for calculation of f2253 REAL(wp), PARAMETER :: t2_max = 40.0_wp!< maximal temperature for calculation of f2247 REAL(wp) :: sat_press, sat_press_d, temp, v_lad 248 REAL(wp) :: d_fact, g_b, g_s, wind_speed, evapor_rate 249 REAL(wp) :: f1, f2, f3, f4, vpd, rswc, e_eq, e_imp, rad 250 REAL(wp), PARAMETER :: gama_psychr = 66.0_wp !< psychrometric constant (Pa/K) 251 REAL(wp), PARAMETER :: g_s_max = 0.01 !< maximum stomatal conductivity (m/s) 252 REAL(wp), PARAMETER :: m_soil = 0.4_wp !< soil water content (needs to adjust or take from LSM) 253 REAL(wp), PARAMETER :: m_wilt = 0.01_wp !< wilting point soil water content (needs to adjust or take from LSM) 254 REAL(wp), PARAMETER :: m_sat = 0.51_wp !< saturation soil water content (needs to adjust or take from LSM) 255 REAL(wp), PARAMETER :: t2_min = 0.0_wp !< minimal temperature for calculation of f2 256 REAL(wp), PARAMETER :: t2_max = 40.0_wp !< maximal temperature for calculation of f2 254 257 255 258 … … 257 260 temp = pt(k,j,i) * exner(k)  degc_to_k 258 261 ! Coefficient for conversion of radiation to grid to radiation to unit leaves surface 259 v_lad = 1.0_wp / ( MAX( lad_s(kk,j,i), 1.0 e10_wp ) * dx * dy * dz(1) )262 v_lad = 1.0_wp / ( MAX( lad_s(kk,j,i), 1.0E10_wp ) * dx * dy * dz(1) ) 260 263 ! Magnus formula for the saturation pressure (see Ngao, Adam and Saudreau (2017) eq. 1) 261 264 ! There are updated formulas available, kept consistent with the rest of the parametrization … … 265 268 ! Wind speed 266 269 wind_speed = SQRT( ( 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) )**2 + & 267 ( 0.5_wp * ( v(k,j,i) + v(k,j ,i+1) ) )**2 + &268 ( 0.5_wp * ( w(k,j,i) + w(k ,j,i+1) ) )**2 )270 ( 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ) )**2 + & 271 ( 0.5_wp * ( w(k,j,i) + w(k1,j,i) ) )**2 ) 269 272 ! Aerodynamic conductivity (Daudet et al. (1999) eq. 14 270 273 g_b = 0.01_wp * wind_speed + 0.0071_wp … … 273 276 ! First function for calculation of stomatal conductivity (radiation dependency) 274 277 ! Stewart (1988; Agric. and Forest. Meteorol. 43) eq. 17 275 f1 = rad * (1000. _wp+42.1_wp) / 1000._wp / (rad+42.1_wp)278 f1 = rad * (1000.0_wp+42.1_wp) / 1000.0_wp / (rad+42.1_wp) 276 279 ! Second function for calculation of stomatal conductivity (temperature dependency) 277 280 ! Stewart (1988; Agric. and Forest. Meteorol. 43) eq. 21 … … 286 289 ! than the coefficients from Stewart (1988) which correspond to conifer trees. 287 290 vpd = MIN(MAX(vpd,770.0_wp),3820.0_wp) 288 f3 = 2 e4_wp * vpd + 1.154_wp291 f3 = 2E4_wp * vpd + 1.154_wp 289 292 ! Fourth function for calculation of stomatal conductivity (soil moisture dependency) 290 293 ! Residual soil water content … … 293 296 rswc = ( m_sat  m_soil ) / ( m_sat  m_wilt ) 294 297 ! van Wijk et al. (1998; Tree Physiology 20) eq. 56 (it is a reformulation of eq. 2223 of Stewart(1988)) 295 f4 = MAX(0. _wp, MIN(1.0_wp  0.041_wp * EXP(3.2_wp * rswc), 1.0_wp  0.041_wp))298 f4 = MAX(0.0_wp, MIN(1.0_wp  0.041_wp * EXP(3.2_wp * rswc), 1.0_wp  0.041_wp)) 296 299 ! Stomatal conductivity 297 300 ! Stewart (1988; Agric. and Forest. Meteorol. 43) eq. 12 298 301 ! (notation according to Ngao, Adam and Saudreau (2017) and others) 299 g_s = g_s_max * f1 * f2 * f3 * f4 + 1.0 e10_wp302 g_s = g_s_max * f1 * f2 * f3 * f4 + 1.0E10_wp 300 303 ! Decoupling factor 301 304 ! Daudet et al. (1999) eq. 6 302 d_fact = (sat_press_d / gama_psychr + 2. _wp ) / &303 (sat_press_d / gama_psychr + 2. _wp + 2* g_b / g_s )305 d_fact = (sat_press_d / gama_psychr + 2.0_wp ) / & 306 (sat_press_d / gama_psychr + 2.0_wp + 2.0_wp * g_b / g_s ) 304 307 ! Equilibrium evaporation rate 305 308 ! Daudet et al. (1999) eq. 4 
palm/trunk/SOURCE/surface_data_output_mod.f90
r4182 r4205 25 25 !  26 26 ! $Id$ 27 !  Correct x,ycoordinates of vertical surfaces in netcdf output 28 !  Change definition of azimuth angle, reference is north 0 degree 29 !  zenith angle is always defined, also for vertical surfaces where it is 30 ! 90 degree, while azimuth angle is only defined for vertical surfaces, not 31 ! for horizontal ones 32 ! 33 ! 4182 20190822 15:20:23Z scharf 27 34 ! Corrected "Former revisions" section 28 35 ! … … 1068 1075 ! 1069 1076 ! For vertical surfaces, zenith angles are not defined (fill value). 1070 ! Azimuth angle: eastward (0), westward (180), northward (270), 1071 ! southward (90). 1077 ! Azimuth angle: northward (0), eastward (90), southward (180), 1078 ! westward (270). 1079 ! Note, for vertical surfaces, zenith angles are 90.0_wp. 1072 1080 DO l = 0, 3 1073 1081 IF ( l == 0 ) THEN 1074 az = 270.0_wp1082 az = 0.0_wp 1075 1083 off_x = 0.5_wp 1076 1084 off_y = 0.0_wp 1077 1085 ELSEIF ( l == 1 ) THEN 1086 az = 180.0_wp 1087 off_x = 0.5_wp 1088 off_y = 1.0_wp 1089 ELSEIF ( l == 2 ) THEN 1078 1090 az = 90.0_wp 1079 off_x = 0.5_wp1080 off_y = 0.0_wp1081 ELSEIF ( l == 2 ) THEN1082 az = 0.0_wp1083 1091 off_x = 0.0_wp 1084 1092 off_y = 0.5_wp 1085 1093 ELSEIF ( l == 3 ) THEN 1086 az = 180.0_wp1087 off_x = 0.0_wp1094 az = 270.0_wp 1095 off_x = 1.0_wp 1088 1096 off_y = 0.5_wp 1089 1097 ENDIF … … 1095 1103 surfaces%zs(mm) = zu(surf_def_v(l)%k(m)) 1096 1104 surfaces%azimuth(mm) = az 1097 surfaces%zenith(mm) = surfaces%fillvalue1105 surfaces%zenith(mm) = 90.0_wp 1098 1106 i = i + 1 1099 1107 mm = mm + 1 … … 1105 1113 surfaces%zs(mm) = zu(surf_lsm_v(l)%k(m)) 1106 1114 surfaces%azimuth(mm) = az 1107 surfaces%zenith(mm) = surfaces%fillvalue1115 surfaces%zenith(mm) = 90.0_wp 1108 1116 i = i + 1 1109 1117 mm = mm + 1 … … 1115 1123 surfaces%zs(mm) = zu(surf_usm_v(l)%k(m)) 1116 1124 surfaces%azimuth(mm) = az 1117 surfaces%zenith(mm) = surfaces%fillvalue1125 surfaces%zenith(mm) = 90.0_wp 1118 1126 i = i + 1 1119 1127 mm = mm + 1
Note: See TracChangeset
for help on using the changeset viewer.