Changeset 1849 for palm/trunk


Ignore:
Timestamp:
Apr 8, 2016 11:33:18 AM (8 years ago)
Author:
hoffmann
Message:

lpm_droplet_condensation improved, microphysics partially modularized

Location:
palm/trunk/SOURCE
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r1838 r1849  
    2020# Current revisions:
    2121# ------------------
    22 #
     22# Adapted for modularization of microphysics
    2323#
    2424# Former revisions:
     
    370370check_parameters.o: modules.o mod_kinds.o land_surface_model_mod.o \
    371371        netcdf_interface.o plant_canopy_model_mod.o pmc_interface.o radiation_model_mod.o \
    372         spectra_mod.o subsidence.o
     372        spectra_mod.o subsidence.o microphysics.o
    373373close_file.o: modules.o mod_kinds.o netcdf_interface.o
    374374compute_vpt.o: modules.o mod_kinds.o
     
    391391data_output_3d.o: modules.o cpulog.o mod_kinds.o mod_particle_attributes.o\
    392392   netcdf_interface.o land_surface_model_mod.o
    393 diffusion_e.o: modules.o mod_kinds.o
     393diffusion_e.o: modules.o mod_kinds.o microphysics.o
    394394diffusion_s.o: modules.o mod_kinds.o
    395395diffusion_u.o: modules.o mod_kinds.o wall_fluxes.o
     
    408408global_min_max.o: modules.o mod_kinds.o
    409409header.o: modules.o cpulog.o mod_kinds.o netcdf_interface.o land_surface_model_mod.o\
    410    plant_canopy_model_mod.o pmc_handle_communicator.o pmc_interface.o \
    411    radiation_model_mod.o spectra_mod.o subsidence.o 
     410   microphysics.o plant_canopy_model_mod.o: pmc_handle_communicator.o pmc_interface.o \
     411   radiation_model_mod.o spectra_mod.o subsidence.o
    412412inflow_turbulence.o: modules.o cpulog.o mod_kinds.o
    413413init_1d_model.o: modules.o mod_kinds.o
     
    415415   lpm_init.o ls_forcing.o netcdf_interface.o plant_canopy_model_mod.o \
    416416   radiation_model_mod.o random_function.o random_generator_parallel.o \
    417         surface_layer_fluxes.o
     417   surface_layer_fluxes.o microphysics.o
    418418init_advec.o: modules.o mod_kinds.o
    419419init_cloud_physics.o: modules.o mod_kinds.o
     
    472472parin.o: modules.o cpulog.o land_surface_model_mod.o mod_kinds.o netcdf_interface.o \
    473473   plant_canopy_model_mod.o pmc_interface.o progress_bar.o spectra_mod.o \
    474    radiation_model_mod.o
     474   radiation_model_mod.o microphysics.o
    475475plant_canopy_model_mod.o: modules.o mod_kinds.o
    476476pmc_interface.o: modules.o mod_kinds.o pmc_client.o pmc_general.o\
     
    496496        subsidence.o user_actions.o
    497497progress_bar.o: modules.o mod_kinds.o
    498 radiation_model_mod.o : modules.o mod_particle_attributes.o
     498radiation_model_mod.o : modules.o mod_particle_attributes.o microphysics.o
    499499random_function.o: mod_kinds.o
    500500random_gauss.o: mod_kinds.o random_function.o random_generator_parallel.o
     
    504504   spectra_mod.o
    505505read_var_list.o: modules.o mod_kinds.o netcdf_interface.o plant_canopy_model_mod.o \
    506    spectra_mod.o
     506   spectra_mod.o microphysics.o
    507507run_control.o: modules.o cpulog.o mod_kinds.o
    508508set_slicer_attributes_dvrp.o: modules.o mod_kinds.o
     
    522522        ls_forcing.o mod_kinds.o nudging.o pmc_interface.o production_e.o \
    523523        prognostic_equations.o progress_bar.o radiation_model_mod.o \
    524         spectra_mod.o user_actions.o surface_layer_fluxes.o
     524        spectra_mod.o user_actions.o surface_layer_fluxes.o microphysics.o
    525525time_to_string.o: mod_kinds.o
    526 timestep.o: modules.o cpulog.o mod_kinds.o
     526timestep.o: modules.o cpulog.o mod_kinds.o microphysics.o
    527527timestep_scheme_steering.o: modules.o mod_kinds.o
    528528transpose.o: modules.o cpulog.o mod_kinds.o
     
    562562        spectra_mod.o
    563563write_var_list.o: modules.o mod_kinds.o netcdf_interface.o plant_canopy_model_mod.o\
    564    spectra_mod.o
     564   spectra_mod.o microphysics.o
  • palm/trunk/SOURCE/data_output_2d.f90

    r1823 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
    22 ! 
     21! precipitation_amount, precipitation_rate, prr moved to arrays_3d
     22!
    2323! Former revisions:
    2424! -----------------
     
    134134
    135135    USE arrays_3d,                                                             &
    136         ONLY:  dzw, e, nr, ol, p, pt, q, qc, ql, ql_c, ql_v, ql_vp, qr, qsws,  &
    137                rho, sa, shf, tend, ts, u, us, v, vpt, w, z0, z0h, z0q, zu, zw
     136        ONLY:  dzw, e, nr, ol, p, pt, precipitation_amount, precipitation_rate,&
     137               prr,q, qc, ql, ql_c, ql_v, ql_vp, qr, qsws, rho, sa, shf, tend, &
     138               ts, u, us, v, vpt, w, z0, z0h, z0q, zu, zw
    138139       
    139140    USE averaging
    140141       
    141142    USE cloud_parameters,                                                      &
    142         ONLY:  hyrho, l_d_cp, precipitation_amount, precipitation_rate, prr,   &
    143                pt_d_t
     143        ONLY:  hyrho, l_d_cp, pt_d_t
    144144               
    145145    USE control_parameters,                                                    &
  • palm/trunk/SOURCE/data_output_3d.f90

    r1823 r1849  
    1919! Current revisions:
    2020! ------------------
    21 !
     21! prr moved to arrays_3d
    2222!
    2323! Former revisions:
     
    116116
    117117    USE arrays_3d,                                                             &
    118         ONLY:  e, nr, p, pt, q, qc, ql, ql_c, ql_v, qr, rho, sa, tend, u, v,  &
    119                vpt, w
     118        ONLY:  e, nr, p, pt, prr, q, qc, ql, ql_c, ql_v, qr, rho, sa, tend, u, &
     119               v, vpt, w
    120120       
    121121    USE averaging
    122122       
    123123    USE cloud_parameters,                                                      &
    124         ONLY:  l_d_cp, prr, pt_d_t
     124        ONLY:  l_d_cp, pt_d_t
    125125       
    126126    USE control_parameters,                                                    &
  • palm/trunk/SOURCE/diffusion_e.f90

    r1832 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
     21! Adapted for modularization of microphysics
    2222!
    2323! Former revisions:
     
    122122                  wall_adjustment, wall_adjustment_factor
    123123
    124        USE cloud_parameters,                                                   &
    125            ONLY:  collision_turbulence
    126 
    127124       USE grid_variables,                                                     &
    128125           ONLY:  ddx2, ddy2
     
    133130           
    134131       USE kinds
    135        
     132
     133       USE microphysics_mod,                                                   &
     134           ONLY:  collision_turbulence
     135
    136136       USE particle_attributes,                                                &
    137137           ONLY:  use_sgs_for_particles, wang_kernel
     
    307307!
    308308!--    Boundary condition for dissipation
    309        IF ( use_sgs_for_particles  .OR.  wang_kernel  .OR.                     &
     309       IF ( use_sgs_for_particles  .OR.  wang_kernel  .OR.  &
    310310            collision_turbulence )  THEN
    311311          DO  i = nxl, nxr
     
    332332           ONLY:  atmos_ocean_sign, g, use_single_reference_value,             &
    333333                  wall_adjustment, wall_adjustment_factor
    334 
    335        USE cloud_parameters,                                                   &
    336            ONLY:  collision_turbulence
    337334
    338335       USE grid_variables,                                                     &
     
    344341           
    345342       USE kinds
    346        
     343
     344       USE microphysics_mod,                                                   &
     345           ONLY:  collision_turbulence
     346
    347347       USE particle_attributes,                                                &
    348348           ONLY:  use_sgs_for_particles, wang_kernel
     
    536536                  wall_adjustment, wall_adjustment_factor
    537537
    538        USE cloud_parameters,                                                   &
    539            ONLY:  collision_turbulence
    540 
    541538       USE grid_variables,                                                     &
    542539           ONLY:  ddx2, ddy2
     
    546543           
    547544       USE kinds
    548        
     545
     546       USE microphysics_mod,                                                   &
     547           ONLY:  collision_turbulence
     548
    549549       USE particle_attributes,                                                &
    550550           ONLY:  use_sgs_for_particles, wang_kernel
     
    621621!
    622622!--    Store dissipation if needed for calculating the sgs particle velocities
    623        IF ( use_sgs_for_particles  .OR.  wang_kernel  .OR.  collision_turbulence )  THEN
     623       IF ( use_sgs_for_particles  .OR.  wang_kernel  .OR.                     &
     624            collision_turbulence )  THEN
    624625          DO  k = nzb_s_inner(j,i)+1, nzt
    625626             diss(k,j,i) = dissipation(k)
  • palm/trunk/SOURCE/flow_statistics.f90

    r1823 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
     21! prr moved to arrays_3d
    2222!
    2323! Former revisions:
     
    186186
    187187    USE arrays_3d,                                                             &
    188         ONLY:  ddzu, ddzw, e, hyp, km, kh, nr, ol, p, prho, pt, q, qc, ql, qr, &
    189                qs, qsws, qswst, rho, sa, saswsb, saswst, shf, td_lsa_lpt,      &
     188        ONLY:  ddzu, ddzw, e, hyp, km, kh, nr, ol, p, prho, prr, pt, q, qc, ql,&
     189               qr, qs, qsws, qswst, rho, sa, saswsb, saswst, shf, td_lsa_lpt,  &
    190190               td_lsa_q, td_sub_lpt, td_sub_q, time_vert, ts, tswst, u, ug, us,&
    191191               usws, uswst, vsws, v, vg, vpt, vswst, w, w_subs, zw
    192192       
    193193    USE cloud_parameters,                                                      &
    194         ONLY:   l_d_cp, prr, pt_d_t
     194        ONLY:   l_d_cp, pt_d_t
    195195       
    196196    USE control_parameters,                                                    &
  • palm/trunk/SOURCE/header.f90

    r1834 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
    22 ! 
     21! Adapted for modularization of microphysics
     22!
    2323! Former revisions:
    2424! -----------------
     
    259259       
    260260    USE cloud_parameters,                                                      &
    261         ONLY:  cloud_water_sedimentation, collision_turbulence, cp,            &
    262                c_sedimentation, limiter_sedimentation, l_v, nc_const,          &
    263                r_d, ventilation_effect
    264        
     261        ONLY:  cp, l_v, r_d
     262
    265263    USE cpulog,                                                                &
    266264        ONLY:  log_point_s
     
    280278    USE land_surface_model_mod,                                                &
    281279        ONLY: land_surface, lsm_header
    282  
     280
     281    USE microphysics_mod,                                                      &
     282        ONLY:  cloud_water_sedimentation, collision_turbulence,                &
     283               c_sedimentation, limiter_sedimentation, nc_const,               &
     284               ventilation_effect
     285
    283286    USE model_1d,                                                              &
    284287        ONLY:  damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
  • palm/trunk/SOURCE/init_3d_model.f90

    r1846 r1849  
    1919! Current revisions:
    2020! ------------------
    21 !
    22 !
     21! Adapted for modularization of microphysics.
     22! precipitation_amount, precipitation_rate, prr moved to arrays_3d.
     23! Initialization of nc_1d, nr_1d, pt_1d, qc_1d, qr_1d, q_1d moved to
     24! microphysics_init.
     25!
    2326! Former revisions:
    2427! -----------------
     
    265268
    266269    USE arrays_3d
    267    
    268     USE cloud_parameters,                                                      &
    269         ONLY:  collision_turbulence, nc_const, precipitation_amount,           &
    270                precipitation_rate, prr
    271    
     270
    272271    USE constants,                                                             &
    273272        ONLY:  pi
     
    289288 
    290289    USE ls_forcing_mod
    291    
     290
     291    USE microphysics_mod,                                                      &
     292        ONLY:  collision_turbulence, microphysics_init
     293
    292294    USE model_1d,                                                              &
    293295        ONLY:  e1d, kh1d, km1d, l1d, rif1d, u1d, us1d, usws1d, v1d, vsws1d
     
    483485
    484486!
    485 !--          1D-arrays
    486              ALLOCATE ( nc_1d(nzb:nzt+1), pt_1d(nzb:nzt+1),                 &
    487                         q_1d(nzb:nzt+1), qc_1d(nzb:nzt+1) )
    488 !
    489487!--          3D-cloud water content
    490488#if defined( __nopointer )
     
    498496
    499497             IF ( microphysics_seifert )  THEN
    500 !
    501 !--             1D-arrays
    502                 ALLOCATE ( nr_1d(nzb:nzt+1), qr_1d(nzb:nzt+1) )
    503 
    504498!
    505499!--             2D-rain water content and rain drop concentration arrays
     
    743737                   ENDDO
    744738                ENDDO
    745 !
    746 !--             Initialze nc_1d with default value
    747                 nc_1d(:) = nc_const
    748739
    749740             ENDIF
     
    882873             ENDDO
    883874             IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
    884 !
    885 !--             Initialze nc_1d with default value
    886                 nc_1d(:) = nc_const
    887875
    888876                DO  i = nxlg, nxrg
     
    11991187
    12001188          precipitation_amount = 0.0_wp
    1201 
    1202           IF ( microphysics_seifert )  THEN
    1203              nc_1d = nc_const
    1204           ENDIF
    12051189       ENDIF
    12061190!
     
    16551639!--    lpm_init) is not defined.
    16561640       CALL init_cloud_physics
     1641!
     1642!--    Initialize bulk cloud microphysics
     1643       CALL microphysics_init
    16571644    ENDIF
    16581645
  • palm/trunk/SOURCE/init_cloud_physics.f90

    r1823 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
     21! bfactor removed
    2222!
    2323! Former revisions:
     
    8585       
    8686    USE cloud_parameters,                                                      &
    87         ONLY:  bfactor, cp, c_sedimentation, dpirho_l, dt_precipitation,       &
    88                hyrho, k_st, l_d_cp, l_d_r, l_d_rv, l_v, mass_of_solute,  &
    89                molecular_weight_of_solute, molecular_weight_of_water, pirho_l, &
    90                pt_d_t, rho_l, r_d, r_v, sed_qc_const, schmidt, schmidt_p_1d3,  &
    91                sigma_gc, t_d_pt, vanthoff, w_precipitation
    92        
    93     USE constants,                                                             &
    94         ONLY:  pi
    95        
     87        ONLY:  cp, hyrho, l_d_cp, l_d_r, l_d_rv, l_v, pt_d_t, rho_l, r_d, r_v, &
     88               t_d_pt
     89               
    9690    USE control_parameters,                                                    &
    97         ONLY:  g, message_string, microphysics_seifert, pt_surface,            &
    98                rho_surface, surface_pressure
     91        ONLY:  g, message_string, pt_surface, rho_surface, surface_pressure
    9992   
    10093    USE indices,                                                               &
     
    118111    l_d_rv = l_v / r_v
    119112
    120     schmidt_p_1d3 = schmidt**( 1.0_wp / 3.0_wp )
    121 
    122     pirho_l  = pi * rho_l / 6.0_wp
    123     dpirho_l = 1.0_wp / pirho_l
    124 !
    125 !-- constant for the sedimentation of cloud water (2-moment cloud physics)
    126     sed_qc_const = k_st * ( 3.0_wp / ( 4.0_wp * pi * rho_l )                   &
    127                           )**( 2.0_wp / 3.0_wp ) *                             &
    128                    EXP( 5.0_wp * LOG( sigma_gc )**2 )
    129 !
    130 !-- Calculate timestep according to precipitation
    131     IF ( microphysics_seifert )  THEN
    132        dt_precipitation = c_sedimentation * MINVAL( dzu(nzb+2:nzt) ) /         &
    133                           w_precipitation
    134     ENDIF
    135 !
    136 !-- Calculate factor used in equation for droplet growth by condensation
    137     bfactor = 3.0_wp * vanthoff * mass_of_solute * molecular_weight_of_water   &
    138               / ( 4.0_wp * pi * rho_l * molecular_weight_of_solute )
    139113!
    140114!-- Calculate:
  • palm/trunk/SOURCE/land_surface_model_mod.f90

    r1827 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
     21! prr moved to arrays_3d
    2222!
    2323! Former revisions:
     
    137137 
    138138    USE arrays_3d,                                                             &
    139         ONLY:  hyp, ol, pt, pt_p, q, q_p, ql, qsws, shf, ts, us, vpt, z0, z0h, &
    140                z0q
     139        ONLY:  hyp, ol, pt, pt_p, prr, q, q_p, ql, qsws, shf, ts, us, vpt, z0, &
     140               z0h, z0q
    141141
    142142    USE cloud_parameters,                                                      &
    143         ONLY:  cp, hyrho, l_d_cp, l_d_r, l_v, prr, pt_d_t, rho_l, r_d, r_v
     143        ONLY:  cp, hyrho, l_d_cp, l_d_r, l_v, pt_d_t, rho_l, r_d, r_v
    144144
    145145    USE control_parameters,                                                    &
  • palm/trunk/SOURCE/lpm_droplet_condensation.f90

    r1832 r1849  
    1919! Current revisions:
    2020! ------------------
    21 !
     21! Interpolation of supersaturation has been removed because it is not in
     22! accordance with the release/depletion of latent heat/water vapor in
     23! interaction_droplets_ptq.
     24!
     25! Calculation of particle Reynolds number has been corrected.
     26!
     27! eps_ros added from modules
    2228!
    2329! Former revisions:
     
    9096
    9197    USE arrays_3d,                                                             &
    92         ONLY:  hyp, pt, q,  ql_c, ql_v, zu
     98        ONLY:  hyp, pt, q,  ql_c, ql_v
    9399
    94100    USE cloud_parameters,                                                      &
    95         ONLY:  bfactor, eps_ros, l_d_rv, l_v, rho_l, r_v
     101        ONLY:  l_d_rv, l_v, rho_l, r_v
    96102
    97103    USE constants,                                                             &
     
    113119
    114120    USE particle_attributes,                                                   &
    115         ONLY:  block_offset, curvature_solution_effects, grid_particles,       &
    116                hall_kernel, number_of_particles, particles, radius_classes,    &
    117                use_kernel_tables, wang_kernel
     121        ONLY:  curvature_solution_effects, hall_kernel, mass_of_solute,        &
     122               molecular_weight_of_solute, molecular_weight_of_water,          &
     123               number_of_particles, particles, radius_classes,                 &
     124               use_kernel_tables, vanthoff, wang_kernel
    118125
    119126
     
    129136    INTEGER(iwp) :: kp                         !<
    130137    INTEGER(iwp) :: n                          !<
    131     INTEGER(iwp) :: nb                         !<
    132138    INTEGER(iwp) :: ros_count                  !<
    133139 
    134     INTEGER(iwp), PARAMETER ::  maxtry = 40      !<
    135 
    136     INTEGER(iwp), DIMENSION(0:7) ::  end_index   !<
    137     INTEGER(iwp), DIMENSION(0:7) ::  start_index !<
    138 
    139     LOGICAL ::  repeat                           !<
    140 
    141     LOGICAL, DIMENSION(number_of_particles) ::  flag_1 !<
     140    INTEGER(iwp), PARAMETER ::  maxtry = 40    !<
     141
     142    LOGICAL ::  repeat                         !<
    142143
    143144    REAL(wp) ::  aa                            !<
    144     REAL(wp) ::  afactor                       !<
     145    REAL(wp) ::  afactor                       !< curvature effects
    145146    REAL(wp) ::  arg                           !<
    146     REAL(wp) ::  bb                            !<
    147     REAL(wp) ::  cc                            !<
    148     REAL(wp) ::  dd                            !<
     147    REAL(wp) ::  bfactor                       !< solute effects
    149148    REAL(wp) ::  ddenom                        !<
    150149    REAL(wp) ::  delta_r                       !<
     150    REAL(wp) ::  diameter                      !< diameter of cloud droplets
     151    REAL(wp) ::  diff_coeff_v                  !< diffusivity for water vapor
    151152    REAL(wp) ::  drdt                          !<
    152153    REAL(wp) ::  drdt_ini                      !<
     
    157158    REAL(wp) ::  d2rdtdr                       !<
    158159    REAL(wp) ::  errmax                        !<
     160    REAL(wp) ::  e_a                           !< current vapor pressure
     161    REAL(wp) ::  e_s                           !< current saturation vapor pressure
    159162    REAL(wp) ::  err_ros                       !<
    160163    REAL(wp) ::  g1                            !<
     
    162165    REAL(wp) ::  g3                            !<
    163166    REAL(wp) ::  g4                            !<
    164     REAL(wp) ::  gg                            !<
    165     REAL(wp) ::  pt_int                        !<
    166     REAL(wp) ::  pt_int_l                      !<
    167     REAL(wp) ::  pt_int_u                      !<
    168     REAL(wp) ::  q_int                         !<
    169     REAL(wp) ::  q_int_l                       !<
    170     REAL(wp) ::  q_int_u                       !<
    171167    REAL(wp) ::  r_ros                         !<
    172168    REAL(wp) ::  r_ros_ini                     !<
    173169    REAL(wp) ::  sigma                         !<
    174     REAL(wp) ::  x                             !<
    175     REAL(wp) ::  y                             !<
     170    REAL(wp) ::  thermal_conductivity_v        !< thermal conductivity for water
     171    REAL(wp) ::  t_int                         !< temperature
     172    REAL(wp) ::  w_s                           !< terminal velocity of droplets
    176173    REAL(wp) ::  re_p                          !<
    177  
     174
     175!
    178176!-- Parameters for Rosenbrock method
    179177    REAL(wp), PARAMETER ::  a21 = 2.0_wp               !<
     
    200198    REAL(wp), PARAMETER ::  pshrnk = -1.0_wp /3.0_wp   !<
    201199    REAL(wp), PARAMETER ::  shrnk = 0.5_wp             !<
    202 
    203     REAL(wp), DIMENSION(number_of_particles) ::  afactor_v              !<
    204     REAL(wp), DIMENSION(number_of_particles) ::  diff_coeff_v           !<
    205     REAL(wp), DIMENSION(number_of_particles) ::  e_s                    !<
    206     REAL(wp), DIMENSION(number_of_particles) ::  e_a                    !<
     200    REAL(wp), PARAMETER ::  eps_ros = 1.0E-4_wp        !< accuracy of Rosenbrock method
     201
     202!
     203!-- Parameters for terminal velocity
     204    REAL(wp), PARAMETER ::  a_rog = 9.65_wp      !< parameter for fall velocity
     205    REAL(wp), PARAMETER ::  b_rog = 10.43_wp     !< parameter for fall velocity
     206    REAL(wp), PARAMETER ::  c_rog = 0.6_wp       !< parameter for fall velocity
     207    REAL(wp), PARAMETER ::  k_cap_rog = 4.0_wp   !< parameter for fall velocity
     208    REAL(wp), PARAMETER ::  k_low_rog = 12.0_wp  !< parameter for fall velocity
     209    REAL(wp), PARAMETER ::  d0_rog = 0.745_wp    !< separation diameter
     210
     211    REAL(wp), DIMENSION(number_of_particles) ::  ventilation_effect     !<
    207212    REAL(wp), DIMENSION(number_of_particles) ::  new_r                  !<
    208     REAL(wp), DIMENSION(number_of_particles) ::  p_int                  !<
    209     REAL(wp), DIMENSION(number_of_particles) ::  thermal_conductivity_v !<
    210     REAL(wp), DIMENSION(number_of_particles) ::  t_int                  !<
    211     REAL(wp), DIMENSION(number_of_particles) ::  xv                     !<
    212     REAL(wp), DIMENSION(number_of_particles) ::  yv                     !<
    213     REAL(wp), DIMENSION(number_of_particles) ::  zv                     !<
     213
    214214
    215215
    216216    CALL cpu_log( log_point_s(42), 'lpm_droplet_condens', 'start' )
    217217
    218     start_index = grid_particles(kp,jp,ip)%start_index
    219     end_index   = grid_particles(kp,jp,ip)%end_index
    220 
    221     xv = particles(1:number_of_particles)%x
    222     yv = particles(1:number_of_particles)%y
    223     zv = particles(1:number_of_particles)%z
    224 
    225     DO  nb = 0,7
    226 
    227        i = ip + block_offset(nb)%i_off
    228        j = jp + block_offset(nb)%j_off
    229        k = kp + block_offset(nb)%k_off
    230 
    231        DO  n = start_index(nb), end_index(nb)
    232 !
    233 !--    Interpolate temperature and humidity.
    234           x  = xv(n) - i * dx
    235           y  = yv(n) - j * dy
    236           aa = x**2          + y**2
    237           bb = ( dx - x )**2 + y**2
    238           cc = x**2          + ( dy - y )**2
    239           dd = ( dx - x )**2 + ( dy - y )**2
    240           gg = aa + bb + cc + dd
    241 
    242           pt_int_l = ( ( gg - aa ) * pt(k,j,i)   + ( gg - bb ) * pt(k,j,i+1)   &
    243                      + ( gg - cc ) * pt(k,j+1,i) + ( gg - dd ) * pt(k,j+1,i+1) &
    244                      ) / ( 3.0_wp * gg )
    245 
    246           pt_int_u = ( ( gg-aa ) * pt(k+1,j,i)   + ( gg-bb ) * pt(k+1,j,i+1)   &
    247                      + ( gg-cc ) * pt(k+1,j+1,i) + ( gg-dd ) * pt(k+1,j+1,i+1) &
    248                      ) / ( 3.0_wp * gg )
    249 
    250           pt_int = pt_int_l + ( particles(n)%z - zu(k) ) / dz *                &
    251                               ( pt_int_u - pt_int_l )
    252 
    253           q_int_l = ( ( gg - aa ) * q(k,j,i)     + ( gg - bb ) * q(k,j,i+1)    &
    254                     + ( gg - cc ) * q(k,j+1,i)   + ( gg - dd ) * q(k,j+1,i+1)  &
    255                     ) / ( 3.0_wp * gg )
    256 
    257           q_int_u = ( ( gg-aa ) * q(k+1,j,i)   + ( gg-bb ) * q(k+1,j,i+1)      &
    258                     + ( gg-cc ) * q(k+1,j+1,i) + ( gg-dd ) * q(k+1,j+1,i+1)    &
    259                     ) / ( 3.0_wp * gg )
    260 
    261           q_int = q_int_l + ( zv(n) - zu(k) ) / dz *                           &
    262                             ( q_int_u - q_int_l )
    263 
    264 !
    265 !--       Calculate real temperature and saturation vapor pressure
    266           p_int(n) = hyp(k) + ( particles(n)%z - zu(k) ) / dz *                &
    267                               ( hyp(k+1)-hyp(k) )
    268           t_int(n) = pt_int * ( p_int(n) / 100000.0_wp )**0.286_wp
    269 
    270           e_s(n) = 611.0_wp * EXP( l_d_rv * ( 3.6609E-3_wp - 1.0_wp /          &
    271                                    t_int(n) ) )
    272 
    273 !
    274 !--       Current vapor pressure
    275           e_a(n) = q_int * p_int(n) / ( 0.378_wp * q_int + 0.622_wp )
    276 
    277        ENDDO
    278     ENDDO
     218!
     219!-- Calculate temperature, saturation vapor pressure and current vapor pressure
     220    t_int = pt(kp,jp,ip) * ( hyp(kp) / 100000.0_wp )**0.286_wp
     221    e_s   = 611.0_wp * EXP( l_d_rv * ( 3.6609E-3_wp - 1.0_wp / t_int ) )
     222    e_a   = q(kp,jp,ip) * hyp(kp) / ( 0.378_wp * q(kp,jp,ip) + 0.622_wp )
     223!
     224!-- Thermal conductivity for water (from Rogers and Yau, Table 7.1),
     225!-- diffusivity for water vapor (after Hall und Pruppacher, 1976)
     226    thermal_conductivity_v = 7.94048E-05_wp * t_int + 0.00227011_wp
     227    diff_coeff_v           = 0.211E-4_wp * ( t_int / 273.15_wp )**1.94_wp * &
     228                             ( 101325.0_wp / hyp(kp) )
     229!
     230!-- Calculate effects of heat conductivity and diffusion of water vapor on the
     231!-- condensation/evaporation process (typically known as 1.0 / (F_k + F_d) )
     232    ddenom  = 1.0_wp / ( rho_l * r_v * t_int / ( e_s * diff_coeff_v ) +        &
     233                         ( l_v / ( r_v * t_int ) - 1.0_wp ) * rho_l *          &
     234                         l_v / ( thermal_conductivity_v * t_int )              &
     235                       )
    279236
    280237    new_r = 0.0_wp
    281     flag_1 = .false.
    282 
     238
     239!
     240!-- Determine ventilation effect on evaporation of large drops
    283241    DO  n = 1, number_of_particles
    284 !
    285 !--    Change in radius by condensation/evaporation
    286        IF ( particles(n)%radius >= 4.0E-5_wp  .AND.                            &
    287             e_a(n)/e_s(n) < 1.0_wp )  THEN
    288 !
    289 !--    Approximation for large radii, where curvature and solution effects
    290 !--    can be neglected but ventilation effect has to be included in case of
    291 !--    evaporation.
    292 !--    First calculate the droplet's Reynolds number
    293           re_p = 2.0_wp * particles(n)%radius * ABS( particles(n)%speed_z ) /  &
    294                                                      molecular_viscosity
     242
     243       IF ( particles(n)%radius >= 4.0E-5_wp  .AND.  e_a / e_s < 1.0_wp )  THEN
     244!
     245!--       Terminal velocity is computed for vertical direction (Rogers et al.,
     246!--       1993, J. Appl. Meteorol.)
     247          diameter = particles(n)%radius * 2000.0_wp !diameter in mm
     248          IF ( diameter <= d0_rog )  THEN
     249             w_s = k_cap_rog * diameter * ( 1.0_wp - EXP( -k_low_rog * diameter ) )
     250          ELSE
     251             w_s = a_rog - b_rog * EXP( -c_rog * diameter )
     252          ENDIF
     253!
     254!--       First calculate droplet's Reynolds number
     255          re_p = 2.0_wp * particles(n)%radius * w_s / molecular_viscosity
    295256!
    296257!--       Ventilation coefficient (Rogers and Yau, 1989):
    297258          IF ( re_p > 2.5_wp )  THEN
    298              afactor_v(n) = 0.78_wp + 0.28_wp * SQRT( re_p )
     259             ventilation_effect(n) = 0.78_wp + 0.28_wp * SQRT( re_p )
    299260          ELSE
    300              afactor_v(n) = 1.0_wp + 0.09_wp * re_p
     261             ventilation_effect(n) = 1.0_wp + 0.09_wp * re_p
    301262          ENDIF
    302           flag_1(n) = .TRUE.
    303        ELSEIF ( particles(n)%radius >= 1.0E-6_wp  .OR.                         &
    304                 .NOT. curvature_solution_effects )  THEN
    305 !
    306 !--    Approximation for larger radii in case that curvature and solution
    307 !--    effects are neglected and ventilation effects does not play a role
    308           afactor_v(n) = 1.0_wp
    309           flag_1(n) = .TRUE.
     263       ELSE
     264!
     265!--       For small droplets or in supersaturated environments, the ventilation
     266!--       effect does not play a role
     267          ventilation_effect(n) = 1.0_wp
    310268       ENDIF
    311269    ENDDO
    312270
    313     DO  n = 1, number_of_particles
    314 !
    315 !--    Thermal conductivity for water (from Rogers and Yau, Table 7.1),
    316 !--    diffusivity for water vapor (after Hall und Pruppacher, 1976)
    317        thermal_conductivity_v(n) = 7.94048E-05_wp * t_int(n) + 0.00227011_wp
    318        diff_coeff_v(n)           = 0.211E-4_wp *                               &
    319                    ( t_int(n) / 273.15_wp )**1.94_wp * ( 101325.0_wp / p_int(n))
    320 
    321        IF(flag_1(n)) then
    322           arg = particles(n)%radius**2 + 2.0_wp * dt_3d * afactor_v(n) *       &
    323                   ( e_a(n) / e_s(n) - 1.0_wp ) /                               &
    324                   ( ( l_d_rv / t_int(n) - 1.0_wp ) * l_v * rho_l / t_int(n) /  &
    325                   thermal_conductivity_v(n) +                                  &
    326                   rho_l * r_v * t_int(n) / diff_coeff_v(n) / e_s(n) )
    327 
     271!
     272!-- Use analytic model for condensational growth
     273    IF( .NOT. curvature_solution_effects ) then
     274       DO  n = 1, number_of_particles
     275          arg = particles(n)%radius**2 + 2.0_wp * dt_3d * ddenom *             &
     276                                         ventilation_effect(n) *               &
     277                                         ( e_a / e_s - 1.0_wp )
    328278          arg = MAX( arg, 1.0E-16_wp )
    329279          new_r(n) = SQRT( arg )
    330         ENDIF
    331     ENDDO
    332 
     280       ENDDO
     281    ENDIF
     282
     283!
     284!-- If selected, use numerical solution of the condensational growth
     285!-- equation (e.g., for studying the activation of aerosols).
     286!-- Curvature and solutions effects are included in growth equation.
     287!-- Change in Radius is calculated with a 4th-order Rosenbrock method
     288!-- for stiff o.d.e's with monitoring local truncation error to adjust
     289!-- stepsize (see Numerical recipes in FORTRAN, 2nd edition, p. 731).
    333290    DO  n = 1, number_of_particles
    334        IF ( curvature_solution_effects  .AND.                                  &
    335             ( ( particles(n)%radius < 1.0E-6_wp )  .OR.                        &
    336               ( new_r(n) < 1.0E-6_wp ) ) )  THEN
    337 !
    338 !--       Curvature and solutions effects are included in growth equation.
    339 !--       Change in Radius is calculated with 4th-order Rosenbrock method
    340 !--       for stiff o.d.e's with monitoring local truncation error to adjust
    341 !--       stepsize (see Numerical recipes in FORTRAN, 2nd edition, p. 731).
    342 !--       For larger radii the simple analytic method (see ELSE) gives
    343 !--       almost the same results.
     291       IF ( curvature_solution_effects )  THEN
    344292
    345293          ros_count = 0
     
    356304             repeat = .FALSE.
    357305!
    358 !--          Surface tension (Straka, 2009):
    359              sigma = 0.0761_wp - 0.000155_wp * ( t_int(n) - 273.15_wp )
     306!--          Curvature effect (afactor) with surface tension parameterization
     307!--          by Straka (2009)
     308             sigma = 0.0761_wp - 0.000155_wp * ( t_int - 273.15_wp )
     309             afactor = 2.0_wp * sigma / ( rho_l * r_v * t_int )
     310!
     311!--          Solute effect (bfactor), mass of solute to be replaced by variable
     312!--          aerosol radius
     313             bfactor = 3.0_wp * vanthoff * mass_of_solute *                     &
     314                       molecular_weight_of_water / ( 4.0_wp * pi * rho_l *      &
     315                                                     molecular_weight_of_solute &
     316                                                   )
    360317
    361318             r_ros = particles(n)%radius
    362319             dt_ros_sum  = 0.0_wp      ! internal integrated time (s)
    363320             internal_timestep_count = 0
    364 
    365              ddenom  = 1.0_wp / ( rho_l * r_v * t_int(n) / ( e_s(n) *          &
    366                                   diff_coeff_v(n) ) + ( l_v /                  &
    367                                   ( r_v * t_int(n) ) - 1.0_wp ) *              &
    368                                   rho_l * l_v / ( thermal_conductivity_v(n) *  &
    369                                   t_int(n) )                                   &
    370                                 )
    371 
    372              afactor = 2.0_wp * sigma / ( rho_l * r_v * t_int(n) )
    373 
    374321!
    375322!--          Take internal time step values from the end of last PALM time step
     
    380327!--          because larger values may lead to secondary solutions which are
    381328!--          physically unlikely
    382              IF ( dt_ros_next > 1.0E-2_wp  .AND.  e_a(n)/e_s(n) < 1.0_wp )  THEN
     329             IF ( dt_ros_next > 1.0E-2_wp  .AND.  e_a / e_s < 1.0_wp )  THEN
    383330                dt_ros_next = 1.0E-3_wp
    384331             ENDIF
     
    408355!
    409356!--             Derivative at starting value
    410                 drdt = ddenom / r_ros * ( e_a(n) / e_s(n) - 1.0_wp - afactor / &
    411                                           r_ros + bfactor / r_ros**3 )
     357                drdt = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0_wp - &
     358                                                          afactor / r_ros +    &
     359                                                          bfactor / r_ros**3   &
     360                                                        ) / r_ros
     361
    412362                drdt_ini       = drdt
    413363                dt_ros_sum_ini = dt_ros_sum
     
    416366!
    417367!--             Calculate radial derivative of dr/dt
    418                 d2rdtdr = ddenom * ( ( 1.0_wp - e_a(n)/e_s(n) ) / r_ros**2 +   &
    419                                      2.0_wp * afactor / r_ros**3 -             &
    420                                      4.0_wp * bfactor / r_ros**5 )
     368                d2rdtdr = ddenom * ventilation_effect(n) *                     &
     369                                       ( ( 1.0_wp - e_a / e_s ) / r_ros**2 +   &
     370                                         2.0_wp * afactor / r_ros**3 -         &
     371                                         4.0_wp * bfactor / r_ros**5           &
     372                                       )
    421373!
    422374!--             Adjust stepsize unless required accuracy is reached
     
    432384                   g1    = drdt_ini / aa
    433385                   r_ros = r_ros_ini + a21 * g1
    434                    drdt  = ddenom / r_ros * ( e_a(n) / e_s(n) - 1.0_wp -       &
    435                                               afactor / r_ros +                &
    436                                               bfactor / r_ros**3 )
     386                   drdt  = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0_wp - &
     387                                                              afactor / r_ros +    &
     388                                                              bfactor / r_ros**3   &
     389                                                            ) / r_ros
    437390
    438391                   g2    = ( drdt + c21 * g1 / dt_ros )&
    439392                           / aa
    440393                   r_ros = r_ros_ini + a31 * g1 + a32 * g2
    441                    drdt  = ddenom / r_ros * ( e_a(n) / e_s(n) - 1.0_wp -       &
    442                                               afactor / r_ros +                &
    443                                               bfactor / r_ros**3 )
     394                   drdt  = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0_wp - &
     395                                                              afactor / r_ros +    &
     396                                                              bfactor / r_ros**3   &
     397                                                            ) / r_ros
    444398
    445399                   g3    = ( drdt +  &
     
    510464!--          Limiting values are tested for droplets down to 1.0E-7
    511465             IF ( new_r(n) - particles(n)%radius >= 3.0E-7_wp  .AND.  &
    512                   e_a(n)/e_s(n) < 0.97_wp )  THEN
     466                  e_a / e_s < 0.97_wp )  THEN
    513467                ros_count = ros_count + 1
    514468                repeat = .TRUE.
     
    546500            new_r(n) < 0.0_wp )  THEN
    547501          WRITE( message_string, * ) '#1 k=',k,' j=',j,' i=',i,                &
    548                        ' e_s=',e_s(n), ' e_a=',e_a(n),' t_int=',t_int(n),      &
     502                       ' e_s=',e_s, ' e_a=',e_a,' t_int=',t_int,      &
    549503                       ' &delta_r=',delta_r,                                   &
    550504                       ' particle_radius=',particles(n)%radius
  • palm/trunk/SOURCE/microphysics.f90

    r1846 r1849  
    1919! Current revisions:
    2020! ------------------
    21 !
    22 ! 
     21! Adapted for modularization of microphysics.
     22!
    2323! Former revisions:
    2424! -----------------
     
    9898! Description:
    9999! ------------
    100 !> Calculate cloud microphysics according to the two moment bulk
    101 !> scheme by Seifert and Beheng (2006).
     100!> Calculate bilk cloud microphysics.
    102101!------------------------------------------------------------------------------!
    103102 MODULE microphysics_mod
    104  
     103
     104    USE  kinds
     105
     106    IMPLICIT NONE
     107
     108    LOGICAL ::  cloud_water_sedimentation = .FALSE.  !< cloud water sedimentation
     109    LOGICAL ::  limiter_sedimentation = .TRUE.       !< sedimentation limiter
     110    LOGICAL ::  collision_turbulence = .FALSE.       !< turbulence effects
     111    LOGICAL ::  ventilation_effect = .TRUE.          !< ventilation effect
     112
     113    REAL(wp) ::  a_1 = 8.69E-4_wp          !< coef. in turb. parametrization (cm-2 s3)
     114    REAL(wp) ::  a_2 = -7.38E-5_wp         !< coef. in turb. parametrization (cm-2 s3)
     115    REAL(wp) ::  a_3 = -1.40E-2_wp         !< coef. in turb. parametrization
     116    REAL(wp) ::  a_term = 9.65_wp          !< coef. for terminal velocity (m s-1)
     117    REAL(wp) ::  a_vent = 0.78_wp          !< coef. for ventilation effect
     118    REAL(wp) ::  b_1 = 11.45E-6_wp         !< coef. in turb. parametrization (m)
     119    REAL(wp) ::  b_2 = 9.68E-6_wp          !< coef. in turb. parametrization (m)
     120    REAL(wp) ::  b_3 = 0.62_wp             !< coef. in turb. parametrization
     121    REAL(wp) ::  b_term = 9.8_wp           !< coef. for terminal velocity (m s-1)
     122    REAL(wp) ::  b_vent = 0.308_wp         !< coef. for ventilation effect
     123    REAL(wp) ::  beta_cc = 3.09E-4_wp      !< coef. in turb. parametrization (cm-2 s3)
     124    REAL(wp) ::  c_1 = 4.82E-6_wp          !< coef. in turb. parametrization (m)
     125    REAL(wp) ::  c_2 = 4.8E-6_wp           !< coef. in turb. parametrization (m)
     126    REAL(wp) ::  c_3 = 0.76_wp             !< coef. in turb. parametrization
     127    REAL(wp) ::  c_const = 0.93_wp         !< const. in Taylor-microscale Reynolds number
     128    REAL(wp) ::  c_evap = 0.7_wp           !< constant in evaporation
     129    REAL(wp) ::  c_term = 600.0_wp         !< coef. for terminal velocity (m-1)
     130    REAL(wp) ::  diff_coeff_l = 0.23E-4_wp  !< diffusivity of water vapor (m2 s-1)
     131    REAL(wp) ::  eps_sb = 1.0E-20_wp       !< threshold in two-moments scheme
     132    REAL(wp) ::  k_cc = 9.44E09_wp         !< const. cloud-cloud kernel (m3 kg-2 s-1)
     133    REAL(wp) ::  k_cr0 = 4.33_wp           !< const. cloud-rain kernel (m3 kg-1 s-1)
     134    REAL(wp) ::  k_rr = 7.12_wp            !< const. rain-rain kernel (m3 kg-1 s-1)
     135    REAL(wp) ::  k_br = 1000.0_wp          !< const. in breakup parametrization (m-1)
     136    REAL(wp) ::  k_st = 1.2E8_wp           !< const. in drizzle parametrization (m-1 s-1)
     137    REAL(wp) ::  kappa_rr = 60.7_wp        !< const. in collision kernel (kg-1/3)
     138    REAL(wp) ::  kin_vis_air = 1.4086E-5_wp  !< kin. viscosity of air (m2 s-1)
     139    REAL(wp) ::  prec_time_const = 0.001_wp  !< coef. in Kessler scheme (s-1)
     140    REAL(wp) ::  ql_crit = 0.0005_wp       !< coef. in Kessler scheme (kg kg-1)
     141    REAL(wp) ::  schmidt_p_1d3=0.8921121_wp  !< Schmidt number**0.33333, 0.71**0.33333
     142    REAL(wp) ::  sigma_gc = 1.3_wp         !< geometric standard deviation cloud droplets
     143    REAL(wp) ::  thermal_conductivity_l = 2.43E-2_wp  !< therm. cond. air (J m-1 s-1 K-1)
     144    REAL(wp) ::  w_precipitation = 9.65_wp  !< maximum terminal velocity (m s-1)
     145    REAL(wp) ::  x0 = 2.6E-10_wp           !< separating drop mass (kg)
     146    REAL(wp) ::  xrmin = 2.6E-10_wp        !< minimum rain drop size (kg)
     147    REAL(wp) ::  xrmax = 5.0E-6_wp         !< maximum rain drop site (kg)
     148
     149    REAL(wp) ::  c_sedimentation = 2.0_wp  !< Courant number of sedimentation process
     150    REAL(wp) ::  dpirho_l                  !< 6.0 / ( pi * rho_l )
     151    REAL(wp) ::  dt_micro                  !< microphysics time step
     152    REAL(wp) ::  nc_const = 70.0E6_wp      !< cloud droplet concentration
     153    REAL(wp) ::  dt_precipitation = 100.0_wp !< timestep precipitation (s)
     154    REAL(wp) ::  sed_qc_const              !< const. for sedimentation of cloud water
     155    REAL(wp) ::  pirho_l                   !< pi * rho_l / 6.0;
     156
     157    REAL(wp), DIMENSION(:), ALLOCATABLE ::  nc_1d  !<
     158    REAL(wp), DIMENSION(:), ALLOCATABLE ::  nr_1d  !<
     159    REAL(wp), DIMENSION(:), ALLOCATABLE ::  pt_1d  !<
     160    REAL(wp), DIMENSION(:), ALLOCATABLE ::  qc_1d  !<
     161    REAL(wp), DIMENSION(:), ALLOCATABLE ::  qr_1d  !<
     162    REAL(wp), DIMENSION(:), ALLOCATABLE ::  q_1d   !<
     163
     164    SAVE
    105165
    106166    PRIVATE
    107     PUBLIC microphysics_control
     167    PUBLIC microphysics_control, microphysics_init
     168
     169    PUBLIC cloud_water_sedimentation, collision_turbulence, c_sedimentation,   &
     170           dt_precipitation, limiter_sedimentation, nc_const, sigma_gc,        &
     171           ventilation_effect
    108172
    109173    INTERFACE microphysics_control
     
    157221    END INTERFACE calc_precipitation_amount
    158222
    159 
    160223 CONTAINS
    161 
    162 
    163224!------------------------------------------------------------------------------!
    164225! Description:
    165226! ------------
    166 !> Call for all grid points
     227!> Initialization of bulk microphysics
     228!------------------------------------------------------------------------------!
     229    SUBROUTINE microphysics_init
     230
     231       USE arrays_3d,                                                          &
     232           ONLY:  dzu
     233
     234       USE constants,                                                          &
     235           ONLY:  pi
     236
     237       USE cloud_parameters,                                                   &
     238           ONLY:  rho_l
     239
     240       USE control_parameters,                                                 &
     241           ONLY:  microphysics_seifert
     242
     243       USE indices,                                                            &
     244           ONLY:  nzb, nzt
     245
     246       IMPLICIT NONE
     247
     248!
     249!--    constant for the sedimentation of cloud water (2-moment cloud physics)
     250       sed_qc_const = k_st * ( 3.0_wp / ( 4.0_wp * pi * rho_l )                &
     251                          )**( 2.0_wp / 3.0_wp ) *                             &
     252                      EXP( 5.0_wp * LOG( sigma_gc )**2 )
     253
     254!
     255!--    Calculate timestep according to precipitation
     256       IF ( microphysics_seifert )  THEN
     257          dt_precipitation = c_sedimentation * MINVAL( dzu(nzb+2:nzt) ) /      &
     258                             w_precipitation
     259       ENDIF
     260
     261!
     262!--    Pre-calculate frequently calculated fractions of pi and rho_l
     263       pirho_l  = pi * rho_l / 6.0_wp
     264       dpirho_l = 1.0_wp / pirho_l
     265
     266!
     267!--    Allocate 1D microphysics arrays
     268       ALLOCATE ( nc_1d(nzb:nzt+1), pt_1d(nzb:nzt+1), q_1d(nzb:nzt+1),         &
     269                  qc_1d(nzb:nzt+1) )
     270
     271       IF ( microphysics_seifert )  THEN
     272          ALLOCATE ( nr_1d(nzb:nzt+1), qr_1d(nzb:nzt+1) )
     273       ENDIF
     274
     275!
     276!--    Initialze nc_1d with nc_const
     277       nc_1d = nc_const
     278
     279    END SUBROUTINE microphysics_init
     280
     281
     282!------------------------------------------------------------------------------!
     283! Description:
     284! ------------
     285!> Control of microphysics for all grid points
    167286!------------------------------------------------------------------------------!
    168287    SUBROUTINE microphysics_control
    169288
    170289       USE arrays_3d,                                                          &
    171            ONLY:  hyp, pt_init, zu
     290           ONLY:  hyp, pt_init, prr, zu
    172291
    173292       USE cloud_parameters,                                                   &
    174            ONLY:  cloud_water_sedimentation, cp, hyrho, prr, pt_d_t, r_d, t_d_pt
     293           ONLY:  cp, hyrho, pt_d_t, r_d, t_d_pt
    175294
    176295       USE control_parameters,                                                 &
    177            ONLY:  call_microphysics_at_all_substeps, dt_3d, dt_micro,          &
    178                   g, intermediate_timestep_count, large_scale_forcing,         &
     296           ONLY:  call_microphysics_at_all_substeps, dt_3d, g,                 &
     297                  intermediate_timestep_count, large_scale_forcing,            &
    179298                  lsf_surf, microphysics_kessler, microphysics_seifert,        &
    180299                  pt_surface, rho_surface,surface_pressure
     
    263382
    264383       USE cloud_parameters,                                                   &
    265            ONLY:  eps_sb, xrmin, xrmax, hyrho
     384           ONLY:  hyrho
    266385
    267386       USE cpulog,                                                             &
     
    314433
    315434       USE cloud_parameters,                                                   &
    316            ONLY:  a_1, a_2, a_3, b_1, b_2, b_3, beta_cc, c_1, c_2, c_3,        &
    317                   c_const, collision_turbulence, dpirho_l, eps_sb, hyrho,      &
    318                   k_cc, kin_vis_air, nc_const, x0
     435           ONLY:  hyrho
    319436
    320437       USE control_parameters,                                                 &
    321            ONLY:  dt_micro, rho_surface
     438           ONLY:  rho_surface
    322439
    323440       USE cpulog,                                                             &
     
    446563
    447564       USE arrays_3d,                                                          &
    448            ONLY:  dzw, pt, q, qc
     565           ONLY:  dzw, pt, prr, q, qc
    449566
    450567       USE cloud_parameters,                                                   &
    451            ONLY:  l_d_cp, pt_d_t, prec_time_const, prr, ql_crit
    452 
    453        USE control_parameters,                                                 &
    454            ONLY:  dt_micro
     568           ONLY:  l_d_cp, pt_d_t
    455569
    456570       USE indices,                                                            &
     
    506620
    507621       USE cloud_parameters,                                                   &
    508            ONLY:  collision_turbulence, eps_sb, hyrho, k_cr0
     622           ONLY:  hyrho
    509623
    510624       USE control_parameters,                                                 &
    511            ONLY:  dt_micro, rho_surface
     625           ONLY:  rho_surface
    512626
    513627       USE cpulog,                                                             &
     
    587701
    588702       USE cloud_parameters,                                                   &
    589            ONLY:  dpirho_l, eps_sb, hyrho, k_br, k_rr
     703           ONLY:  hyrho
    590704
    591705       USE control_parameters,                                                 &
    592            ONLY:  dt_micro, rho_surface
     706           ONLY:  rho_surface
    593707
    594708       USE cpulog,                                                             &
     
    659773
    660774       USE cloud_parameters,                                                   &
    661            ONLY:  a_term, a_vent, b_term, b_vent, c_evap, c_term,              &
    662                   diff_coeff_l, dpirho_l, eps_sb, hyrho, kin_vis_air,          &
    663                   l_d_cp, l_d_r, l_v, r_v, schmidt_p_1d3,                      &
    664                   thermal_conductivity_l, t_d_pt, ventilation_effect
     775           ONLY:  hyrho, l_d_cp, l_d_r, l_v, r_v, t_d_pt
    665776
    666777       USE constants,                                                          &
    667778           ONLY:  pi
    668 
    669        USE control_parameters,                                                 &
    670            ONLY:  dt_micro
    671779
    672780       USE cpulog,                                                             &
     
    817925
    818926       USE arrays_3d,                                                          &
    819            ONLY:  ddzu, dzu, pt, q, qc
     927           ONLY:  ddzu, dzu, pt, prr, q, qc
    820928
    821929       USE cloud_parameters,                                                   &
    822            ONLY:  eps_sb, hyrho, l_d_cp, nc_const, prr, pt_d_t, sed_qc_const
     930           ONLY:  hyrho, l_d_cp, pt_d_t
    823931
    824932       USE control_parameters,                                                 &
    825            ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
    826                   intermediate_timestep_count
     933           ONLY:  call_microphysics_at_all_substeps, intermediate_timestep_count
    827934
    828935       USE cpulog,                                                             &
     
    840947       IMPLICIT NONE
    841948
    842        INTEGER(iwp) ::  i                 !<
    843        INTEGER(iwp) ::  j                 !<
    844        INTEGER(iwp) ::  k                 !<
     949       INTEGER(iwp) ::  i             !<
     950       INTEGER(iwp) ::  j             !<
     951       INTEGER(iwp) ::  k             !<
    845952
    846953       REAL(wp), DIMENSION(nzb:nzt+1) :: sed_qc !<
     
    9001007
    9011008       USE arrays_3d,                                                          &
    902            ONLY:  ddzu, dzu, nr, pt, q, qr
     1009           ONLY:  ddzu, dzu, nr, pt, prr, q, qr
    9031010
    9041011       USE cloud_parameters,                                                   &
    905            ONLY:  a_term, b_term, c_term, dpirho_l, eps_sb, hyrho,             &
    906                   limiter_sedimentation, l_d_cp, prr, pt_d_t
     1012           ONLY:  hyrho, l_d_cp, pt_d_t
    9071013
    9081014       USE control_parameters,                                                 &
    909            ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
    910                   intermediate_timestep_count
     1015           ONLY:  call_microphysics_at_all_substeps, intermediate_timestep_count
    9111016       USE cpulog,                                                             &
    9121017           ONLY:  cpu_log, log_point_s
     
    11251230    SUBROUTINE calc_precipitation_amount
    11261231
     1232       USE arrays_3d,                                                          &
     1233           ONLY:  precipitation_amount, prr
     1234
    11271235       USE cloud_parameters,                                                   &
    1128            ONLY:  hyrho, precipitation_amount, prr
     1236           ONLY:  hyrho
    11291237
    11301238       USE control_parameters,                                                 &
     
    11661274! Description:
    11671275! ------------
    1168 !> Call for grid point i,j
     1276!> Control of microphysics for grid points i,j
    11691277!------------------------------------------------------------------------------!
    11701278
     
    11721280
    11731281       USE arrays_3d,                                                          &
    1174            ONLY:  hyp, nc_1d, nr, nr_1d, pt, pt_init, pt_1d, q, q_1d, qc,      &
    1175                   qc_1d, qr, qr_1d, zu
     1282           ONLY:  hyp, nr, pt, pt_init, prr, q, qc, qr, zu
    11761283
    11771284       USE cloud_parameters,                                                   &
    1178            ONLY:  cloud_water_sedimentation, cp, hyrho, nc_const, prr, pt_d_t, &
    1179                   r_d, t_d_pt
     1285           ONLY:  cp, hyrho, pt_d_t, r_d, t_d_pt
    11801286
    11811287       USE control_parameters,                                                 &
    1182            ONLY:  call_microphysics_at_all_substeps, dt_3d, dt_micro,          &
    1183                   g, intermediate_timestep_count, large_scale_forcing,         &
     1288           ONLY:  call_microphysics_at_all_substeps, dt_3d, g,                 &
     1289                  intermediate_timestep_count, large_scale_forcing,            &
    11841290                  lsf_surf, microphysics_seifert, microphysics_kessler,        &
    11851291                  pt_surface, rho_surface, surface_pressure
     
    12861392    SUBROUTINE adjust_cloud_ij( i, j )
    12871393
    1288        USE arrays_3d,                                                          &
    1289            ONLY:  qr_1d, nr_1d
    1290 
    12911394       USE cloud_parameters,                                                   &
    1292            ONLY:  eps_sb, xrmin, xrmax, hyrho
     1395           ONLY:  hyrho
    12931396
    12941397       USE indices,                                                            &
     
    13341437
    13351438       USE arrays_3d,                                                          &
    1336            ONLY:  diss, dzu, nc_1d, nr_1d, qc_1d, qr_1d
     1439           ONLY:  diss, dzu
    13371440
    13381441       USE cloud_parameters,                                                   &
    1339            ONLY:  a_1, a_2, a_3, b_1, b_2, b_3, beta_cc, c_1, c_2, c_3,        &
    1340                   c_const, collision_turbulence, dpirho_l, eps_sb, hyrho,      &
    1341                   kin_vis_air, k_cc, x0
     1442           ONLY:  hyrho
    13421443
    13431444       USE control_parameters,                                                 &
    1344            ONLY:  dt_micro, rho_surface
     1445           ONLY:  rho_surface
    13451446
    13461447       USE grid_variables,                                                     &
     
    14541555
    14551556       USE arrays_3d,                                                          &
    1456            ONLY:  dzw, pt_1d, q_1d, qc_1d
     1557           ONLY:  dzw, prr
    14571558
    14581559       USE cloud_parameters,                                                   &
    1459            ONLY:  l_d_cp, pt_d_t, prec_time_const, prr, ql_crit
    1460 
    1461        USE control_parameters,                                                 &
    1462            ONLY:  dt_micro
     1560           ONLY:  l_d_cp, pt_d_t
    14631561
    14641562       USE indices,                                                            &
     
    15051603
    15061604       USE arrays_3d,                                                          &
    1507            ONLY:  diss, qc_1d, qr_1d
     1605           ONLY:  diss
    15081606
    15091607       USE cloud_parameters,                                                   &
    1510            ONLY:  collision_turbulence, eps_sb, hyrho, k_cr0
     1608           ONLY:  hyrho
    15111609
    15121610       USE control_parameters,                                                 &
    1513            ONLY:  dt_micro, rho_surface
     1611           ONLY:  rho_surface
    15141612
    15151613       USE indices,                                                            &
     
    15721670    SUBROUTINE selfcollection_breakup_ij( i, j )
    15731671
    1574        USE arrays_3d,                                                          &
    1575            ONLY:  nr_1d, qr_1d
    1576 
    15771672       USE cloud_parameters,                                                   &
    1578            ONLY:  dpirho_l, eps_sb, hyrho, k_br, k_rr
     1673           ONLY:  hyrho
    15791674
    15801675       USE control_parameters,                                                 &
    1581            ONLY:  dt_micro, rho_surface
     1676           ONLY:  rho_surface
    15821677
    15831678       USE indices,                                                            &
     
    16321727
    16331728       USE arrays_3d,                                                          &
    1634            ONLY:  hyp, nr_1d, pt_1d, q_1d,  qc_1d, qr_1d
     1729           ONLY:  hyp
    16351730
    16361731       USE cloud_parameters,                                                   &
    1637            ONLY:  a_term, a_vent, b_term, b_vent, c_evap, c_term, diff_coeff_l,&
    1638                   dpirho_l, eps_sb, hyrho, kin_vis_air, l_d_cp, l_d_r,         &
    1639                   l_v, r_v, schmidt_p_1d3, thermal_conductivity_l,             &
    1640                   t_d_pt, ventilation_effect
     1732           ONLY:  hyrho, l_d_cp, l_d_r, l_v, r_v, t_d_pt
    16411733
    16421734       USE constants,                                                          &
    16431735           ONLY:  pi
    1644 
    1645        USE control_parameters,                                                 &
    1646            ONLY:  dt_micro
    16471736
    16481737       USE indices,                                                            &
     
    17791868
    17801869       USE arrays_3d,                                                          &
    1781            ONLY:  ddzu, dzu, nc_1d, pt_1d, q_1d, qc_1d
     1870           ONLY:  ddzu, dzu, prr
    17821871
    17831872       USE cloud_parameters,                                                   &
    1784            ONLY:  eps_sb, hyrho, l_d_cp, prr, pt_d_t, sed_qc_const
     1873           ONLY:  hyrho, l_d_cp, pt_d_t
    17851874
    17861875       USE control_parameters,                                                 &
    1787            ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
    1788                   intermediate_timestep_count
     1876           ONLY:  call_microphysics_at_all_substeps, intermediate_timestep_count
    17891877
    17901878       USE indices,                                                            &
     
    17981886       IMPLICIT NONE
    17991887
    1800        INTEGER(iwp) ::  i                 !<
    1801        INTEGER(iwp) ::  j                 !<
    1802        INTEGER(iwp) ::  k                 !<
     1888       INTEGER(iwp) ::  i             !<
     1889       INTEGER(iwp) ::  j             !<
     1890       INTEGER(iwp) ::  k             !<
    18031891
    18041892       REAL(wp), DIMENSION(nzb:nzt+1) :: sed_qc  !<
     
    18481936
    18491937       USE arrays_3d,                                                          &
    1850            ONLY:  ddzu, dzu, nr_1d, pt_1d, q_1d, qr_1d
     1938           ONLY:  ddzu, dzu, prr
    18511939
    18521940       USE cloud_parameters,                                                   &
    1853            ONLY:  a_term, b_term, c_term, dpirho_l, eps_sb, hyrho,             &
    1854                   limiter_sedimentation, l_d_cp, prr, pt_d_t
     1941           ONLY:  hyrho, l_d_cp, pt_d_t
    18551942
    18561943       USE control_parameters,                                                 &
    1857            ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
    1858                   intermediate_timestep_count
     1944           ONLY:  call_microphysics_at_all_substeps, intermediate_timestep_count
    18591945
    18601946       USE indices,                                                            &
     
    20502136    SUBROUTINE calc_precipitation_amount_ij( i, j )
    20512137
     2138       USE arrays_3d,                                                          &
     2139           ONLY:  precipitation_amount, prr
     2140
    20522141       USE cloud_parameters,                                                   &
    2053            ONLY:  hyrho, precipitation_amount, prr
     2142           ONLY:  hyrho
    20542143
    20552144       USE control_parameters,                                                 &
     
    20892178!------------------------------------------------------------------------------!
    20902179    FUNCTION gamm( xx )
    2091        
    2092        USE cloud_parameters,                                                   &
    2093            ONLY:  cof, stp
    20942180
    20952181       USE kinds
     
    21062192       REAL(wp)     ::  y_gamm       !<
    21072193
    2108        x_gamm = xx
    2109        y_gamm = x_gamm
     2194
     2195       REAL(wp), PARAMETER  ::  stp = 2.5066282746310005_wp               !<
     2196       REAL(wp), PARAMETER  ::  cof(6) = (/ 76.18009172947146_wp,      &
     2197                                           -86.50532032941677_wp,      &
     2198                                            24.01409824083091_wp,      &
     2199                                            -1.231739572450155_wp,     &
     2200                                             0.1208650973866179E-2_wp, &
     2201                                            -0.5395239384953E-5_wp /)     !<
     2202
     2203       x_gamm = xx
     2204       y_gamm = x_gamm
    21102205       tmp = x_gamm + 5.5_wp
    2111        tmp = ( x_gamm + 0.5_wp ) * LOG( tmp ) - tmp 
     2206       tmp = ( x_gamm + 0.5_wp ) * LOG( tmp ) - tmp
    21122207       ser = 1.000000000190015_wp
    21132208
  • palm/trunk/SOURCE/mod_particle_attributes.f90

    r1832 r1849  
    1919! Current revisions:
    2020! ------------------
    21 !
     21! bfactor, mass_of_solute, molecular_weight_of_solute, molecular_weight_of_water,
     22! vanthoff added from modules
    2223!
    2324! Former revisions:
     
    115116    REAL(wp), DIMENSION(:), ALLOCATABLE     ::  log_z_z0
    116117
     118!
     119!-- Lagrangian cloud model constants
     120    REAL(wp) ::  mass_of_solute = 1.0E-17_wp                !< soluted NaCl (kg)
     121    REAL(wp) ::  molecular_weight_of_solute = 0.05844_wp    !< mol. m. NaCl (kg mol-1)
     122    REAL(wp) ::  molecular_weight_of_water = 0.01801528_wp  !< mol. m. H2O (kg mol-1)
     123    REAL(wp) ::  vanthoff = 2.0_wp                          !< van't Hoff factor for NaCl
     124
    117125    TYPE particle_type
    118126        SEQUENCE
  • palm/trunk/SOURCE/modules.f90

    r1846 r1849  
    1919! Current revisions:
    2020! ------------------
    21 !
    22 !
     21! bfactor, mass_of_solute, molecular_weight_of_solute, molecular_weight_of_water,
     22! vanthoff moved to mod_particle_attributes.
     23! dt_micro and several cloud_parameters moved to microphysics_mod.
     24! 1d-microphysics profiles moved to microphysics_mod.
     25!
    2326! Former revisions:
    2427! -----------------
     
    394397          c_u_m, c_u_m_l, c_v_m, c_v_m_l, c_w_m, c_w_m_l, ddzu, ddzu_pres,     &
    395398          dd2zu, dzu, ddzw, dzw, hyp, inflow_damping_factor, l_grid,           &
    396           nc_1d, nr_1d, ptdf_x, ptdf_y, p_surf, pt_surf, pt_1d, pt_init,       &
    397           qsws_surf, q_1d, q_init, q_surf, qc_1d, qr_1d, rdf, rdf_sc,          &
    398           ref_state, sa_init, shf_surf, timenudge, time_surf, time_vert,       &
    399           tmp_tnudge, ug, u_init, u_nzb_p1_for_vfc, vg, v_init,                &
     399          ptdf_x, ptdf_y, p_surf, pt_surf, pt_init, qsws_surf, q_init, q_surf, &
     400          rdf, rdf_sc, ref_state, sa_init, shf_surf, timenudge, time_surf,     &
     401          time_vert, tmp_tnudge, ug, u_init, u_nzb_p1_for_vfc, vg, v_init,     &
    400402          v_nzb_p1_for_vfc, w_subs, zu, zw
    401403
     
    407409          mean_inflow_profiles, nrs, nrsws, nrswst,                            &
    408410          ol,                                                                  & !< Obukhov length
    409           ptnudge, pt_slope_ref,                                               &
     411          precipitation_amount, precipitation_rate, ptnudge, pt_slope_ref,     &
    410412          qnudge, qs, qsws, qswst, qswst_remote, qrs, qrsws, qrswst,           &
    411413          saswsb, saswst, shf, tnudge, td_lsa_lpt, td_lsa_q, td_sub_lpt,       &
     
    421423          diss_l_v, diss_l_w, flux_l_e, flux_l_nr, flux_l_pt, flux_l_q,        &
    422424          flux_l_qr, flux_l_sa, flux_l_u, flux_l_v, flux_l_w, kh, km,          &
    423           l_wall, p_loc, tend, tric,                                           &
     425          l_wall, prr, p_loc, tend, tric,                                      &
    424426          u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n, v_m_r, v_m_s, w_m_l,       &
    425427          w_m_n, w_m_r, w_m_s
     
    490492    USE kinds
    491493
    492     LOGICAL ::  cloud_water_sedimentation = .FALSE., & !< cloud water sedimentation in bulk cloud physics
    493                 limiter_sedimentation = .TRUE.,      & !< sedimentation limiter in bulk cloud physics
    494                 collision_turbulence = .FALSE.,      & !< turbulence effects in bulk cloud physics
    495                 ventilation_effect = .TRUE.            !< ventilation effect in bulk cloud physics
    496                
    497 
    498     REAL(wp) ::  a_1 = 8.69E-4_wp,     & !< coef. in turb. parametrization (cm-2 s3)
    499                  a_2 = -7.38E-5_wp,    & !< coef. in turb. parametrization (cm-2 s3)
    500                  a_3 = -1.40E-2_wp,    & !< coef. in turb. parametrization
    501                  a_term = 9.65_wp,     & !< coef. for terminal velocity (m s-1)
    502                  a_vent = 0.78_wp,     & !< coef. for ventilation effect
    503                  b_1 = 11.45E-6_wp,    & !< coef. in turb. parametrization (m)
    504                  b_2 = 9.68E-6_wp,     & !< coef. in turb. parametrization (m)
    505                  b_3 = 0.62_wp,        & !< coef. in turb. parametrization
    506                  b_term = 9.8_wp,      & !< coef. for terminal velocity (m s-1)
    507                  b_vent = 0.308_wp,    & !< coef. for ventilation effect
    508                  beta_cc = 3.09E-4_wp, & !< coef. in turb. parametrization (cm-2 s3)
    509                  bfactor,              & !< solution effect on diffusional growth
    510                  c_1 = 4.82E-6_wp,     & !< coef. in turb. parametrization (m)
    511                  c_2 = 4.8E-6_wp,      & !< coef. in turb. parametrization (m)
    512                  c_3 = 0.76_wp,        & !< coef. in turb. parametrization
    513                  c_const = 0.93_wp,    & !< const. in Taylor-microscale Reynolds number
    514                  c_evap = 0.7_wp,      & !< constant in evaporation
    515                  c_sedimentation = 2.0_wp, & !< Courant number of sedimentation process
    516                  c_term = 600.0_wp,    & !< coef. for terminal velocity (m-1)
    517                  cof(6) = (/ 76.18009172947146_wp,      & !< coefficients in the
    518                              -86.50532032941677_wp,     & !< numerical
    519                              24.01409824083091_wp,      & !< calculation of the
    520                              -1.231739572450155_wp,     & !< gamma function
    521                              0.1208650973866179E-2_wp,  &
    522                              -0.5395239384953E-5_wp /), &
    523                 cp = 1005.0_wp,       & !< heat capacity of dry air (J kg-1 K-1)
    524                 diff_coeff_l = 0.23E-4_wp, & !< diffusivity of water vapor (m2 s-1)
    525                 effective_coll_efficiency, & !< effective collision efficiency
    526                 eps_ros = 1.0E-4_wp,  & !< accuracy of Rosenbrock method
    527                 eps_sb = 1.0E-20_wp,  & !< threshold in two-moments scheme
    528                 k_cc = 9.44E09_wp,    & !< const. cloud-cloud kernel (m3 kg-2 s-1)
    529                 k_cr0 = 4.33_wp,      & !< const. cloud-rain kernel (m3 kg-1 s-1)
    530                 k_rr = 7.12_wp,       & !< const. rain-rain kernel (m3 kg-1 s-1)
    531                 k_br = 1000._wp,      & !< const. in breakup parametrization (m-1)
    532                 k_st = 1.2E8_wp,      & !< const. in drizzle parametrization (m-1 s-1)
    533                 kappa_rr = 60.7_wp,   & !< const. in collision kernel (kg-1/3)
    534                 kin_vis_air = 1.4086E-5_wp, & !< kin. viscosity of air (m2 s-1)
     494    REAL(wp) :: cp = 1005.0_wp,       & !< heat capacity of dry air (J kg-1 K-1)
    535495                l_v = 2.5E+06_wp,     & !< latent heat of vaporization (J kg-1)
    536496                l_d_cp, l_d_r, l_d_rv, & !< l_v / cp, l_v / r_d, l_v / r_v
    537                 mass_of_solute = 1.0E-17_wp, & !< soluted NaCl (kg)
    538                 molecular_weight_of_solute = 0.05844_wp, & !< mol. m. NaCl (kg mol-1)
    539                 molecular_weight_of_water = 0.01801528_wp, & !< mol. m. H2O (kg mol-1)
    540                 nc_const = 70.0E6_wp, & !< cloud droplet concentration
    541                 prec_time_const = 0.001_wp, & !< coef. in Kessler scheme
    542                 pirho_l, dpirho_l, & !< pi * rho_l / 6.0; 6.0 / ( pi * rho_l )
    543497                rho_l = 1.0E3_wp,     & !< density of water (kg m-3)
    544                 ql_crit = 0.0005_wp,  & !< coef. in Kessler scheme
    545498                r_d = 287.0_wp,       & !< sp. gas const. dry air (J kg-1 K-1)
    546                 r_v = 461.51_wp,      & !< sp. gas const. water vapor (J kg-1 K-1)
    547                 schmidt = 0.71_wp,    & !< Schmidt number
    548                 schmidt_p_1d3,        & !< schmidt**( 1.0 / 3.0 )
    549                 sed_qc_const,         & !< const. for sedimentation of cloud water
    550                 sigma_gc = 1.3_wp,    & !< log-normal geometric standard deviation
    551                 stp = 2.5066282746310005_wp, & !< parameter in gamma function
    552                 thermal_conductivity_l = 2.43E-2_wp, & !< therm. cond. air (J m-1 s-1 K-1)
    553                 vanthoff = 2.0_wp,    & !< van't Hoff factor for NaCl
    554                 x0 = 2.6E-10_wp,      & !< separating drop mass (kg)
    555                 xrmin = 2.6E-10_wp,   & !< minimum rain drop size (kg)
    556                 xrmax = 5.0E-6_wp,    & !< maximum rain drop site (kg)
    557                 dt_precipitation = 100.0_wp, & !< timestep precipitation (s)
    558                 w_precipitation = 9.65_wp      !< maximum terminal velocity (m s-1)
     499                r_v = 461.51_wp         !< sp. gas const. water vapor (J kg-1 K-1)
     500
    559501
    560502    REAL(wp), DIMENSION(:), ALLOCATABLE     ::  hyrho, pt_d_t, t_d_pt 
    561 
    562     REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  precipitation_amount, &
    563                                                 precipitation_rate
    564 !
    565 !-- 3D array of precipitation rate
    566     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  prr
    567503
    568504    SAVE
     
    807743                 dt_do2d_xy = 9999999.9_wp, dt_do2d_xz = 9999999.9_wp, &
    808744                 dt_do2d_yz = 9999999.9_wp, dt_do3d = 9999999.9_wp, dt_dvrp = 9999999.9_wp, &
    809                  dt_max = 20.0_wp, dt_micro = -1.0_wp, &
     745                 dt_max = 20.0_wp, &
    810746                 dt_restart = 9999999.9_wp, &
    811747                 dt_run_control = 60.0_wp, dt_3d = -1.0_wp, dz = -1.0_wp, &
  • palm/trunk/SOURCE/parin.f90

    r1834 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
     21! Adapted for modularization of microphysics
    2222!
    2323! Former revisions:
     
    205205    USE plant_canopy_model_mod,                                                &
    206206         ONLY: pcm_parin 
    207  
    208     USE cloud_parameters,                                                      &
     207
     208    USE control_parameters
     209
     210    USE cpulog,                                                                &
     211        ONLY:  cpu_log_barrierwait
     212
     213    USE dvrp_variables,                                                        &
     214        ONLY:  local_dvrserver_running
     215
     216    USE grid_variables,                                                        &
     217        ONLY:  dx, dy
     218
     219    USE indices,                                                               &
     220        ONLY:  nx, ny, nz
     221
     222    USE kinds
     223
     224    USE land_surface_model_mod,                                                &
     225        ONLY: lsm_parin
     226
     227    USE microphysics_mod,                                                      &
    209228        ONLY:  c_sedimentation, cloud_water_sedimentation,                     &
    210229               collision_turbulence, limiter_sedimentation, nc_const,          &
    211230               ventilation_effect
    212231
    213     USE control_parameters
    214 
    215     USE cpulog,                                                                &
    216         ONLY:  cpu_log_barrierwait
    217 
    218     USE dvrp_variables,                                                        &
    219         ONLY:  local_dvrserver_running
    220 
    221     USE grid_variables,                                                        &
    222         ONLY:  dx, dy
    223 
    224     USE indices,                                                               &
    225         ONLY:  nx, ny, nz
    226 
    227     USE kinds
    228 
    229     USE land_surface_model_mod,                                                &
    230         ONLY: lsm_parin
    231    
    232232    USE model_1d,                                                              &
    233233        ONLY:  damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
  • palm/trunk/SOURCE/radiation_model_mod.f90

    r1827 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
     21! Adapted for modularization of microphysics
    2222!
    2323! Former revisions:
     
    9898
    9999    USE cloud_parameters,                                                      &
    100         ONLY:  cp, l_d_cp, nc_const, rho_l, sigma_gc 
     100        ONLY:  cp, l_d_cp, rho_l
    101101
    102102    USE constants,                                                             &
     
    112112
    113113    USE kinds
     114
     115    USE microphysics_mod,                                                      &
     116        ONLY:  nc_const, sigma_gc
    114117
    115118#if defined ( __netcdf )
  • palm/trunk/SOURCE/read_3d_binary.f90

    r1834 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
     21! prr, precipitation_amount moved to arrays_3d
    2222!
    2323! Former revisions:
     
    102102
    103103    USE arrays_3d,                                                             &
    104         ONLY:  e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, qr,    &
     104        ONLY:  e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst,        &
     105               prr, precipitation_amount, qr,                                  &
    105106               qrs, qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst,        &
    106107               rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us,    &
     
    109110
    110111    USE averaging
    111 
    112     USE cloud_parameters,                                                      &
    113         ONLY:  prr, precipitation_amount
    114112
    115113    USE control_parameters,                                                    &
  • palm/trunk/SOURCE/read_var_list.f90

    r1834 r1849  
    1919! Current revisions:
    2020! ------------------
    21 !
    22 ! 
     21! Adapted for modularization of microphysics
     22!
    2323! Former revisions:
    2424! -----------------
     
    171171               q_init, ref_state, sa_init, u_init, ug, v_init, vg
    172172
    173     USE cloud_parameters,                                                      &
     173    USE control_parameters
     174
     175    USE grid_variables,                                                        &
     176        ONLY:  dx, dy
     177
     178    USE indices,                                                               &
     179        ONLY:  nz, nx, nx_on_file, ny, ny_on_file
     180
     181    USE microphysics_mod,                                                      &
    174182        ONLY:  c_sedimentation, collision_turbulence,                          &
    175183               cloud_water_sedimentation, limiter_sedimentation,               &
    176184               nc_const, ventilation_effect
    177 
    178     USE control_parameters
    179 
    180     USE grid_variables,                                                        &
    181         ONLY:  dx, dy
    182 
    183     USE indices,                                                               &
    184         ONLY:  nz, nx, nx_on_file, ny, ny_on_file
    185185
    186186    USE model_1d,                                                              &
  • palm/trunk/SOURCE/sum_up_3d_data.f90

    r1818 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
     21! precipitation_rate moved to arrays_3d
    2222!
    2323! Former revisions:
     
    9494
    9595    USE arrays_3d,                                                             &
    96         ONLY:  dzw, e, nr, ol, p, pt, q, qc, ql, ql_c, ql_v, qr, qsws, rho, sa,&
    97                shf, ts, u, us, v, vpt, w, z0, z0h, z0q
     96        ONLY:  dzw, e, nr, ol, p, pt, precipitation_rate, q, qc, ql, ql_c,     &
     97               ql_v, qr, qsws, rho, sa, shf, ts, u, us, v, vpt, w, z0, z0h, z0q
    9898
    9999    USE averaging,                                                             &
     
    105105
    106106    USE cloud_parameters,                                                      &
    107         ONLY:  l_d_cp, precipitation_rate, pt_d_t
     107        ONLY:  l_d_cp, pt_d_t
    108108
    109109    USE control_parameters,                                                    &
  • palm/trunk/SOURCE/time_integration.f90

    r1834 r1849  
    1919! Current revisions:
    2020! ------------------
    21 !
    22 ! 
     21! Adapted for modularization of microphysics
     22!
    2323! Former revisions:
    2424! -----------------
     
    243243               ws_scheme_sca
    244244
    245     USE cloud_parameters,                                                      &
    246         ONLY: collision_turbulence
    247 
    248245    USE cpulog,                                                                &
    249246        ONLY:  cpu_log, log_point, log_point_s
     
    264261    USE ls_forcing_mod,                                                        &
    265262        ONLY:  ls_forcing_surf, ls_forcing_vert
     263
     264    USE microphysics_mod,                                                      &
     265        ONLY: collision_turbulence
    266266
    267267    USE nudge_mod,                                                             &
  • palm/trunk/SOURCE/timestep.f90

    r1818 r1849  
    1919! Current revisions:
    2020! ------------------
    21 !
     21! Adapted for modularization of microphysics
    2222!
    2323! Former revisions:
     
    8989        ONLY:  dzu, dzw, kh, km, u, v, w
    9090
    91     USE cloud_parameters,                                                      &
    92         ONLY:  dt_precipitation
    93 
    9491    USE control_parameters,                                                    &
    9592        ONLY:  cfl_factor, coupling_mode, dt_3d, dt_fixed, dt_max,             &
     
    110107
    111108    USE kinds
     109
     110    USE microphysics_mod,                                                      &
     111        ONLY:  dt_precipitation
    112112
    113113    USE pegrid
  • palm/trunk/SOURCE/write_3d_binary.f90

    r1834 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
     21! prr, precipitation_amount moved to arrays_3d
    2222!
    2323! Former revisions:
     
    9595
    9696    USE arrays_3d,                                                             &
    97         ONLY:  e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, qr,    &
     97        ONLY:  e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst,        &
     98               prr, precipitation_amount, qr,                                  &
    9899               qrs, qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst,        &
    99100               rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us,    &
     
    102103       
    103104    USE averaging
    104        
    105     USE cloud_parameters,                                                      &
    106         ONLY:  prr, precipitation_amount
    107        
     105
    108106    USE control_parameters,                                                    &
    109107        ONLY:  iran, humidity, passive_scalar, cloud_physics, cloud_droplets,  &
  • palm/trunk/SOURCE/write_var_list.f90

    r1834 r1849  
    1919! Current revisions:
    2020! -----------------
    21 !
    22 ! 
     21! Adapted for modularization of microphysics
     22!
    2323! Former revisions:
    2424! -----------------
     
    149149        ONLY:  inflow_damping_factor, mean_inflow_profiles, pt_init,           &
    150150               q_init, ref_state, sa_init, u_init, ug, v_init, vg
    151    
    152     USE cloud_parameters,                                                      &
    153         ONLY:  c_sedimentation, cloud_water_sedimentation,                     &
    154                collision_turbulence, limiter_sedimentation, nc_const,          &
    155                ventilation_effect
    156    
     151
    157152    USE control_parameters
    158153   
     
    162157    USE indices,                                                               &
    163158        ONLY:  nz, nx, ny
    164    
     159
     160    USE microphysics_mod,                                                      &
     161        ONLY:  c_sedimentation, cloud_water_sedimentation,                     &
     162               collision_turbulence, limiter_sedimentation, nc_const,          &
     163               ventilation_effect
     164
    165165    USE model_1d,                                                              &
    166166        ONLY:  damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
Note: See TracChangeset for help on using the changeset viewer.