ARTS
2.4.0(git:4fb77825)
|
Internal cloudbox functions. 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.
Functions | |
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_scat_species (const ArrayOfString &scat_species, const String &delim) |
Check validity of scat_species setting. More... | |
void | chk_scattering_data (const ArrayOfSingleScatteringData &scat_data, const ArrayOfScatteringMetaData &scat_meta, const Verbosity &verbosity) |
Check scattering data general. More... | |
void | chk_scattering_meta_data (const ScatteringMetaData &scat_meta_single, const String &scat_meta_file, const Verbosity &verbosity) |
Check scattering data meta. More... | |
void | chk_scat_data (const SingleScatteringData &scat_data, const Verbosity &verbosity) |
Check single scattering data. 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=3) |
bool | is_inside_cloudbox (const Ppath &ppath_step, const ArrayOfIndex &cloudbox_limits, const bool include_boundaries) |
void | bin_quadweights (Vector &w, const Vector &x, const Index &order=1) |
void | chk_scat_species_field (bool &empty_flag, const Tensor3 &scat_species_field, const String &fieldname, const Index &dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid) |
Check whether field of a specific scattering species zero everywhere. More... | |
void | find_cloudlimits (Index &lower, Index &upper, const Tensor3 &scat_species_field, const Index &atmosphere_dim, const Numeric &cloudbox_margin) |
Adjust uppermost and lowermost cloudy level for one scat_species_*_*_field. More... | |
void | parse_atmcompact_speciestype (String &species_type, const String &field_name, const String &delim) |
void | parse_atmcompact_speciesname (String &species_name, const String &field_name, const String &delim) |
void | parse_atmcompact_scattype (String &scat_type, const String &field_name, const String &delim) |
void | parse_partfield_name (String &partfield_name, const String &part_string, const String &delim) |
Derives weights of a bin-type quadrature for arbitrary wide bins.
Note: Rectangular and trapezoidal rule essentially give the same weights when considering the same nodes x (not the mid-points between the nodes as rectangular is sometimes using) and limiting the quadrature range by the first and last node). Keyword order=0 calculates rectangular bins (ie bins extend beyond the first and last nodes), order=1 to trapezoidal bins (ie bins end exactly at nodes).
w | resulting weights at ordinates. |
x | ordinates. |
order | order of quadrature (see above for details). |
Definition at line 611 of file cloudbox.cc.
References is_increasing(), min, w(), and ARTS::Var::x().
Referenced by pndFromPsd(), and pndFromPsdBasic().
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_fieldCalcFrompnd_field_raw).
pnd_field_raw | pnd field data |
pnd_field_file | pnd field filename |
atmosphere_dim | Atmospheric dimension |
Definition at line 67 of file cloudbox.cc.
References ARTS::Var::atmosphere_dim(), CREATE_OUT3, GFIELD3_LAT_GRID, GFIELD3_LON_GRID, ConstVectorView::nelem(), and ARTS::Var::pnd_field_raw().
Referenced by chk_pnd_raw_data(), ScatElementsPndAndScatAdd(), and ScatElementsToabs_speciesAdd().
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 146 of file cloudbox.cc.
References ARTS::Var::cloudbox_limits(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, ARTS::Var::lat(), ARTS::Var::lat_grid(), ARTS::Var::lon(), ARTS::Var::lon_grid(), ARTS::Var::p_grid(), and ARTS::Var::pnd_field_raw().
Referenced by pnd_fieldCalcFrompnd_field_raw().
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 scattering elements) |
pnd_field_file | pnd field filename |
atmosphere_dim | Atmospheric dimension |
Definition at line 116 of file cloudbox.cc.
References ARTS::Var::atmosphere_dim(), chk_pnd_data(), CREATE_OUT3, ARTS::Var::pnd_field_raw(), and ARTS::Var::verbosity().
Referenced by ScatSpeciesPndAndScatAdd().
void chk_scat_data | ( | const SingleScatteringData & | scat_data_single, |
const Verbosity & | verbosity | ||
) |
Check single scattering data.
This function checks the self consistency of the data by checking the dimensions of pha_mat, ext_mat and abs_vec depending on the ptype case. It furthermore checks whether the angular grids are defined correctly depending on ptype and the sanity of the temperature grid.
scat_data_single[in] | Single scattering data of a single scattering element |
Definition at line 313 of file cloudbox.cc.
References chk_size(), CREATE_OUT3, last(), PTYPE_AZIMUTH_RND, PTYPE_GENERAL, PTYPE_TOTAL_RND, and ARTS::Var::scat_data_single().
Referenced by xml_read_from_stream().
void chk_scat_species | ( | const ArrayOfString & | scat_species, |
const String & | delim | ||
) |
Check validity of scat_species setting.
This function checks, whether number of elements in each scattering species string is ok, and whether the entries for size limits are indeed numbers (or '*').
\param scat_species Array of scattering species tags.
delim | delimiter string of scat_species elements. |
Definition at line 230 of file cloudbox.cc.
References Absorption::nelem().
void chk_scat_species_field | ( | bool & | empty_flag, |
const Tensor3 & | scat_species_field, | ||
const String & | fieldname, | ||
const Index & | dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid | ||
) |
Check whether field of a specific scattering species zero everywhere.
scat_species_field | scattering species field (e.g. mass density, mass flux, total number density) |
fieldname | name of scattering species field (just for info) |
dim | the atmosphere dimension |
p_grid | pressure grid of current atmosphere |
lat_grid | latitude grid of current atmosphere |
lon_grid | longitude grid of current atmosphere |
Definition at line 646 of file cloudbox.cc.
References ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ConstTensor3View::ncols(), ConstTensor3View::npages(), ConstTensor3View::nrows(), and ARTS::Var::p_grid().
Referenced by cloudboxSetAutomatically().
void chk_scattering_data | ( | const ArrayOfSingleScatteringData & | scat_data, |
const ArrayOfScatteringMetaData & | scat_meta, | ||
const Verbosity & | |||
) |
Check scattering data general.
FIXME
Definition at line 259 of file cloudbox.cc.
References ARTS::Var::scat_data(), and ARTS::Var::scat_meta().
void chk_scattering_meta_data | ( | const ScatteringMetaData & | scat_meta_single, |
const String & | scat_meta_file, | ||
const Verbosity & | verbosity | ||
) |
Check scattering data meta.
FIXME
scat_meta_single | scattering meta data |
scat_meta_file | filename of the data to be checked |
Definition at line 281 of file cloudbox.cc.
References CREATE_OUT3.
void find_cloudlimits | ( | Index & | lower, |
Index & | upper, | ||
const Tensor3 & | scat_species_field, | ||
const Index & | atmosphere_dim, | ||
const Numeric & | cloudbox_margin | ||
) |
Adjust uppermost and lowermost cloudy level for one scat_species_*_*_field.
lower and upper levels have to be preinitialized before calling this function.
[in,out] | lower | lowermost level containing scattering particles |
[in,out] | upper | uppermost level containing scattering particles |
[in] | scat_species_field | scattering species field (e.g. mass density, mass flux, total number density) |
[in] | atmosphere_dim | the atmosphere dimension |
[in] | cloudbox_margin | flag whether to determine lowermost level or set to surface |
Definition at line 714 of file cloudbox.cc.
References ARTS::Var::atmosphere_dim(), joker, max, and ConstTensor3View::npages().
Referenced by cloudboxSetAutomatically().
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 499 of file cloudbox.cc.
References ARTS::Var::atmosphere_dim(), ARTS::Var::cloudbox_limits(), and fractional_gp().
Referenced by get_ppath_cloudvars(), get_ppath_transmat(), is_inside_cloudbox(), iyIndependentBeamApproximation(), and mcPathTraceRadar().
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 579 of file cloudbox.cc.
References ARTS::Var::cloudbox_limits(), is_gp_inside_cloudbox(), and ARTS::Var::ppath_step().
Referenced by cloud_ppath_update3D().
void parse_atmcompact_scattype | ( | String & | scat_type, |
const String & | field_name, | ||
const String & | delim | ||
) |
Parse atm_field_compact fieldname for type of scat_species field
scat_type | species name (second part of field_name) |
field_name | fieldname of atm_field_compact data entry |
delim | delimiter string of field_name |
Definition at line 912 of file cloudbox.cc.
References my_basic_string< charT >::split().
void parse_atmcompact_speciesname | ( | String & | species_name, |
const String & | field_name, | ||
const String & | delim | ||
) |
Parse atm_field_compact fieldname for species name
species_type | species name (second part of field_name) |
field_name | fieldname of atm_field_compact data entry |
delim | delimiter string of field_name |
Definition at line 880 of file cloudbox.cc.
References my_basic_string< charT >::split().
Referenced by abs_lookupSetupBatch().
void parse_atmcompact_speciestype | ( | String & | species_type, |
const String & | field_name, | ||
const String & | delim | ||
) |
Parse atm_field_compact fieldname for species type
species_type | species indentifier (first part of field_name) |
field_name | fieldname of atm_field_compact data entry |
delim | delimiter string of field_name |
Definition at line 848 of file cloudbox.cc.
References my_basic_string< charT >::split().
Referenced by abs_lookupSetupBatch().
void parse_partfield_name | ( | String & | partfield_name, |
const String & | part_string, | ||
const String & | delim | ||
) |
Splitting scat_species string and parse type of scattering species field
partfield_name | name of atmospheric scattering species field |
part_string | scattering species tag from scat_species |
delim | delimiter string of scat_species elements |
Definition at line 944 of file cloudbox.cc.
References my_basic_string< charT >::split().
Referenced by ScatElementsSelect(), and ScatSpeciesExtendTemperature().