ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
TopographicShadingChoice Struct Reference

#include <ERF_RadStruct.H>

Collaboration diagram for TopographicShadingChoice:

Public Member Functions

bool active () const
 
void read (const std::string &prefix, const RRTMGPSolarChoice &solar)
 

Public Attributes

bool slope_rad = false
 
bool topo_shading = false
 
amrex::Real shadlen = 25000
 
amrex::Real fixed_mu = 0
 
amrex::Real fixed_azimuth = -1
 
amrex::Real latitude = 0
 
amrex::Real longitude = 0
 
int radiation_interval = 0
 

Detailed Description

Inputs for the optional topographic correction of RRTMGP land forcing.

Member Function Documentation

◆ active()

bool TopographicShadingChoice::active ( ) const
inline
113 { return slope_rad || topo_shading; }
bool slope_rad
Definition: ERF_RadStruct.H:104
bool topo_shading
Definition: ERF_RadStruct.H:105

Referenced by plotfile2d::available_diagnostic_names(), and SolverChoice::init_params().

Here is the caller graph for this function:

◆ read()

void TopographicShadingChoice::read ( const std::string &  prefix,
const RRTMGPSolarChoice &  solar 
)
40 {
41  ParmParse pp(prefix);
42  pp.queryAdd("slope_rad", slope_rad);
43  pp.queryAdd("topo_shading", topo_shading);
44  if (!active()) { return; }
45  pp.queryAdd("shadlen", shadlen);
46  const bool has_azimuth = pp.query("fixed_solar_azimuth_angle", fixed_azimuth);
47  fixed_mu = solar.fixed_mu;
48  latitude = solar.latitude;
49  longitude = solar.longitude;
51  AMREX_ALWAYS_ASSERT_WITH_MESSAGE(std::isfinite(shadlen) && shadlen > 0,
52  "erf.shadlen must be a positive finite horizontal distance in metres");
53  AMREX_ALWAYS_ASSERT_WITH_MESSAGE(std::isfinite(fixed_mu) && fixed_mu <= 1,
54  "erf.fixed_solar_zenith_angle is a cosine and must not exceed 1");
55  AMREX_ALWAYS_ASSERT_WITH_MESSAGE(!has_azimuth || fixed_mu > 0,
56  "erf.fixed_solar_azimuth_angle requires a positive fixed_solar_zenith_angle");
58  (has_azimuth && std::isfinite(fixed_azimuth) && fixed_azimuth >= 0 && fixed_azimuth < 360),
59  "Topographic radiation with fixed_solar_zenith_angle requires "
60  "fixed_solar_azimuth_angle in [0,360), clockwise from geographic north");
62  "Topographic radiation requires erf.rad_freq_in_steps > 0");
63 }
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(axis >=0 &&axis< AMREX_SPACEDIM, "prob.axis must be 0, 1 or 2")
ParmParse pp("prob")
amrex::Real fixed_mu
Definition: ERF_RadStruct.H:74
amrex::Real latitude
Definition: ERF_RadStruct.H:75
amrex::Real longitude
Definition: ERF_RadStruct.H:76
int radiation_interval
Definition: ERF_RadStruct.H:77
amrex::Real shadlen
Definition: ERF_RadStruct.H:106
bool active() const
Definition: ERF_RadStruct.H:113
amrex::Real longitude
Definition: ERF_RadStruct.H:110
amrex::Real fixed_mu
Definition: ERF_RadStruct.H:107
int radiation_interval
Definition: ERF_RadStruct.H:111
amrex::Real latitude
Definition: ERF_RadStruct.H:109
amrex::Real fixed_azimuth
Definition: ERF_RadStruct.H:108

Referenced by SolverChoice::init_params().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fixed_azimuth

amrex::Real TopographicShadingChoice::fixed_azimuth = -1

◆ fixed_mu

amrex::Real TopographicShadingChoice::fixed_mu = 0

◆ latitude

amrex::Real TopographicShadingChoice::latitude = 0

◆ longitude

amrex::Real TopographicShadingChoice::longitude = 0

◆ radiation_interval

int TopographicShadingChoice::radiation_interval = 0

◆ shadlen

amrex::Real TopographicShadingChoice::shadlen = 25000

◆ slope_rad

bool TopographicShadingChoice::slope_rad = false

◆ topo_shading

bool TopographicShadingChoice::topo_shading = false

The documentation for this struct was generated from the following files: