Ignore:
Timestamp:
Apr 7, 2016 7:49:42 AM (8 years ago)
Author:
hoffmann
Message:

changes in LPM and bulk cloud microphysics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/microphysics.f90

    r1818 r1822  
    1919! Current revisions:
    2020! ------------------
    21 !
     21! Unused variables removed.
     22!
     23! Kessler scheme integrated.
    2224!
    2325! Former revisions:
     
    109111    END INTERFACE autoconversion
    110112
     113    INTERFACE autoconversion_kessler
     114       MODULE PROCEDURE autoconversion_kessler
     115       MODULE PROCEDURE autoconversion_kessler_ij
     116    END INTERFACE autoconversion_kessler
     117
    111118    INTERFACE accretion
    112119       MODULE PROCEDURE accretion
     
    151158
    152159       USE arrays_3d,                                                          &
    153            ONLY:  hyp, nr, pt, pt_init, q, qc, qr, zu
     160           ONLY:  hyp, pt_init, zu
    154161
    155162       USE cloud_parameters,                                                   &
    156            ONLY:  cp, hyrho, nc_const, pt_d_t, r_d, t_d_pt
     163           ONLY:  cp, hyrho, prr, pt_d_t, r_d, t_d_pt
    157164
    158165       USE control_parameters,                                                 &
    159166           ONLY:  call_microphysics_at_all_substeps, drizzle, dt_3d, dt_micro, &
    160                   g, intermediate_timestep_count,                              &
    161                   large_scale_forcing, lsf_surf, precipitation, pt_surface,    &
    162                   rho_surface,surface_pressure
     167                  g, intermediate_timestep_count, large_scale_forcing,         &
     168                  lsf_surf, microphysics_kessler, microphysics_seifert,        &
     169                  pt_surface, rho_surface,surface_pressure
    163170
    164171       USE indices,                                                            &
     
    172179       IMPLICIT NONE
    173180
    174        INTEGER(iwp) ::  i                 !<
    175        INTEGER(iwp) ::  j                 !<
    176181       INTEGER(iwp) ::  k                 !<
    177182
     
    193198             hyrho(k)  = hyp(k) / ( r_d * t_d_pt(k) * pt_init(k) )       
    194199          ENDDO
     200
    195201!
    196202!--       Compute reference density
     
    207213
    208214!
     215!--    Reset precipitation rate
     216       IF ( intermediate_timestep_count == 1 )  prr = 0.0_wp
     217
     218!
    209219!--    Compute cloud physics
    210        IF ( precipitation )  THEN
     220       IF ( microphysics_kessler )  THEN
     221
     222          CALL autoconversion_kessler
     223
     224       ELSEIF ( microphysics_seifert )  THEN
     225
    211226          CALL adjust_cloud
    212227          CALL autoconversion
     
    215230          CALL evaporation_rain
    216231          CALL sedimentation_rain
     232
     233          IF ( drizzle )  CALL sedimentation_cloud
     234
    217235       ENDIF
    218236
    219        IF ( drizzle )  CALL sedimentation_cloud
    220 
    221        IF ( precipitation )  THEN
    222           CALL calc_precipitation_amount
    223        ENDIF
     237       CALL calc_precipitation_amount
    224238
    225239    END SUBROUTINE microphysics_control
     
    238252
    239253       USE cloud_parameters,                                                   &
    240            ONLY:  eps_sb, xrmin, xrmax, hyrho, k_cc, x0
     254           ONLY:  eps_sb, xrmin, xrmax, hyrho
    241255
    242256       USE cpulog,                                                             &
     
    244258
    245259       USE indices,                                                            &
    246            ONLY:  nxl, nxr, nys, nyn, nzb, nzb_s_inner, nzt
     260           ONLY:  nxl, nxr, nys, nyn, nzb_s_inner, nzt
    247261
    248262       USE kinds
     
    303317
    304318       USE indices,                                                            &
    305            ONLY:  nxl, nxr, nys, nyn, nzb, nzb_s_inner, nzt
     319           ONLY:  nxl, nxr, nys, nyn, nzb_s_inner, nzt
    306320
    307321       USE kinds
     
    323337       REAL(wp)     ::  rc                !<
    324338       REAL(wp)     ::  re_lambda         !<
    325        REAL(wp)     ::  selfcoll          !<
    326339       REAL(wp)     ::  sigma_cc          !<
    327340       REAL(wp)     ::  tau_cloud         !<
     
    417430! Description:
    418431! ------------
     432!> Autoconversion process (Kessler, 1969).
     433!------------------------------------------------------------------------------!
     434    SUBROUTINE autoconversion_kessler
     435
     436       USE arrays_3d,                                                          &
     437           ONLY:  dzw, pt, q, qc
     438
     439       USE cloud_parameters,                                                   &
     440           ONLY:  l_d_cp, pt_d_t, prec_time_const, prr, ql_crit
     441
     442       USE control_parameters,                                                 &
     443           ONLY:  dt_micro
     444
     445       USE indices,                                                            &
     446           ONLY:  nxl, nxr, nyn, nys, nzb_2d, nzt
     447
     448       USE kinds
     449
     450
     451       IMPLICIT NONE
     452
     453       INTEGER(iwp) ::  i !<
     454       INTEGER(iwp) ::  j !<
     455       INTEGER(iwp) ::  k !<
     456
     457       REAL(wp)    ::  dqdt_precip !<
     458
     459       DO  i = nxl, nxr
     460          DO  j = nys, nyn
     461             DO  k = nzb_2d(j,i)+1, nzt
     462
     463                IF ( qc(k,j,i) > ql_crit )  THEN
     464                   dqdt_precip = prec_time_const * ( qc(k,j,i) - ql_crit )
     465                ELSE
     466                   dqdt_precip = 0.0_wp
     467                ENDIF
     468
     469                qc(k,j,i) = qc(k,j,i) - dqdt_precip * dt_micro
     470                q(k,j,i)  = q(k,j,i)  - dqdt_precip * dt_micro
     471                pt(k,j,i) = pt(k,j,i) + dqdt_precip * dt_micro * l_d_cp * pt_d_t(k)
     472
     473!
     474!--             Compute the rain rate
     475                prr(nzb_2d(j,i)+1,j,i) = prr(nzb_2d(j,i)+1,j,i) + dqdt_precip * dzw(k)
     476
     477             ENDDO
     478          ENDDO
     479       ENDDO
     480
     481   END SUBROUTINE autoconversion_kessler
     482
     483
     484!------------------------------------------------------------------------------!
     485! Description:
     486! ------------
    419487!> Accretion rate (Seifert and Beheng, 2006).
    420488!------------------------------------------------------------------------------!
     
    434502
    435503       USE indices,                                                            &
    436            ONLY:  nxl, nxr, nys, nyn, nzb, nzb_s_inner, nzt
     504           ONLY:  nxl, nxr, nys, nyn, nzb_s_inner, nzt
    437505
    438506       USE kinds
     
    448516       REAL(wp)     ::  phi_ac            !<
    449517       REAL(wp)     ::  tau_cloud         !<
    450        REAL(wp)     ::  xc                !<
    451518
    452519       CALL cpu_log( log_point_s(56), 'accretion', 'start' )
     
    516583
    517584       USE indices,                                                            &
    518            ONLY:  nxl, nxr, nys, nyn, nzb, nzb_s_inner, nzt
     585           ONLY:  nxl, nxr, nys, nyn, nzb_s_inner, nzt
    519586
    520587       USE kinds
     
    579646
    580647       USE cloud_parameters,                                                   &
    581            ONLY:  a_term, a_vent, b_term, b_vent, c_evap, c_term, diff_coeff_l,&
    582                   dpirho_l, eps_sb, hyrho, kin_vis_air, k_st, l_d_cp, l_d_r,   &
    583                   l_v, rho_l, r_v, schmidt_p_1d3, thermal_conductivity_l,      &
    584                   t_d_pt, ventilation_effect
     648           ONLY:  a_term, a_vent, b_term, b_vent, c_evap, c_term,              &
     649                  diff_coeff_l, dpirho_l, eps_sb, hyrho, kin_vis_air,          &
     650                  l_d_cp, l_d_r, l_v, r_v, schmidt_p_1d3,                      &
     651                  thermal_conductivity_l, t_d_pt, ventilation_effect
    585652
    586653       USE constants,                                                          &
     
    594661
    595662       USE indices,                                                            &
    596            ONLY:  nxl, nxr, nys, nyn, nzb, nzb_s_inner, nzt
     663           ONLY:  nxl, nxr, nys, nyn, nzb_s_inner, nzt
    597664
    598665       USE kinds
     
    742809           ONLY:  eps_sb, hyrho, l_d_cp, nc_const, prr, pt_d_t, sed_qc_const
    743810
    744        USE constants,                                                          &
    745            ONLY:  pi
    746 
    747811       USE control_parameters,                                                 &
    748812           ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
    749                   intermediate_timestep_count, precipitation
     813                  intermediate_timestep_count
    750814
    751815       USE cpulog,                                                             &
     
    798862!
    799863!--             Compute the precipitation rate due to cloud (fog) droplets
    800                 IF ( precipitation )  THEN
    801                    IF ( call_microphysics_at_all_substeps )  THEN
    802                       prr(k,j,i) = prr(k,j,i) +  sed_qc(k) / hyrho(k)          &
    803                                    * weight_substep(intermediate_timestep_count)
    804                    ELSE
    805                       prr(k,j,i) = prr(k,j,i) + sed_qc(k) / hyrho(k)
    806                    ENDIF
     864                IF ( call_microphysics_at_all_substeps )  THEN
     865                   prr(k,j,i) = prr(k,j,i) +  sed_qc(k) / hyrho(k)             &
     866                                * weight_substep(intermediate_timestep_count)
     867                ELSE
     868                   prr(k,j,i) = prr(k,j,i) + sed_qc(k) / hyrho(k)
    807869                ENDIF
    808870
     
    828890
    829891       USE cloud_parameters,                                                   &
    830            ONLY:  a_term, b_term, c_term, cof, dpirho_l, eps_sb, hyrho,        &
    831                   limiter_sedimentation, l_d_cp, prr,  pt_d_t, stp
     892           ONLY:  a_term, b_term, c_term, dpirho_l, eps_sb, hyrho,             &
     893                  limiter_sedimentation, l_d_cp, prr, pt_d_t
    832894
    833895       USE control_parameters,                                                 &
     
    857919       REAL(wp)     ::  d_min                      !<
    858920       REAL(wp)     ::  dr                         !<
    859        REAL(wp)     ::  dt_sedi                    !<
    860921       REAL(wp)     ::  flux                       !<
    861922       REAL(wp)     ::  lambda_r                   !<
     
    865926       REAL(wp), DIMENSION(nzb:nzt+1) ::  c_nr     !<
    866927       REAL(wp), DIMENSION(nzb:nzt+1) ::  c_qr     !<
    867        REAL(wp), DIMENSION(nzb:nzt+1) ::  d_nr     !<
    868        REAL(wp), DIMENSION(nzb:nzt+1) ::  d_qr     !<
    869928       REAL(wp), DIMENSION(nzb:nzt+1) ::  nr_slope !<
    870929       REAL(wp), DIMENSION(nzb:nzt+1) ::  qr_slope !<
     
    876935       CALL cpu_log( log_point_s(60), 'sed_rain', 'start' )
    877936
    878        IF ( intermediate_timestep_count == 1 )  prr(:,:,:) = 0.0_wp
    879937!
    880938!--    Compute velocities
     
    11051163
    11061164       USE cloud_parameters,                                                   &
    1107            ONLY:  cp, hyrho, nc_const, pt_d_t, r_d, t_d_pt
     1165           ONLY:  cp, hyrho, nc_const, prr, pt_d_t, r_d, t_d_pt
    11081166
    11091167       USE control_parameters,                                                 &
    11101168           ONLY:  call_microphysics_at_all_substeps, drizzle, dt_3d, dt_micro, &
    11111169                  g, intermediate_timestep_count, large_scale_forcing,         &
    1112                   lsf_surf, precipitation, pt_surface,                         &
    1113                   rho_surface,surface_pressure
     1170                  lsf_surf, microphysics_seifert, microphysics_kessler,        &
     1171                  pt_surface, rho_surface, surface_pressure
    11141172
    11151173       USE indices,                                                            &
     
    11621220       qc_1d(:) = qc(:,j,i)
    11631221       nc_1d(:) = nc_const
    1164        IF ( precipitation )  THEN
     1222       IF ( microphysics_seifert )  THEN
    11651223          qr_1d(:) = qr(:,j,i)
    11661224          nr_1d(:) = nr(:,j,i)
     
    11681226
    11691227!
     1228!--    Reset precipitation rate
     1229       IF ( intermediate_timestep_count == 1 )  prr(:,j,i) = 0.0_wp
     1230
     1231!
    11701232!--    Compute cloud physics
    1171        IF ( precipitation )  THEN
    1172           CALL adjust_cloud( i,j )
     1233       IF( microphysics_kessler )  THEN
     1234
     1235          CALL autoconversion_kessler( i,j )
     1236
     1237       ELSEIF ( microphysics_seifert )  THEN
     1238
     1239          CALL adjust_cloud( i,j )
    11731240          CALL autoconversion( i,j )
    11741241          CALL accretion( i,j )
     
    11761243          CALL evaporation_rain( i,j )
    11771244          CALL sedimentation_rain( i,j )
     1245
     1246          IF ( drizzle )  CALL sedimentation_cloud( i,j )
     1247
    11781248       ENDIF
    11791249
    1180        IF ( drizzle )  CALL sedimentation_cloud( i,j )
    1181 
    1182        IF ( precipitation )  THEN
    1183           CALL calc_precipitation_amount( i,j )
    1184        ENDIF
     1250       CALL calc_precipitation_amount( i,j )
    11851251
    11861252!
     
    11881254       q(:,j,i)  = q_1d(:)
    11891255       pt(:,j,i) = pt_1d(:)
    1190        IF ( precipitation )  THEN
     1256       IF ( microphysics_seifert )  THEN
    11911257          qr(:,j,i) = qr_1d(:)
    11921258          nr(:,j,i) = nr_1d(:)
     
    12101276
    12111277       USE cloud_parameters,                                                   &
    1212            ONLY:  eps_sb, xrmin, xrmax, hyrho, k_cc, x0
     1278           ONLY:  eps_sb, xrmin, xrmax, hyrho
    12131279
    12141280       USE indices,                                                            &
    1215            ONLY:  nzb, nzb_s_inner, nzt
     1281           ONLY:  nzb_s_inner, nzt
    12161282
    12171283       USE kinds
     
    12581324       USE cloud_parameters,                                                   &
    12591325           ONLY:  a_1, a_2, a_3, b_1, b_2, b_3, beta_cc, c_1, c_2, c_3,        &
    1260                   c_const, dpirho_l, eps_sb, hyrho, k_cc, kin_vis_air, x0
     1326                  c_const, dpirho_l, eps_sb, hyrho, kin_vis_air, k_cc, x0
    12611327
    12621328       USE control_parameters,                                                 &
     
    12671333
    12681334       USE indices,                                                            &
    1269            ONLY:  nzb, nzb_s_inner, nzt
     1335           ONLY:  nzb_s_inner, nzt
    12701336
    12711337       USE kinds
     
    12871353       REAL(wp)     ::  rc                !<
    12881354       REAL(wp)     ::  re_lambda         !<
    1289        REAL(wp)     ::  selfcoll          !<
    12901355       REAL(wp)     ::  sigma_cc          !<
    12911356       REAL(wp)     ::  tau_cloud         !<
     
    13661431    END SUBROUTINE autoconversion_ij
    13671432
     1433!------------------------------------------------------------------------------!
     1434! Description:
     1435! ------------
     1436!> Autoconversion process (Kessler, 1969).
     1437!------------------------------------------------------------------------------!
     1438    SUBROUTINE autoconversion_kessler_ij( i, j )
     1439
     1440       USE arrays_3d,                                                          &
     1441           ONLY:  dzw, pt_1d, q_1d, qc_1d
     1442
     1443       USE cloud_parameters,                                                   &
     1444           ONLY:  l_d_cp, pt_d_t, prec_time_const, prr, ql_crit
     1445
     1446       USE control_parameters,                                                 &
     1447           ONLY:  dt_micro
     1448
     1449       USE indices,                                                            &
     1450           ONLY:  nzb_2d, nzt
     1451
     1452       USE kinds
     1453
     1454
     1455       IMPLICIT NONE
     1456
     1457       INTEGER(iwp) ::  i !<
     1458       INTEGER(iwp) ::  j !<
     1459       INTEGER(iwp) ::  k !<
     1460
     1461       REAL(wp)    ::  dqdt_precip !<
     1462
     1463       DO  k = nzb_2d(j,i)+1, nzt
     1464
     1465          IF ( qc_1d(k) > ql_crit )  THEN
     1466             dqdt_precip = prec_time_const * ( qc_1d(k) - ql_crit )
     1467          ELSE
     1468             dqdt_precip = 0.0_wp
     1469          ENDIF
     1470
     1471          qc_1d(k) = qc_1d(k) - dqdt_precip * dt_micro
     1472          q_1d(k)  = q_1d(k)  - dqdt_precip * dt_micro
     1473          pt_1d(k) = pt_1d(k) + dqdt_precip * dt_micro * l_d_cp * pt_d_t(k)
     1474
     1475!
     1476!--       Compute the rain rate
     1477          prr(nzb_2d(j,i)+1,j,i) = prr(nzb_2d(j,i)+1,j,i) +                    &
     1478                                   dqdt_precip * dzw(k)
     1479
     1480       ENDDO
     1481
     1482    END SUBROUTINE autoconversion_kessler_ij
    13681483
    13691484!------------------------------------------------------------------------------!
     
    13841499
    13851500       USE indices,                                                            &
    1386            ONLY:  nzb, nzb_s_inner, nzt
     1501           ONLY:  nzb_s_inner, nzt
    13871502
    13881503       USE kinds
     
    13981513       REAL(wp)     ::  phi_ac            !<
    13991514       REAL(wp)     ::  tau_cloud         !<
    1400        REAL(wp)     ::  xc                !<
    14011515
    14021516       DO  k = nzb_s_inner(j,i)+1, nzt
     
    14531567
    14541568       USE indices,                                                            &
    1455            ONLY:  nzb, nzb_s_inner, nzt
     1569           ONLY:  nzb_s_inner, nzt
    14561570
    14571571       USE kinds
     
    15071621       USE cloud_parameters,                                                   &
    15081622           ONLY:  a_term, a_vent, b_term, b_vent, c_evap, c_term, diff_coeff_l,&
    1509                   dpirho_l, eps_sb, hyrho, kin_vis_air, k_st, l_d_cp, l_d_r,   &
    1510                   l_v, rho_l, r_v, schmidt_p_1d3, thermal_conductivity_l,      &
     1623                  dpirho_l, eps_sb, hyrho, kin_vis_air, l_d_cp, l_d_r,         &
     1624                  l_v, r_v, schmidt_p_1d3, thermal_conductivity_l,             &
    15111625                  t_d_pt, ventilation_effect
    15121626
     
    15181632
    15191633       USE indices,                                                            &
    1520            ONLY:  nzb, nzb_s_inner, nzt
     1634           ONLY:  nzb_s_inner, nzt
    15211635
    15221636       USE kinds
     
    16551769           ONLY:  eps_sb, hyrho, l_d_cp, prr, pt_d_t, sed_qc_const
    16561770
    1657        USE constants,                                                          &
    1658            ONLY:  pi
    1659 
    16601771       USE control_parameters,                                                 &
    1661            ONLY:  call_microphysics_at_all_substeps, dt_do2d_xy, dt_micro,     &
    1662                   intermediate_timestep_count, precipitation
     1772           ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
     1773                  intermediate_timestep_count
    16631774
    16641775       USE indices,                                                            &
     
    17011812!
    17021813!--       Compute the precipitation rate of cloud (fog) droplets
    1703           IF ( precipitation )  THEN
    1704              IF ( call_microphysics_at_all_substeps )  THEN
    1705                 prr(k,j,i) = prr(k,j,i) + sed_qc(k) / hyrho(k) *               &
     1814          IF ( call_microphysics_at_all_substeps )  THEN
     1815             prr(k,j,i) = prr(k,j,i) + sed_qc(k) / hyrho(k) *               &
    17061816                             weight_substep(intermediate_timestep_count)
    1707              ELSE
    1708                 prr(k,j,i) = prr(k,j,i) +  sed_qc(k) / hyrho(k)
    1709              ENDIF
     1817          ELSE
     1818             prr(k,j,i) = prr(k,j,i) + sed_qc(k) / hyrho(k)
    17101819          ENDIF
    17111820
     
    17271836
    17281837       USE cloud_parameters,                                                   &
    1729            ONLY:  a_term, b_term, c_term, cof, dpirho_l, eps_sb, hyrho,        &
    1730                   limiter_sedimentation, l_d_cp, precipitation_amount, prr,    &
    1731                   pt_d_t, stp
     1838           ONLY:  a_term, b_term, c_term, dpirho_l, eps_sb, hyrho,             &
     1839                  limiter_sedimentation, l_d_cp, prr, pt_d_t
    17321840
    17331841       USE control_parameters,                                                 &
    1734            ONLY:  call_microphysics_at_all_substeps, dt_do2d_xy, dt_micro,     &
    1735                   dt_3d, intermediate_timestep_count,                          &
    1736                   intermediate_timestep_count_max,                             &
    1737                   precipitation_amount_interval, time_do2d_xy
     1842           ONLY:  call_microphysics_at_all_substeps, dt_micro,                 &
     1843                  intermediate_timestep_count
    17381844
    17391845       USE indices,                                                            &
     
    17571863       REAL(wp)     ::  d_min                      !<
    17581864       REAL(wp)     ::  dr                         !<
    1759        REAL(wp)     ::  dt_sedi                    !<
    17601865       REAL(wp)     ::  flux                       !<
    17611866       REAL(wp)     ::  lambda_r                   !<
     
    17651870       REAL(wp), DIMENSION(nzb:nzt+1) ::  c_nr     !<
    17661871       REAL(wp), DIMENSION(nzb:nzt+1) ::  c_qr     !<
    1767        REAL(wp), DIMENSION(nzb:nzt+1) ::  d_nr     !<
    1768        REAL(wp), DIMENSION(nzb:nzt+1) ::  d_qr     !<
    17691872       REAL(wp), DIMENSION(nzb:nzt+1) ::  nr_slope !<
    17701873       REAL(wp), DIMENSION(nzb:nzt+1) ::  qr_slope !<
     
    17741877       REAL(wp), DIMENSION(nzb:nzt+1) ::  w_qr     !<
    17751878
    1776        IF ( intermediate_timestep_count == 1 )  prr(:,j,i) = 0.0_wp
    17771879!
    17781880!--    Compute velocities
     
    19392041           ONLY:  call_microphysics_at_all_substeps, dt_do2d_xy, dt_3d,        &
    19402042                  intermediate_timestep_count, intermediate_timestep_count_max,&
    1941                   precipitation_amount_interval,         &
    1942                   time_do2d_xy
     2043                  precipitation_amount_interval, time_do2d_xy
    19432044
    19442045       USE indices,                                                            &
Note: See TracChangeset for help on using the changeset viewer.