emc2.core (emc2.core)¶
The procedures in this module contain the core data structures of EMC^2. In particular, the Instrument class that describes the characteristics of the instrument to be simulated is stored here. In addition, global constants used by EMC^2 are also stored in this module.
|
This is the base class which holds the information needed to contain the instrument parameters for the simulator. |
|
This stores the information for the KAZR. |
This stores the information for the High Resolution Spectral Lidar. |
|
This stores the information for the 1064nm Lidar. |
|
|
This class stores the model specific parameters for the radar simulator. |
|
This loads a ModelE simulation with all of the necessary parameters for EMC^2 to run. |
This is a test Model structure used only for unit testing. |
|
This is a test Model structure used only for unit testing. |
In addition the emc2.core.quantity()
is equivalent to pint’s
UnitRegistry().Quantity object. This allows for the use of quantities
with units, making EMC^2 unit aware.
-
class
emc2.core.
Model
[source]¶ This class stores the model specific parameters for the radar simulator.
- Attributes
- Rho_hyd: dict
A dictionary whose keys are the names of the model’s hydrometeor classes and whose values are the density of said hydrometeors in \(kg\ m^{-3}\)
- lidar_ratio: dict
A dictionary whose keys are the names of the model’s hydrometeor classes and whose values are the lidar_ratio of said hydrometeors.
- vel_param_a: dict
A dictionary whose keys are the names of the model’s hydrometeor classes and whose values are the \(a\) parameters to the equation \(V = aD^b\) used to calculate terminal velocity corresponding to each hydrometeor.
- vel_param_b: dict
A dictionary whose keys are the names of the model’s hydrometeor classes and whose values are the \(b\) parameters to the equation \(V = aD^b\) used to calculate terminal velocity corresponding to each hydrometeor.
- N_field: dict
A dictionary whose keys are the names of the model’s hydrometeor classes and whose values are the number concentrations in \(cm^{-3}\) corresponding to each hydrometeor class.
- T_field: str
A string containing the name of the temperature field in the model.
- q_field: str
A string containing the name of the water vapor mixing ratio field (in kg/kg) in the model.
- p_field: str
A string containing the name of the pressure field (in mbar) in the model.
- z_field: str
A string containing the name of the height field (in m) in the model.
- conv_frac_names: dict
A dictionary containing the names of the convective fraction corresponding to each hydrometeor class in the model.
- time_dim: str
The name of the time dimension in the model.
- height_dim: str
The name of the height dimension in the model.
- model_name: str
The name of the model (used for plotting).
-
property
hydrometeor_classes
¶ The list of hydrometeor classes.
-
load_subcolumns_from_netcdf
(self, file_name)[source]¶ Load all of the subcolumn data from a previously saved netCDF file. The dataset being loaded must match the current number of subcolumns if there are any generated.
- Parameters
- file_name: str
Name of the file to save.
-
property
num_hydrometeor_classes
¶ The number of hydrometeor classes
-
property
num_subcolumns
¶ Gets the number of subcolumns in the model. Will return 0 if the number of subcolumns has not yet been set.
-
class
emc2.core.
Instrument
(frequency=None, wavelength=None)[source]¶ This is the base class which holds the information needed to contain the instrument parameters for the simulator.
- Attributes
- instrument_str: str
The name of the instrument.
- instrument_class: str
The class of the instrument. Currently must be one of ‘radar,’ or ‘lidar’.
- freq: float
The frequency of the instrument.
- wavelength: float
The wavelength of the instrument
- ext_OD: float
The optical depth where we have full extinction of the lidar signal.
- K_w: float
The index of refraction of water used for Ze calculation. See the ARM KAZR handbook (Widener et al. 2012)
- eps_liq: float
The complex dielectric constant for liquid water.
- pt: float
Transmitting power in Watts.
- theta: float
3 dB beam width in degrees
- gain: float
The antenna gain in linear units.
- Z_min_1km: float
The minimum detectable signal at 1 km in dBZ
- lr: float
Attenuation based on the the general attributes in the spectra files.
- pr_noise_ge: float
Minimum detectable signal in mW.
- tau_ge: float
Pulse width in mus.
- tau_md: float
Pulse width in mus.