The Intermediate Complexity Atmospheric Research model (ICAR)
A computationally efficient atmospheric model for downscaling.
 All Classes Files Functions Variables
Public Member Functions | Private Member Functions | Private Attributes | List of all members
module_mp_simple Module Reference


Very simple microphysics code modeled after the microphysics of SB04 used in Smith and Barstad '04 (the linear model). More...

Public Member Functions

subroutine, public mp_simple_driver (pressure, th, pii, rho, qv, qc, qr, qs, rain, snow, dt, dz, nx, ny, nz)
 

Driver code to control simple microphysics More...

 

Private Member Functions

real function sat_mr (temperature, pressure)
 

Calculate the saturated mixing ratio for a given temperature and pressure More...

 
subroutine cloud_conversion (pressure, temperature, qv, qc, qvsat, dt)
 

Convert cloud water to vapor and back More...

 
subroutine cloud2hydrometeor (qc, q, conversion, qcmin)
 

Convert cloud water or ice to rain or snow More...

 
subroutine phase_change (pressure, temperature, q1, qmax, q2, Lheat, change_rate)
 

Change the "phase" of a hydrometeor (e.g. evaporate rain) More...

 
subroutine mp_conversions (pressure, temperature, qv, qc, qr, qs, dt)
 

Compute microphysical conversions More...

 
real function sediment (q, v, rho, dz, n)
 

Compute sedimentation in a column More...

 
subroutine mp_simple (pressure, temperature, rho, qv, qc, qr, qs, rain, snow, dt, dz, nz, debug)
 

Basic microphysics code for a column of air More...

 

Private Attributes

real, parameter lh_vapor = 2.26E6
 
real, parameter dlhvdt = 2400
 
real, parameter lh_liquid = 3.34E5
 
real, parameter heat_capacity = 1006.0
 
real, parameter small_value = 1E-15
 
real, parameter small_pressure = 1000.
 
real, parameter snow_formation_time_const = 1/2000.0
 
real, parameter rain_formation_time_const = 1/500.0
 
real, parameter freezing_threshold = 273.15
 
real, parameter snow_fall_rate = 1.5
 
real, parameter rain_fall_rate = 10.0
 
real, parameter snow_cloud_init = 0.00001
 
real, parameter rain_cloud_init = 0.00001
 
real rain_evap = 0.999
 
real snow_evap = 0.999
 
real snow_melt = 0.999
 
real cloud2rain = 0.999
 
real cloud2snow = 0.999
 

Detailed Description


Very simple microphysics code modeled after the microphysics of SB04 used in Smith and Barstad '04 (the linear model).

Clouds (solid and liquid) form and evaporate instantly Clouds convert to rain (or snow) with a time constant tau [s] typically rain_tau ~500s snow_tau ~2000s Fall speeds in SB04 assume 10m/s (rain) and 1.5m/s (snow). In SB04 this is treated by means of a time constant (=height/speed). Here it is modeled explicitly with these fall speeds

The entry point to the code is mp_simple_driver.

 Call tree graph :
 mp_simple_driver->mp_simple->
   [mp_conversions->
       [cloud_conversion->sat_mr,
        cloud2hydrometeor,
        phase_change],
   sediment]
 High level routine descriptions / purpose
   mp_simple_driver    - loops over X,Y grid cells, calls mp_simple on columns
   mp_simple           - calls mp_conversions for all z, then calls sediment
   mp_conversions      - handles all microphysics conversions (e.g. vapor->cloud->rain[->snow->vapor],...)
   cloud_conversion    - uses sat_mr to calculate sub or supersaturation and changes vapor and cloud water to balance
                          (adjusts temperature for Latent Heating)
   cloud2hydrometeor   - converts cloud water to rain or snow (temperature dependant)
   phase_change        - handles rain and snow evaporation (can take a time constant)
   sediment            - advects falling rain and snow due to gravity (not wind)
   sat_mr              - calculate saturated water vapor mixing ratio
 Driver inputs: pressure,th,pii,rho,qv,qc,qr,qs,rain,snow,dt,dz,nx,ny,nz
   pressure   = pressure                      - 3D - input  - Pa     - (nx,nz,ny)
   th         = potential temperature         - 3D - in/out - K      - (nx,nz,ny)
   pii        = exner function                - 3D - input  - []     - (nx,nz,ny)
   rho        = air density                   - 3D - input  - kg/m^3 - (nx,nz,ny)
   qv         = specific humidity             - 3D - in/out - kg/kg  - (nx,nz,ny)
   qc         = cloud water content           - 3D - in/out - kg/kg  - (nx,nz,ny)
   qr         = rain water content            - 3D - in/out - kg/kg  - (nx,nz,ny)
   qs         = snow water content            - 3D - in/out - kg/kg  - (nx,nz,ny)
   rain       = accumulated rain              - 2D - output - mm     - (nx,ny)
   snow       = accumulated snow              - 2D - output - mm     - (nx,ny)
   dt         = time step                     - 0D - input  - sec.   - scalar
   nx         = number of ew grid cells       - 0D - input  - n      - scalar
   ny         = number of ns grid cells       - 0D - input  - n      - scalar
   nz         = number of vertical grid cells - 0D - input  - n      - scalar
 
