ARTS
2.2.66
|
Internal functions for scattering calculations. More...
#include "cloudbox.h"
#include <stdexcept>
#include <cmath>
#include <algorithm>
#include <limits>
#include "arts.h"
#include "messages.h"
#include "make_vector.h"
#include "logic.h"
#include "ppath.h"
#include "physics_funcs.h"
#include "math_funcs.h"
#include "check_input.h"
#include "rng.h"
#include <ctime>
#include "mc_antenna.h"
#include "sorting.h"
#include "lin_alg.h"
Go to the source code of this file.
Functions | |
void | chk_massdensity_field (bool &empty_flag, const Index &dim, const Tensor3 &massdensity, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid) |
Check whether hydromet grid size is equal to atmospheric grid size and if hydromet profile is zero (no cloud) in each grid point. More... | |
void | chk_if_pnd_zero_p (const Index &i_p, const GriddedField3 &pnd_field_raw, const String &pnd_field_file, const Verbosity &verbosity) |
Check whether particle number density is zero at a specified pressure level. More... | |
void | chk_if_pnd_zero_lat (const Index &i_lat, const GriddedField3 &pnd_field_raw, const String &pnd_field_file, const Verbosity &verbosity) |
Check whether particle number density is zero at a specified latitude. More... | |
void | chk_if_pnd_zero_lon (const Index &i_lon, const GriddedField3 &pnd_field_raw, const String &pnd_field_file, const Verbosity &verbosity) |
Check whether particle number density is zero at a specified longitude. More... | |
void | chk_pnd_data (const GriddedField3 &pnd_field_raw, const String &pnd_field_file, const Index &atmosphere_dim, const Verbosity &verbosity) |
Check particle number density files. More... | |
void | chk_pnd_raw_data (const ArrayOfGriddedField3 &pnd_field_raw, const String &pnd_field_file, const Index &atmosphere_dim, const Verbosity &verbosity) |
Check particle number density files (pnd_field_raw) More... | |
void | chk_pnd_field_raw_only_in_cloudbox (const Index &dim, const ArrayOfGriddedField3 &pnd_field_raw, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, const ArrayOfIndex &cloudbox_limits) |
chk_pnd_field_raw_only_in_cloudbox More... | |
void | chk_part_species (const ArrayOfString &part_species, const String &delim) |
Check validity of part_species setting. More... | |
void | chk_scattering_data (const ArrayOfSingleScatteringData &scat_data_array, const ArrayOfScatteringMetaData &scat_meta_array, const Verbosity &) |
Check scattering data general. More... | |
void | chk_scattering_meta_data (const ScatteringMetaData &scat_meta, const String &scat_meta_file, const Verbosity &verbosity) |
Check scattering data meta files. More... | |
void | chk_scat_data (const SingleScatteringData &scat_data_array, const String &scat_data_file, ConstVectorView f_grid, const Verbosity &verbosity) |
Check single scattering data files. More... | |
bool | is_gp_inside_cloudbox (const GridPos &gp_p, const GridPos &gp_lat, const GridPos &gp_lon, const ArrayOfIndex &cloudbox_limits, const bool &include_boundaries, const Index &atmosphere_dim) |
bool | is_inside_cloudbox (const Ppath &ppath_step, const ArrayOfIndex &cloudbox_limits, const bool include_boundaries) |
void | pnd_fieldMH97 (Tensor4View pnd_field, const Tensor3 &IWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldH11 (Tensor4View pnd_field, const Tensor3 &IWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldH13 (Tensor4View pnd_field, const Tensor3 &IWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldH13Shape (Tensor4View pnd_field, const Tensor3 &IWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldF07TR (Tensor4View pnd_field, const Tensor3 &SWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldF07ML (Tensor4View pnd_field, const Tensor3 &SWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldMGD_LWC (Tensor4View pnd_field, const Tensor3 &LWC_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldMGD_IWC (Tensor4View pnd_field, const Tensor3 &IWC_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldGM58 (Tensor4View pnd_field, const Tensor3 &PR_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldSS70 (Tensor4View pnd_field, const Tensor3 &PR_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldMP48 (Tensor4View pnd_field, const Tensor3 &PR_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
void | pnd_fieldH98 (Tensor4View pnd_field, const Tensor3 &LWC_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity) |
Numeric | IWCtopnd_MH97 (const Numeric iwc, const Numeric dm, const Numeric t, const Numeric density, const bool noisy) |
Numeric | IWCtopnd_H11 (const Numeric d, const Numeric t) |
Numeric | IWCtopnd_H13 (const Numeric d, const Numeric t) |
Numeric | IWCtopnd_H13Shape (const Numeric d, const Numeric t) |
Numeric | area_ratioH13 (const Numeric d, const Numeric t) |
Numeric | IWCtopnd_F07TR (const Numeric d, const Numeric t, const Numeric swc, const Numeric alpha, const Numeric beta) |
Numeric | IWCtopnd_F07ML (const Numeric d, const Numeric t, const Numeric swc, const Numeric alpha, const Numeric beta) |
Numeric | LWCtopnd (const Numeric lwc, const Numeric density, const Numeric r) |
Numeric | LWCtopnd2 (const Numeric r) |
Numeric | LWCtopnd_MGD_LWC (const Numeric d, const Numeric rho, const Numeric lwc) |
Numeric | IWCtopnd_MGD_IWC (const Numeric d, const Numeric rho, const Numeric iwc) |
Numeric | PRtopnd_MP48 (const Numeric R, const Numeric D) |
void | scale_pnd (Vector &w, const Vector &x, const Vector &y) |
void | chk_pndsum (Vector &pnd, const Numeric xwc, const Vector &vol, const Vector &density, const Index &p, const Index &lat, const Index &lon, const String &partfield_name, const Verbosity &verbosity) |
void | scale_H11 (Vector &pnd, const Numeric xwc, const Vector &density, const Vector &vol) |
void | scale_H13 (Vector &pnd, const Numeric xwc, const Vector &density, const Vector &vol) |
void | parse_partfield_name (String &partfield_name, const String &part_string, const String &delim) |
void | parse_psd_param (String &psd_param, const String &part_string, const String &delim) |
void | parse_part_material (String &part_material, const String &part_string, const String &delim) |
void | parse_part_size (Numeric &sizemin, Numeric &sizemax, const String &part_string, const String &delim) |
Variables | |
const Index | GFIELD3_P_GRID |
const Index | GFIELD3_LAT_GRID |
const Index | GFIELD3_LON_GRID |
const Numeric | PI |
Internal functions for scattering calculations.
Definition in file cloudbox.cc.
Calculates area ratio from the temperature and maximum diameter using H13 parametrization. Each diameter of the scattering particles is a node in the aspect ratio distribution. One call of this function calculates one aspect ratio.
d | maximum diameter of scattering particle [m] |
t | atmospheric temperature [K] |
Definition at line 3078 of file cloudbox.cc.
References beta.
Referenced by dN_Ar_H13(), and pnd_fieldH13Shape().
void chk_if_pnd_zero_lat | ( | const Index & | i_lat, |
const GriddedField3 & | pnd_field_raw, | ||
const String & | pnd_field_file, | ||
const Verbosity & | verbosity | ||
) |
Check whether particle number density is zero at a specified latitude.
i_lat | Latitude index |
pnd_field_raw | Particle number density data |
pnd_field_file | pnd field filename |
Definition at line 193 of file cloudbox.cc.
References CREATE_OUT1, GriddedField3::data, GriddedField::get_numeric_grid(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, and ConstVectorView::nelem().
void chk_if_pnd_zero_lon | ( | const Index & | i_lon, |
const GriddedField3 & | pnd_field_raw, | ||
const String & | pnd_field_file, | ||
const Verbosity & | verbosity | ||
) |
Check whether particle number density is zero at a specified longitude.
i_lon | Latitude index |
pnd_field_raw | Particle number density data |
pnd_field_file | pnd field filename |
Definition at line 241 of file cloudbox.cc.
References CREATE_OUT1, GriddedField3::data, GriddedField::get_numeric_grid(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, and ConstVectorView::nelem().
void chk_if_pnd_zero_p | ( | const Index & | i_p, |
const GriddedField3 & | pnd_field_raw, | ||
const String & | pnd_field_file, | ||
const Verbosity & | verbosity | ||
) |
Check whether particle number density is zero at a specified pressure level.
i_p | Pressure index |
pnd_field_raw | Particle number density data |
pnd_field_file | pnd field filename |
Definition at line 145 of file cloudbox.cc.
References CREATE_OUT1, GriddedField3::data, GriddedField::get_numeric_grid(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, and ConstVectorView::nelem().
void chk_massdensity_field | ( | bool & | empty_flag, |
const Index & | dim, | ||
const Tensor3 & | massdensity, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid | ||
) |
Check whether hydromet grid size is equal to atmospheric grid size and if hydromet profile is zero (no cloud) in each grid point.
dim | atmosphere dimension |
hydromet | hydrometeor grid in p, lat or lon dimension |
p_grid | p grid of current atmosphere |
lat_grid | lat grid of current atmosphere |
lon_grid | lon grid of current atmosphere |
Definition at line 70 of file cloudbox.cc.
References ConstTensor3View::ncols(), ConstVectorView::nelem(), ConstTensor3View::npages(), and ConstTensor3View::nrows().
Referenced by cloudboxSetAutomatically().
void chk_part_species | ( | const ArrayOfString & | part_species, |
const String & | delim | ||
) |
Check validity of part_species setting.
This function checks, whether number of elements in each particle string is ok, and whether the entries for size limits are indeed numbers (or '*').
\param part_species Array of particle species tags.
delim | Delimiter string of part_species elements. |
Definition at line 480 of file cloudbox.cc.
References Array< base >::nelem().
Referenced by ParticleSpeciesSet().
void chk_pnd_data | ( | const GriddedField3 & | pnd_field_raw, |
const String & | pnd_field_file, | ||
const Index & | atmosphere_dim, | ||
const Verbosity & | verbosity | ||
) |
Check particle number density files.
This function checks, whether the particle number density file has the right atmospheric dimension (check for no non-zero pnd values outside cloudbox removed. done in pnd_fieldCalc).
pnd_field_raw | pnd field data |
pnd_field_file | pnd field filename |
atmosphere_dim | Atmospheric dimension |
Definition at line 294 of file cloudbox.cc.
References CREATE_OUT3, GriddedField::get_numeric_grid(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, and ConstVectorView::nelem().
Referenced by chk_pnd_raw_data(), ParticleType2abs_speciesAdd(), and ParticleTypeAdd().
void chk_pnd_field_raw_only_in_cloudbox | ( | const Index & | dim, |
const ArrayOfGriddedField3 & | pnd_field_raw, | ||
ConstVectorView | p_grid, | ||
ConstVectorView | lat_grid, | ||
ConstVectorView | lon_grid, | ||
const ArrayOfIndex & | cloudbox_limits | ||
) |
chk_pnd_field_raw_only_in_cloudbox
Checks whether the pnd_field is zero outside the cloudbox. This is of a higher level than chk_pnd_data because it does not require any filename and because it works on all pnd_field_raw rather than just one element. Otherwise, it is mostly a new implementation of the same functionality.
dim | The atmospheric dimensionality. |
pnd_field_raw | All pnd_field_raw data. |
p_grid | Pressure grid. |
lat_grid | Latitude grid. |
lon_grid | Longitude grid. |
cloudbox_limits | The edges of the cloudbox. |
Definition at line 390 of file cloudbox.cc.
References GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, and Array< base >::nelem().
Referenced by pnd_fieldCalc().
void chk_pnd_raw_data | ( | const ArrayOfGriddedField3 & | pnd_field_raw, |
const String & | pnd_field_file, | ||
const Index & | atmosphere_dim, | ||
const Verbosity & | verbosity | ||
) |
Check particle number density files (pnd_field_raw)
pnd_field_raw | pnd field raw data (array for all particle types) |
pnd_field_file | pnd field filename |
atmosphere_dim | Atmospheric dimension |
Definition at line 352 of file cloudbox.cc.
References chk_pnd_data(), CREATE_OUT3, and Array< base >::nelem().
Referenced by ParticleTypeAddAll().
void chk_pndsum | ( | Vector & | pnd, |
const Numeric | xwc, | ||
const Vector & | vol, | ||
const Vector & | density, | ||
const Index & | p, | ||
const Index & | lat, | ||
const Index & | lon, | ||
const String & | partfield_name, | ||
const Verbosity & | verbosity | ||
) |
Check sum of pnd vector against total mass density value. Deviation is calculated and used to adjust the output of vector pnd.
\param pnd particle number density [#/m3] \param xwc atmospheric massdensity [kg/m3] \param density scattering particle density [kg/m3] \param vol scattering particle volume [m3]
Definition at line 3517 of file cloudbox.cc.
References CREATE_OUT1, CREATE_OUT2, ConstVectorView::nelem(), and ConstVectorView::sum().
Referenced by pnd_fieldF07ML(), pnd_fieldF07TR(), pnd_fieldGM58(), pnd_fieldH11(), pnd_fieldH13(), pnd_fieldH13Shape(), pnd_fieldH98(), pnd_fieldMGD_IWC(), pnd_fieldMGD_LWC(), pnd_fieldMH97(), pnd_fieldMP48(), pnd_fieldSS70(), and pndFromdN().
void chk_scat_data | ( | const SingleScatteringData & | scat_data_array, |
const String & | scat_data_file, | ||
ConstVectorView | f_grid, | ||
const Verbosity & | verbosity | ||
) |
Check single scattering data files.
This function checks, whether a datafile containing the single scattering properties of a particle type includes the required frequencies and temperatures and whether the angular grids are defined correctly. Furthermore it checks the self consistency of the data by checking the dimensions of pha_mat, ext_mat and abs_vec depending on the particle_type case.
scat_data_array | Single scattering data |
scat_data_file | Filename of the data to be checked. |
f_grid | Frequency grid |
Definition at line 605 of file cloudbox.cc.
References SingleScatteringData::aa_grid, SingleScatteringData::abs_vec_data, chk_interpolation_grids(), chk_size(), CREATE_OUT2, SingleScatteringData::ext_mat_data, SingleScatteringData::f_grid, last(), ConstVectorView::nelem(), SingleScatteringData::particle_type, PARTICLE_TYPE_GENERAL, PARTICLE_TYPE_HORIZ_AL, PARTICLE_TYPE_MACROS_ISO, PARTICLE_TYPE_SPHERICAL, SingleScatteringData::pha_mat_data, SingleScatteringData::T_grid, and SingleScatteringData::za_grid.
Referenced by ParticleType2abs_speciesAdd(), ParticleTypeAdd(), ParticleTypeAddAll(), and ScatteringParticleTypeAndMetaRead().
void chk_scattering_data | ( | const ArrayOfSingleScatteringData & | scat_data_array, |
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Verbosity & | |||
) |
Check scattering data general.
FIXME
scat_data_array | Array of single scattering data |
scat_meta_array | Array of scattering meta data |
Definition at line 541 of file cloudbox.cc.
References Array< base >::nelem().
Referenced by ScatteringParticleTypeAndMetaRead().
void chk_scattering_meta_data | ( | const ScatteringMetaData & | scat_meta, |
const String & | scat_meta_file, | ||
const Verbosity & | verbosity | ||
) |
Check scattering data meta files.
FIXME
scat_meta | scattering meta data |
scat_meta_file | filename of the data to be checked |
Definition at line 567 of file cloudbox.cc.
References CREATE_OUT2.
Referenced by ScatteringParticleTypeAndMetaRead().
bool is_gp_inside_cloudbox | ( | const GridPos & | gp_p, |
const GridPos & | gp_lat, | ||
const GridPos & | gp_lon, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const bool & | include_boundaries, | ||
const Index & | atmosphere_dim | ||
) |
Checks, whether a gridpoint is inside the cloudbox.
gp_p | pressure GridPos |
gp_lat | latitude GridPos |
gp_lon | longitude GridPos |
cloudbox_limits | The limits of the cloudbox. |
include_boundaries | boolean: determines whther or not points on the boundary are considered to be inside the cloudbox. |
Definition at line 808 of file cloudbox.cc.
References fractional_gp().
Referenced by get_ppath_ext(), is_inside_cloudbox(), iy_auxFillParticleVariables(), mcPathTraceGeneral(), and mcPathTraceIPA().
bool is_inside_cloudbox | ( | const Ppath & | ppath_step, |
const ArrayOfIndex & | cloudbox_limits, | ||
const bool | include_boundaries | ||
) |
Checks, whether the last point of a propagation path is inside the cloudbox.
Works only for 3D !!!
ppath_step | Propagation path step. |
cloudbox_limits | The limits of the cloudbox. |
include_boundaries | boolean: determines whther or not points on the boundary are considered to be inside the cloudbox. |
Definition at line 892 of file cloudbox.cc.
References Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, is_gp_inside_cloudbox(), Array< base >::nelem(), and Ppath::np.
Referenced by cloud_ppath_update3D(), mcPathTraceGeneral(), and mcPathTraceIPA().
Numeric IWCtopnd_F07ML | ( | const Numeric | d, |
const Numeric | t, | ||
const Numeric | swc, | ||
const Numeric | alpha, | ||
const Numeric | beta | ||
) |
Calculates particle size distribution using F07 parametrization for mid latitude. Each diameter of the scattering particles is a node in the distribution. One call of this function calculates one particle number density.
d | maximum diameter of scattering particle [m] |
t | atmospheric temperature [K] |
swc | snow water content [kg/m^3] |
alpha | Factor for the mass-dimension (m=alpha*(Dmax/D0)^beta) relationship [kg] |
beta | Exponent for the mass-dimension relationship [pure number] |
Definition at line 3215 of file cloudbox.cc.
Referenced by dN_F07ML(), and pnd_fieldF07ML().
Numeric IWCtopnd_F07TR | ( | const Numeric | d, |
const Numeric | t, | ||
const Numeric | swc, | ||
const Numeric | alpha, | ||
const Numeric | beta | ||
) |
Calculates particle size distribution using F07 parametrization for tropics. Each diameter of the scattering particles is a node in the distribution. One call of this function calculates one particle number density.
d | maximum diameter of scattering particle [m] |
t | atmospheric temperature [K] |
swc | snow water content [kg/m^3] |
alpha | Factor for the mass-dimension (m=alpha*(Dmax/D0)^beta) relationship [kg] |
beta | Exponent for the mass-dimension relationship [pure number] |
Definition at line 3121 of file cloudbox.cc.
Referenced by dN_F07TR(), and pnd_fieldF07TR().
Calculates particle size distribution using H11 parametrization. Each diameter of the scattering particles is a node in the distribution. One call of this function calculates one particle number density.
d | maximum diameter of scattering particle [m] |
t | atmospheric temperature [K] |
Definition at line 2921 of file cloudbox.cc.
Referenced by dN_H11(), and pnd_fieldH11().
Calculates particle size distribution using H13 parametrization. Each diameter of the scattering particles is a node in the distribution. One call of this function calculates one particle number density.
d | maximum diameter of scattering particle [m] |
t | atmospheric temperature [K] |
Definition at line 2972 of file cloudbox.cc.
Referenced by pnd_fieldH13().
Calculates particle size distribution using H13 parametrization. Each diameter of the scattering particles is a node in the distribution. One call of this function calculates one particle number density.
d | maximum diameter of scattering particle [m] |
t | atmospheric temperature [K] |
Definition at line 3025 of file cloudbox.cc.
Referenced by dN_Ar_H13(), and pnd_fieldH13Shape().
Calculates the particle number density field for Cloud ice according the modified gamma distribution for cloud ice inside Geer and Baordo (2014), see table A1 One call of this function calculates one particle number density. Assumptions are: density of particles is constant and particle shape is sphere.
d | volume equivalent diameter of scattering particle [m] |
iwc | ice water content [kg/m^3] |
Definition at line 3402 of file cloudbox.cc.
Referenced by dN_MGD_IWC(), and pnd_fieldMGD_IWC().
Numeric IWCtopnd_MH97 | ( | const Numeric | iwc, |
const Numeric | dm, | ||
const Numeric | t, | ||
const Numeric | density, | ||
const bool | noisy | ||
) |
Calculates particle size distribution using MH97 parametrization. Each diameter of the scattering particles is a node in the distribution. One call of this function calculates one particle number density.
iwc | atmospheric ice water content [kg/m3] |
dm | melted diameter of scattering particle [m] |
t | atmospheric temperature [K] |
density | of the scattering particle [kg/m3] |
perturb | PSD parameters according to their error statistics? |
Definition at line 2755 of file cloudbox.cc.
References gamma_func(), min, PI, ran_gaussian(), and Rng::seed().
Referenced by dN_MH97(), and pnd_fieldMH97().
Calculates particle size distribution for liquid water clouds using a gamma parametrization by Hess et al., 1998 (continental stratus). Each radius of the scattering particles is a node in the distribution. One call of this function calculates one particle number density.
\return n particle number density per radius interval [#/m3*m] \param lwc atm
ospheric liquid water content [kg/m3]
r | radius of scattering particle [m] |
Definition at line 3305 of file cloudbox.cc.
References gamma_func(), and PI.
Referenced by dN_H98(), and pnd_fieldH98().
Definition at line 3331 of file cloudbox.cc.
References gamma_func().
Calculates the particle number density field for Cloud liquid water according the modified gamma distribution for cloud water inside Geer and Baordo (2014), see table A1 One call of this function calculates one particle number density. Assumptions are: density of particles is constant and particle shape is sphere.
d | volume equivalent diameter of scattering particle [m] |
lwc | liquid water content [kg/m^3] |
Definition at line 3363 of file cloudbox.cc.
Referenced by dN_MGD_LWC(), and pnd_fieldMGD_LWC().
void parse_part_material | ( | String & | part_material, |
const String & | part_string, | ||
const String & | delim | ||
) |
Splitting part_species string and parse type of particle (from ScattData array)
\param part_type particle type (material, phase). \param part_string containing infos about scattering particle calculations
delim | Delimiter string of part_species elements |
Definition at line 3793 of file cloudbox.cc.
References my_basic_string< charT >::split().
Referenced by pnd_fieldSetup(), and ScatteringParticlesSelect().
void parse_part_size | ( | Numeric & | sizemin, |
Numeric & | sizemax, | ||
const String & | part_string, | ||
const String & | delim | ||
) |
Splitting part_species string and parse min and max particle radius
sizemin | min scattering particle radius |
sizemax | max scattering particle radius |
part_string | containing infos about scattering particle calculations |
delim | Delimiter string of part_species elements |
Definition at line 3830 of file cloudbox.cc.
References Array< base >::nelem(), and my_basic_string< charT >::split().
Referenced by ScatteringParticlesSelect().
void parse_partfield_name | ( | String & | partfield_name, |
const String & | part_string, | ||
const String & | delim | ||
) |
Splitting part_species string and parse type of massdensity_field
\param partfield_name name of atmospheric particle field \param part_string containing infos about scattering particle calculations
delim | Delimiter string of part_species elements |
Definition at line 3700 of file cloudbox.cc.
References my_basic_string< charT >::split().
Referenced by AtmFieldsFromCompact(), pnd_fieldF07ML(), pnd_fieldF07TR(), pnd_fieldGM58(), pnd_fieldH11(), pnd_fieldH13(), pnd_fieldH13Shape(), pnd_fieldH98(), pnd_fieldMGD_IWC(), pnd_fieldMGD_LWC(), pnd_fieldMH97(), pnd_fieldMP48(), pnd_fieldSetup(), pnd_fieldSS70(), and ScatteringParticlesSelect().
Splitting part_species string and parse psd_param
psd_param | particle size distribution parametrization |
part_string | containing infos about scattering particle calculations |
delim | Delimiter string of part_species elements |
Definition at line 3749 of file cloudbox.cc.
References my_basic_string< charT >::split().
Referenced by pnd_fieldMH97(), and pnd_fieldSetup().
void pnd_fieldF07ML | ( | Tensor4View | pnd_field, |
const Tensor3 & | SWC_field, | ||
const Tensor3 & | t_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Field (2007) size distribution for mid latitude. For the estimation of the second moment the mass dimension relationship is estimated by regression from the meta data. To be used for snow. For this distribution the snow has to be as mass content.
pnd_field | Particle number density field |
SWC_field | (snow) mass content field [kg/m3] |
t_field | atmospheric temperature [K] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 1674 of file cloudbox.cc.
References beta, chk_pndsum(), CREATE_OUT2, dmax, get_sorted_indexes(), IWCtopnd_F07ML(), linreg(), parse_partfield_name(), q, and scale_pnd().
Referenced by pnd_fieldSetup().
void pnd_fieldF07TR | ( | Tensor4View | pnd_field, |
const Tensor3 & | SWC_field, | ||
const Tensor3 & | t_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Field (2007) size distribution for tropics. For the estimation of the second moment the mass dimension relationship is estimated by regression from the meta data. To be used for snow. For this distribution the snow has to be as mass content.
pnd_field | Particle number density field |
SWC_field | (snow) mass content field [kg/m3] |
t_field | atmospheric temperature [K] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 1517 of file cloudbox.cc.
References beta, chk_pndsum(), CREATE_OUT2, dmax, get_sorted_indexes(), IWCtopnd_F07TR(), linreg(), parse_partfield_name(), q, and scale_pnd().
Referenced by pnd_fieldSetup().
void pnd_fieldGM58 | ( | Tensor4View | pnd_field, |
const Tensor3 & | PR_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Gunn and Marshall (1958) size distribution. To be used for snow fall rates.
pnd_field | Particle number density field |
PR_field | precipitation rate field [kg/(m2*s)] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 2110 of file cloudbox.cc.
References chk_pndsum(), fac(), get_sorted_indexes(), ConstVectorView::nelem(), parse_partfield_name(), PI, and scale_pnd().
Referenced by pnd_fieldSetup().
void pnd_fieldH11 | ( | Tensor4View | pnd_field, |
const Tensor3 & | IWC_field, | ||
const Tensor3 & | t_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Heymsfield (2011, personal comm.) size distribution. To be used for atmospheric ice, particularly cloud ice and snow.
pnd_field | Particle number density field |
IWC_field | mass content (cloud ice or snow) field [kg/m3] |
t_field | atmospheric temperature [K] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 1045 of file cloudbox.cc.
References chk_pndsum(), get_sorted_indexes(), IWCtopnd_H11(), ConstVectorView::nelem(), parse_partfield_name(), and scale_pnd().
Referenced by pnd_fieldSetup().
void pnd_fieldH13 | ( | Tensor4View | pnd_field, |
const Tensor3 & | IWC_field, | ||
const Tensor3 & | t_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Heymsfield (2013, personal comm.) size distribution. To be used for atmospheric ice, particularly cloud ice and snow.
pnd_field | Particle number density field |
IWC_field | mass content (cloud ice or snow) field [kg/m3] |
t_field | atmospheric temperature [K] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 1165 of file cloudbox.cc.
References chk_pndsum(), get_sorted_indexes(), IWCtopnd_H13(), ConstVectorView::nelem(), parse_partfield_name(), and scale_pnd().
Referenced by pnd_fieldSetup().
void pnd_fieldH13Shape | ( | Tensor4View | pnd_field, |
const Tensor3 & | IWC_field, | ||
const Tensor3 & | t_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Heymsfield (2013, personal comm.) size distribution. To be used for atmospheric ice, particularly cloud ice and snow.
pnd_field | Particle number density field |
IWC_field | mass content (cloud ice or snow) field [kg/m3] |
t_field | atmospheric temperature [K] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 1303 of file cloudbox.cc.
References abs, area_ratioH13(), VectorView::begin(), chk_pndsum(), CREATE_OUT1, VectorView::end(), get_sorted_indexes(), IWCtopnd_H13Shape(), ConstVectorView::nelem(), parse_partfield_name(), and scale_pnd().
Referenced by pnd_fieldSetup().
void pnd_fieldH98 | ( | Tensor4View | pnd_field, |
const Tensor3 & | LWC_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Hess et al. (1998) size distribution, namely the continental stratus case. To be used for liquid clouds.
pnd_field | Particle number density field |
LWC_field | mass content (liquid water) field [kg/m3] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 2638 of file cloudbox.cc.
References chk_pndsum(), get_sorted_indexes(), LWCtopnd(), ConstVectorView::nelem(), parse_partfield_name(), PI, and scale_pnd().
Referenced by pnd_fieldSetup().
void pnd_fieldMGD_IWC | ( | Tensor4View | pnd_field, |
const Tensor3 & | IWC_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Cloud liquid water according to the modified gamma distribution for cloud water inside Geer and Baordo (2014), see table A1 Assumptions are: density of particles is constant and particle shape is sphere.
pnd_field | Particle number density field |
SWC_field | (snow) mass content field [kg/m3] |
t_field | atmospheric temperature [K] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 1970 of file cloudbox.cc.
References chk_pndsum(), get_sorted_indexes(), IWCtopnd_MGD_IWC(), max, min, ConstVectorView::nelem(), parse_partfield_name(), PI, scale_pnd(), and ConstVectorView::sum().
Referenced by pnd_fieldSetup().
void pnd_fieldMGD_LWC | ( | Tensor4View | pnd_field, |
const Tensor3 & | LWC_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Cloud liquid water according to the modified gamma distribution for cloud water inside Geer and Baordo (2014), see table A1 Assumptions are: density of particles is constant and particle shape is sphere.
pnd_field | Particle number density field |
SWC_field | (snow) mass content field [kg/m3] |
t_field | atmospheric temperature [K] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 1821 of file cloudbox.cc.
References chk_pndsum(), CREATE_OUT1, get_sorted_indexes(), LWCtopnd_MGD_LWC(), max, min, ConstVectorView::nelem(), parse_partfield_name(), PI, scale_pnd(), and ConstVectorView::sum().
Referenced by pnd_fieldSetup().
void pnd_fieldMH97 | ( | Tensor4View | pnd_field, |
const Tensor3 & | IWC_field, | ||
const Tensor3 & | t_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for McFarquhar and Heymsfield (1997) size distribution. To be used for cloud ice.
IWC_field | mass content (cloud ice) field [kg/m3] |
t_field | atmospheric temperature [K] |
limits | pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 924 of file cloudbox.cc.
References chk_pndsum(), get_sorted_indexes(), IWCtopnd_MH97(), ConstVectorView::nelem(), parse_partfield_name(), parse_psd_param(), PI, and scale_pnd().
Referenced by pnd_fieldSetup().
void pnd_fieldMP48 | ( | Tensor4View | pnd_field, |
const Tensor3 & | PR_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Marshall and Palmer (1948) size distribution. To be used for precipitation, particularly rain.
pnd_field | Particle number density field |
PR_field | precipitation rate field [kg/(m2*s)] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 2449 of file cloudbox.cc.
References abs, chk_pndsum(), fac(), get_sorted_indexes(), ConstVectorView::nelem(), parse_partfield_name(), PI, scale_pnd(), and ConstVectorView::sum().
Referenced by pnd_fieldSetup().
void pnd_fieldSS70 | ( | Tensor4View | pnd_field, |
const Tensor3 & | PR_field, | ||
const ArrayOfIndex & | limits, | ||
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const Index & | scat_data_start, | ||
const Index & | npart, | ||
const String & | part_string, | ||
const String & | delim, | ||
const Verbosity & | verbosity | ||
) |
Calculates the particle number density field for Sekhon and Srivastava (1970) size distribution. To be used for snow fall rates.
pnd_field | Particle number density field |
PR_field | precipitation rate field [kg/(m2*s)] \param limits pnd_field boundaries (indices in p, lat, lon) |
scat_meta_array | particle meta data for particles |
scat_data_start | start index for particles handled by this distribution |
npart | number of particles handled by this distribution |
part_string | part_species tag for profile/distribution handled here |
delim | Delimiter string of part_species elements |
Definition at line 2278 of file cloudbox.cc.
References chk_pndsum(), fac(), get_sorted_indexes(), ConstVectorView::nelem(), parse_partfield_name(), PI, and scale_pnd().
Referenced by pnd_fieldSetup().
Calculates particle size distribution using MP48 parametrization for rain. Each diameter of the scattering particles is a node in the distribution. One call of this function calculates one particle number density.
R | precipitation rate [mm/hr] |
D | volume equivalent diameter of scattering particle [m] |
Definition at line 3438 of file cloudbox.cc.
Referenced by dN_MP48().
The H11 PSD is scaled to the initial 'ice' or 'snow' massdensity, after the distribution has been evaluated. This function applies the scaling.
\param xwc atmospheric massdensity [kg/m3] \param density scattering particle density [kg/m3] \param vol scattering particle volume [m3]
Definition at line 3604 of file cloudbox.cc.
References ConstVectorView::nelem(), and ConstVectorView::sum().
The H13 PSD is scaled to the initial 'ice' or 'snow' massdensity, after the distribution has been evaluated. This function applies the scaling.
xwc | atmospheric massdensity [kg/m3] |
density | scattering particle density [kg/m3] |
vol | scattering particle volume [m3] |
Definition at line 3652 of file cloudbox.cc.
References ConstVectorView::nelem(), and ConstVectorView::sum().
Scaling pnd values by width of size bin. Bin width is determined from preceeding and following particle size. Vector y and x must be equal in size. Vector w holds the weights. Derived from trapezoid integration rule.
w | weights |
x | e.g. particle radius [m] |
y | e.g. particle number density per radies interval [#/m3*m] |
Definition at line 3469 of file cloudbox.cc.
References ConstVectorView::nelem(), and w().
Referenced by pnd_fieldF07ML(), pnd_fieldF07TR(), pnd_fieldGM58(), pnd_fieldH11(), pnd_fieldH13(), pnd_fieldH13Shape(), pnd_fieldH98(), pnd_fieldMGD_IWC(), pnd_fieldMGD_LWC(), pnd_fieldMH97(), pnd_fieldMP48(), pnd_fieldSS70(), and pndFromdN().
|
extern |
|
extern |
|
extern |
|
extern |
Referenced by calcSingleScatteringDataProperties(), faddeeva_algorithm_916(), hui_etal_1978_lineshape(), integrate_phamat_theta0_phi10(), integrate_phamat_theta0_phi_alpha6(), interp_scat_angle_temperature(), IWCtopnd_MH97(), lineshape_CO2_lorentz(), lineshape_doppler(), lineshape_lorentz(), lineshape_voigt_drayson(), lineshape_voigt_kuntz3(), lineshape_voigt_kuntz4(), lineshape_voigt_kuntz6(), LWCtopnd(), pnd_fieldGM58(), pnd_fieldH98(), pnd_fieldMGD_IWC(), pnd_fieldMGD_LWC(), pnd_fieldMH97(), pnd_fieldMP48(), pnd_fieldSS70(), scat_data_arrayFromMeta(), scat_meta_arrayAddTmatrix(), and scat_meta_arrayAddTmatrixOldVersion().