ARTS
2.4.0(git:4fb77825)
|
Internal functions associated with size distributions. More...
#include "array.h"
#include "gridded_fields.h"
#include "interpolation.h"
#include "matpackVII.h"
#include "messages.h"
#include "optproperties.h"
#include "ppath.h"
Go to the source code of this file.
Macros | |
#define | START_OF_PSD_METHODS() |
Functions | |
void | psd_cloudice_MH97 (Vector &psd, const Vector &diameter, const Numeric &iwc, const Numeric &t, const bool noisy) |
The MH97 cloud ice PSD. More... | |
void | psd_mgd_mass_and_something (Matrix &psd_data, Tensor3 &dpsd_data_dx, const String &something, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &) |
Code common to MGD PSD involving the integrated mass. More... | |
void | psd_mono_common (Matrix &psd_data, Tensor3 &dpsd_data_dx, const String &type, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const ArrayOfArrayOfScatteringMetaData &scat_meta, const Index &species_index, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &) |
Code common to PSDs of mono type. More... | |
void | psd_rain_W16 (Vector &psd, const Vector &diameter, const Numeric &rwc) |
The Wang16 rain DSD DEPRECATED BY NEW MGD_SMM_COMMON Only included for compatibility with "old" pnd_fieldCalcFromscat_speciesField. More... | |
void | psd_mgd_smm_common (Matrix &psd_data, Tensor3 &dpsd_data_dx, const String &psd_name, const Vector &psd_size_grid, const Vector &pnd_agenda_input_t, const Matrix &pnd_agenda_input, const ArrayOfString &pnd_agenda_input_names, const ArrayOfString &dpnd_data_dx_names, const Numeric &scat_species_a, const Numeric &scat_species_b, const Numeric &n_alpha_in, const Numeric &n_b_in, const Numeric &mu_in, const Numeric &gamma_in, const Numeric &t_min, const Numeric &t_max, const Index &picky, const Verbosity &) |
Code common to a number of modified gamma PSDs used with single-moment mass schemes. More... | |
void | psd_snow_F07 (Vector &psd, const Vector &diameter, const Numeric &swc, const Numeric &t, const Numeric alpha, const Numeric beta, const String ®ime) |
The F07 snow PSD. More... | |
void | psd_SB06 (Vector &psd, Matrix &dpsd, const Vector &mass, const Numeric &N_tot, const Numeric &WC, const String &hydrometeor_type) |
void | psd_MY05 (Vector &psd, Matrix &dpsd, const Vector &diameter_max, const Numeric N_tot, const Numeric WC, const String psd_type) |
Numeric | dm_from_iwc_n0 (Numeric iwc, Numeric n0, Numeric rho) |
Derives Dm from IWC and N0star. More... | |
Numeric | n0_from_iwc_dm (Numeric iwc, Numeric dm, Numeric rho) |
Derives N0star from IWC and Dm. More... | |
Numeric | n0_from_t (Numeric t) |
Sets N0star based on temperature. More... | |
Sets N0star based on temperature.
For definition of N0star follows the DARDAR PSD.
This a priori parameterisation is taken from Table 5 in "Normalized particle size distribution for remote sensing application" by Delanoƫ et al., JGR, 2014.
[in] | t | temperature |
void psd_cloudice_MH97 | ( | Vector & | psd, |
const Vector & | diameter, | ||
const Numeric & | iwc, | ||
const Numeric & | t, | ||
const bool | noisy | ||
) |
The MH97 cloud ice PSD.
Handles a vector of sizes at a time. Implicitly assumes particles of water ice. Strictly requires IWC and T to be positive, i.e. calling method needs to ensure this.
[out] | psd | particle number density per size interval [#/m3*m] |
[in] | diameter | size of the scattering elements (supposed to be mass (aka volume) equivalent diameter of pure ice particle) [m] |
[in] | iwc | atmospheric ice water content [kg/m3] |
t | atmospheric temperature [K] | |
noisy | flag whether to add noise onto PSD parameters according to their reported error statistics |
Definition at line 58 of file psd.cc.
References a1, b1, b2, DENSITY_OF_ICE, ARTS::Var::mc_seed(), min, ConstVectorView::nelem(), PI, pow(), ran_gaussian(), Vector::resize(), Rng::seed(), sqrt(), and ARTS::Var::time().
Referenced by psdMcFarquaharHeymsfield97().
void psd_mgd_mass_and_something | ( | Matrix & | psd_data, |
Tensor3 & | dpsd_data_dx, | ||
const String & | something, | ||
const Vector & | psd_size_grid, | ||
const Vector & | pnd_agenda_input_t, | ||
const Matrix & | pnd_agenda_input, | ||
const ArrayOfString & | pnd_agenda_input_names, | ||
const ArrayOfString & | dpnd_data_dx_names, | ||
const Numeric & | scat_species_a, | ||
const Numeric & | scat_species_b, | ||
const Numeric & | n0, | ||
const Numeric & | mu, | ||
const Numeric & | la, | ||
const Numeric & | ga, | ||
const Numeric & | t_min, | ||
const Numeric & | t_max, | ||
const Index & | picky, | ||
const Verbosity & | |||
) |
Code common to MGD PSD involving the integrated mass.
Valid choices for something is "mean size", "median size", "mean particle mass" and "Ntot".
[out] | psd_data | As the WSV wih same name |
[out] | dpsd_data_dx | As the WSV wih same name |
[in] | something | Text string gving the second moment |
[in] | psd_size_grid | As the WSV wih same name |
[in] | pnd_agenda_input_t | As the WSV wih same name |
[in] | pnd_agenda_input | As the WSV wih same name |
[in] | pnd_agenda_input_names | As the WSV wih same name |
[in] | dpnd_data_dx_names | As the WSV wih same name |
[in] | scat_species_a | As the WSV wih same name |
[in] | scat_species_b | As the WSV wih same name |
[in] | n0 | Selection for N0 parameter |
[in] | mu | Selection for mu parameter |
[in] | la | Selection for lambda parameter |
[in] | ga | Selection for gamma parameter |
[in] | t_min | PSD set to zero below this temperature |
[in] | t_max | PSD set to zero above this temperature |
[in] | picky | Triggers more check of input |
Definition at line 195 of file psd.cc.
References ARTS::Var::dpsd_data_dx(), joker, mgd_with_derivatives(), ARTS::Var::pnd_agenda_input(), ARTS::Var::pnd_agenda_input_t(), pow(), ARTS::Var::psd_data(), ARTS::Var::psd_size_grid(), ARTS::Var::scat_species_a(), ARTS::Var::scat_species_b(), and START_OF_PSD_METHODS.
Referenced by psdModifiedGammaMassMeanParticleMass(), psdModifiedGammaMassNtot(), psdModifiedGammaMassXmean(), and psdModifiedGammaMassXmedian().
void psd_mgd_smm_common | ( | Matrix & | psd_data, |
Tensor3 & | dpsd_data_dx, | ||
const String & | psd_name, | ||
const Vector & | psd_size_grid, | ||
const Vector & | pnd_agenda_input_t, | ||
const Matrix & | pnd_agenda_input, | ||
const ArrayOfString & | pnd_agenda_input_names, | ||
const ArrayOfString & | dpnd_data_dx_names, | ||
const Numeric & | scat_species_a, | ||
const Numeric & | scat_species_b, | ||
const Numeric & | n_alpha_in, | ||
const Numeric & | n_b_in, | ||
const Numeric & | mu_in, | ||
const Numeric & | gamma_in, | ||
const Numeric & | t_min, | ||
const Numeric & | t_max, | ||
const Index & | picky, | ||
const Verbosity & | |||
) |
Code common to a number of modified gamma PSDs used with single-moment mass schemes.
All PSDs take the form n(D) = n_alpha lam^n_b D^mu exp(-lam*D^gamma).
[out] | psd_data | As the WSV wih same name |
[out] | dpsd_data_dx | As the WSV wih same name |
[in] | psd_name | Name of selected PSD |
[in] | psd_size_grid | As the WSV wih same name |
[in] | pnd_agenda_input_t | As the WSV wih same name |
[in] | pnd_agenda_input | As the WSV wih same name |
[in] | pnd_agenda_input_names | As the WSV wih same name |
[in] | dpnd_data_dx_names | As the WSV wih same name |
[in] | scat_species_a | As the WSV wih same name |
[in] | scat_species_b | As the WSV wih same name |
[in] | t_min | PSD set to zero below this temperature |
[in] | t_max | PSD set to zero above this temperature |
[in] | n_alpha_in | Value of n_alpha for psd_name "generic" |
[in] | n_b_in | Value of n_b for psd_name "generic" |
[in] | mu_in | Value of mu for psd_name "generic" |
[in] | gamma_in | Value of gamma for psd_name "generic" |
[in] | picky | Triggers more check of input |
Definition at line 727 of file psd.cc.
References ARTS::Var::pnd_agenda_input(), ARTS::Var::pnd_agenda_input_t(), ARTS::Var::scat_species_a(), ARTS::Var::scat_species_b(), and START_OF_PSD_METHODS.
Referenced by psdAbelBoutle12(), psdFieldEtAl19(), psdModifiedGammaMassSingleMoment(), and psdWangEtAl16().
void psd_mono_common | ( | Matrix & | psd_data, |
Tensor3 & | dpsd_data_dx, | ||
const String & | type, | ||
const Vector & | pnd_agenda_input_t, | ||
const Matrix & | pnd_agenda_input, | ||
const ArrayOfString & | pnd_agenda_input_names, | ||
const ArrayOfString & | dpnd_data_dx_names, | ||
const ArrayOfArrayOfScatteringMetaData & | scat_meta, | ||
const Index & | species_index, | ||
const Numeric & | t_min, | ||
const Numeric & | t_max, | ||
const Index & | picky, | ||
const Verbosity & | |||
) |
Code common to PSDs of mono type.
[out] | psd_data | As the WSV wih same name |
[out] | dpsd_data_dx | As the WSV wih same name |
[in] | pnd_agenda_input_t | As the WSV wih same name |
[in] | pnd_agenda_input | As the WSV wih same name |
[in] | pnd_agenda_input_names | As the WSV wih same name |
[in] | dpnd_data_dx_names | As the WSV wih same name |
[in] | scat_meta | As the WSV wih same name |
[in] | species_index | Index of the scattering species of concern |
[in] | t_min | PSD set to zero below this temperature |
[in] | t_max | PSD set to zero above this temperature |
[in] | picky | Triggers more check of input |
Definition at line 606 of file psd.cc.
References ARTS::Var::dpsd_data_dx(), Absorption::nelem(), ARTS::Var::pnd_agenda_input(), ARTS::Var::pnd_agenda_input_t(), ARTS::Var::psd_data(), ARTS::Var::psd_size_grid(), ARTS::Var::scat_meta(), START_OF_PSD_METHODS, and ARTS::Var::x().
Referenced by psdMonoDispersive(), and psdMonoMass().
void psd_MY05 | ( | Vector & | psd, |
Matrix & | dpsd, | ||
const Vector & | diameter_max, | ||
const Numeric | N_tot, | ||
const Numeric | WC, | ||
const String | psd_type | ||
) |
Calculates the particle number density field according to the Milbrandt and Yau two moment scheme, which is used in the GEM model. See also milbrandt and yau, 2005. One call of this function calculates one particle number density.
mass | Mass of scattering particle [kg] |
N_tot | Total number of particles (0th moment) [#/m3/m/kg^mu] |
M | Total mass concentration of Particles (1st moment) [kg/m^3] |
psd_type | string with a tag defining the (hydrometeor) scheme |
Definition at line 1118 of file psd.cc.
References temp.
Referenced by psdMilbrandtYau05().
The Wang16 rain DSD DEPRECATED BY NEW MGD_SMM_COMMON Only included for compatibility with "old" pnd_fieldCalcFromscat_speciesField.
Uses rain water water content. PSD follows an exponential distribution. Handles a vector of sizes at a time.
Reference: Wang et al., 2016, "Investigation of liquid cloud microphysical properties of deep convective systems: 1. Parameterization raindrop size distribution and its application for stratiform rain estimation". Ported from CloudArts matlab implementation.
[out] | psd | particle number density per size interval [#/m3*m] |
[in] | diameter | size of the scattering elements (volume equivalent diameter) [m] |
[in] | rwc | atmospheric rain water content [kg/m3] |
Definition at line 699 of file psd.cc.
References DENSITY_OF_WATER, ConstVectorView::nelem(), PI, pow(), and Vector::resize().
void psd_SB06 | ( | Vector & | psd, |
Matrix & | dpsd, | ||
const Vector & | mass, | ||
const Numeric & | N_tot, | ||
const Numeric & | WC, | ||
const String & | hydrometeor_type | ||
) |
Calculates the particle number density field according to the two moment scheme of Seifert and Beheng, 2006b,a that is used in the ICON model. One call of this function calculates one particle number density.
mass | Mass of scattering particle [kg] |
N_tot | Total number of particles (0th moment) [#/m3/m/kg^mu] |
M | Total mass concentration of Particles (1st moment) [kg/m^3] |
psd_type | string with a tag defining the (hydrometeor) scheme |
Definition at line 977 of file psd.cc.
Referenced by psdSeifertBeheng06().
void psd_snow_F07 | ( | Vector & | psd, |
const Vector & | diameter, | ||
const Numeric & | swc, | ||
const Numeric & | t, | ||
const Numeric | alpha, | ||
const Numeric | beta, | ||
const String & | regime | ||
) |
The F07 snow PSD.
Handles a vector of sizes at a time. Strictly requires SWC and T to be positive and regime to be either "TR" or "ML", i.e. calling methods need to ensure these. No further limitations on the allowed temperatures here. Strictly valid it's only within -60<=t<=0C, the measured t-range the parametrization is based on. However, this is left to be handled by the calling methods.
[out] | psd | particle number density per size interval [#/m3*m] |
[in] | diameter | size of the scattering elements (supposed to be maximum diameter of the ice particles) [m] |
[in] | swc | atmospheric snow water content [kg/m^3] |
[in] | t | atmospheric temperature [K] |
[in] | alpha | mass-dimension relationship scaling factor (m=alpha*(Dmax/D0)^beta) [kg] |
[in] | beta | mass-dimension relationship exponent [-] |
[in] | regime | parametrization regime to apply (TR=tropical, ML=midlatitude) |