ARTS 2.5.11 (git: 6827797f)
|
#include "agenda_class.h"
#include "exceptions.h"
#include "gridded_fields.h"
#include "matpack_data.h"
#include "mystring.h"
Go to the source code of this file.
Classes | |
class | runtime_error_not_found |
Subclasses of runtime_error. More... | |
class | runtime_error_not_unique |
Subclasses of runtime_error. More... | |
Functions | |
void | chk_if_bool (const String &x_name, const Index &x) |
chk_if_bool | |
void | chk_if_in_range (const String &x_name, const Index &x, const Index &x_low, const Index &x_high) |
chk_if_in_range | |
void | chk_if_increasing (const String &x_name, const ArrayOfIndex &x) |
chk_if_increasing | |
void | chk_not_negative (const String &x_name, const Numeric &x) |
chk_not_negative | |
void | chk_if_in_range (const String &x_name, const Numeric &x, const Numeric &x_low, const Numeric &x_high) |
chk_if_in_range | |
void | chk_if_in_range_exclude_low (const String &x_name, const Numeric &x, const Numeric &x_low, const Numeric &x_high) |
chk_if_in_range_exclude_low | |
void | chk_if_in_range_exclude_high (const String &x_name, const Numeric &x, const Numeric &x_low, const Numeric &x_high) |
chk_if_in_range_exclude_high | |
void | chk_if_in_range_exclude (const String &x_name, const Numeric &x, const Numeric &x_low, const Numeric &x_high) |
chk_if_in_range_exclude | |
void | chk_vector_length (const String &x_name, ConstVectorView x, const Index &l) |
chk_vector_length | |
void | chk_vector_length (const String &x1_name, const String &x2_name, ConstVectorView x1, ConstVectorView x2) |
chk_vector_length | |
void | chk_if_increasing (const String &x_name, ConstVectorView x) |
chk_if_increasing | |
void | chk_if_decreasing (const String &x_name, ConstVectorView x) |
chk_if_decreasing | |
void | chk_if_equal (const String &x1_name, const String &x2_name, ConstVectorView v1, ConstVectorView v2, Numeric margin=1e-6) |
chk_if_equal | |
void | chk_matrix_ncols (const String &x_name, ConstMatrixView x, const Index &l) |
chk_matrix_ncols | |
void | chk_matrix_nrows (const String &x_name, ConstMatrixView x, const Index &l) |
chk_matrix_nrows | |
template<class T > | |
Index | chk_contains (const String &x_name, const Array< T > &x, const T &what) |
Check if an array contains a value. | |
template<class T > | |
void | chk_size (const String &x_name, const Array< T > &x, const Index &c) |
Check the size of an array. | |
void | chk_size (const String &x_name, ConstVectorView x, const Index &c) |
Runtime check for size of Vector. | |
void | chk_size (const String &x_name, ConstMatrixView x, const Index &r, const Index &c) |
Runtime check for size of Matrix. | |
void | chk_size (const String &x_name, ConstTensor3View x, const Index &p, const Index &r, const Index &c) |
Runtime check for size of Tensor. | |
void | chk_size (const String &x_name, ConstTensor4View x, const Index &b, const Index &p, const Index &r, const Index &c) |
Runtime check for size of Tensor. | |
void | chk_size (const String &x_name, ConstTensor5View x, const Index &s, const Index &b, const Index &p, const Index &r, const Index &c) |
Runtime check for size of Tensor. | |
void | chk_size (const String &x_name, ConstTensor6View x, const Index &v, const Index &s, const Index &b, const Index &p, const Index &r, const Index &c) |
Runtime check for size of Tensor. | |
void | chk_size (const String &x_name, ConstTensor7View x, const Index &l, const Index &v, const Index &s, const Index &b, const Index &p, const Index &r, const Index &c) |
Runtime check for size of Tensor. | |
void | chk_not_empty (const String &x_name, const Agenda &x) |
chk_not_empty | |
void | chk_interpolation_grids_loose (Index &ing_min, Index &ing_max, const String &which_interpolation, ConstVectorView old_grid, ConstVectorView new_grid, ConstVectorView data, const Index order=1) |
Check interpolation grids. | |
void | chk_interpolation_grids_loose_no_data_check (Index &ing_min, Index &ing_max, const String &which_interpolation, ConstVectorView old_grid, ConstVectorView new_grid, const Index order=1) |
Check interpolation grids. | |
void | chk_interpolation_pgrids_loose_no_data_check (Index &ing_min, Index &ing_max, const String &which_interpolation, ConstVectorView old_pgrid, ConstVectorView new_pgrid, const Index order=1) |
Check log pressure interpolation grids. | |
void | chk_interpolation_grids_loose_check_data (Index &ing_min, Index &ing_max, const String &which_interpolation, ConstVectorView old_grid, ConstVectorView new_grid, ConstVectorView data) |
Check interpolation grids. | |
void | chk_interpolation_grids (const String &which_interpolation, ConstVectorView old_grid, ConstVectorView new_grid, const Index order=1, const Numeric &extpolfac=0.5, const bool islog=false) |
Check interpolation grids. | |
void | chk_interpolation_grids (const String &which_interpolation, ConstVectorView old_grid, const Numeric &new_grid, const Index order=1, const Numeric &extpolfac=0.5) |
Check interpolation grids. | |
void | chk_interpolation_pgrids (const String &which_interpolation, ConstVectorView old_pgrid, ConstVectorView new_pgrid, const Index order=1, const Numeric &extpolfac=0.5) |
Check log pressure interpolation grids. | |
void | chk_atm_grids (const Index &dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid) |
chk_atm_grids | |
void | chk_atm_field (const String &x_name, ConstTensor3View x, const Index &dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, const bool &chk_lat90=1) |
chk_atm_field (simple fields) | |
void | chk_atm_field (const String &x_name, ConstTensor4View x, const Index &dim, const Index &nspecies, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, const bool &check_nan=1) |
chk_atm_field (fields with one more dimension) | |
void | chk_atm_vecfield_lat90 (const String &x1_name, ConstTensor3View x1, const String &x2_name, ConstTensor3View x2, const Index &dim, ConstVectorView lat_grid, const Numeric &threshold=1e-3) |
chk_atm_vecfield_lat90 | |
void | chk_latlon_true (const Index &atmosphere_dim, ConstVectorView lat_grid, ConstVectorView lat_true, ConstVectorView lon_true) |
chk_latlon_true | |
void | chk_atm_surface (const String &x_name, const Matrix &x, const Index &dim, ConstVectorView lat_grid, ConstVectorView lon_grid) |
chk_atm_surface | |
void | chk_rte_pos (const Index &atmosphere_dim, ConstVectorView rte_pos, const bool &is_rte_pos2=false) |
chk_rte_pos | |
void | chk_rte_los (const Index &atmosphere_dim, ConstVectorView rte_los) |
chk_rte_los | |
void | chk_griddedfield_gridname (const GriddedField &gf, const Index gridindex, const String &gridname) |
Check name of grid in GriddedField. | |
void | chk_met_mm_backend (const Matrix &bdsp) |
Check met_mm_backend. | |
This file contains the declaration of functions in check_input.cc.
Definition in file check_input.h.
void chk_atm_field | ( | const String & | x_name, |
ConstTensor3View | x, | ||
const Index & | dim, | ||
ConstVectorView | p_grid, | ||
ConstVectorView | lat_grid, | ||
ConstVectorView | lon_grid, | ||
const bool & | chk_lat90 | ||
) |
chk_atm_field (simple fields)
Checks if an atmospheric field matches the dimensionality and the grids.
The function gives an error message if this is not the case.
x_name | The name of the atmospheric field. |
x | A variable holding an atmospheric field. |
dim | The atmospheric dimensionality. |
p_grid | The pressure grid. |
lat_grid | The latitude grid. |
lon_grid | The longitude grid. |
chk_lat90 | Flag whether pole consistency check to be done (only relevant for dim==3. |
Definition at line 1143 of file check_input.cc.
References ARTS_USER_ERROR_IF, chk_if_bool(), and max().
Referenced by AtmFieldPerturb(), AtmFieldPerturbAtmGrids(), atmfields_checkedCalc(), AtmFieldsExpand1D(), AtmFieldsRefinePgrid(), atmgeom_checkedCalc(), cloudbox_checkedCalc(), InterpAtmFieldToPosition(), particle_bulkpropRadarOnionPeeling(), and pnd_fieldCalcFromParticleBulkProps().
void chk_atm_field | ( | const String & | x_name, |
ConstTensor4View | x, | ||
const Index & | dim, | ||
const Index & | nspecies, | ||
ConstVectorView | p_grid, | ||
ConstVectorView | lat_grid, | ||
ConstVectorView | lon_grid, | ||
const bool & | check_nan | ||
) |
chk_atm_field (fields with one more dimension)
Checks if an atmospheric field matches the dimensionality and the grids. This is the version for fields like vmr_field, which are a Tensor4, not a Tensor3. (First dimension is the gas species.)
The function gives an error message if this is not the case.
x_name | The name of the atmospheric field. |
x | A variable holding an atmospheric field. |
dim | The atmospheric dimensionality. |
nspecies | Number of species. |
p_grid | The pressure grid. |
lat_grid | The latitude grid. |
lon_grid | The longitude grid. |
Definition at line 1254 of file check_input.cc.
References ARTS_USER_ERROR_IF.
void chk_atm_grids | ( | const Index & | dim, |
ConstVectorView | p_grid, | ||
ConstVectorView | lat_grid, | ||
ConstVectorView | lon_grid | ||
) |
chk_atm_grids
Checks if the atmospheric grids and the specified atmospheric dimensionality match, and if the grids are ordered correctly.
The function gives an error message if this is not the case.
dim | The atmospheric dimensionality. |
p_grid | The pressure grid. |
lat_grid | The latitude grid. |
lon_grid | The longitude grid. |
Definition at line 1081 of file check_input.cc.
References ARTS_USER_ERROR_IF, chk_if_decreasing(), and chk_if_increasing().
Referenced by atmfields_checkedCalc(), AtmFieldsAndParticleBulkPropFieldFromCompact(), AtmFieldsCalc(), AtmFieldsCalcExpand1D(), AtmFieldsExpand1D(), AtmFieldsRefinePgrid(), atmgeom_checkedCalc(), cloudbox_field_monoSetConst(), cloudbox_fieldUpdateSeq3D(), cloudboxSetAutomatically(), cloudboxSetManually(), InterpAtmFieldToPosition(), InterpSurfaceFieldToPosition(), MagFieldsCalc(), MagFieldsCalcExpand1D(), pnd_fieldCalcFromParticleBulkProps(), pnd_fieldCalcFrompnd_field_raw(), WindFieldsCalc(), and WindFieldsCalcExpand1D().
void chk_atm_surface | ( | const String & | x_name, |
const Matrix & | x, | ||
const Index & | dim, | ||
ConstVectorView | lat_grid, | ||
ConstVectorView | lon_grid | ||
) |
chk_atm_surface
Checks if a surface-type variable matches the dimensionality and the grids.
The function gives an error message if this is not the case.
x_name | The name of the surface-type variable. |
x | The variable holding the surface data. |
dim | The atmospheric dimensionality. |
lat_grid | The latitude grid. |
lon_grid | The longitude grid. |
Definition at line 1517 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by atmgeom_checkedCalc(), InterpSurfaceFieldToPosition(), and particle_bulkpropRadarOnionPeeling().
void chk_atm_vecfield_lat90 | ( | const String & | x1_name, |
ConstTensor3View | x1, | ||
const String & | x2_name, | ||
ConstTensor3View | x2, | ||
const Index & | dim, | ||
ConstVectorView | lat_grid, | ||
const Numeric & | threshold | ||
) |
chk_atm_vecfield_lat90
Checks if a two-compnent vector atmospheric field is consistant at the poles.
Similar to the field-constant at poles check of chk_atm_field, but checking the total vector instead of each component to be constant (since this involves some numerics, we allow a deviation threshold instead of perfect match). Note that each component of the vector is stored in a separate atmospheric field. Intended for variables that are supposed to be two horizontal components of a 3D vector field (e.g., winds, magnetic field). It is assumed that individual fields have passed chk_atm_field. The function gives an error message if a mismatch is encountered.
x1_name | The name of the atmospheric field. |
x1 | A variable holding an atmospheric field. |
x2_name | The name of the atmospheric field. |
x2 | A variable holding an atmospheric field. |
dim | The atmospheric dimensionality. |
lat_grid | The latitude grid. |
threshold | The percentage threshold the total vector lengths along the pole are allowed to deviate. |
Definition at line 1381 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by atmfields_checkedCalc().
Index chk_contains | ( | const String & | x_name, |
const Array< T > & | x, | ||
const T & | what | ||
) |
Check if an array contains a value.
This makes sure that the array x contains the element with value what exactly once.
As a bonus, it returns the index of what in x.
This template function can be used for arrays of anything, provided that the "==" operator is defined.
x_name | Name of the array to check |
x | The array to check |
what | The value to look for. |
runtime_error_not_found,runtime_error_not_unique |
Definition at line 130 of file check_input.h.
References find_all(), and Array< base >::nelem().
Referenced by GasAbsLookup::Adapt(), and x2artsAtmAndSurf().
void chk_griddedfield_gridname | ( | const GriddedField & | gf, |
const Index | gridindex, | ||
const String & | gridname | ||
) |
Check name of grid in GriddedField.
Does a case-insensitive check to verify that the name of the grid at the given index in the GriddedField has the expected name.
gf | GriddedField to check. Can be a GriddedField of any dimension. |
gridindex | Index of grid. |
gridname | Expected name of grid. |
Definition at line 1675 of file check_input.cc.
References ARTS_USER_ERROR_IF, GriddedField::get_dim(), GriddedField::get_grid_name(), GriddedField::get_name(), my_basic_string< charT >::nelem(), my_basic_string< charT >::toupper(), and var_string().
Referenced by AtmFieldsAndParticleBulkPropFieldFromCompact(), complex_n_interp(), FieldFromGriddedField(), FieldFromGriddedFieldCheckLatLonHelper(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), GriddedFieldZToPRegridHelper(), InterpGriddedField2ToPosition(), InterpSurfaceTypeMask(), surface_complex_refr_indexFromGriddedField5(), surface_reflectivityFromGriddedField6(), and surface_scalar_reflectivityFromGriddedField4().
void chk_if_bool | ( | const String & | x_name, |
const Index & | x | ||
) |
chk_if_bool
Checks that a variable of type Index has the value 0 or 1.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type Index. |
Definition at line 46 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by chk_atm_field(), cloudbox_checkedCalc(), sensor_responseInit(), and sensor_responseMetMM().
void chk_if_decreasing | ( | const String & | x_name, |
ConstVectorView | x | ||
) |
chk_if_decreasing
Checks if a vector is strictly decreasing.
Duplicated values are not allowed.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type Vector. |
Definition at line 306 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by GasAbsLookup::Adapt(), chk_atm_grids(), cloudbox_fieldUpdate1D(), and cloudbox_fieldUpdateSeq1D().
void chk_if_equal | ( | const String & | x1_name, |
const String & | x2_name, | ||
ConstVectorView | v1, | ||
ConstVectorView | v2, | ||
Numeric | margin | ||
) |
chk_if_equal
Checks if two vectors are equal within a margin.
x1_name | The name of the first variable (used in error message). |
x2_name | The name of the second variable (used in error message). |
v1 | First vector |
v2 | Second vector |
margin | uncertainty margin. Default: 1e-6 |
Definition at line 326 of file check_input.cc.
References ARTS_USER_ERROR_IF, and chk_vector_length().
Referenced by FieldFromGriddedField(), and FieldFromGriddedFieldCheckLatLonHelper().
void chk_if_in_range | ( | const String & | x_name, |
const Index & | x, | ||
const Index & | x_low, | ||
const Index & | x_high | ||
) |
chk_if_in_range
Checks that a variable of type Index has a value inside the specified range.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type Index. |
x_low | Lowest allowed value for x. |
x_high | Highest allowed value for x. |
Definition at line 67 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by GasAbsLookup::Adapt(), AntennaMultiBeamsToPencilBeams(), atmfields_checkedCalc(), AtmFieldsCalc(), AtmFieldsCalcExpand1D(), AtmFieldsExpand1D(), atmgeom_checkedCalc(), calc_rayleighPhaMat(), cloudbox_field_monoSetConst(), cloudboxSetAutomatically(), cloudboxSetManually(), cloudboxSetManuallyAltitude(), complex_n_ice_matzler06(), complex_n_water_liebe93(), complex_refr_indexIceMatzler06(), doit_za_interpSet(), DoitGetIncoming(), DoitGetIncoming1DAtm(), DoitInit(), FastemStandAlone(), InterpGriddedField2ToPosition(), InterpSurfaceTypeMask(), iyRadarSingleScat(), iySurfaceFlatReflectivity(), iySurfaceFlatRefractiveIndex(), iySurfaceLambertian(), iySurfaceLambertianDirect(), iySurfaceRtpropAgenda(), iySurfaceRtpropCalc(), MagFieldsCalc(), MagFieldsCalcExpand1D(), MCGeneral(), MCRadar(), particle_bulkpropRadarOnionPeeling(), pnd_fieldCalcFromParticleBulkProps(), pnd_fieldZero(), refellipsoidOrbitPlane(), ScatElementsPndAndScatAdd(), ScatElementsToabs_speciesAdd(), ScatSpeciesPndAndScatAdd(), sensor_responseInit(), sensor_responseStokesRotation(), specular_losCalc(), specular_losCalcNoTopography(), surface_complex_refr_indexFromGriddedField5(), surface_reflectivityFromGriddedField6(), surface_scalar_reflectivityFromGriddedField4(), surfaceBlackbody(), surfaceFastem(), surfaceFlatReflectivity(), surfaceFlatRefractiveIndex(), surfaceFlatRvRh(), surfaceFlatScalarReflectivity(), surfaceLambertianSimple(), surfaceTelsem(), surfaceTessem(), telsemAtlasLookup(), telsemStandalone(), telsemSurfaceTypeLandSea(), WindFieldsCalc(), WindFieldsCalcExpand1D(), yCalc(), and yRadar().
void chk_if_in_range | ( | const String & | x_name, |
const Numeric & | x, | ||
const Numeric & | x_low, | ||
const Numeric & | x_high | ||
) |
chk_if_in_range
Checks that a variable of type Numeric has a value inside the specified range.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type Numeric. |
x_low | Lowest allowed value for x. |
x_high | Highest allowed value for x. |
Definition at line 136 of file check_input.cc.
References ARTS_USER_ERROR_IF.
void chk_if_in_range_exclude | ( | const String & | x_name, |
const Numeric & | x, | ||
const Numeric & | x_low, | ||
const Numeric & | x_high | ||
) |
chk_if_in_range_exclude
Checks that a variable of type Numeric has a value inside the specified range. The low and high values are excluded from the valid range.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type Numeric. |
x_low | Lowest allowed value for x. |
x_high | Highest allowed value for x. |
Definition at line 211 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by FastemStandAlone(), surfaceTelsem(), and surfaceTessem().
void chk_if_in_range_exclude_high | ( | const String & | x_name, |
const Numeric & | x, | ||
const Numeric & | x_low, | ||
const Numeric & | x_high | ||
) |
chk_if_in_range_exclude_high
Checks that a variable of type Numeric has a value inside the specified range. The high value is excluded from the valid range.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type Numeric. |
x_low | Lowest allowed value for x. |
x_high | Highest allowed value for x. |
Definition at line 186 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by FastemStandAlone(), and surfaceTessem().
void chk_if_in_range_exclude_low | ( | const String & | x_name, |
const Numeric & | x, | ||
const Numeric & | x_low, | ||
const Numeric & | x_high | ||
) |
chk_if_in_range_exclude_low
Checks that a variable of type Numeric has a value inside the specified range. The low value is excluded from the valid range.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type Numeric. |
x_low | Lowest allowed value for x. |
x_high | Highest allowed value for x. |
Definition at line 161 of file check_input.cc.
References ARTS_USER_ERROR_IF.
void chk_if_increasing | ( | const String & | x_name, |
const ArrayOfIndex & | x | ||
) |
chk_if_increasing
Checks if an ArrayOfIndex is strictly increasing. Cloned from Patricks similar function for Vector.
Duplicated values are not allowed.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type ArrayOfIndex. |
Definition at line 92 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by GasAbsLookup::Adapt(), atmgeom_checkedCalc(), chk_atm_grids(), cloudbox_fieldUpdate1D(), cloudbox_fieldUpdateSeq1D(), cloudbox_fieldUpdateSeq3D(), doit_conv_flagAbsBT(), doit_conv_flagLsq(), DoitCalc(), scat_data_checkedCalc(), ScatElementsToabs_speciesAdd(), SurfaceFlatScalarReflectivity(), WMRFSelectChannels(), yCalc(), and yRadar().
void chk_if_increasing | ( | const String & | x_name, |
ConstVectorView | x | ||
) |
chk_if_increasing
Checks if a vector is strictly increasing.
Duplicated values are not allowed.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type Vector. |
Definition at line 285 of file check_input.cc.
References ARTS_USER_ERROR_IF.
void chk_interpolation_grids | ( | const String & | which_interpolation, |
ConstVectorView | old_grid, | ||
const Numeric & | new_grid, | ||
const Index | order, | ||
const Numeric & | extpolfac | ||
) |
Check interpolation grids.
This function checks if old and new grid for an interpolation are ok. If not, it throws a detailed runtime error message. This is intended for workspace method input variable checking.
This is for the special case that the new grid is just a single Numeric, instead of a Vector. ("Red" interpolation.) It just calles the other more general chk_interpolation_grids function for which both grid arguments are vectors.
[in] | which_interpolation | A string describing the interpolation for which the grids are intended. |
[in] | old_grid | The original grid. |
[in] | new_grid | The new grid. |
[in] | order | Interpolation order. (Default value is 1.) |
[in] | extpolfac | The extrapolation fraction. See gridpos function for details. Has a default value, which is consistent with gridpos. |
Definition at line 1019 of file check_input.cc.
References chk_interpolation_grids(), and v.
void chk_interpolation_grids | ( | const String & | which_interpolation, |
ConstVectorView | old_grid, | ||
ConstVectorView | new_grid, | ||
const Index | order, | ||
const Numeric & | extpolfac, | ||
const bool | islog | ||
) |
Check interpolation grids.
This function checks if old and new grid for an interpolation are ok. If not, it throws a detailed runtime error message. This is intended for workspace method input variable checking.
[in] | which_interpolation | A string describing the interpolation for which the grids are intended. |
[in] | old_grid | The original grid. |
[in] | new_grid | The new grid. |
[in] | order | Interpolation order. (Default value is 1.) |
[in] | extpolfac | The extrapolation fraction. See gridpos function for details. Has a default value, which is consistent with gridpos. |
Definition at line 887 of file check_input.cc.
References ARTS_USER_ERROR_IF, max(), min(), and var_string().
Referenced by atm_fields_compactAddSpecies(), AtmFieldsCalc(), chk_interpolation_grids(), chk_interpolation_pgrids(), cia_interpolation(), cloudbox_field_monoOptimizeReverse(), complex_n_interp(), XsecRecord::Extract(), GriddedFieldLatLonRegridHelper(), InterpSurfaceFieldToPosition(), MagFieldsCalc(), MagFieldsFromAltitudeRawCalc(), opt_prop_sptFromData(), opt_prop_sptFromMonoData(), opt_prop_sptFromScat_data(), OptimizeDoitPressureGrid(), pha_mat_sptFromData(), pha_mat_sptFromDataDOITOpt(), pha_mat_sptFromMonoData(), pha_mat_sptFromScat_data(), regrid_sun_spectrum(), rte_pos2gridpos(), scat_data_monoCalc(), scat_dataCalc(), scat_dataReduceT(), ScatElementsToabs_speciesAdd(), ScatSpeciesMerge(), specular_losCalc(), ssd_tinterp_parameters(), surface_reflectivityFromGriddedField6(), surface_rtpropInterpFreq(), surface_scalar_reflectivityFromGriddedField4(), and WindFieldsCalc().
void chk_interpolation_grids_loose | ( | Index & | ing_min, |
Index & | ing_max, | ||
const String & | which_interpolation, | ||
ConstVectorView | old_grid, | ||
ConstVectorView | new_grid, | ||
ConstVectorView | data, | ||
const Index | order | ||
) |
Check interpolation grids.
This function checks if old and new grid for an interpolation are ok. If not, it throws a detailed runtime error message. This is intended for workspace method input variable checking. If the original grid does not have to cover the whole new grid. The returned ing_min and ing_max give the positions in the new grid of the first values that are outside the old grid. This is only allowed if the boundary value in the input data is 0.
[out] | ing_min | Index in the new grid with first value covered by the old grid. |
[out] | ing_max | Index in the new grid with last value covered by the old grid. |
[in] | which_interpolation | A string describing the interpolation for which the grids are intended. |
[in] | old_grid | The original grid. |
[in] | new_grid | The new grid. |
[in] | data | The data for the interpolation. |
[in] | order | Interpolation order. (Default value is 1.) |
[in] | extpolfac | The extrapolation fraction. See gridpos function for details. Has a default value, which is consistent with gridpos. |
Definition at line 646 of file check_input.cc.
References chk_interpolation_grids_loose_check_data(), and chk_interpolation_grids_loose_no_data_check().
void chk_interpolation_grids_loose_check_data | ( | Index & | ing_min, |
Index & | ing_max, | ||
const String & | which_interpolation, | ||
ConstVectorView | old_grid, | ||
ConstVectorView | new_grid, | ||
ConstVectorView | data | ||
) |
Check interpolation grids.
This function checks if old and new grid for an interpolation are ok. If not, it throws a detailed runtime error message. This is intended for workspace method input variable checking. If the original grid does not have to cover the whole new grid. The returned ing_min and ing_max give the positions in the new grid of the first values that are outside the old grid. This is only allowed if the boundary value in the input data is 0.
[out] | ing_min | Index in the new grid with first value covered by the old grid. |
[out] | ing_max | Index in the new grid with last value covered by the old grid. |
[in] | which_interpolation | A string describing the interpolation for which the grids are intended. |
[in] | old_grid | The original grid. |
[in] | new_grid | The new grid. |
[in] | data | The data for the interpolation. |
Definition at line 834 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by chk_interpolation_grids_loose().
void chk_interpolation_grids_loose_no_data_check | ( | Index & | ing_min, |
Index & | ing_max, | ||
const String & | which_interpolation, | ||
ConstVectorView | old_grid, | ||
ConstVectorView | new_grid, | ||
const Index | order | ||
) |
Check interpolation grids.
This function checks if old and new grid for an interpolation are ok. If not, it throws a detailed runtime error message. This is intended for workspace method input variable checking. The original grid does not have to cover the whole new grid. The returned ing_min and ing_max give the positions in the new grid of the first values that are outside the old grid.
[out] | ing_min | Index in the new grid with first value covered by the old grid. |
[out] | ing_max | Index in the new grid with last value covered by the old grid. |
[in] | which_interpolation | A string describing the interpolation for which the grids are intended. |
[in] | old_grid | The original grid. |
[in] | new_grid | The new grid. |
[in] | order | Interpolation order. (Default value is 1.) |
[in] | extpolfac | The extrapolation fraction. See gridpos function for details. Has a default value, which is consistent with gridpos. |
Definition at line 684 of file check_input.cc.
References ARTS_USER_ERROR_IF, max(), and min().
Referenced by chk_interpolation_grids_loose(), chk_interpolation_pgrids_loose_no_data_check(), and GriddedFieldZToPRegridHelper().
void chk_interpolation_pgrids | ( | const String & | which_interpolation, |
ConstVectorView | old_pgrid, | ||
ConstVectorView | new_pgrid, | ||
const Index | order, | ||
const Numeric & | extpolfac | ||
) |
Check log pressure interpolation grids.
This function checks if old and new grid for an interpolation are ok. If not, it throws a detailed runtime error message. This is intended for workspace method input variable checking.
[in] | which_interpolation | A string describing the interpolation for which the grids are intended. |
[in] | old_pgrid | The original grid. |
[in] | new_pgrid | The new grid. |
[in] | order | Interpolation order. (Default value is 1.) |
[in] | extpolfac | The extrapolation fraction. See gridpos function for details. Has a default value, which is consistent with gridpos. |
Definition at line 1046 of file check_input.cc.
References chk_interpolation_grids().
Referenced by AtmFieldPRegridHelper(), AtmFieldsCalc(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegridHelper(), MagFieldsCalc(), and WindFieldsCalc().
void chk_interpolation_pgrids_loose_no_data_check | ( | Index & | ing_min, |
Index & | ing_max, | ||
const String & | which_interpolation, | ||
ConstVectorView | old_pgrid, | ||
ConstVectorView | new_pgrid, | ||
const Index | order | ||
) |
Check log pressure interpolation grids.
This function checks if old and new grid for an interpolation are ok. If not, it throws a detailed runtime error message. This is intended for workspace method input variable checking. The original grid does not have to cover the whole new grid. The returned ing_min and ing_max give the positions in the new grid of the first values that are outside the old grid.
[out] | ing_min | Index in the new grid with first value covered by the old grid. |
[out] | ing_max | Index in the new grid with last value covered by the old grid. |
[in] | which_interpolation | A string describing the interpolation for which the grids are intended. |
[in] | old_grid | The original grid. |
[in] | new_grid | The new grid. |
[in] | order | Interpolation order. (Default value is 1.) |
[in] | extpolfac | The extrapolation fraction. See gridpos function for details. Has a default value, which is consistent with gridpos. |
Definition at line 794 of file check_input.cc.
References chk_interpolation_grids_loose_no_data_check().
Referenced by GriddedFieldPRegridHelper().
void chk_latlon_true | ( | const Index & | atmosphere_dim, |
ConstVectorView | lat_grid, | ||
ConstVectorView | lat_true, | ||
ConstVectorView | lon_true | ||
) |
chk_latlon_true
Checks that lat_true and lon_true have the correct size for 1D and 2D cases (they are not used for 3D).
atmosphere_dim | As the WSV with the same name |
lat_grid | As the WSV with the same name |
lat_true | As the WSV with the same name |
lon_true | As the WSV with the same name |
Definition at line 1484 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by InterpGriddedField2ToPosition(), InterpSurfaceTypeMask(), iyIndependentBeamApproximation(), surface_complex_refr_indexFromGriddedField5(), surface_reflectivityFromGriddedField6(), surface_scalar_reflectivityFromGriddedField4(), and telsemSurfaceTypeLandSea().
void chk_matrix_ncols | ( | const String & | x_name, |
ConstMatrixView | x, | ||
const Index & | l | ||
) |
chk_matrix_ncols
Checks that a matrix has the specified number of columns.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A matrix. |
l | The expected length of x. |
Definition at line 361 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by GasAbsLookup::Adapt().
void chk_matrix_nrows | ( | const String & | x_name, |
ConstMatrixView | x, | ||
const Index & | l | ||
) |
chk_matrix_nrows
Checks that a matrix has the specified number of rows.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A matrix. |
l | The expected length of x. |
Definition at line 380 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by GasAbsLookup::Adapt().
void chk_met_mm_backend | ( | const Matrix & | mmb | ) |
Check met_mm_backend.
Verifies that the backend description matrix has the correct size and format.
[in] | mmb | met_mm_backend |
std::runtime_error |
Definition at line 1709 of file check_input.cc.
References ARTS_USER_ERROR_IF.
chk_not_empty
Checks that an agenda is not empty.
The function gives an error message if the agenda is empty.
x_name | The name of the agenda. |
x | A variable of type Agenda. |
Definition at line 608 of file check_input.cc.
References ARTS_USER_ERROR_IF, and Agenda::nelem().
Referenced by cloud_RT_surface(), cloudbox_field_monoIterate(), cloudbox_fieldUpdate1D(), cloudbox_fieldUpdateSeq1D(), cloudbox_fieldUpdateSeq3D(), doit_scat_fieldCalc(), doit_scat_fieldCalcLimb(), DoitCalc(), get_iy_of_background(), and surf_albedoCalc().
void chk_not_negative | ( | const String & | x_name, |
const Numeric & | x | ||
) |
chk_not_negative
Checks that a variable of type Numeric is 0 or positive.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type Numeric. |
Definition at line 115 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by iySurfaceFlatReflectivity(), iySurfaceFlatRefractiveIndex(), iySurfaceLambertian(), surfaceBlackbody(), surfaceFlatReflectivity(), surfaceFlatRefractiveIndex(), surfaceFlatRvRh(), surfaceFlatScalarReflectivity(), and surfaceLambertianSimple().
void chk_rte_los | ( | const Index & | atmosphere_dim, |
ConstVectorView | rte_los | ||
) |
chk_rte_los
Performs all needed checks of rte_los
The function gives an error message if this is not the case.
atmosphere_dim | As the WSV with the same name. |
rte_los | As the WSV with the same name. |
Definition at line 1634 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by iySurfaceFlatReflectivity(), iySurfaceFlatRefractiveIndex(), iySurfaceLambertian(), iySurfaceRtpropAgenda(), iySurfaceRtpropCalc(), ppath_calc(), specular_losCalc(), specular_losCalcNoTopography(), surface_reflectivityFromGriddedField6(), surface_scalar_reflectivityFromGriddedField4(), surfaceBlackbody(), surfaceFastem(), surfaceFlatReflectivity(), surfaceFlatRefractiveIndex(), surfaceFlatRvRh(), surfaceFlatScalarReflectivity(), surfaceLambertianSimple(), surfaceTelsem(), and surfaceTessem().
void chk_rte_pos | ( | const Index & | atmosphere_dim, |
ConstVectorView | rte_pos, | ||
const bool & | is_rte_pos2 | ||
) |
chk_rte_pos
Performs all needed checks of rte_pos and rte_pos2.
The function gives an error message if this is not the case.
atmosphere_dim | As the WSV with the same name. |
rte_pos | As WSV rte_pos or rte_pos2. |
is_rte_pos2 | True if rte_pos actually is rte_pos2. |
Definition at line 1586 of file check_input.cc.
References ARTS_USER_ERROR_IF.
Referenced by InterpAtmFieldToPosition(), InterpGriddedField2ToPosition(), InterpSurfaceFieldToPosition(), InterpSurfaceTypeMask(), iySurfaceFlatReflectivity(), iySurfaceFlatRefractiveIndex(), iySurfaceLambertian(), iySurfaceLambertianDirect(), iySurfaceRtpropAgenda(), iySurfaceRtpropCalc(), ppath_calc(), rte_pos2gridpos(), specular_losCalc(), specular_losCalcNoTopography(), surface_complex_refr_indexFromGriddedField5(), surface_reflectivityFromGriddedField6(), surface_scalar_reflectivityFromGriddedField4(), surfaceBlackbody(), surfaceFastem(), surfaceFlatReflectivity(), surfaceFlatRefractiveIndex(), surfaceFlatRvRh(), surfaceFlatScalarReflectivity(), surfaceLambertianSimple(), surfaceTelsem(), and surfaceTessem().
Check the size of an array.
Checks the size of an Array. Cloned from Patricks similar function for Vector.
The function throws a runtime_error if the size is not correct.
This is a template function that works for any array type.
x_name | The name of the variable. |
x | A variable of type ArrayOfIndex. |
c | The size to match |
Definition at line 182 of file check_input.h.
References ARTS_USER_ERROR_IF, c, and Array< base >::nelem().
void chk_size | ( | const String & | x_name, |
ConstMatrixView | x, | ||
const Index & | r, | ||
const Index & | c | ||
) |
Runtime check for size of Matrix.
This is the runtime version of is_size. An appropriate error message is generated if the size is not correct.
x_name | The name of the agenda. |
x | A variable of type Matrix. |
r | Required number of rows |
c | Required number of columns |
Definition at line 422 of file check_input.cc.
References ARTS_USER_ERROR_IF, and c.
void chk_size | ( | const String & | x_name, |
ConstTensor3View | x, | ||
const Index & | p, | ||
const Index & | r, | ||
const Index & | c | ||
) |
Runtime check for size of Tensor.
This is the runtime version of is_size. An appropriate error message is generated if the size is not correct.
x_name | The name of the agenda. |
x | A variable of type Tensor3. |
p | Required number of pages |
r | Required number of rows |
c | Required number of columns |
Definition at line 447 of file check_input.cc.
References ARTS_USER_ERROR_IF, and c.
void chk_size | ( | const String & | x_name, |
ConstTensor4View | x, | ||
const Index & | b, | ||
const Index & | p, | ||
const Index & | r, | ||
const Index & | c | ||
) |
Runtime check for size of Tensor.
This is the runtime version of is_size. An appropriate error message is generated if the size is not correct.
x_name | The name of the agenda. |
x | A variable of type Tensor4. |
b | Required number of books |
p | Required number of pages |
r | Required number of rows |
c | Required number of columns |
Definition at line 474 of file check_input.cc.
References ARTS_USER_ERROR_IF, b, and c.
void chk_size | ( | const String & | x_name, |
ConstTensor5View | x, | ||
const Index & | s, | ||
const Index & | b, | ||
const Index & | p, | ||
const Index & | r, | ||
const Index & | c | ||
) |
Runtime check for size of Tensor.
This is the runtime version of is_size. An appropriate error message is generated if the size is not correct.
x_name | The name of the agenda. |
x | A variable of type Tensor5. |
s | Required number of shelves |
b | Required number of books |
p | Required number of pages |
r | Required number of rows |
c | Required number of columns |
Definition at line 505 of file check_input.cc.
References ARTS_USER_ERROR_IF, b, and c.
void chk_size | ( | const String & | x_name, |
ConstTensor6View | x, | ||
const Index & | v, | ||
const Index & | s, | ||
const Index & | b, | ||
const Index & | p, | ||
const Index & | r, | ||
const Index & | c | ||
) |
Runtime check for size of Tensor.
This is the runtime version of is_size. An appropriate error message is generated if the size is not correct.
x_name | The name of the agenda. |
x | A variable of type Tensor6. |
v | Required number of vitrines |
s | Required number of shelves |
b | Required number of books |
p | Required number of pages |
r | Required number of rows |
c | Required number of columns |
Definition at line 538 of file check_input.cc.
References ARTS_USER_ERROR_IF, b, c, and v.
void chk_size | ( | const String & | x_name, |
ConstTensor7View | x, | ||
const Index & | l, | ||
const Index & | v, | ||
const Index & | s, | ||
const Index & | b, | ||
const Index & | p, | ||
const Index & | r, | ||
const Index & | c | ||
) |
Runtime check for size of Tensor.
This is the runtime version of is_size. An appropriate error message is generated if the size is not correct.
x_name | The name of the agenda. |
x | A variable of type Tensor7. |
l | Required number of libraries |
v | Required number of vitrines |
s | Required number of shelves |
b | Required number of books |
p | Required number of pages |
r | Required number of rows |
c | Required number of columns |
Definition at line 573 of file check_input.cc.
References ARTS_USER_ERROR_IF, b, c, and v.
void chk_size | ( | const String & | x_name, |
ConstVectorView | x, | ||
const Index & | c | ||
) |
Runtime check for size of Vector.
This is the runtime version of is_size. An appropriate error message is generated if the size is not correct.
x_name | The name of the agenda. |
x | A variable of type Vector. |
c | Required number of elements |
Definition at line 402 of file check_input.cc.
References ARTS_USER_ERROR_IF, and c.
Referenced by GasAbsLookup::Adapt(), chk_scat_data(), cloudbox_fieldUpdate1D(), cloudbox_fieldUpdateSeq1D(), cloudbox_fieldUpdateSeq3D(), ConvertAzimuthallyRandomSingleScatteringData(), doit_za_grid_optCalc(), FieldFromGriddedFieldCheckLatLonHelper(), iySurfaceFlatReflectivity(), iySurfaceFlatReflectivityDirect(), iySurfaceFlatRefractiveIndex(), iySurfaceFlatRefractiveIndexDirect(), iySurfaceLambertian(), and iySurfaceLambertianDirect().
void chk_vector_length | ( | const String & | x1_name, |
const String & | x2_name, | ||
ConstVectorView | x1, | ||
ConstVectorView | x2 | ||
) |
chk_vector_length
Checks if two vectors have the same length.
The function gives an error message if this is not the case.
x1_name | The name of the first vector |
x2_name | The name of the second vector |
x1 | The first vector. |
x2 | The second vector. |
Definition at line 260 of file check_input.cc.
References ARTS_USER_ERROR_IF, and my_basic_string< charT >::nelem().
void chk_vector_length | ( | const String & | x_name, |
ConstVectorView | x, | ||
const Index & | l | ||
) |
chk_vector_length
Checks that a vector has the specified length.
The function gives an error message if this is not the case.
x_name | The name of the variable. |
x | A variable of type Vector. |
l | The expected length of x. |
Definition at line 238 of file check_input.cc.
References ARTS_USER_ERROR_IF, and my_basic_string< charT >::nelem().
Referenced by GasAbsLookup::Adapt(), chk_if_equal(), complex_refr_indexTemperatureConstant(), and FastemStandAlone().