Changeset 2608 for palm/trunk/SOURCE
- Timestamp:
- Nov 13, 2017 2:04:26 PM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r2600 r2608 25 25 # ----------------- 26 26 # $Id$ 27 # Added diagnostic_quantities_mod 28 # 29 # 2600 2017-11-01 14:11:20Z raasch 27 30 # comment line concerning bound checks removed 28 31 # … … 384 387 data_output_ptseries.f90 data_output_spectra.f90 data_output_flight.f90\ 385 388 data_output_tseries.f90 data_output_2d.f90 data_output_3d.f90 \ 386 date_and_time_mod.f90 \389 date_and_time_mod.f90 diagnostic_quantities_mod.f90 \ 387 390 diffusion_e.f90 diffusion_s.f90 diffusion_u.f90 diffusion_v.f90 \ 388 391 diffusion_w.f90 diffusivities.f90 disturb_field.f90 \ … … 482 485 buoyancy.o: modules.o mod_kinds.o 483 486 calc_mean_profile.o: modules.o mod_kinds.o 484 calc_liquid_water_content.o: modules.o mod_kinds.o 487 calc_liquid_water_content.o: modules.o mod_kinds.o diagnostic_quantities_mod.o 485 488 calc_radiation.o: modules.o mod_kinds.o 486 489 check_for_restart.o: modules.o mod_kinds.o pmc_interface_mod.o … … 513 516 netcdf_interface_mod.o land_surface_model_mod.o urban_surface_mod.o 514 517 date_and_time_mod.o: modules.o mod_kinds.o 518 diagnostic_quantities_mod.o: modules.o mod_kinds.o 515 519 diffusion_e.o: modules.o mod_kinds.o microphysics_mod.o \ 516 520 mod_particle_attributes.o surface_mod.o … … 552 556 init_slope.o: modules.o mod_kinds.o 553 557 interaction_droplets_ptq.o: modules.o mod_kinds.o 554 land_surface_model_mod.o: modules.o mod_kinds.o radiation_model_mod.o surface_mod.o 558 land_surface_model_mod.o: modules.o mod_kinds.o radiation_model_mod.o surface_mod.o diagnostic_quantities_mod.o 555 559 large_scale_forcing_nudging_mod.o: modules.o cpulog_mod.o mod_kinds.o surface_mod.o 556 560 local_stop.o: modules.o mod_kinds.o pmc_interface_mod.o … … 570 574 mod_kinds.o mod_particle_attributes.o 571 575 lpm_droplet_condensation.o: modules.o cpulog_mod.o lpm_collision_kernels.o \ 572 mod_kinds.o mod_particle_attributes.o 576 mod_kinds.o mod_particle_attributes.o diagnostic_quantities_mod.o 573 577 lpm_exchange_horiz.o: modules.o cpulog_mod.o lpm_pack_arrays.o mod_kinds.o \ 574 578 mod_particle_attributes.o netcdf_interface_mod.o … … 576 580 netcdf_interface_mod.o random_function_mod.o mod_particle_attributes.o \ 577 581 lpm_exchange_horiz.o lpm_pack_arrays.o random_generator_parallel_mod.o \ 578 surface_mod.o 582 surface_mod.o diagnostic_quantities_mod.o 579 583 lpm_init_sgs_tke.o: modules.o mod_kinds.o mod_particle_attributes.o surface_mod.o 580 584 lpm_merging.o: modules.o cpulog_mod.o mod_kinds.o mod_particle_attributes.o … … 588 592 lpm_write_restart_file.o: modules.o mod_kinds.o mod_particle_attributes.o 589 593 message.o: modules.o mod_kinds.o pmc_interface_mod.o 590 microphysics_mod.o: modules.o cpulog_mod.o mod_kinds.o surface_mod.o 594 microphysics_mod.o: modules.o cpulog_mod.o mod_kinds.o surface_mod.o diagnostic_quantities_mod.o 591 595 model_1d_mod.o: modules.o mod_kinds.o 592 596 modules.o: modules.f90 mod_kinds.o -
palm/trunk/SOURCE/calc_liquid_water_content.f90
r2292 r2608 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Calculation of supersaturation in external module (diagnostic_quantities_mod). 28 ! Change: correct calculation of saturation specific humidity to saturation 29 ! mixing ratio (the factor of 0.378 vanishes). 30 ! 31 ! 2292 2017-06-20 09:51:42Z schwenkel 27 32 ! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 28 33 ! includes two more prognostic equations for cloud drop concentration (nc) … … 82 87 83 88 USE arrays_3d, & 84 ONLY: hyp, pt, q, qc, ql, qr 85 86 USE cloud_parameters, & 87 ONLY: l_d_cp, l_d_r, t_d_pt 89 ONLY: q, qc, ql, qr 88 90 89 91 USE control_parameters, & 90 92 ONLY: microphysics_morrison, microphysics_seifert 93 94 USE diagnostic_quantities_mod, & 95 ONLY: e_s, magnus, q_s, sat, supersaturation, t_l 91 96 92 97 USE indices, & … … 104 109 INTEGER(iwp) :: k !< 105 110 106 REAL(wp) :: alpha !<107 REAL(wp) :: e_s !<108 REAL(wp) :: q_s !<109 REAL(wp) :: t_l !<110 111 111 112 DO i = nxlg, nxrg … … 114 115 115 116 ! 116 !-- Compute the liquid water temperature 117 t_l = t_d_pt(k) * pt(k,j,i) 118 119 ! 120 !-- Compute saturation water vapor pressure at t_l 121 e_s = 610.78_wp * EXP( 17.269_wp * ( t_l - 273.16_wp ) / & 122 ( t_l - 35.86_wp ) ) 123 124 ! 125 !-- Compute approximation of saturation humidity 126 q_s = 0.622_wp * e_s / ( hyp(k) - 0.378_wp * e_s ) 127 128 ! 129 !-- Correction factor 130 alpha = 0.622_wp * l_d_r * l_d_cp / ( t_l * t_l ) 131 132 ! 133 !-- Correction of the approximated value 134 !-- (see: Cuijpers + Duynkerke, 1993, JAS, 23) 135 q_s = q_s * ( 1.0_wp + alpha * q(k,j,i) ) / ( 1.0_wp + alpha * q_s ) 117 !-- Call calculation of supersaturation located 118 !-- in diagnostic_quantities_mod 119 CALL supersaturation ( i, j, k ) 136 120 137 121 ! -
palm/trunk/SOURCE/land_surface_model_mod.f90
r2575 r2608 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Calculation of magnus equation in external module (diagnostic_quantities_mod). 28 ! Adjust calculation of vapor pressure and saturation mixing ratio that it is 29 ! consistent with formulations in other parts of PALM. 30 ! 31 ! 2575 2017-10-24 09:57:58Z maronga 27 32 ! Pavement parameterization revised 28 33 ! … … 1410 1415 SUBROUTINE lsm_energy_balance( horizontal, l ) 1411 1416 1412 1417 USE diagnostic_quantities_mod, & 1418 ONLY: magnus 1419 1413 1420 USE pegrid 1414 1421 … … 1648 1655 f2 = 1.0E-20_wp 1649 1656 ENDIF 1650 ! 1651 !-- Calculate water vapour pressure at saturation 1652 e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( surf_t_surface%var_1d(m) & 1653 - 273.16_wp ) / ( surf_t_surface%var_1d(m) - 35.86_wp ) ) 1657 1658 ! 1659 !-- Calculate water vapour pressure at saturation and convert to hPa 1660 e_s = 0.01_wp * magnus( surf_t_surface%var_1d(m) ) 1661 1654 1662 ! 1655 1663 !-- f3: correction for vapour pressure deficit … … 1657 1665 ! 1658 1666 !-- Calculate vapour pressure 1659 e = qv1 * surface_pressure / 0.622_wp1667 e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) 1660 1668 f3 = EXP ( - surf%g_d(m) * (e_s - e) ) 1661 1669 ELSE … … 1698 1706 ! 1699 1707 !-- Calculate saturation specific humidity 1700 q_s = 0.622_wp * e_s / surface_pressure1708 q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) 1701 1709 ! 1702 1710 !-- In case of dewfall, set evapotranspiration to zero … … 1733 1741 ! 1734 1742 !-- Calculate derivative of q_s for Taylor series expansion 1735 e_s_dt = e_s * ( 17. 269_wp / ( surf_t_surface%var_1d(m) - 35.86_wp) - &1736 17. 269_wp*( surf_t_surface%var_1d(m) - 273.16_wp) &1737 / ( surf_t_surface%var_1d(m) - 35.86_wp)**2 )1738 1739 dq_s_dt = 0.622_wp * e_s_dt / surface_pressure1743 e_s_dt = e_s * ( 17.62_wp / ( surf_t_surface%var_1d(m) - 29.65_wp) - & 1744 17.62_wp*( surf_t_surface%var_1d(m) - 273.15_wp) & 1745 / ( surf_t_surface%var_1d(m) - 29.65_wp)**2 ) 1746 1747 dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) 1740 1748 ! 1741 1749 !-- Add LW up so that it can be removed in prognostic equation … … 1988 1996 SUBROUTINE calc_q_surface 1989 1997 1998 USE diagnostic_quantities_mod 1999 1990 2000 IMPLICIT NONE 1991 2001 … … 1997 2007 j = surf%j(m) 1998 2008 k = surf%k(m) 1999 2000 ! 2001 !-- Calculate water vapour pressure at saturation 2002 e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & 2003 ( surf_t_surface_p%var_1d(m) - 273.16_wp ) / & 2004 ( surf_t_surface_p%var_1d(m) - 35.86_wp ) & 2005 ) 2009 ! 2010 !-- Calculate water vapour pressure at saturation and convert to hPa 2011 e_s = 0.01_wp * magnus( surf_t_surface_p%var_1d(m) ) 2006 2012 2007 2013 ! 2008 2014 !-- Calculate specific humidity at saturation 2009 q_s = 0.622_wp * e_s / surface_pressure2015 q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) 2010 2016 2011 2017 resistance = surf%r_a(m) / ( surf%r_a(m) + surf%r_s(m) ) -
palm/trunk/SOURCE/lpm_droplet_condensation.f90
r2375 r2608 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Calculation of magnus equation in external module (diagnostic_quantities_mod). 28 ! 29 ! 2375 2017-08-29 14:10:28Z schwenkel 27 30 ! Changed ONLY-dependencies 28 31 ! … … 129 132 USE cpulog, & 130 133 ONLY: cpu_log, log_point_s 134 135 USE diagnostic_quantities_mod, & 136 ONLY: magnus 131 137 132 138 USE grid_variables, & … … 199 205 ! 200 206 !-- Saturation vapor pressure (Eq. 10 in Bolton, 1980) 201 e_s = 611.2_wp * EXP( 17.62_wp * ( t_int - 273.15_wp ) / ( t_int - 29.65_wp ))207 e_s = magnus( t_int ) 202 208 ! 203 209 !-- Current vapor pressure -
palm/trunk/SOURCE/lpm_init.f90
r2606 r2608 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Calculation of magnus equation in external module (diagnostic_quantities_mod). 28 ! 29 ! 2606 2017-11-10 10:36:31Z schwenkel 27 30 ! Changed particle box locations: center of particle box now coincides 28 31 ! with scalar grid point of same index. … … 986 989 USE constants, & 987 990 ONLY: pi 991 992 USE diagnostic_quantities_mod, & 993 ONLY: magnus 994 988 995 989 996 USE kinds … … 1124 1131 t_int = pt(kp,jp,ip) * ( hyp(kp) / 100000.0_wp )**0.286_wp 1125 1132 1126 e_s = 611.0_wp * EXP( l_d_rv * ( 3.6609E-3_wp - 1.0_wp / t_int ))1127 e_a = q(kp,jp,ip) * hyp(kp) / ( 0.378_wp *q(kp,jp,ip) + 0.622_wp )1133 e_s = magnus( t_int ) 1134 e_a = q(kp,jp,ip) * hyp(kp) / ( q(kp,jp,ip) + 0.622_wp ) 1128 1135 1129 1136 sigma = 0.0761_wp - 0.000155_wp * ( t_int - 273.15_wp ) -
palm/trunk/SOURCE/microphysics_mod.f90
r2522 r2608 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Calculation of supersaturation in external module (diagnostic_quantities_mod). 28 ! Change: correct calculation of saturation specific humidity to saturation 29 ! mixing ratio (the factor of 0.378 vanishes). 30 ! 31 ! 2522 2017-10-05 14:20:37Z schwenkel 27 32 ! Minor bugfix 28 33 ! … … 548 553 ONLY: cpu_log, log_point_s 549 554 555 USE diagnostic_quantities_mod, & 556 ONLY: e_s, magnus, q_s, sat, supersaturation, t_l 557 550 558 USE indices, & 551 559 ONLY: nxlg, nxrg, nysg, nyng, nzb, nzt … … 564 572 REAL(wp) :: activ !< 565 573 REAL(wp) :: afactor !< 566 REAL(wp) :: alpha !<567 574 REAL(wp) :: beta_act !< 568 575 REAL(wp) :: bfactor !< 569 REAL(wp) :: e_s !<570 576 REAL(wp) :: k_act !< 571 577 REAL(wp) :: n_act !< 572 578 REAL(wp) :: n_ccn !< 573 REAL(wp) :: q_s !<574 579 REAL(wp) :: s_0 !< 575 REAL(wp) :: sat !<576 580 REAL(wp) :: sat_max !< 577 581 REAL(wp) :: sigma !< 578 582 REAL(wp) :: sigma_act !< 579 REAL(wp) :: t_int !<580 REAL(wp) :: t_l !<581 583 582 584 CALL cpu_log( log_point_s(65), 'activation', 'start' ) … … 587 589 588 590 ! 589 !-- Actual liquid water temperature: 590 t_l = t_d_pt(k) * pt(k,j,i) 591 592 ! 593 !-- Calculate actual temperature 594 t_int = pt(k,j,i) * ( hyp(k) / 100000.0_wp )**0.286_wp 595 ! 596 !-- Saturation vapor pressure at t_l: 597 e_s = 610.78_wp * EXP( 17.269_wp * ( t_l - 273.16_wp ) / & 598 ( t_l - 35.86_wp ) & 599 ) 600 ! 601 !-- Computation of saturation humidity: 602 q_s = 0.622_wp * e_s / ( hyp(k) - 0.378_wp * e_s ) 603 alpha = 0.622_wp * l_d_r * l_d_cp / ( t_l * t_l ) 604 q_s = q_s * ( 1.0_wp + alpha * q(k,j,i) ) / & 605 ( 1.0_wp + alpha * q_s ) 606 607 !-- Supersaturation: 608 sat = ( q(k,j,i) - qr(k,j,i) - qc(k,j,i) ) / q_s - 1.0_wp 609 591 !-- Call calculation of supersaturation located 592 !-- in diagnostic_quantities_mod 593 CALL supersaturation ( i, j, k ) 610 594 ! 611 595 !-- Prescribe parameters for activation … … 636 620 !-- Curvature effect (afactor) with surface tension 637 621 !-- parameterization by Straka (2009) 638 sigma = 0.0761_wp - 0.000155_wp * ( t_ int- 273.15_wp )639 afactor = 2.0_wp * sigma / ( rho_l * r_v * t_ int)622 sigma = 0.0761_wp - 0.000155_wp * ( t_l - 273.15_wp ) 623 afactor = 2.0_wp * sigma / ( rho_l * r_v * t_l ) 640 624 ! 641 625 !-- Solute effect (bfactor) … … 695 679 ONLY: cpu_log, log_point_s 696 680 681 USE diagnostic_quantities_mod, & 682 ONLY: e_s, magnus, q_s, sat, supersaturation, t_l 683 697 684 USE indices, & 698 685 ONLY: nxlg, nxrg, nysg, nyng, nzb, nzt … … 709 696 INTEGER(iwp) :: k !< 710 697 711 REAL(wp) :: alpha !<712 698 REAL(wp) :: cond !< 713 699 REAL(wp) :: cond_max !< 714 700 REAL(wp) :: dc !< 715 REAL(wp) :: e_s !<716 701 REAL(wp) :: evap !< 717 702 REAL(wp) :: evap_nc !< 718 703 REAL(wp) :: g_fac !< 719 704 REAL(wp) :: nc_0 !< 720 REAL(wp) :: q_s !<721 REAL(wp) :: sat !<722 REAL(wp) :: t_l !<723 705 REAL(wp) :: temp !< 724 706 REAL(wp) :: xc !< … … 730 712 DO k = nzb+1, nzt 731 713 ! 732 !-- Actual liquid water temperature: 733 t_l = t_d_pt(k) * pt(k,j,i) 734 ! 735 !-- Saturation vapor pressure at t_l: 736 e_s = 610.78_wp * EXP( 17.269_wp * ( t_l - 273.16_wp ) / & 737 ( t_l - 35.86_wp ) & 738 ) 739 ! 740 !-- Computation of saturation humidity: 741 q_s = 0.622_wp * e_s / ( hyp(k) - 0.378_wp * e_s ) 742 alpha = 0.622_wp * l_d_r * l_d_cp / ( t_l * t_l ) 743 q_s = q_s * ( 1.0_wp + alpha * q(k,j,i) ) / & 744 ( 1.0_wp + alpha * q_s ) 745 746 !-- Supersaturation: 747 sat = ( q(k,j,i) - qr(k,j,i) - qc(k,j,i) ) / q_s - 1.0_wp 748 714 !-- Call calculation of supersaturation located 715 !-- in diagnostic_quantities_mod 716 CALL supersaturation ( i, j, k ) 749 717 ! 750 718 !-- Actual temperature: … … 1200 1168 ONLY: cpu_log, log_point_s 1201 1169 1170 USE diagnostic_quantities_mod, & 1171 ONLY: e_s, magnus, q_s, sat, supersaturation, t_l 1172 1202 1173 USE indices, & 1203 1174 ONLY: nxlg, nxrg, nyng, nysg, nzb, nzt, wall_flags_0 … … 1211 1182 INTEGER(iwp) :: k !< 1212 1183 1213 REAL(wp) :: alpha !<1214 1184 REAL(wp) :: dr !< 1215 REAL(wp) :: e_s !<1216 1185 REAL(wp) :: evap !< 1217 1186 REAL(wp) :: evap_nr !< … … 1224 1193 REAL(wp) :: mu_r_5d2 !< 1225 1194 REAL(wp) :: nr_0 !< 1226 REAL(wp) :: q_s !<1227 REAL(wp) :: sat !<1228 REAL(wp) :: t_l !<1229 1195 REAL(wp) :: temp !< 1230 1196 REAL(wp) :: xr !< … … 1240 1206 1241 1207 IF ( qr(k,j,i) > eps_sb ) THEN 1242 ! 1243 !-- Actual liquid water temperature: 1244 t_l = t_d_pt(k) * pt(k,j,i) 1245 ! 1246 !-- Saturation vapor pressure at t_l: 1247 e_s = 610.78_wp * EXP( 17.269_wp * ( t_l - 273.16_wp ) / & 1248 ( t_l - 35.86_wp ) & 1249 ) 1250 ! 1251 !-- Computation of saturation humidity: 1252 q_s = 0.622_wp * e_s / ( hyp(k) - 0.378_wp * e_s ) 1253 alpha = 0.622_wp * l_d_r * l_d_cp / ( t_l * t_l ) 1254 q_s = q_s * ( 1.0_wp + alpha * q(k,j,i) ) / & 1255 ( 1.0_wp + alpha * q_s ) 1256 ! 1257 !-- Supersaturation: 1258 sat = ( q(k,j,i) - qr(k,j,i) - qc(k,j,i) ) / q_s - 1.0_wp 1208 1209 ! 1210 !-- Call calculation of supersaturation located 1211 !-- in diagnostic_quantities_mod 1212 CALL supersaturation ( i, j, k ) 1259 1213 ! 1260 1214 !-- Evaporation needs only to be calculated in subsaturated regions
Note: See TracChangeset
for help on using the changeset viewer.