The Intermediate Complexity Atmospheric Research model (ICAR)
A computationally efficient atmospheric model for downscaling.
|
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 |
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
|
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
qc | Cloud water (or ice) mixing ratio [kg/kg] |
q | Rain (or snow) mixing ratio [kg/kg] |
conversion | time constant for conversion (*dt) [] |
qcmin | minimum cloud content before conversion [kg/kg] |
|
private |
Convert cloud water to vapor and back
Iterates to find the conversion between liquid and vapor including temperature feedbacks
pressure | air pressure [Pa] |
temperature | air temperature [K] |
qv | water vapor mixing ratio [kg/kg] |
qc | cloud water mixing ratio [kg/kg] |
qvsat | saturated mixing ratio [kg/kg] |
dt | time step [sec.] |
|
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
pressure | air pressure [Pa] |
temperature | air temperature [K] |
qv | water vapor mixing ratio [kg/kg] |
qc | cloud water mixing ratio [kg/kg] |
qr | rain mixing ratio [kg/kg] |
qs | snow mixing ratio [kg/kg] |
dt | time step [sec.] |
|
private |
Basic microphysics code for a column of air
Call microphysical conversion routines on each layer and sedimentation for the column
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 |
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
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 |
|
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
pressure | air pressure (not used) [Pa] |
temperature | air temperature [K] |
q1 | hydrometeor to convert from [kg/kg] |
qmax | the maximum value for q2 (e.g. qv_sat) [kg/kg] |
q2 | hydrometeor to convert to [kg/kg] |
Lheat | latent heat associated with the phase change [J/kg] |
change_rate | fraction of q1 that can change in a timestep [] |
|
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
temperature | Air Temperature [K] |
pressure | Air Pressure [Pa] |
sat_mr | Saturated water vapor mixing ratio [kg/kg] |
|
private |
Compute sedimentation in a column
Takes a mixing ratio of some species along with the fall velocities, air densities and layer thicknesses.
q | 1D microphysical species to sediment (snow, rain, etc) [kg/kg] |
v | 1D vertical velocity [m/s] |
rho | 1D air density [kg/m^3] |
dz | 1D layer thickness [m] |
n | 0D number of layers |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |