4.1.1.1.1.2. pamtra2.hydrometeors.core¶
4.1.1.1.1.2.1. Module Contents¶
4.1.1.1.1.2.1.1. Classes¶
generic class to store hydrometeor properties. |
|
hydrometeor class to be used for soft ellipsoids with fixed density. |
|
hydrometeor class to be used for soft ellipsoids with variable |
|
hydrometeor class for cloud droplets. |
|
hydrometeor class for rain. |
|
hydrometeor class for ice. |
|
hydrometeor class for snow. |
4.1.1.1.1.2.1.2. Functions¶
- class hydrometeor(parent=None, name=None, discreteProperties=None, calculationOrder=None, useFuncArgDefaults=True, **kwargs)[source]¶
Bases:
objectgeneric class to store hydrometeor properties.
- Parameters
parent (pamtra2 object) – content of parent’s class
name (str, optional) – name of the hydrometeor
discreteProperties (xr.Dataset, optional) – pre-calculated discrete properties
calculationOrder (optional) – order for estimating the properties
useFuncArgDefaults (bool, optional) – if parameters are not found in any kwarg, discreteProperties, parent’s profile, then fall back to default values of the function. Helpful for debugging. default True.
**kwargs – All properties of the hydrometeor. Most hydrometeors require at least ‘sizeCenter’, ‘aspectRatio’, ‘mass’, ‘density’, ‘crossSectionArea’, and ‘numberConcentration’.
- kind¶
liquid or frozen hydrometeor?
- Type
{‘liquid’, ‘ice’}
- discreteProperties¶
calculated discrete properties
- Type
xr.Dataset
- calculationOrder¶
order for estimating the properties
- useFuncArgDefaults¶
if parameters are not found in any of funcArgs, discreteProperties, parent’s profile, then fall back to default values of the function. Helpful for debugging. default True.
- Type
- description¶
All properties of the hydrometeor. Most hydrometeors require at least ‘sizeCenter’, ‘aspectRatio’, ‘mass’, ‘density’, ‘crossSectionArea’, and ‘numberConcentration’.
- Type
- property _parentProfile(self)[source]¶
Helper function
- Returns
_parentProfile – Limited version of parent.profile. Contains only data belonging to
the hydrometeor.
- _arrayOrFunc(self, thisKey, thisDesription, **fixedKwargs)[source]¶
Helper function calling functions if required.
- Parameters
thisDesription – function or value or xr.DataArray
**fixedKwargs – additional parameters for the function not defined elsewhere
- Returns
value or xr.DataArray
- Return type
thisProperty
- class softEllipsoidFixedDensity(*args, **kwargs)[source]¶
Bases:
hydrometeorhydrometeor class to be used for soft ellipsoids with fixed density.
- class softEllipsoidMassSize(*args, **kwargs)[source]¶
Bases:
hydrometeorhydrometeor class to be used for soft ellipsoids with variable density depending on the mass-size relation.
- class cloud(*args, nBins=2, numberConcentration=numberConcentration.monoDisperseWC, scattering=scattering.Mie, Dmin=1e-05 - 1e-10, Dmax=1e-05 + 1e-10, **kwargs)[source]¶
Bases:
softEllipsoidFixedDensityhydrometeor class for cloud droplets.
- Parameters
parent (pamtra2 object) – content of parent’s class
name (str, optional) – name of the hydrometeor
nBins (int, optional) – number of bins. Note taht the spectral radar simulator requires >= 2 hydrometeor bins. (default 2)
numberConcentration (func, optional) – Function to describe the size distribution. default: numberConcentration.monoDisperseWC which requires hydrometeorContent either as kwarg or in pamtra2’s profile
scattering (func, optional) – Function to describe the single scattering of the hydrometeor. default: scattering.Mie
Dmin (float, optional) – Smallest boundary of size distribution. Note that Dmin != Dmax is required also for a monodisperse distribution. (default 1e-5 - 1e-10)
Dmax (float, optional) – Largest boundary of size distribution. Note that Dmin != Dmax is required also for a monodisperse distribution. (default 1e-5 + 1e-10)
useFuncArgDefaults (bool, optional) – if parameters are not found in any of kwargs, discreteProperties, parent’s profile, then fall back to default values of the function. Helpful for debugging. default True.
**kwargs – Further properties if required. Also the parameters defined in defaultArgs (see source) can be overwritten if provided.
- kind¶
liquid or frozen hydrometeor?
- Type
{‘liquid’, ‘ice’}
- discreteProperties¶
calculated discrete properties
- Type
xr.Dataset
- calculationOrder¶
order for estimating the properties
- useFuncArgDefaults¶
if parameters are not found in any of funcArgs, discreteProperties, parent’s profile, then fall back to default values of the function. Helpful for debugging. default True.
- Type
- class rain(*args, nBins=50, numberConcentration=numberConcentration.exponentialN0WC, scattering=scattering.Mie, aspectRatio=1.0, Dmin=1e-06, Dmax=0.008, N0=8000000.0, **kwargs)[source]¶
Bases:
softEllipsoidFixedDensityhydrometeor class for rain.
- Parameters
parent (pamtra2 object) – content of parent’s class
name (str, optional) – name of the hydrometeor
nBins (int, optional) – number of bins. Note taht the spectral radar simulator requires >= 2 hydrometeor bins. (default 50)
numberConcentration (func, optional) – Function to describe the size distribution. default: numberConcentration.exponentialN0WC which requires hydrometeorContent either as kwarg or in pamtra2’s profile. In addition, N0 has to be provided
scattering (func, optional) – Function to describe the single scattering of the hydrometeor. default: scattering.Mie
aspectRatio (float, optional) – hydrometeor aspect ratio (default 1.0)
Dmin (float, optional) – Smallest boundary of size distribution. Note that Dmin != Dmax is required also for a monodisperse distribution. (default 1e-6)
Dmax (float, optional) – Largest boundary of size distribution. Note that Dmin != Dmax is required also for a monodisperse distribution. (default 0.008)
N0 (float, optional) – N0 of exponential distribution. (default 8e6)
useFuncArgDefaults (bool, optional) – if parameters are not found in any of kwargs, discreteProperties, parent’s profile, then fall back to default values of the function. Helpful for debugging. default True.
**kwargs – Further properties if required. Also the parameters defined in defaultArgs (see source) can be overwritten if provided.
- kind¶
liquid or frozen hydrometeor?
- Type
{‘liquid’, ‘ice’}
- discreteProperties¶
calculated discrete properties
- Type
xr.Dataset
- calculationOrder¶
order for estimating the properties
- useFuncArgDefaults¶
if parameters are not found in any of funcArgs, discreteProperties, parent’s profile, then fall back to default values of the function. Helpful for debugging. default True.
- Type
- class ice(*args, nBins=2, numberConcentration=numberConcentration.monoDisperseWC, scattering=scattering.Mie, Dmin=0.0001 - 1e-10, Dmax=0.0001 + 1e-10, **kwargs)[source]¶
Bases:
softEllipsoidFixedDensityhydrometeor class for ice.
- Parameters
parent (pamtra2 object) – content of parent’s class
name (str, optional) – name of the hydrometeor
nBins (int, optional) – number of bins. Note taht the spectral radar simulator requires >= 2 hydrometeor bins. (default 2)
numberConcentration (func, optional) – Function to describe the size distribution. default: numberConcentration.monoDisperseWC which requires hydrometeorContent either as kwarg or in pamtra2’s profile
scattering (func, optional) – Function to describe the single scattering of the hydrometeor. default: scattering.Mie
Dmin (float, optional) – Smallest boundary of size distribution. Note that Dmin != Dmax is required also for a monodisperse distribution. (default 1e-5 - 1e-10)
Dmax (float, optional) – Largest boundary of size distribution. Note that Dmin != Dmax is required also for a monodisperse distribution. (default 1e-5 + 1e-10)
useFuncArgDefaults (bool, optional) – if parameters are not found in any of kwargs, discreteProperties, parent’s profile, then fall back to default values of the function. Helpful for debugging. default True.
**kwargs – Further properties if required. Also the parameters defined in defaultArgs (see source) can be overwritten if provided.
- kind¶
liquid or frozen hydrometeor?
- Type
{‘liquid’, ‘ice’}
- discreteProperties¶
calculated discrete properties
- Type
xr.Dataset
- calculationOrder¶
order for estimating the properties
- useFuncArgDefaults¶
if parameters are not found in any of funcArgs, discreteProperties, parent’s profile, then fall back to default values of the function. Helpful for debugging. default True.
- Type
- class snow(*args, nBins=2, aspectRatio=1.0, numberConcentration=numberConcentration.exponentialN0WC, scattering=scattering.Mie, Dmin=5e-09, Dmax=0.01, N0=100000.0, massSizeA=0.0121, massSizeB=1.9, areaSizeA=0.4, areaSizeB=1.8, minDensity=100, **kwargs)[source]¶
Bases:
softEllipsoidMassSizehydrometeor class for snow.