Changeset 2608


Ignore:
Timestamp:
Nov 13, 2017 2:04:26 PM (6 years ago)
Author:
schwenkel
Message:

Inital revision of diagnostic_quantities_mod allows unified calculation of magnus equation and saturion mixing ratio

Location:
palm/trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/INSTALL/ex_lsm_clearsky_rc

    r2556 r2608  
    11
    22 ******************************    --------------------------------------------
    3  * PALM 4.0  Rev: 2532        *    atmosphere - run without 1D - prerun
     3 * PALM 4.0  Rev: 2603:26     *    atmosphere - run without 1D - prerun
    44 ******************************    --------------------------------------------
    55
    6  Date:                 18-10-17    Run:       ex_lsm_clearsky     
    7  Time:                 17:42:56    Run-No.:   00
    8  Run on host:              imuk
     6 Date:                 13-11-17    Run:       ex_lsm_clearsky     
     7 Time:                 14:31:43    Run-No.:   00
     8 Run on host:             lcmuk
    99 Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
    1010 ------------------------------------------------------------------------------
     
    8888
    8989    Albedo is set for land surface type: mixed farming, tall grassland
    90     Geograph. longitude            :   lambda =  0.0 degr
    91     Day of the year at model start :   day_init = 172
    92     UTC time at model start        :   time_utc_init = 43200.0 s
    9390    Timestep: dt_radiation =  60.00  s
    9491
     
    237234 -------------------
    238235
    239     Geograph. latitude  :   phi    = 55.0 degr
     236    Geograph. latitude  :   latitude  = 55.0 degr
     237    Geograph. longitude :   longitude =  0.0 degr
    240238    Angular velocity    :   omega  = 0.729E-04 rad/s
    241239    Coriolis parameter  :   f      =  0.000119 1/s
    242240                            f*     =  0.000084 1/s
     241    Day of the year at model start :   day_init = 172
     242    UTC time at model start        :   time_utc_init = 43200.0 s
    243243
    244244    Gravity             :   g      =  9.8 m/s**2
     
    284284  0      0 00:00:00.00   8.6700A   5.1898D -0.2288D  0.1182  0.100  0.00   0.200E-11    800.  0.119E+02  0.103E-02  0.611E-03  0.888E-13    9   9  23   11   7  19    5  26   7    0.000    0.000       0
    285285  0      1 00:00:08.67   8.6900A   5.1806   0.2159   0.1162  0.001  0.00   0.000E+00    550.  0.119E+02  0.867E-03  0.287E-05  0.440E-15    9   9  24    4   5  26    5  26   8    0.000    0.000       0
    286   0      2 00:00:17.35   8.6900A   5.1762   0.1915   0.1151  0.021  1.11  -0.474E+02    100.  0.119E+02  0.793E-03  0.759E-05  0.407E-15    5  16  32    4   5  27    5  26   9    0.000    0.000       0
    287   0      3 00:00:26.04   8.7000A   5.1723   0.1786   0.1113  0.021  0.72  -0.545E+01    100.  0.119E+02  0.751E-03  0.253E-05  0.386E-15    5  16  33    4   5  28    5  26  10    0.000    0.000       0
    288   0      4 00:00:34.75   8.7000A   5.1732  -0.1675   0.1061  0.028  0.70  -0.372E+01    100.  0.119E+02  0.721E-03  0.408E-05  0.358E-15    5  16  34    8  29  32    5  26  11    0.000    0.000       0
    289   0      5 00:00:43.45   8.7000A   5.1719  -0.1671   0.1028  0.034  0.94  -0.297E+01    250.  0.119E+02  0.698E-03  0.487E-05  0.337E-15    5  16  35    8  29  33    5  26  11    0.000    0.000       0
    290   0      6 00:00:52.15   8.7000A   5.1701  -0.1621   0.1039  0.040  0.94  -0.250E+01    250.  0.119E+02  0.680E-03  0.567E-05  0.321E-15    5  16  36    8  29  34    5  26  12    0.000    0.000       0
    291   0      7 00:01:00.85   8.7100A   5.1675  -0.1565   0.1043  0.046  1.22  -0.218E+01    550.  0.119E+02  0.665E-03  0.649E-05  0.306E-15    5  16  37    8  29  35    5  26  13    0.000    0.000       0
    292   0      8 00:01:09.56   8.7100A   5.1643   0.1515   0.1040  0.051  1.23  -0.195E+01    550.  0.119E+02  0.652E-03  0.733E-05  0.295E-15    5  16  38   11   3  22    5  26  14    0.000    0.000       0
    293   0      9 00:01:18.27   8.7100A   5.1636  -0.1506   0.1034  0.057  1.21  -0.172E+01    550.  0.119E+02  0.640E-03  0.812E-05  0.282E-15    5  16  38    8  29  36    5  26  15    0.000    0.000       0
    294   0     10 00:01:26.98   8.7100A   5.1636  -0.1516   0.1024  0.062  1.22  -0.158E+01    550.  0.119E+02  0.630E-03  0.898E-05  0.270E-15    5  16  39    8  29  37    5  26  16    0.000    0.000       0
    295   0     11 00:01:35.69   8.7200A   5.1632  -0.1516   0.1013  0.067  1.22  -0.148E+01    550.  0.119E+02  0.620E-03  0.980E-05  0.260E-15    5  16   0    8  29  38    5  26  17    0.000    0.000       0
    296   0     12 00:01:44.41   8.7200A   5.1625  -0.1506   0.0999  0.072  1.23  -0.139E+01    550.  0.119E+02  0.612E-03  0.106E-04  0.250E-15    5  16   1    8  29  39    5  26  18    0.000    0.000       0
    297   0     13 00:01:53.13   8.7200A   5.1614  -0.1488   0.0984  0.077  1.23  -0.132E+01    550.  0.119E+02  0.604E-03  0.115E-04  0.239E-15    5  16   2    8  29   0    5  26  19    0.000    0.000       0
    298   0     14 00:02:01.85   8.7200A   5.1600  -0.1462   0.0966  0.082  1.24  -0.126E+01    550.  0.119E+02  0.596E-03  0.123E-04  0.231E-15    5  16   3    8  29   1    5  26  20    0.000    0.000       0
     286  0      2 00:00:17.35   8.6900A   5.1762   0.1915   0.1151  0.021  1.06  -0.495E+02    100.  0.119E+02  0.793E-03  0.744E-05  0.407E-15    5  16  32    4   5  27    5  26   9    0.000    0.000       0
     287  0      3 00:00:26.04   8.7000A   5.1723   0.1786   0.1113  0.021  0.70  -0.516E+01    100.  0.119E+02  0.751E-03  0.247E-05  0.385E-15    5  16  33    4   5  28    5  26  10    0.000    0.000       0
     288  0      4 00:00:34.75   8.7000A   5.1732  -0.1675   0.1061  0.027  0.69  -0.360E+01    100.  0.119E+02  0.721E-03  0.396E-05  0.358E-15    5  16  34    8  29  32    5  26  11    0.000    0.000       0
     289  0      5 00:00:43.45   8.7000A   5.1719  -0.1671   0.1028  0.034  0.93  -0.287E+01    250.  0.119E+02  0.698E-03  0.471E-05  0.337E-15    5  16  35    8  29  33    5  26  11    0.000    0.000       0
     290  0      6 00:00:52.15   8.7000A   5.1701  -0.1621   0.1039  0.039  0.93  -0.242E+01    250.  0.119E+02  0.680E-03  0.548E-05  0.321E-15    5  16  36    8  29  34    5  26  12    0.000    0.000       0
     291  0      7 00:01:00.85   8.7100A   5.1675  -0.1565   0.1043  0.045  1.21  -0.211E+01    550.  0.119E+02  0.665E-03  0.627E-05  0.306E-15    5  16  37    8  29  35    5  26  13    0.000    0.000       0
     292  0      8 00:01:09.56   8.7100A   5.1643   0.1515   0.1040  0.051  1.21  -0.189E+01    550.  0.119E+02  0.652E-03  0.709E-05  0.294E-15    5  16  38   11   3  22    5  26  14    0.000    0.000       0
     293  0      9 00:01:18.27   8.7100A   5.1636  -0.1506   0.1034  0.056  1.20  -0.166E+01    550.  0.119E+02  0.640E-03  0.785E-05  0.282E-15    5  16  38    8  29  36    5  26  15    0.000    0.000       0
     294  0     10 00:01:26.98   8.7100A   5.1635  -0.1516   0.1024  0.061  1.20  -0.153E+01    550.  0.119E+02  0.630E-03  0.868E-05  0.269E-15    5  16  39    8  29  37    5  26  16    0.000    0.000       0
     295  0     11 00:01:35.69   8.7200A   5.1632  -0.1516   0.1013  0.067  1.20  -0.143E+01    550.  0.119E+02  0.620E-03  0.949E-05  0.260E-15    5  16   0    8  29  38    5  26  17    0.000    0.000       0
     296  0     12 00:01:44.41   8.7200A   5.1624  -0.1506   0.0999  0.072  1.21  -0.135E+01    550.  0.119E+02  0.612E-03  0.103E-04  0.249E-15    5  16   1    8  29  39    5  26  18    0.000    0.000       0
     297  0     13 00:01:53.13   8.7200A   5.1614  -0.1488   0.0983  0.077  1.22  -0.128E+01    550.  0.119E+02  0.604E-03  0.111E-04  0.239E-15    5  16   2    8  29   0    5  26  19    0.000    0.000       0
     298  0     14 00:02:01.85   8.7200A   5.1600  -0.1462   0.0966  0.081  1.22  -0.122E+01    550.  0.119E+02  0.596E-03  0.119E-04  0.230E-15    5  16   3    8  29   1    5  26  20    0.000    0.000       0
  • palm/trunk/SOURCE/Makefile

    r2600 r2608  
    2525# -----------------
    2626# $Id$
     27# Added diagnostic_quantities_mod
     28#
     29# 2600 2017-11-01 14:11:20Z raasch
    2730# comment line concerning bound checks removed
    2831#
     
    384387        data_output_ptseries.f90 data_output_spectra.f90 data_output_flight.f90\
    385388        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 \
    387390        diffusion_e.f90 diffusion_s.f90 diffusion_u.f90 diffusion_v.f90 \
    388391        diffusion_w.f90 diffusivities.f90 disturb_field.f90 \
     
    482485buoyancy.o: modules.o mod_kinds.o
    483486calc_mean_profile.o: modules.o mod_kinds.o
    484 calc_liquid_water_content.o: modules.o mod_kinds.o
     487calc_liquid_water_content.o: modules.o mod_kinds.o diagnostic_quantities_mod.o
    485488calc_radiation.o: modules.o mod_kinds.o
    486489check_for_restart.o: modules.o mod_kinds.o pmc_interface_mod.o
     
    513516   netcdf_interface_mod.o land_surface_model_mod.o urban_surface_mod.o
    514517date_and_time_mod.o: modules.o mod_kinds.o
     518diagnostic_quantities_mod.o: modules.o mod_kinds.o
    515519diffusion_e.o: modules.o mod_kinds.o microphysics_mod.o \
    516520   mod_particle_attributes.o surface_mod.o
     
    552556init_slope.o: modules.o mod_kinds.o
    553557interaction_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
     558land_surface_model_mod.o: modules.o mod_kinds.o radiation_model_mod.o surface_mod.o diagnostic_quantities_mod.o
    555559large_scale_forcing_nudging_mod.o: modules.o cpulog_mod.o mod_kinds.o surface_mod.o
    556560local_stop.o: modules.o mod_kinds.o pmc_interface_mod.o
     
    570574        mod_kinds.o mod_particle_attributes.o
    571575lpm_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
    573577lpm_exchange_horiz.o: modules.o cpulog_mod.o lpm_pack_arrays.o mod_kinds.o \
    574578        mod_particle_attributes.o netcdf_interface_mod.o
     
    576580        netcdf_interface_mod.o random_function_mod.o mod_particle_attributes.o \
    577581        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
    579583lpm_init_sgs_tke.o: modules.o mod_kinds.o mod_particle_attributes.o surface_mod.o
    580584lpm_merging.o: modules.o cpulog_mod.o mod_kinds.o mod_particle_attributes.o
     
    588592lpm_write_restart_file.o: modules.o mod_kinds.o mod_particle_attributes.o
    589593message.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
     594microphysics_mod.o: modules.o cpulog_mod.o mod_kinds.o surface_mod.o diagnostic_quantities_mod.o
    591595model_1d_mod.o: modules.o mod_kinds.o
    592596modules.o: modules.f90 mod_kinds.o
  • palm/trunk/SOURCE/calc_liquid_water_content.f90

    r2292 r2608  
    2525! -----------------
    2626! $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
    2732! Implementation of new microphysic scheme: cloud_scheme = 'morrison'
    2833! includes two more prognostic equations for cloud drop concentration (nc) 
     
    8287
    8388    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
    8890
    8991    USE control_parameters,                                                    &
    9092        ONLY:  microphysics_morrison, microphysics_seifert
     93
     94    USE diagnostic_quantities_mod,                                             &
     95        ONLY:  e_s, magnus, q_s, sat, supersaturation, t_l
    9196
    9297    USE indices,                                                               &
     
    104109    INTEGER(iwp) ::  k !<
    105110
    106     REAL(wp) ::  alpha !<
    107     REAL(wp) ::  e_s   !<
    108     REAL(wp) ::  q_s   !<
    109     REAL(wp) ::  t_l   !<
    110111
    111112    DO  i = nxlg, nxrg
     
    114115
    115116!
    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 )
    136120
    137121!
  • palm/trunk/SOURCE/land_surface_model_mod.f90

    r2575 r2608  
    2525! -----------------
    2626! $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
    2732! Pavement parameterization revised
    2833!
     
    14101415 SUBROUTINE lsm_energy_balance( horizontal, l )
    14111416
    1412  
     1417    USE diagnostic_quantities_mod,                                             &
     1418        ONLY:  magnus
     1419
    14131420    USE pegrid
    14141421
     
    16481655          f2 = 1.0E-20_wp
    16491656       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
    16541662!
    16551663!--    f3: correction for vapour pressure deficit
     
    16571665!
    16581666!--       Calculate vapour pressure
    1659           e  = qv1 * surface_pressure / 0.622_wp
     1667          e  = qv1 * surface_pressure / ( qv1 + 0.622_wp )
    16601668          f3 = EXP ( - surf%g_d(m) * (e_s - e) )
    16611669       ELSE
     
    16981706!
    16991707!--    Calculate saturation specific humidity
    1700        q_s = 0.622_wp * e_s / surface_pressure
     1708       q_s = 0.622_wp * e_s / ( surface_pressure - e_s )
    17011709!
    17021710!--    In case of dewfall, set evapotranspiration to zero
     
    17331741!
    17341742!--    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_pressure
     1743       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 )
    17401748!
    17411749!--    Add LW up so that it can be removed in prognostic equation
     
    19881996    SUBROUTINE calc_q_surface
    19891997
     1998       USE diagnostic_quantities_mod
     1999
    19902000       IMPLICIT NONE
    19912001
     
    19972007          j   = surf%j(m)
    19982008          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) )                   
    20062012
    20072013!
    20082014!--       Calculate specific humidity at saturation
    2009           q_s = 0.622_wp * e_s / surface_pressure
     2015          q_s = 0.622_wp * e_s / ( surface_pressure - e_s )
    20102016
    20112017          resistance = surf%r_a(m) / ( surf%r_a(m) + surf%r_s(m) )
  • palm/trunk/SOURCE/lpm_droplet_condensation.f90

    r2375 r2608  
    2525! -----------------
    2626! $Id$
     27! Calculation of magnus equation in external module (diagnostic_quantities_mod).
     28!
     29! 2375 2017-08-29 14:10:28Z schwenkel
    2730! Changed ONLY-dependencies
    2831!
     
    129132    USE cpulog,                                                                &
    130133        ONLY:  cpu_log, log_point_s
     134
     135    USE diagnostic_quantities_mod,                                             &
     136        ONLY:  magnus
    131137
    132138    USE grid_variables,                                                        &
     
    199205!
    200206!-- 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 )
    202208!
    203209!-- Current vapor pressure
  • palm/trunk/SOURCE/lpm_init.f90

    r2606 r2608  
    2525! -----------------
    2626! $Id$
     27! Calculation of magnus equation in external module (diagnostic_quantities_mod).
     28!
     29! 2606 2017-11-10 10:36:31Z schwenkel
    2730! Changed particle box locations: center of particle box now coincides
    2831! with scalar grid point of same index.
     
    986989    USE constants,                                                             &
    987990        ONLY: pi
     991
     992    USE diagnostic_quantities_mod,                                             &
     993        ONLY:  magnus
     994
    988995
    989996    USE kinds
     
    11241131             t_int  = pt(kp,jp,ip) * ( hyp(kp) / 100000.0_wp )**0.286_wp
    11251132
    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 )
    11281135
    11291136             sigma   = 0.0761_wp - 0.000155_wp * ( t_int - 273.15_wp )
  • palm/trunk/SOURCE/microphysics_mod.f90

    r2522 r2608  
    2525! -----------------
    2626! $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
    2732! Minor bugfix
    2833!
     
    548553           ONLY:  cpu_log, log_point_s
    549554
     555       USE diagnostic_quantities_mod,                                          &
     556           ONLY: e_s, magnus, q_s, sat, supersaturation, t_l
     557
    550558       USE indices,                                                            &
    551559           ONLY:  nxlg, nxrg, nysg, nyng, nzb, nzt
     
    564572       REAL(wp)     ::  activ             !<
    565573       REAL(wp)     ::  afactor           !<
    566        REAL(wp)     ::  alpha             !<
    567574       REAL(wp)     ::  beta_act          !<
    568575       REAL(wp)     ::  bfactor           !<
    569        REAL(wp)     ::  e_s               !<
    570576       REAL(wp)     ::  k_act             !<
    571577       REAL(wp)     ::  n_act             !<
    572578       REAL(wp)     ::  n_ccn             !<
    573        REAL(wp)     ::  q_s               !<
    574579       REAL(wp)     ::  s_0               !<
    575        REAL(wp)     ::  sat               !<
    576580       REAL(wp)     ::  sat_max           !<
    577581       REAL(wp)     ::  sigma             !<
    578582       REAL(wp)     ::  sigma_act         !<
    579        REAL(wp)     ::  t_int             !<
    580        REAL(wp)     ::  t_l               !<
    581583
    582584       CALL cpu_log( log_point_s(65), 'activation', 'start' )
     
    587589
    588590!
    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 )
    610594!
    611595!--             Prescribe parameters for activation
     
    636620!--                Curvature effect (afactor) with surface tension
    637621!--                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 )
    640624!
    641625!--                Solute effect (bfactor)
     
    695679           ONLY:  cpu_log, log_point_s
    696680
     681       USE diagnostic_quantities_mod,                                          &
     682           ONLY: e_s, magnus, q_s, sat, supersaturation, t_l
     683
    697684       USE indices,                                                            &
    698685           ONLY:  nxlg, nxrg, nysg, nyng, nzb, nzt
     
    709696       INTEGER(iwp) ::  k                 !<
    710697
    711        REAL(wp)     ::  alpha             !<
    712698       REAL(wp)     ::  cond              !<
    713699       REAL(wp)     ::  cond_max          !<
    714700       REAL(wp)     ::  dc                !<
    715        REAL(wp)     ::  e_s               !<
    716701       REAL(wp)     ::  evap              !<
    717702       REAL(wp)     ::  evap_nc           !<
    718703       REAL(wp)     ::  g_fac             !<
    719704       REAL(wp)     ::  nc_0              !<
    720        REAL(wp)     ::  q_s               !<
    721        REAL(wp)     ::  sat               !<
    722        REAL(wp)     ::  t_l               !<
    723705       REAL(wp)     ::  temp              !<
    724706       REAL(wp)     ::  xc                !<
     
    730712             DO  k = nzb+1, nzt
    731713!
    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 )
    749717!
    750718!--             Actual temperature:
     
    12001168           ONLY:  cpu_log, log_point_s
    12011169
     1170       USE diagnostic_quantities_mod,                                          &
     1171           ONLY: e_s, magnus, q_s, sat, supersaturation, t_l
     1172
    12021173       USE indices,                                                            &
    12031174           ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt, wall_flags_0
     
    12111182       INTEGER(iwp) ::  k                 !<
    12121183
    1213        REAL(wp)     ::  alpha             !<
    12141184       REAL(wp)     ::  dr                !<
    1215        REAL(wp)     ::  e_s               !<
    12161185       REAL(wp)     ::  evap              !<
    12171186       REAL(wp)     ::  evap_nr           !<
     
    12241193       REAL(wp)     ::  mu_r_5d2          !<
    12251194       REAL(wp)     ::  nr_0              !<
    1226        REAL(wp)     ::  q_s               !<
    1227        REAL(wp)     ::  sat               !<
    1228        REAL(wp)     ::  t_l               !<
    12291195       REAL(wp)     ::  temp              !<
    12301196       REAL(wp)     ::  xr                !<
     
    12401206
    12411207                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 )
    12591213!
    12601214!--                Evaporation needs only to be calculated in subsaturated regions
Note: See TracChangeset for help on using the changeset viewer.