Author
Ethan Gutmann (gutma.nosp@m.nn@u.nosp@m.car.e.nosp@m.du)

Member Function/Subroutine Documentation

subroutine module_mp_simple::cloud2hydrometeor ( real, intent(inout)  qc,
real, intent(inout)  q,
real, intent(in)  conversion,
real, intent(in)  qcmin 
)
private


Convert cloud water or ice to rain or snow

Use a time constant to calculate the convertion between cloud and hydrometeor and enforce reasonable bounds

Parameters
qcCloud water (or ice) mixing ratio [kg/kg]
qRain (or snow) mixing ratio [kg/kg]
conversiontime constant for conversion (*dt) []
qcminminimum cloud content before conversion [kg/kg]

Here is the caller graph for this function:

subroutine module_mp_simple::cloud_conversion ( real, intent(in)  pressure,
real, intent(inout)  temperature,
real, intent(inout)  qv,
real, intent(inout)  qc,
real, intent(inout)  qvsat,
real, intent(in)  dt 
)
private


Convert cloud water to vapor and back

Iterates to find the conversion between liquid and vapor including temperature feedbacks

Parameters
pressureair pressure [Pa]
temperatureair temperature [K]
qvwater vapor mixing ratio [kg/kg]
qccloud water mixing ratio [kg/kg]
qvsatsaturated mixing ratio [kg/kg]
dttime step [sec.]

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine module_mp_simple::mp_conversions ( real, intent(inout)  pressure,
real, intent(inout)  temperature,
real, intent(inout)  qv,
real, intent(inout)  qc,
real, intent(inout)  qr,
real, intent(inout)  qs,
real, intent(in)  dt 
)
private


Compute microphysical conversions

Convert cloud water to and from vapor Convert cloud water to rain, and cloud ice to snow Cloud water is assumed to be ice if temperature is less than 0C Conversions also include latent heat feedbacks to temperature

Parameters
pressureair pressure [Pa]
temperatureair temperature [K]
qvwater vapor mixing ratio [kg/kg]
qccloud water mixing ratio [kg/kg]
qrrain mixing ratio [kg/kg]
qssnow mixing ratio [kg/kg]
dttime step [sec.]

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine module_mp_simple::mp_simple ( real, dimension(nz), intent(inout)  pressure,
real, dimension(nz), intent(inout)  temperature,
real, dimension(nz), intent(inout)  rho,
real, dimension(nz), intent(inout)  qv,
real, dimension(nz), intent(inout)  qc,
real, dimension(nz), intent(inout)  qr,
real, dimension(nz), intent(inout)  qs,
real, intent(inout)  rain,
real, intent(inout)  snow,
real, intent(in)  dt,
real, dimension(nz), intent(in)  dz,
integer, intent(in)  nz,
logical, intent(in)  debug 
)
private


Basic microphysics code for a column of air

Call microphysical conversion routines on each layer and sedimentation for the column

Parameters
pressure= pressure - 1D - input - Pa - (nz)
temperature=air temperature - 1D - in/out - K - (nz)
rho= air density - 1D - input - kg/m^3 - (nz)
qv= specific humidity - 1D - in/out - kg/kg - (nz)
qc= cloud water content - 1D - in/out - kg/kg - (nz)
qr= rain water content - 1D - in/out - kg/kg - (nz)
qs= snow water content - 1D - in/out - kg/kg - (nz)
rain= accumulated rain - 0D - output - mm - ()
snow= accumulated snow - 0D - output - mm - ()
dt= time step - 0D - input - sec. - scalar
dz= vertical thickness of layers - 1D - input - m - (nz)
nz= number of vertical grid cells - 0D - input - n - scalar
debug= debug mode (print and test) - 0D - input - T/F - Boolean

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine, public module_mp_simple::mp_simple_driver ( real, dimension(nx,nz,ny), intent(inout)  pressure,
real, dimension(nx,nz,ny), intent(inout)  th,
real, dimension(nx,nz,ny), intent(inout)  pii,
real, dimension(nx,nz,ny), intent(inout)  rho,
real, dimension(nx,nz,ny), intent(inout)  qv,
real, dimension(nx,nz,ny), intent(inout)  qc,
real, dimension(nx,nz,ny), intent(inout)  qr,
real, dimension(nx,nz,ny), intent(inout)  qs,
real, dimension(nx,ny), intent(inout)  rain,
real, dimension(nx,ny), intent(inout)  snow,
real, intent(in)  dt,
real, dimension(nx,nz,ny), intent(inout)  dz,
integer, intent(in)  nx,
integer, intent(in)  ny,
integer, intent(in)  nz 
)


