ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_Parameterizations.H
Go to the documentation of this file.
1 //
2 // parameterization provides the tracer particle properties
3 // that are not provided by the microphysics model
4 //
5 #ifndef ERF_PARAMETERIZATIONS_H_
6 #define ERF_PARAMETERIZATIONS_H_
7 
8 #include "rrtmgp_const.h"
9 #include "ERF_Rad_constants.H"
10 #include "ERF_Constants.H"
11 
12  AMREX_FORCE_INLINE
13  real liquid_effective_radius (real temperature, real landfrac, real icefrac = 0., real snowh = 0.)
14  {
15  const real rliqland = 8.0; // liquid drop size if over land
16  const real rliqocean = 14.0; // liquid drop size if over ocean
17  const real rliqice = 14.0; // liquid drop size if over sea ice
18 
19  real reffective = 0.;
20  // jrm Reworked effective radius algorithm
21  // Start with temperature-dependent value appropriate for continental air
22  reffective = rliqland+(rliqocean-rliqland)*std::min(1.0, std::max(0.0, (tmelt-temperature)*0.05));
23 
24  // Modify for snow depth over land
25  reffective = reffective + (rliqocean-reffective)*std::min(1.0, std::max(0.0, snowh*10.));
26 
27  // Ramp between polluted value over land to clean value over ocean.
28  reffective = reffective + (rliqocean-reffective) * std::min(1.0, std::max(0.0, 1.0 - landfrac));
29 
30  // Ramp between the resultant value and a sea ice value in the presence of ice.
31  reffective = reffective + (rliqice-reffective) * std::min(1.0, std::max(0.0, icefrac));
32  return reffective;
33  }
34 
35  AMREX_FORCE_INLINE
36  real ice_effective_radius(real temperature)
37  {
38  int index = int(temperature - (RadConstants::icesize_table_min_temp - 1.));
39  index = std::min(std::max(index, 1), 94);
40  real fraction = temperature-int(temperature);
41  return RadConstants::retab[index]*(1.-fraction)+RadConstants::retab[index+1]*fraction;
42  }
43 #endif
constexpr amrex::Real tmelt
Definition: ERF_Constants.H:88
AMREX_FORCE_INLINE real ice_effective_radius(real temperature)
Definition: ERF_Parameterizations.H:36
AMREX_FORCE_INLINE real liquid_effective_radius(real temperature, real landfrac, real icefrac=0., real snowh=0.)
Definition: ERF_Parameterizations.H:13
static constexpr real icesize_table_min_temp
Definition: ERF_Rad_constants.H:41
static constexpr real retab[]
Definition: ERF_Rad_constants.H:42