module_mp_tempo_main Module

main tempo microphysics code


Uses

  • module~~module_mp_tempo_main~~UsesGraph module~module_mp_tempo_main module_mp_tempo_main module~module_mp_tempo_aerosols module_mp_tempo_aerosols module~module_mp_tempo_main->module~module_mp_tempo_aerosols module~module_mp_tempo_cfgs module_mp_tempo_cfgs module~module_mp_tempo_main->module~module_mp_tempo_cfgs module~module_mp_tempo_diags module_mp_tempo_diags module~module_mp_tempo_main->module~module_mp_tempo_diags module~module_mp_tempo_ml module_mp_tempo_ml module~module_mp_tempo_main->module~module_mp_tempo_ml module~module_mp_tempo_params module_mp_tempo_params module~module_mp_tempo_main->module~module_mp_tempo_params module~module_mp_tempo_utils module_mp_tempo_utils module~module_mp_tempo_main->module~module_mp_tempo_utils module~module_mp_tempo_aerosols->module~module_mp_tempo_params module~module_mp_tempo_diags->module~module_mp_tempo_params module~module_mp_tempo_diags->module~module_mp_tempo_utils module~module_mp_tempo_ml->module~module_mp_tempo_params ccpp_kind_types ccpp_kind_types module~module_mp_tempo_params->ccpp_kind_types iso_fortran_env iso_fortran_env module~module_mp_tempo_params->iso_fortran_env module~machine machine module~module_mp_tempo_params->module~machine mpas_kind_types mpas_kind_types module~module_mp_tempo_params->mpas_kind_types module~module_mp_tempo_utils->module~module_mp_tempo_params

Used by

  • module~~module_mp_tempo_main~~UsedByGraph module~module_mp_tempo_main module_mp_tempo_main module~module_mp_tempo_driver module_mp_tempo_driver module~module_mp_tempo_driver->module~module_mp_tempo_main module~tests tests module~tests->module~module_mp_tempo_driver program~run_tempo_tests run_tempo_tests program~run_tempo_tests->module~tests

Variables

Type Visibility Attributes Name Initial
real(kind=wp), private :: global_dt
real(kind=wp), private :: global_inverse_dt

Interfaces

private interface get_cloud_number

  • public subroutine tempo_ml_predict_cloud_number(qc, qr, qi, qs, pres, temp, w, predicted_number)

    predicts number concentration

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in), dimension(:) :: qc
    real(kind=wp), intent(in), dimension(:) :: qr
    real(kind=wp), intent(in), dimension(:) :: qi
    real(kind=wp), intent(in), dimension(:) :: qs
    real(kind=wp), intent(in), dimension(:) :: pres
    real(kind=wp), intent(in), dimension(:) :: temp
    real(kind=wp), intent(in), dimension(:) :: w
    real(kind=wp), intent(inout), dimension(:) :: predicted_number
  • public subroutine get_constant_cloud_number(land, nc)

    returns land-specific value of cloud droplet number concentration when aerosol-aware = false if land = 1, else returns ocean-specific value

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in), optional :: land
    real(kind=wp), intent(out), dimension(:) :: nc

Derived Types

type, public ::  ty_tempo_main_diags

Components

Type Visibility Attributes Name Initial
real(kind=wp), public :: rain_precip
real(kind=wp), public :: cloud_precip
real(kind=wp), public :: ice_liquid_equiv_precip
real(kind=wp), public :: snow_liquid_equiv_precip
real(kind=wp), public :: graupel_liquid_equiv_precip
real(kind=wp), public :: frozen_fraction
real(kind=wp), public :: frz_rain_precip
real(kind=wp), public, dimension(:), allocatable :: rain_med_vol_diam
real(kind=wp), public, dimension(:), allocatable :: graupel_med_vol_diam
real(kind=wp), public, dimension(:), allocatable :: refl10cm
real(kind=wp), public, dimension(:), allocatable :: re_cloud
real(kind=wp), public, dimension(:), allocatable :: re_ice
real(kind=wp), public, dimension(:), allocatable :: re_snow
real(kind=wp), public, dimension(:), allocatable :: max_hail_diameter
real(kind=wp), public, dimension(:), allocatable :: cloud_number_mixing_ratio

type, private ::  ty_tend

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, allocatable, dimension(:) :: prr_wau
real(kind=dp), public, allocatable, dimension(:) :: pnr_wau
real(kind=dp), public, allocatable, dimension(:) :: pnc_wau
real(kind=dp), public, allocatable, dimension(:) :: prr_rcw
real(kind=dp), public, allocatable, dimension(:) :: pnc_rcw
real(kind=dp), public, allocatable, dimension(:) :: pnr_rcr
real(kind=dp), public, allocatable, dimension(:) :: prs_scw
real(kind=dp), public, allocatable, dimension(:) :: pnc_scw
real(kind=dp), public, allocatable, dimension(:) :: png_scw
real(kind=dp), public, allocatable, dimension(:) :: pbg_scw
real(kind=dp), public, allocatable, dimension(:) :: prg_gcw
real(kind=dp), public, allocatable, dimension(:) :: pnc_gcw
real(kind=dp), public, allocatable, dimension(:) :: pbg_gcw
real(kind=dp), public, allocatable, dimension(:) :: pri_ihm
real(kind=dp), public, allocatable, dimension(:) :: pni_ihm
real(kind=dp), public, allocatable, dimension(:) :: prs_ihm
real(kind=dp), public, allocatable, dimension(:) :: prg_ihm
real(kind=dp), public, allocatable, dimension(:) :: prg_scw
real(kind=dp), public, allocatable, dimension(:) :: prr_rcs
real(kind=dp), public, allocatable, dimension(:) :: pnr_rcs
real(kind=dp), public, allocatable, dimension(:) :: prg_rcs
real(kind=dp), public, allocatable, dimension(:) :: png_rcs
real(kind=dp), public, allocatable, dimension(:) :: prs_rcs
real(kind=dp), public, allocatable, dimension(:) :: pbg_rcs
real(kind=dp), public, allocatable, dimension(:) :: prr_rcg
real(kind=dp), public, allocatable, dimension(:) :: pnr_rcg
real(kind=dp), public, allocatable, dimension(:) :: prg_rcg
real(kind=dp), public, allocatable, dimension(:) :: png_rcg
real(kind=dp), public, allocatable, dimension(:) :: pbg_rcg
real(kind=dp), public, allocatable, dimension(:) :: pri_inu
real(kind=dp), public, allocatable, dimension(:) :: pni_inu
real(kind=dp), public, allocatable, dimension(:) :: pri_iha
real(kind=dp), public, allocatable, dimension(:) :: pni_iha
real(kind=dp), public, allocatable, dimension(:) :: pri_wfz
real(kind=dp), public, allocatable, dimension(:) :: pni_wfz
real(kind=dp), public, allocatable, dimension(:) :: prg_rfz
real(kind=dp), public, allocatable, dimension(:) :: png_rfz
real(kind=dp), public, allocatable, dimension(:) :: pnr_rfz
real(kind=dp), public, allocatable, dimension(:) :: pri_rfz
real(kind=dp), public, allocatable, dimension(:) :: pni_rfz
real(kind=dp), public, allocatable, dimension(:) :: pbg_rfz
real(kind=dp), public, allocatable, dimension(:) :: prs_sde
real(kind=dp), public, allocatable, dimension(:) :: pri_ide
real(kind=dp), public, allocatable, dimension(:) :: pni_ide
real(kind=dp), public, allocatable, dimension(:) :: prs_ide
real(kind=dp), public, allocatable, dimension(:) :: prg_gde
real(kind=dp), public, allocatable, dimension(:) :: png_gde
real(kind=dp), public, allocatable, dimension(:) :: pni_iau
real(kind=dp), public, allocatable, dimension(:) :: prs_iau
real(kind=dp), public, allocatable, dimension(:) :: prr_sml
real(kind=dp), public, allocatable, dimension(:) :: prr_gml
real(kind=dp), public, allocatable, dimension(:) :: pbg_sml
real(kind=dp), public, allocatable, dimension(:) :: pbg_gml
real(kind=dp), public, allocatable, dimension(:) :: pnr_sml
real(kind=dp), public, allocatable, dimension(:) :: pnr_gml
real(kind=dp), public, allocatable, dimension(:) :: prr_rci
real(kind=dp), public, allocatable, dimension(:) :: pnr_rci
real(kind=dp), public, allocatable, dimension(:) :: pri_rci
real(kind=dp), public, allocatable, dimension(:) :: pni_rci
real(kind=dp), public, allocatable, dimension(:) :: prg_rci
real(kind=dp), public, allocatable, dimension(:) :: png_rci
real(kind=dp), public, allocatable, dimension(:) :: pbg_rci
real(kind=dp), public, allocatable, dimension(:) :: pni_sci
real(kind=dp), public, allocatable, dimension(:) :: prs_sci
real(kind=dp), public, allocatable, dimension(:) :: prw_vcd
real(kind=dp), public, allocatable, dimension(:) :: pnc_wcd
real(kind=dp), public, allocatable, dimension(:) :: prv_rev
real(kind=dp), public, allocatable, dimension(:) :: pnr_rev
real(kind=dp), public, allocatable, dimension(:) :: pna_rca
real(kind=dp), public, allocatable, dimension(:) :: pna_sca
real(kind=dp), public, allocatable, dimension(:) :: pna_gca
real(kind=dp), public, allocatable, dimension(:) :: pnd_rcd
real(kind=dp), public, allocatable, dimension(:) :: pnd_scd
real(kind=dp), public, allocatable, dimension(:) :: pnd_gcd

Functions

private function koop_nucleation(temp, satw, naero) result(nuc)

aqueous solution freezing of water from Koop et al. (2000) newer research suggests that the freezing rate should be lower than original paper, so J_rate is reduced by two orders of magnitude

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: temp
real(kind=wp), intent(in) :: satw
real(kind=wp), intent(in) :: naero

Return Value real(kind=wp)

private function activate_cloud_number(temp, w1d, nwfa, land) result(activ)

calculations numer of cloud droplets activated

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: temp
real(kind=wp), intent(in) :: w1d
real(kind=wp), intent(in) :: nwfa
integer, intent(in), optional :: land

Return Value real(kind=wp)

private function demott_nucleation(tempc, rho, nifa) result(nuc)

DeMott nucleation

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: tempc
real(kind=wp), intent(in) :: rho
real(kind=wp), intent(in) :: nifa

Return Value real(kind=wp)


Subroutines

public subroutine tempo_main(tempo_cfgs, qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, qb1d, ni1d, nr1d, nc1d, ng1d, nwfa1d, nifa1d, t1d, p1d, w1d, dz1d, qcfrac1d, qifrac1d, qc_bl1d, qcfrac_bl1d, thten_bl1d, qvten_bl1d, qcten_bl1d, qiten_bl1d, thten_lwrad1d, thten_swrad1d, kts, kte, dt, ii, jj, tempo_main_diags)

tempo main

Arguments

Type IntentOptional Attributes Name
type(ty_tempo_cfgs), intent(in) :: tempo_cfgs
real(kind=wp), intent(inout), dimension(kts:kte) :: qv1d

1D water vapor mixing ratio

real(kind=wp), intent(inout), dimension(kts:kte) :: qc1d

1D cloud water mass mixing ratio

real(kind=wp), intent(inout), dimension(kts:kte) :: qi1d

1D cloud ice mass mixing ratio

real(kind=wp), intent(inout), dimension(kts:kte) :: qr1d

1D rain water mass mixing ratio

real(kind=wp), intent(inout), dimension(kts:kte) :: qs1d

1D snow mass mixing ratio

real(kind=wp), intent(inout), dimension(kts:kte) :: qg1d

1D graupel mass mixing ratio

real(kind=wp), intent(inout), optional, dimension(:) :: qb1d

1D graupel volume mixing ratio

real(kind=wp), intent(inout), dimension(kts:kte) :: ni1d

1D cloud ice number mixing ratio

real(kind=wp), intent(inout), dimension(kts:kte) :: nr1d

1D rain water number mixing ratio

real(kind=wp), intent(inout), optional, dimension(:) :: nc1d

1D cloud water number mixing ratio

real(kind=wp), intent(inout), optional, dimension(:) :: ng1d

1D graupel number mixing ratio

real(kind=wp), intent(inout), optional, dimension(:) :: nwfa1d

1D water-friendly aerosol number mixing ratio

real(kind=wp), intent(inout), optional, dimension(:) :: nifa1d

1D ice-friendly aerosol number mixing ratio

real(kind=wp), intent(inout), dimension(kts:kte) :: t1d

1D temperature

real(kind=wp), intent(in), dimension(kts:kte) :: p1d

1D pressure

real(kind=wp), intent(in), dimension(kts:kte) :: w1d

1D vertical velocity

real(kind=wp), intent(in), dimension(kts:kte) :: dz1d

1D vertical grid spacing

real(kind=wp), intent(inout), optional, dimension(:) :: qcfrac1d

cloud fraction

real(kind=wp), intent(inout), optional, dimension(:) :: qifrac1d

cloud ice fraction

real(kind=wp), intent(in), optional, dimension(:) :: qc_bl1d

cloud water mixing ratio from boundary layer scheme

real(kind=wp), intent(in), optional, dimension(:) :: qcfrac_bl1d

cloud fraction from boundary layer scheme

real(kind=wp), intent(in), optional, dimension(:) :: thten_bl1d

potential temperature tendency from boundary layer scheme

real(kind=wp), intent(in), optional, dimension(:) :: qvten_bl1d

water vapor mixing ratio tendency from boundary layer scheme

real(kind=wp), intent(in), optional, dimension(:) :: qcten_bl1d

cloud water mixing ratio tendency from boundary layer scheme

real(kind=wp), intent(in), optional, dimension(:) :: qiten_bl1d

cloud ice mixing ratio from boundary layer scheme

real(kind=wp), intent(in), optional, dimension(:) :: thten_lwrad1d

potential temperature tendency from longwave radiation scheme

real(kind=wp), intent(in), optional, dimension(:) :: thten_swrad1d

potential temperature tendency from shortwave radiation scheme

integer, intent(in) :: kts
integer, intent(in) :: kte
real(kind=wp), intent(in) :: dt
integer, intent(in) :: ii
integer, intent(in) :: jj
type(ty_tempo_main_diags), intent(out) :: tempo_main_diags

private subroutine aerosol_check_and_update(rho, nwfa1d, nifa1d, nwfa, nifa, nwfaten, nifaten)

sets aerosol number concentrations and checks bounds

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(inout), optional, dimension(:) :: nwfa1d
real(kind=wp), intent(inout), optional, dimension(:) :: nifa1d
real(kind=wp), intent(inout), dimension(:) :: nwfa
real(kind=wp), intent(inout), dimension(:) :: nifa
real(kind=wp), intent(inout), dimension(:) :: nwfaten
real(kind=wp), intent(inout), dimension(:) :: nifaten

public subroutine cloud_check_and_update(rho, l_qc, qc1d, nc1d, rc, nc, qcten, ncten, ilamc, mvd_c)