Driver code to control simple microphysics

Handles horizontal spatial dimensions and parallelization in space, Calculates time constants for the current dt, Calculates real temperature from potential temperature

Parameters
pressure= pressure - 3D - input - Pa - (nx,nz,ny)
th= potential temperature - 3D - in/out - K - (nx,nz,ny)
pii= exner function - 3D - input - [] - (nx,nz,ny)
rho= air density - 3D - input - kg/m^3 - (nx,nz,ny)
qv= specific humidity - 3D - in/out - kg/kg - (nx,nz,ny)
qc= cloud water content - 3D - in/out - kg/kg - (nx,nz,ny)
qr= rain water content - 3D - in/out - kg/kg - (nx,nz,ny)
qs= snow water content - 3D - in/out - kg/kg - (nx,nz,ny)
rain= accumulated rain - 2D - output - mm - (nx,ny)
snow= accumulated snow - 2D - output - mm - (nx,ny)
dt= time step - 0D - input - sec. - scalar
nx= number of ew grid cells - 0D - input - n - scalar
ny= number of ns grid cells - 0D - input - n - scalar
nz= number of vertical grid cells - 0D - input - n - scalar

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine module_mp_simple::phase_change ( real, intent(in)  pressure,
real, intent(inout)  temperature,
real, intent(inout)  q1,
real, intent(in)  qmax,
real, intent(inout)  q2,
real, intent(in)  Lheat,
real, intent(in)  change_rate 
)
private


Change the "phase" of a hydrometeor (e.g. evaporate rain)

Written to apply generically to any conversion. Convert from q1 (e.g. rain) to q2 (e.g. vapor) using Lheat to affect temperature and change_rate to control the conversion time scale

Parameters
pressureair pressure (not used) [Pa]
temperatureair temperature [K]
q1hydrometeor to convert from [kg/kg]
qmaxthe maximum value for q2 (e.g. qv_sat) [kg/kg]
q2hydrometeor to convert to [kg/kg]
Lheatlatent heat associated with the phase change [J/kg]
change_ratefraction of q1 that can change in a timestep []

Here is the caller graph for this function:

real function module_mp_simple::sat_mr ( real, intent(in)  temperature,
real, intent(in)  pressure 
)
private


Calculate the saturated mixing ratio for a given temperature and pressure

If temperature > 0C: returns the saturated mixing ratio with respect to liquid If temperature < 0C: returns the saturated mixing ratio with respect to ice

Parameters
temperatureAir Temperature [K]
pressureAir Pressure [Pa]
Return values
sat_mrSaturated water vapor mixing ratio [kg/kg]
See also
http://www.dtic.mil/dtic/tr/fulltext/u2/778316.pdf Lowe, P.R. and J.M. Ficke., 1974: The Computation of Saturation Vapor Pressure Environmental Prediction Research Facility, Technical Paper No. 4-74

Here is the call graph for this function:

real function module_mp_simple::sediment ( real, dimension(n), intent(inout)  q,
real, dimension(n), intent(in)  v,
real, dimension(n), intent(in)  rho,
real, dimension(n), intent(in)  dz,
integer, intent(in)  n 
)
private


Compute sedimentation in a column

Takes a mixing ratio of some species along with the fall velocities, air densities and layer thicknesses.

Parameters
q1D microphysical species to sediment (snow, rain, etc) [kg/kg]
v1D vertical velocity [m/s]
rho1D air density [kg/m^3]
dz1D layer thickness [m]
n0D number of layers

Here is the caller graph for this function:

Member Data Documentation

real module_mp_simple::cloud2rain = 0.999
private
real module_mp_simple::cloud2snow = 0.999
private
real, parameter module_mp_simple::dlhvdt = 2400
private
real, parameter module_mp_simple::freezing_threshold = 273.15
private
real, parameter module_mp_simple::heat_capacity = 1006.0
private
real, parameter module_mp_simple::lh_liquid = 3.34E5
private
real, parameter module_mp_simple::lh_vapor = 2.26E6
private
real, parameter module_mp_simple::rain_cloud_init = 0.00001
private
real module_mp_simple::rain_evap = 0.999
private
real, parameter module_mp_simple::rain_fall_rate = 10.0
private
real, parameter module_mp_simple::rain_formation_time_const = 1/500.0
private
real, parameter module_mp_simple::small_pressure = 1000.
private
real, parameter module_mp_simple::small_value = 1E-15
private
real, parameter module_mp_simple::snow_cloud_init = 0.00001
private
real module_mp_simple::snow_evap = 0.999
private
real, parameter module_mp_simple::snow_fall_rate = 1.5
private
real, parameter module_mp_simple::snow_formation_time_const = 1/2000.0
private
real module_mp_simple::snow_melt = 0.999
private

The documentation for this module was generated from the following file: