emc2.simulator.radar_moments.calc_radar_moments¶
- emc2.simulator.radar_moments.calc_radar_moments(instrument, model, is_conv, OD_from_sfc=True, hyd_types=None, parallel=True, chunk=None, mie_for_ice=False, use_rad_logic=True, use_empiric_calc=False, calc_spectral_width=True, **kwargs)[source]¶
Calculates the reflectivity, doppler velocity, and spectral width in a given column for the given radar.
NOTE: When starting a parallel task (in microphysics approach), it is recommended to wrap the top-level python script calling the EMC^2 processing (‘lines_of_code’) with the following command (just below the ‘import’ statements):
if __name__ == “__main__”: lines_of_code
- Parameters:
- instrument: Instrument
The instrument to simulate. The instrument must be a radar.
- model: Model
The model to generate the parameters for.
- is_conv: bool
True if the cell is convective
- z_field: str
The name of the altitude field to use.
- OD_from_sfc: bool
If True, then calculate optical depth from the surface.
- hyd_types: list or None
list of hydrometeor names to include in calculation. using default Model subclass types if None.
- parallel: bool
If True, then use parallelism to calculate each column quantity.
- chunk: None or int
If using parallel processing, only send this number of time periods to the parallel loop at one time. Sometimes Dask will crash if there are too many tasks in the queue, so setting this value will help avoid that.
- calc_spectral_width: bool
If False, skips spectral width calculations since these are not always needed for an application and are the most computationally expensive. Default is True.
- mie_for_ice: bool
If True, using bulk LUTs generated using solid ice spheres (Mie) calculations (e.g., consistent with the ice treatment in MG1 through MG2). Otherwise, using bulk LUTs that consider ice properties, e.g., the C6 8-column severly roughned aggregate for E3 or the m-D A-D for CESM and E3SMv1, consistent with the radiation schemes of these models. This parameter is set to False if mcphys_scheme == P3 since ice shape is integrated into P3, which also affects mu, etc. and therefore the bulk LUT behavior in a similar manner to how the P3 LUTs are integrated into EMC².
- use_rad_logic: bool
When True using radiation scheme logic in calculations, which includes using the cloud fraction fields utilized in a model radiative scheme, as well as bulk scattering LUTs (effective radii dependent scattering variables). Otherwise, and only in the stratiform case, using the microphysics scheme logic, which includes the cloud fraction fields utilized by the model microphysics scheme and single particle scattering LUTs. NOTE: because of its single-particle calculation method, the microphysics approach is significantly slower than the radiation approach. Also, the cloud fraction logic in these schemes does not necessarily fully overlap.
- use_empirical_calc: bool
When True using empirical relations from literature for the fwd calculations (the cloud fraction still follows the scheme logic set by use_rad_logic).
- Additonal keyword arguments are passed into
- :py:func:`emc2.simulator.psd.calc_mu_lambda`.
- :py:func:`emc2.simulator.lidar_moments.accumulate_attenuation`.
- :py:func:`emc2.simulator.lidar_moments.calc_radar_empirical`.
- :py:func:`emc2.simulator.lidar_moments.calc_radar_bulk`.
- :py:func:`emc2.simulator.lidar_moments.calc_radar_micro`.
- Returns:
- model:
emc2.core.Model()
The xarray Dataset containing the calculated radar moments.
- model: