Changeset 3361 for palm/trunk
- Timestamp:
- Oct 16, 2018 8:39:37 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/basic_constants_and_equations_mod.f90
r3274 r3361 72 72 REAL(wp), PARAMETER :: lv_d_cp = l_v / c_p !< precomputed l_v / c_p 73 73 REAL(wp), PARAMETER :: lv_d_rd = l_v / r_d !< precomputed l_v / r_d 74 REAL(wp), PARAMETER :: rd_d_rv = 0.622_wp !r_d / r_v !< precomputed r_d / r_v 74 75 REAL(wp), PARAMETER :: rd_d_cp = 0.286_wp !r_d / c_p !< precomputed r_d / c_p 75 76 REAL(wp), PARAMETER :: cp_d_rd = 1.0_wp/0.286_wp !c_p / r_d !< precomputed c_p / r_d -
palm/trunk/SOURCE/biometeorology_mod.f90
r3337 r3361 45 45 USE arrays_3d, & 46 46 ONLY: hyp, p, pt, q, u, v, w 47 48 USE basic_constants_and_equations_mod, & 49 ONLY: rd_d_rv 47 50 48 51 USE kinds !< to set precision of INTEGER and REAL arrays according to PALM … … 231 234 CALL calculate_pet_static( & 232 235 pt(k,j,i) * (hyp(k) / 100000.0_wp )**0.286_wp + t_zero, & !< Air temperature (°C) 233 q(k,j,i) * hyp(k) / ( q(k,j,i) + 0.622_wp ) / 100._wp,& !< Vapor pressure (hPa)236 q(k,j,i) * hyp(k) / ( q(k,j,i) + rd_d_rv ) / 100._wp, & !< Vapor pressure (hPa) 234 237 SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & 235 238 ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & … … 380 383 CALL calculate_pet_static( & 381 384 pt(k,j,i) * (hyp(k) / 100000.0_wp )**0.286_wp + t_zero, & !< Air temperature (°C) 382 q(k,j,i) * hyp(k) / ( q(k,j,i) + 0.622_wp ) / 100.0_wp,& !< Vapor pressure (hPa)385 q(k,j,i) * hyp(k) / ( q(k,j,i) + rd_d_rv ) / 100.0_wp, & !< Vapor pressure (hPa) 383 386 SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & 384 387 ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & -
palm/trunk/SOURCE/bulk_cloud_model_mod.f90
r3274 r3361 186 186 molecular_weight_of_water, pi, rho_l, rho_s, r_d, r_v, vanthoff,& 187 187 exner_function, exner_function_invers, ideal_gas_law_rho, & 188 ideal_gas_law_rho_pt, barometric_formula 188 ideal_gas_law_rho_pt, barometric_formula, rd_d_rv 189 189 190 190 USE control_parameters, & … … 3308 3308 ! 3309 3309 !-- Computation of saturation mixing ratio: 3310 q_s = 0.622_wp* e_s / ( hyp(k) - e_s )3311 alpha = 0.622_wp* lv_d_rd * lv_d_cp / ( t_l * t_l )3310 q_s = rd_d_rv * e_s / ( hyp(k) - e_s ) 3311 alpha = rd_d_rv * lv_d_rd * lv_d_cp / ( t_l * t_l ) 3312 3312 q_s = q_s * ( 1.0_wp + alpha * q(k,j,i) ) / & 3313 3313 ( 1.0_wp + alpha * q_s ) … … 3423 3423 ! 3424 3424 !-- Computation of saturation mixing ratio: 3425 q_s = 0.622_wp* e_s / ( hyp(k) - e_s )3426 alpha = 0.622_wp* lv_d_rd * lv_d_cp / ( t_l * t_l )3425 q_s = rd_d_rv * e_s / ( hyp(k) - e_s ) 3426 alpha = rd_d_rv * lv_d_rd * lv_d_cp / ( t_l * t_l ) 3427 3427 q_s = q_s * ( 1.0_wp + alpha * q(k,j,i) ) / & 3428 3428 ( 1.0_wp + alpha * q_s ) … … 3803 3803 ! 3804 3804 !-- Computation of saturation mixing ratio: 3805 q_s = 0.622_wp* e_s / ( hyp(k) - e_s )3806 alpha = 0.622_wp* lv_d_rd * lv_d_cp / ( t_l * t_l )3805 q_s = rd_d_rv * e_s / ( hyp(k) - e_s ) 3806 alpha = rd_d_rv * lv_d_rd * lv_d_cp / ( t_l * t_l ) 3807 3807 q_s = q_s * ( 1.0_wp + alpha * q(k,j,i) ) / ( 1.0_wp + alpha * q_s ) 3808 3808 ! … … 4247 4247 ! 4248 4248 !-- Computation of saturation mixing ratio: 4249 q_s = 0.622_wp* e_s / ( hyp(k) - e_s )4249 q_s = rd_d_rv * e_s / ( hyp(k) - e_s ) 4250 4250 ! 4251 4251 !-- Correction factor 4252 alpha = 0.622_wp* lv_d_rd * lv_d_cp / ( t_l * t_l )4252 alpha = rd_d_rv * lv_d_rd * lv_d_cp / ( t_l * t_l ) 4253 4253 ! 4254 4254 !-- Correction of the approximated value -
palm/trunk/SOURCE/land_surface_model_mod.f90
r3349 r3361 486 486 487 487 USE basic_constants_and_equations_mod, & 488 ONLY: c_p, g, lv_d_cp, l_v, magnus, rho_l, r_d, r_v 488 ONLY: c_p, g, lv_d_cp, l_v, magnus, rho_l, r_d, r_v, rd_d_rv 489 489 490 490 USE calc_mean_profile_mod, & … … 1999 1999 ! 2000 2000 !-- Calculate vapour pressure 2001 e = surf%qv1(m) * surface_pressure / ( surf%qv1(m) + 0.622_wp)2001 e = surf%qv1(m) * surface_pressure / ( surf%qv1(m) + rd_d_rv ) 2002 2002 f3 = EXP ( - surf%g_d(m) * (e_s - e) ) 2003 2003 ELSE … … 2040 2040 ! 2041 2041 !-- Calculate saturation water vapor mixing ratio 2042 q_s = 0.622_wp* e_s / ( surface_pressure - e_s )2042 q_s = rd_d_rv * e_s / ( surface_pressure - e_s ) 2043 2043 ! 2044 2044 !-- In case of dewfall, set evapotranspiration to zero … … 2079 2079 / ( surf_t_surface%var_1d(m) - 29.65_wp)**2 ) 2080 2080 2081 dq_s_dt = 0.622_wp* e_s_dt / ( surface_pressure - e_s_dt )2081 dq_s_dt = rd_d_rv * e_s_dt / ( surface_pressure - e_s_dt ) 2082 2082 ! 2083 2083 !-- Calculate net radiation radiation without longwave outgoing flux because … … 2350 2350 ! 2351 2351 !-- Calculate mixing ratio at saturation 2352 q_s = 0.622_wp* e_s / ( surface_pressure - e_s )2352 q_s = rd_d_rv * e_s / ( surface_pressure - e_s ) 2353 2353 2354 2354 resistance = surf%r_a(m) / ( surf%r_a(m) + surf%r_s(m) + 1E-5_wp ) -
palm/trunk/SOURCE/lpm_droplet_condensation.f90
r3274 r3361 143 143 USE basic_constants_and_equations_mod, & 144 144 ONLY: l_v, molecular_weight_of_solute, molecular_weight_of_water, & 145 magnus, pi, rho_l, rho_s, r _v, vanthoff145 magnus, pi, rho_l, rho_s, rd_d_rv, r_v, vanthoff 146 146 147 147 USE control_parameters, & … … 223 223 ! 224 224 !-- Current vapor pressure 225 e_a = q(kp,jp,ip) * hyp(kp) / ( q(kp,jp,ip) + 0.622_wp)225 e_a = q(kp,jp,ip) * hyp(kp) / ( q(kp,jp,ip) + rd_d_rv ) 226 226 ! 227 227 !-- Thermal conductivity for water (from Rogers and Yau, Table 7.1) -
palm/trunk/SOURCE/lpm_init.f90
r3294 r3361 1061 1061 USE basic_constants_and_equations_mod, & 1062 1062 ONLY: molecular_weight_of_solute, molecular_weight_of_water, magnus, & 1063 pi, r ho_l, r_v, rho_s, vanthoff1063 pi, rd_d_rv, rho_l, r_v, rho_s, vanthoff 1064 1064 1065 1065 USE kinds … … 1201 1201 1202 1202 e_s = magnus( t_int ) 1203 e_a = q(kp,jp,ip) * hyp(kp) / ( q(kp,jp,ip) + 0.622_wp)1203 e_a = q(kp,jp,ip) * hyp(kp) / ( q(kp,jp,ip) + rd_d_rv ) 1204 1204 1205 1205 sigma = 0.0761_wp - 0.000155_wp * ( t_int - 273.15_wp ) -
palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
r3274 r3361 237 237 238 238 USE basic_constants_and_equations_mod, & 239 ONLY: g, kappa, lv_d_cp, pi 239 ONLY: g, kappa, lv_d_cp, pi, rd_d_rv 240 240 241 241 USE chem_modules, & … … 1818 1818 EXP( 0.07_wp * ( MIN(pt(k-1,j,i),pt(k,j,i)) & 1819 1819 - 273.15_wp ) ) 1820 q(k-1,j,i) = 0.622_wp* e_s / ( surface_pressure - e_s )1820 q(k-1,j,i) = rd_d_rv * e_s / ( surface_pressure - e_s ) 1821 1821 ENDDO 1822 1822 ENDIF -
palm/trunk/SOURCE/turbulence_closure_mod.f90
r3359 r3361 170 170 171 171 USE basic_constants_and_equations_mod, & 172 ONLY: g, kappa, lv_d_cp, lv_d_rd 172 ONLY: g, kappa, lv_d_cp, lv_d_rd, rd_d_rv 173 173 174 174 USE control_parameters, & … … 3006 3006 k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp * & 3007 3007 ( q(k,j,i) - ql(k,j,i) ) * & 3008 ( 1.0_wp + 0.622_wp * lv_d_rd / temp ) ) /&3009 ( 1.0_wp + 0.622_wp * lv_d_rd * lv_d_cp *&3008 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) / & 3009 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp * & 3010 3010 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) ) 3011 3011 k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp ) … … 3066 3066 k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp * & 3067 3067 ( q(k,j,i) - ql(k,j,i) ) * & 3068 ( 1.0_wp + 0.622_wp * lv_d_rd / temp ) ) /&3069 ( 1.0_wp + 0.622_wp * lv_d_rd * lv_d_cp *&3068 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) / & 3069 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp * & 3070 3070 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) ) 3071 3071 k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp ) … … 3103 3103 k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp * & 3104 3104 ( q(k,j,i) - ql(k,j,i) ) * & 3105 ( 1.0_wp + 0.622_wp * lv_d_rd / temp ) ) /&3106 ( 1.0_wp + 0.622_wp * lv_d_rd * lv_d_cp *&3105 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) / & 3106 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp * & 3107 3107 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) ) 3108 3108 k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp ) … … 3139 3139 k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp * & 3140 3140 ( q(k,j,i) - ql(k,j,i) ) * & 3141 ( 1.0_wp + 0.622_wp * lv_d_rd / temp ) ) /&3142 ( 1.0_wp + 0.622_wp * lv_d_rd * lv_d_cp *&3141 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) / & 3142 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp * & 3143 3143 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) ) 3144 3144 k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp ) … … 3178 3178 k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp * & 3179 3179 ( q(k,j,i) - ql(k,j,i) ) * & 3180 ( 1.0_wp + 0.622_wp * lv_d_rd / temp ) ) /&3181 ( 1.0_wp + 0.622_wp * lv_d_rd * lv_d_cp *&3180 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) / & 3181 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp * & 3182 3182 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) ) 3183 3183 k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp ) … … 3794 3794 k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp * & 3795 3795 ( q(k,j,i) - ql(k,j,i) ) * & 3796 ( 1.0_wp + 0.622_wp * lv_d_rd / temp ) ) /&3797 ( 1.0_wp + 0.622_wp * lv_d_rd * lv_d_cp *&3796 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) / & 3797 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp * & 3798 3798 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) ) 3799 3799 k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp ) … … 3851 3851 k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp * & 3852 3852 ( q(k,j,i) - ql(k,j,i) ) * & 3853 ( 1.0_wp + 0.622_wp * lv_d_rd / temp ) ) /&3854 ( 1.0_wp + 0.622_wp * lv_d_rd * lv_d_cp *&3853 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) / & 3854 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp * & 3855 3855 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) ) 3856 3856 k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp ) … … 3888 3888 k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp * & 3889 3889 ( q(k,j,i) - ql(k,j,i) ) * & 3890 ( 1.0_wp + 0.622_wp * lv_d_rd / temp ) ) /&3891 ( 1.0_wp + 0.622_wp * lv_d_rd * lv_d_cp *&3890 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) / & 3891 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp * & 3892 3892 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) ) 3893 3893 k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp ) … … 3924 3924 k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp * & 3925 3925 ( q(k,j,i) - ql(k,j,i) ) * & 3926 ( 1.0_wp + 0.622_wp * lv_d_rd / temp ) ) /&3927 ( 1.0_wp + 0.622_wp * lv_d_rd * lv_d_cp *&3926 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) / & 3927 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp * & 3928 3928 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) ) 3929 3929 k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp ) … … 3964 3964 k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp * & 3965 3965 ( q(k,j,i) - ql(k,j,i) ) * & 3966 ( 1.0_wp + 0.622_wp * lv_d_rd / temp ) ) /&3967 ( 1.0_wp + 0.622_wp * lv_d_rd * lv_d_cp *&3966 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) / & 3967 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp * & 3968 3968 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) ) 3969 3969 k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
Note: See TracChangeset
for help on using the changeset viewer.