computes cloud water contents, ilamc, and mvd_c and checks bounds

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
logical, intent(inout), dimension(:) :: l_qc
real(kind=wp), intent(inout), dimension(:) :: qc1d
real(kind=wp), intent(inout), optional, dimension(:) :: nc1d
real(kind=wp), intent(inout), dimension(:) :: rc
real(kind=wp), intent(inout), dimension(:) :: nc
real(kind=wp), intent(inout), dimension(:) :: qcten
real(kind=wp), intent(inout), dimension(:) :: ncten
real(kind=dp), intent(out), dimension(:) :: ilamc
real(kind=wp), intent(out), dimension(:) :: mvd_c

private subroutine rain_check_and_update(rho, l_qr, qr1d, nr1d, rr, nr, qrten, nrten, ilamr, mvd_r)

computes rain water contents, ilamr, and mvd_r and checks bounds

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
logical, intent(inout), dimension(:) :: l_qr
real(kind=wp), intent(inout), dimension(:) :: qr1d
real(kind=wp), intent(inout), dimension(:) :: nr1d
real(kind=wp), intent(inout), dimension(:) :: rr
real(kind=wp), intent(inout), dimension(:) :: nr
real(kind=wp), intent(inout), dimension(:) :: qrten
real(kind=wp), intent(inout), dimension(:) :: nrten
real(kind=dp), intent(out), dimension(:) :: ilamr
real(kind=wp), intent(out), dimension(:) :: mvd_r

public subroutine ice_check_and_update(rho, l_qi, qi1d, ni1d, ri, ni, qiten, niten, ilami)

computes ice contents, ilami and checks bounds

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
logical, intent(inout), dimension(:) :: l_qi
real(kind=wp), intent(inout), dimension(:) :: qi1d
real(kind=wp), intent(inout), dimension(:) :: ni1d
real(kind=wp), intent(inout), dimension(:) :: ri
real(kind=wp), intent(inout), dimension(:) :: ni
real(kind=wp), intent(inout), dimension(:) :: qiten
real(kind=wp), intent(inout), dimension(:) :: niten
real(kind=dp), intent(out), dimension(:) :: ilami

public subroutine snow_check_and_update(rho, l_qs, qs1d, rs, qsten)

computes snow mass

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
logical, intent(inout), dimension(:) :: l_qs
real(kind=wp), intent(inout), dimension(:) :: qs1d
real(kind=wp), intent(inout), dimension(:) :: rs
real(kind=wp), intent(inout), dimension(:) :: qsten

private subroutine graupel_check_and_update(rho, l_qg, qg1d, ng1d, qb1d, rg, ng, rb, idx, qgten, ngten, qbten, ilamg, mvd_g)

computes graupel contents, ilamg, and mvd_g and checks bounds

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
logical, intent(inout), dimension(:) :: l_qg
real(kind=wp), intent(inout), dimension(:) :: qg1d
real(kind=wp), intent(inout), optional, dimension(:) :: ng1d
real(kind=wp), intent(inout), optional, dimension(:) :: qb1d
real(kind=wp), intent(inout), dimension(:) :: rg
real(kind=wp), intent(inout), dimension(:) :: ng
real(kind=wp), intent(inout), dimension(:) :: rb
integer, intent(inout), dimension(:) :: idx
real(kind=wp), intent(inout), dimension(:) :: qgten
real(kind=wp), intent(inout), dimension(:) :: ngten
real(kind=wp), intent(inout), dimension(:) :: qbten
real(kind=dp), intent(out), dimension(:) :: ilamg
real(kind=wp), intent(out), dimension(:) :: mvd_g

private subroutine graupel_init(rho, qg1d, ng1d, qb1d)

initializes graupel number and volume if both are zero and hail-aware = true

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: qg1d
real(kind=wp), intent(inout), dimension(:) :: ng1d
real(kind=wp), intent(inout), dimension(:) :: qb1d

private subroutine thermo_vars(qv, temp, pres, rho, rhof, rhof2, qvs, delqvs, qvsi, satw, sati, ssatw, ssati, diffu, visco, vsc2, ocp, lvap, tcond, lvt2, supersaturated)

computes thermodynamic variables

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: qv
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: pres
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(out), dimension(:) :: rhof
real(kind=wp), intent(out), dimension(:) :: rhof2
real(kind=wp), intent(out), dimension(:) :: qvs
real(kind=wp), intent(out), dimension(:) :: delqvs
real(kind=wp), intent(out), dimension(:) :: qvsi
real(kind=wp), intent(out), dimension(:) :: satw
real(kind=wp), intent(out), dimension(:) :: sati
real(kind=wp), intent(out), dimension(:) :: ssatw
real(kind=wp), intent(out), dimension(:) :: ssati
real(kind=wp), intent(out), dimension(:) :: diffu
real(kind=wp), intent(out), dimension(:) :: visco
real(kind=wp), intent(out), dimension(:) :: vsc2
real(kind=wp), intent(out), dimension(:) :: ocp
real(kind=wp), intent(out), dimension(:) :: lvap
real(kind=wp), intent(out), dimension(:) :: tcond
real(kind=wp), intent(out), dimension(:) :: lvt2
logical, intent(inout) :: supersaturated

private subroutine check_over_depletion(rho, temp, qvsi, qv, l_qc, rc, l_qi, ri, l_qr, rr, l_qs, rs, l_qg, rg, tend)

check to ensure that loss terms don't over-deplete a category and adjusts tendencies if needed

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: qvsi
real(kind=wp), intent(in), dimension(:) :: qv
logical, intent(in), dimension(:) :: l_qc
real(kind=wp), intent(in), dimension(:) :: rc
logical, intent(in), dimension(:) :: l_qi
real(kind=wp), intent(in), dimension(:) :: ri
logical, intent(in), dimension(:) :: l_qr
real(kind=wp), intent(in), dimension(:) :: rr
logical, intent(in), dimension(:) :: l_qs
real(kind=wp), intent(in), dimension(:) :: rs
logical, intent(in), dimension(:) :: l_qg
real(kind=wp), intent(in), dimension(:) :: rg
type(ty_tend), intent(inout) :: tend

private subroutine sum_tendencies(rho, temp, idx, lvap, ocp, tend, tten, qvten, qcten, ncten, qiten, niten, qsten, qrten, nrten, qgten, ngten, qbten)

sums tendencies for each hydrometeor category and temperature and moisture

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: temp
integer, intent(in), dimension(:) :: idx
real(kind=wp), intent(in), dimension(:) :: lvap
real(kind=wp), intent(in), dimension(:) :: ocp
type(ty_tend), intent(in) :: tend
real(kind=wp), intent(inout), dimension(:) :: tten
real(kind=wp), intent(inout), dimension(:) :: qvten
real(kind=wp), intent(inout), dimension(:) :: qcten
real(kind=wp), intent(inout), dimension(:) :: ncten
real(kind=wp), intent(inout), dimension(:) :: qiten
real(kind=wp), intent(inout), dimension(:) :: niten
real(kind=wp), intent(inout), dimension(:) :: qsten
real(kind=wp), intent(inout), dimension(:) :: qrten
real(kind=wp), intent(inout), dimension(:) :: nrten
real(kind=wp), intent(inout), dimension(:) :: qgten
real(kind=wp), intent(inout), dimension(:) :: ngten
real(kind=wp), intent(inout), dimension(:) :: qbten

private subroutine sedimentation(xr, vt, dz1d, rho, xten, limit, steps, ktop_sedi, precip)

computes sedimentation fluxes, adds fluxes to tendencies, and updates hydrometeor mass (and number and volume)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout), dimension(:) :: xr
real(kind=wp), intent(in), dimension(:) :: vt
real(kind=wp), intent(in), dimension(:) :: dz1d
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(inout), dimension(:) :: xten
real(kind=wp), intent(in) :: limit
integer, intent(in) :: steps
integer, intent(in), optional :: ktop_sedi
real(kind=wp), intent(inout), optional :: precip

private subroutine semilagrangian_sedimentation(dz1d, rho, xr, xten, vt, steps, limit, precip)

semi-lagrangian sedimentation scheme from Juang and Hong (2010)

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: dz1d
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(inout), dimension(:) :: xr
real(kind=wp), intent(inout), dimension(:) :: xten
real(kind=wp), intent(in), dimension(:) :: vt
integer, intent(in) :: steps
real(kind=wp), intent(in) :: limit
real(kind=wp), intent(out), optional :: precip

private subroutine rain_fallspeed(rhof, l_qr, rr, ilamr, dz1d, vt, vtn, substeps_sedi, ktop_sedi)

calculates mass and number weighted fall speeds for rain and optionally the substepping required and the top k-level of sedimentation

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rhof
logical, intent(in), dimension(:) :: l_qr
real(kind=wp), intent(in), dimension(:) :: rr
real(kind=dp), intent(in), dimension(:) :: ilamr
real(kind=wp), intent(in), dimension(:) :: dz1d
real(kind=wp), intent(inout), dimension(:) :: vt
real(kind=wp), intent(inout), dimension(:) :: vtn
integer, intent(out), optional :: substeps_sedi
integer, intent(out), optional :: ktop_sedi

private subroutine graupel_fallspeed(rhof, rho, visco, l_qg, rg, rb, qb1d, idx, ilamg, dz1d, vt, vtn, substeps_sedi, ktop_sedi)

calculates mass and number weighted fall speeds for graupel and optionally the substepping required and the top k-level of sedimentation

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rhof
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: visco
logical, intent(in), dimension(:) :: l_qg
real(kind=wp), intent(in), dimension(:) :: rg
real(kind=wp), intent(in), dimension(:) :: rb
real(kind=wp), intent(in), optional, dimension(:) :: qb1d
integer, intent(in), dimension(:) :: idx
real(kind=dp), intent(in), dimension(:) :: ilamg
real(kind=wp), intent(in), dimension(:) :: dz1d
real(kind=wp), intent(inout), dimension(:) :: vt
real(kind=wp), intent(inout), dimension(:) :: vtn
integer, intent(out), optional :: substeps_sedi
integer, intent(out), optional :: ktop_sedi

private subroutine snow_fallspeed(rhof, l_qs, rs, prr_sml, smob, smoc, rr, vtrr, dz1d, vt, vtboost, substeps_sedi, ktop_sedi)

calcules mass weighted fall speeds for snow and optionally the substepping required and the top k-level of sedimentation

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rhof
logical, intent(in), dimension(:) :: l_qs
real(kind=wp), intent(in), dimension(:) :: rs
real(kind=dp), intent(in), dimension(:) :: prr_sml
real(kind=dp), intent(in), dimension(:) :: smob
real(kind=dp), intent(in), dimension(:) :: smoc
real(kind=wp), intent(in), dimension(:) :: rr
real(kind=wp), intent(in), dimension(:) :: vtrr
real(kind=wp), intent(in), dimension(:) :: dz1d
real(kind=wp), intent(inout), dimension(:) :: vt
real(kind=wp), intent(in), dimension(:) :: vtboost
integer, intent(out), optional :: substeps_sedi
integer, intent(out), optional :: ktop_sedi

private subroutine ice_fallspeed(rhof, l_qi, ri, ilami, dz1d, vt, vtn, substeps_sedi, ktop_sedi)

calculates mass and number weighted fall speeds for ice and the substepping required and the top k-level of sedimentation

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rhof
logical, intent(in), dimension(:) :: l_qi
real(kind=wp), intent(in), dimension(:) :: ri
real(kind=dp), intent(in), dimension(:) :: ilami
real(kind=wp), intent(in), dimension(:) :: dz1d
real(kind=wp), intent(inout), dimension(:) :: vt
real(kind=wp), intent(inout), dimension(:) :: vtn
integer, intent(out) :: substeps_sedi
integer, intent(out) :: ktop_sedi

private subroutine cloud_fallspeed(rhof, w1d, l_qc, rc, nc, ilamc, dz1d, vt, vtn, ktop_sedi)

calculates mass and number weighted fall speeds for cloud and the top k-level of sedimentation

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rhof
real(kind=wp), intent(in), dimension(:) :: w1d
logical, intent(in), dimension(:) :: l_qc
real(kind=wp), intent(in), dimension(:) :: rc
real(kind=wp), intent(in), dimension(:) :: nc
real(kind=dp), intent(in), dimension(:) :: ilamc
real(kind=wp), intent(in), dimension(:) :: dz1d
real(kind=wp), intent(inout), dimension(:) :: vt
real(kind=wp), intent(inout), dimension(:) :: vtn
integer, intent(out) :: ktop_sedi

private subroutine cloud_condensation(rho, temp, w1d, ssatw, lvap, tcond, diffu, lvt2, nwfa, qv, qvs, l_qc, rc, nc, tend)

cloud condensation and evaporation

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: w1d
real(kind=wp), intent(in), dimension(:) :: ssatw
real(kind=wp), intent(in), dimension(:) :: lvap
real(kind=wp), intent(in), dimension(:) :: tcond
real(kind=wp), intent(in), dimension(:) :: diffu
real(kind=wp), intent(in), dimension(:) :: lvt2
real(kind=wp), intent(in), dimension(:) :: nwfa
real(kind=wp), intent(in), dimension(:) :: qv
real(kind=wp), intent(in), dimension(:) :: qvs
logical, intent(in), dimension(:) :: l_qc
real(kind=wp), intent(in), dimension(:) :: rc
real(kind=wp), intent(in), dimension(:) :: nc
type(ty_tend), intent(inout) :: tend

private subroutine rain_evaporation(rho, temp, ssatw, lvap, tcond, diffu, vsc2, rhof2, qv, qvs, l_qr, rr, nr, ilamr, tend)

rain evaporation that includes reduction in the evaporation rate in the presence of melting graupel

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: ssatw
real(kind=wp), intent(in), dimension(:) :: lvap
real(kind=wp), intent(in), dimension(:) :: tcond
real(kind=wp), intent(in), dimension(:) :: diffu
real(kind=wp), intent(in), dimension(:) :: vsc2
real(kind=wp), intent(in), dimension(:) :: rhof2
real(kind=wp), intent(in), dimension(:) :: qv
real(kind=wp), intent(in), dimension(:) :: qvs
logical, intent(in), dimension(:) :: l_qr
real(kind=wp), intent(in), dimension(:) :: rr
real(kind=wp), intent(in), dimension(:) :: nr
real(kind=dp), intent(in), dimension(:) :: ilamr
type(ty_tend), intent(inout) :: tend

private subroutine freeze_cloud_melt_ice(temp, rho, ocp, lvap, qi1d, ni1d, qiten, niten, qc1d, nc1d, ncsave, qcten, ncten, tten)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: ocp
real(kind=wp), intent(in), dimension(:) :: lvap
real(kind=wp), intent(in), dimension(:) :: qi1d
real(kind=wp), intent(in), dimension(:) :: ni1d
real(kind=wp), intent(inout), dimension(:) :: qiten
real(kind=wp), intent(inout), dimension(:) :: niten
real(kind=wp), intent(in), dimension(:) :: qc1d
real(kind=wp), intent(in), optional, dimension(:) :: nc1d
real(kind=wp), intent(in), optional, dimension(:) :: ncsave
real(kind=wp), intent(inout), dimension(:) :: qcten
real(kind=wp), intent(inout), dimension(:) :: ncten
real(kind=wp), intent(inout), dimension(:) :: tten

private subroutine warm_rain(rhof, l_qc, rc, nc, ilamc, mvd_c, l_qr, rr, nr, mvd_r, tend)

computes warm-rain process rates -- condensation/evaporation happen later

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rhof
logical, intent(in), dimension(:) :: l_qc
real(kind=wp), intent(in), dimension(:) :: rc
real(kind=wp), intent(in), dimension(:) :: nc
real(kind=dp), intent(in), dimension(:) :: ilamc
real(kind=wp), intent(in), dimension(:) :: mvd_c
logical, intent(in), dimension(:) :: l_qr
real(kind=wp), intent(in), dimension(:) :: rr
real(kind=wp), intent(in), dimension(:) :: nr
real(kind=wp), intent(in), dimension(:) :: mvd_r
type(ty_tend), intent(inout) :: tend

private subroutine riming(temp, rhof, visco, l_qc, rc, nc, ilamc, mvd_c, l_qs, rs, smo0, smob, smoc, smoe, vtboost, l_qg, rg, ng, ilamg, idx, tend)

snow and graupel riming

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: rhof
real(kind=wp), intent(in), dimension(:) :: visco
logical, intent(in), dimension(:) :: l_qc
real(kind=wp), intent(in), dimension(:) :: rc
real(kind=wp), intent(in), dimension(:) :: nc
real(kind=dp), intent(in), dimension(:) :: ilamc
real(kind=wp), intent(in), dimension(:) :: mvd_c
logical, intent(in), dimension(:) :: l_qs
real(kind=wp), intent(in), dimension(:) :: rs
real(kind=dp), intent(in), dimension(:) :: smo0
real(kind=dp), intent(in), dimension(:) :: smob
real(kind=dp), intent(in), dimension(:) :: smoc
real(kind=dp), intent(in), dimension(:) :: smoe
real(kind=wp), intent(out), dimension(:) :: vtboost
logical, intent(in), dimension(:) :: l_qg
real(kind=wp), intent(in), dimension(:) :: rg
real(kind=wp), intent(in), dimension(:) :: ng
real(kind=dp), intent(in), dimension(:) :: ilamg
integer, intent(in), dimension(:) :: idx
type(ty_tend), intent(inout) :: tend

public subroutine get_snow_table_index(rs, idx_s)

get snow table index from snow mass

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: rs
integer, intent(out) :: idx_s

public subroutine get_temperature_table_index(tempk, idx_t)

get temperature table index

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: tempk
integer, intent(out) :: idx_t

public subroutine get_rain_table_index(rr, ilamr, idx_r, idx_r1)

get rain table indices from rain mass and lambda

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: rr
real(kind=dp), intent(in) :: ilamr
integer, intent(out) :: idx_r
integer, intent(out) :: idx_r1

public subroutine get_graupel_table_index(rg, ilamg, idx, idx_g, idx_g1)

get graupel table indices from graupel mass, lambda, and density index

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: rg
real(kind=dp), intent(in) :: ilamg
integer, intent(in) :: idx
integer, intent(out) :: idx_g
integer, intent(out) :: idx_g1

public subroutine get_cloud_table_index(rc, nc, idx_c, idx_n)

get cloud table index from mass and number

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: rc
real(kind=wp), intent(in) :: nc
integer, intent(out) :: idx_c
integer, intent(out) :: idx_n

public subroutine get_ice_table_index(ri, ni, idx_i, idx_i1)

get ice table index from mass and number

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: ri
real(kind=wp), intent(in) :: ni
integer, intent(out) :: idx_i
integer, intent(out) :: idx_i1

private subroutine rain_snow_rain_graupel(temp, l_qr, rr, nr, ilamr, l_qs, rs, l_qg, rg, ng, ilamg, idx, tend)

calculates rain-snow and rain-graupel collection

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: temp
logical, intent(in), dimension(:) :: l_qr
real(kind=wp), intent(in), dimension(:) :: rr
real(kind=wp), intent(in), dimension(:) :: nr
real(kind=dp), intent(in), dimension(:) :: ilamr
logical, intent(in), dimension(:) :: l_qs
real(kind=wp), intent(in), dimension(:) :: rs
logical, intent(in), dimension(:) :: l_qg
real(kind=wp), intent(in), dimension(:) :: rg
real(kind=wp), intent(in), dimension(:) :: ng
real(kind=dp), intent(in), dimension(:) :: ilamg
integer, intent(in), dimension(:) :: idx
type(ty_tend), intent(inout) :: tend

private subroutine ice_nucleation(temp, rho, w1d, qv, qvsi, ssati, ssatw, nifa, nwfa, ni, smo0, rc, nc, rr, nr, ilamr, tend)

ice nulceation

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: w1d
real(kind=wp), intent(in), dimension(:) :: qv
real(kind=wp), intent(in), dimension(:) :: qvsi
real(kind=wp), intent(in), dimension(:) :: ssati
real(kind=wp), intent(in), dimension(:) :: ssatw
real(kind=wp), intent(in), optional, dimension(:) :: nifa
real(kind=wp), intent(in), optional, dimension(:) :: nwfa
real(kind=wp), intent(in), dimension(:) :: ni
real(kind=dp), intent(in), dimension(:) :: smo0
real(kind=wp), intent(in), dimension(:) :: rc
real(kind=wp), intent(in), dimension(:) :: nc
real(kind=wp), intent(in), dimension(:) :: rr
real(kind=wp), intent(in), dimension(:) :: nr
real(kind=dp), intent(in), dimension(:) :: ilamr
type(ty_tend), intent(inout) :: tend

private subroutine get_in_table_index(xni, idx_in)

