psdModifiedGamma
- Workspace.psdModifiedGamma(self: pyarts.arts._Workspace, psd_data: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Matrix]] = self.psd_data, dpsd_data_dx: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Tensor3]] = self.dpsd_data_dx, psd_size_grid: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Vector]] = self.psd_size_grid, pnd_agenda_input_t: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Vector]] = self.pnd_agenda_input_t, pnd_agenda_input: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Matrix]] = self.pnd_agenda_input, pnd_agenda_input_names: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.ArrayOfString]] = self.pnd_agenda_input_names, dpnd_data_dx_names: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.ArrayOfString]] = self.dpnd_data_dx_names, n0: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Numeric]] = std::numeric_limits<Numeric>::quiet_NaN(), mu: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Numeric]] = std::numeric_limits<Numeric>::quiet_NaN(), la: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Numeric]] = std::numeric_limits<Numeric>::quiet_NaN(), ga: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Numeric]] = std::numeric_limits<Numeric>::quiet_NaN(), t_min: Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Numeric], t_max: Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Numeric], picky: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Index]] = 0, verbosity: Optional[Union[pyarts.arts.WorkspaceVariable, pyarts.arts.Verbosity]] = self.verbosity) None
Modified gamma distribution PSD using n0, mu, la and ga as parameters.
The modified gamma distribution is a 4-parameter (n0, mu, la and ga) distribution [Petty & Huang, JAS, 2011)]:
n(x) = n0 * x^mu * exp( -la*x^ga )
where x is particle size or mass.
The parameters can be given in two ways, either by
pnd_agenda_input
or as GIN arguments. The first option allows the parameter to vary, while in the second case the parameter gets a constant value. If a parameter is part ofpnd_agenda_input
, the corresponding GIN argument must be set to NaN (which is default). This means that the number of columns inpnd_agenda_input
and the number of non-NaN choices for n0, mu, la and ga must add up to four.Data in
pnd_agenda_input
are linked to the MGD parameters in term of order, the naming inpnd_agenda_input_names
is free. If all four parameteras are specified bypnd_agenda_input
, the data in the first column are taken as n0, the second column as mu etc. If a parameter is given as a GIN argument, the columns are just shifted with one position. For example, if mu and ga are specified as GIN arguments,pnd_agenda_input
shall have two columns, with n0-values in the first one and la-values in the second one.The GIN route is especially suitable for selecting special cases of MGD. For example, by setting mu=0 and ga=1, an exponential PSD is obtained:
n(x) = n0 * exp( -la * x )
With mu=1 and ga=1, the gamma PSD is obtained:
n(x) = n0 * x^mu * exp( -la * x )
There should be little overhead in using the method for exponential and gamma PSDs, there is an internal switch to dedicated expressions for those PSDs.
Derivatives can only be obtained for parameters that are specified by
pnd_agenda_input
.If temperature is outside [
t_min
,t_max
] psd=0 and dpsd=0 if picky=0, or an error is thrown if picky=1.These requirements apply to the MGD parameters:
la > 0
ga > 0
Author(s): Patrick Eriksson
- Parameters:
psd_data (Matrix, optional) – Particle size distribution values for a set of points. See
psd_data
, defaults toself.psd_data
[OUT]dpsd_data_dx (Tensor3, optional) – Partial derivates of
psd_data
. Seedpsd_data_dx
, defaults toself.dpsd_data_dx
[OUT]psd_size_grid (Vector, optional) – The particle sizes associated with
psd_data
. Seepsd_size_grid
, defaults toself.psd_size_grid
[IN]pnd_agenda_input_t (Vector, optional) – Temperature input to one element of
pnd_agenda_array
. Seepnd_agenda_input_t
, defaults toself.pnd_agenda_input_t
[IN]pnd_agenda_input (Matrix, optional) – The variable input to one element of
pnd_agenda_array
. Seepnd_agenda_input
, defaults toself.pnd_agenda_input
[IN]pnd_agenda_input_names (ArrayOfString, optional) – Naming of (existing or expected) data in
pnd_agenda_input
. Seepnd_agenda_input_names
, defaults toself.pnd_agenda_input_names
[IN]dpnd_data_dx_names (ArrayOfString, optional) – Selection of partial derivatives of
pnd_data
. Seedpnd_data_dx_names
, defaults toself.dpnd_data_dx_names
[IN]n0 (Numeric, optional) – n0. Defaults to
NaN
[IN]mu (Numeric, optional) – mu. Defaults to
NaN
[IN]la (Numeric, optional) – la. Defaults to
NaN
[IN]ga (Numeric, optional) – ga. Defaults to
NaN
[IN]t_min (Numeric) – Low temperature limit to calculate a psd. [IN]
t_max (Numeric) – High temperature limit to calculate a psd. [IN]
picky (Index, optional) – Flag whether to be strict with parametrization value checks. Defaults to
0
[IN]verbosity (Verbosity) – ARTS verbosity. See
verbosity
, defaults toself.verbosity
[IN]