get ice nuclei table index

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: xni
integer, intent(out) :: idx_in

private subroutine get_t1_subl(rho, temp, qvsi, tcond, diffu, ssati, t1_subl)

calculations thermodynamic term used in depositional growth and melting

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: qvsi
real(kind=wp), intent(in), dimension(:) :: tcond
real(kind=wp), intent(in), dimension(:) :: diffu
real(kind=wp), intent(in), dimension(:) :: ssati
real(kind=wp), intent(out), dimension(:) :: t1_subl

private subroutine ice_processes(rhof, rhof2, rho, w1d, temp, qv, qvsi, tcond, diffu, vsc2, ssati, l_qi, ri, ni, ilami, l_qs, rs, smoe, smof, smo1, rr, nr, ilamr, mvd_r, l_qg, rg, ng, ilamg, idx, tend)

ice processes including cloud ice depositional growth, conversion of cloud ice to snow, snow collecting cloud ice, rain collecting cloud ice, snow depositional growth, and graupel sublimation

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rhof
real(kind=wp), intent(in), dimension(:) :: rhof2
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: w1d
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: qv
real(kind=wp), intent(in), dimension(:) :: qvsi
real(kind=wp), intent(in), dimension(:) :: tcond
real(kind=wp), intent(in), dimension(:) :: diffu
real(kind=wp), intent(in), dimension(:) :: vsc2
real(kind=wp), intent(in), dimension(:) :: ssati
logical, intent(in), dimension(:) :: l_qi
real(kind=wp), intent(in), dimension(:) :: ri
real(kind=wp), intent(in), dimension(:) :: ni
real(kind=dp), intent(in), dimension(:) :: ilami
logical, intent(in), dimension(:) :: l_qs
real(kind=wp), intent(in), dimension(:) :: rs
real(kind=dp), intent(in), dimension(:) :: smoe
real(kind=dp), intent(in), dimension(:) :: smof
real(kind=dp), intent(in), dimension(:) :: smo1
real(kind=wp), intent(in), dimension(:) :: rr
real(kind=wp), intent(in), dimension(:) :: nr
real(kind=dp), intent(in), dimension(:) :: ilamr
real(kind=wp), intent(in), dimension(:) :: mvd_r
logical, intent(in), dimension(:) :: l_qg
real(kind=wp), intent(in), dimension(:) :: rg
real(kind=wp), intent(in), dimension(:) :: ng
real(kind=dp), intent(in), dimension(:) :: ilamg
integer, intent(in), dimension(:) :: idx
type(ty_tend), intent(inout) :: tend

private subroutine melting(rhof2, rho, temp, qvsi, tcond, diffu, vsc2, ssati, delqvs, l_qs, rs, smof, smo0, smo1, l_qg, rg, ng, ilamg, idx, tend)

melting of snow and graupel

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: rhof2
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: qvsi
real(kind=wp), intent(in), dimension(:) :: tcond
real(kind=wp), intent(in), dimension(:) :: diffu
real(kind=wp), intent(in), dimension(:) :: vsc2
real(kind=wp), intent(in), dimension(:) :: ssati
real(kind=wp), intent(in), dimension(:) :: delqvs
logical, intent(in), dimension(:) :: l_qs
real(kind=wp), intent(in), dimension(:) :: rs
real(kind=dp), intent(in), dimension(:) :: smof
real(kind=dp), intent(in), dimension(:) :: smo0
real(kind=dp), intent(in), dimension(:) :: smo1
logical, intent(in), dimension(:) :: l_qg
real(kind=wp), intent(in), dimension(:) :: rg
real(kind=wp), intent(in), dimension(:) :: ng
real(kind=dp), intent(in), dimension(:) :: ilamg
integer, intent(in), dimension(:) :: idx
type(ty_tend), intent(inout) :: tend

private subroutine aerosol_scavenging(temp, rho, rhof, visco, nwfa, nifa, l_qr, nr, ilamr, mvd_r, l_qs, rs, smob, smoc, smoe, l_qg, rg, ng, ilamg, idx, tend)

scavenging of aerosols by rain, snow, and graupel

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: rho
real(kind=wp), intent(in), dimension(:) :: rhof
real(kind=wp), intent(in), dimension(:) :: visco
real(kind=wp), intent(in), dimension(:) :: nwfa
real(kind=wp), intent(in), dimension(:) :: nifa
logical, intent(in), dimension(:) :: l_qr
real(kind=wp), intent(in), dimension(:) :: nr
real(kind=dp), intent(in), dimension(:) :: ilamr
real(kind=wp), intent(in), dimension(:) :: mvd_r
logical, intent(in), dimension(:) :: l_qs
real(kind=wp), intent(in), dimension(:) :: rs
real(kind=dp), intent(in), dimension(:) :: smob
real(kind=dp), intent(in), dimension(:) :: smoc
real(kind=dp), intent(in), dimension(:) :: smoe
logical, intent(in), dimension(:) :: l_qg
real(kind=wp), intent(in), dimension(:) :: rg
real(kind=wp), intent(in), dimension(:) :: ng
real(kind=dp), intent(in), dimension(:) :: ilamg
integer, intent(in), dimension(:) :: idx
type(ty_tend), intent(inout) :: tend