ARTS
2.4.0(git:4fb77825)
|
Workspace functions setting the checked WSVs. More...
Go to the source code of this file.
Functions | |
void | abs_xsec_agenda_checkedCalc (Workspace &ws, Index &abs_xsec_agenda_checked, const ArrayOfArrayOfSpeciesTag &abs_species, const Agenda &abs_xsec_agenda, const Verbosity &) |
WORKSPACE METHOD: abs_xsec_agenda_checkedCalc. More... | |
void | atmfields_checkedCalc (Index &atmfields_checked, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &t_field, const Tensor4 &vmr_field, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Tensor3 &mag_u_field, const Tensor3 &mag_v_field, const Tensor3 &mag_w_field, const SpeciesAuxData &partition_functions, const Index &abs_f_interp_order, const Index &negative_vmr_ok, const Index &bad_partition_functions_ok, const Verbosity &) |
WORKSPACE METHOD: atmfields_checkedCalc. More... | |
void | atmgeom_checkedCalc (Index &atmgeom_checked, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Vector &refellipsoid, const Matrix &z_surface, const Vector &lat_true, const Vector &lon_true, const Verbosity &) |
WORKSPACE METHOD: atmgeom_checkedCalc. More... | |
void | cloudbox_checkedCalc (Index &cloudbox_checked, const Index &atmfields_checked, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Matrix &z_surface, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const ArrayOfTensor4 &dpnd_field_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfString &scat_species, const Matrix &particle_masses, const ArrayOfArrayOfSpeciesTag &abs_species, const Index &negative_pnd_ok, const Verbosity &) |
WORKSPACE METHOD: cloudbox_checkedCalc. More... | |
void | scat_data_checkedCalc (Index &scat_data_checked, const ArrayOfArrayOfSingleScatteringData &scat_data, const Vector &f_grid, const Numeric &dfrel_threshold, const String &check_level, const Numeric &sca_mat_threshold, const Verbosity &verbosity) |
WORKSPACE METHOD: scat_data_checkedCalc. More... | |
void | lbl_checkedCalc (Index &lbl_checked, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfArrayOfSpeciesTag &abs_species, const SpeciesAuxData &isotopologue_ratios, const SpeciesAuxData &partition_functions, const Verbosity &) |
WORKSPACE METHOD: lbl_checkedCalc. More... | |
void | propmat_clearsky_agenda_checkedCalc (Workspace &ws, Index &propmat_clearsky_agenda_checked, const ArrayOfArrayOfSpeciesTag &abs_species, const Agenda &propmat_clearsky_agenda, const Verbosity &) |
WORKSPACE METHOD: propmat_clearsky_agenda_checkedCalc. More... | |
void | sensor_checkedCalc (Index &sensor_checked, const Index &atmosphere_dim, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_pos, const Matrix &sensor_los, const Matrix &transmitter_pos, const Matrix &mblock_dlos_grid, const Sparse &sensor_response, const Vector &sensor_response_f, const ArrayOfIndex &sensor_response_pol, const Matrix &sensor_response_dlos, const Verbosity &) |
WORKSPACE METHOD: sensor_checkedCalc. More... | |
Variables | |
const Numeric | DEG2RAD |
const Numeric | LAT_LON_MIN |
Workspace functions setting the checked WSVs.
These functions are listed in the doxygen documentation as entries of the file auto_md.h.
Definition in file m_checked.cc.
void abs_xsec_agenda_checkedCalc | ( | Workspace & | ws, |
Index & | abs_xsec_agenda_checked, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Agenda & | abs_xsec_agenda, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: abs_xsec_agenda_checkedCalc.
Checks if the abs_xsec_agenda contains all necessary methods to calculate all the species in abs_species.
This method should be called just before the abs_xsec_agenda is used, e.g. abs_lookupCalc, ybatchCalc, yCalc
[in,out] | ws | Workspace |
[out] | abs_xsec_agenda_checked | WS Output |
[in] | abs_species | WS Input |
[in] | abs_xsec_agenda | WS Input |
Definition at line 44 of file m_checked.cc.
References ARTS::Var::abs_species(), ARTS::Var::abs_xsec_agenda(), ARTS::Var::abs_xsec_agenda_checked(), find_first_species_tg(), SpeciesTag::TYPE_CIA, SpeciesTag::TYPE_FREE_ELECTRONS, SpeciesTag::TYPE_HITRAN_XSEC, SpeciesTag::TYPE_PARTICLES, SpeciesTag::TYPE_PLAIN, SpeciesTag::TYPE_PREDEF, and SpeciesTag::TYPE_ZEEMAN.
Referenced by abs_xsec_agenda_checkedCalc_g().
void atmfields_checkedCalc | ( | Index & | atmfields_checked, |
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Tensor3 & | t_field, | ||
const Tensor4 & | vmr_field, | ||
const Tensor3 & | wind_u_field, | ||
const Tensor3 & | wind_v_field, | ||
const Tensor3 & | wind_w_field, | ||
const Tensor3 & | mag_u_field, | ||
const Tensor3 & | mag_v_field, | ||
const Tensor3 & | mag_w_field, | ||
const SpeciesAuxData & | partition_functions, | ||
const Index & | abs_f_interp_order, | ||
const Index & | negative_vmr_ok, | ||
const Index & | bad_partition_functions_ok, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: atmfields_checkedCalc.
Checks consistency of (clear sky) atmospheric fields.
The following WSVs are treated: p_grid, lat_grid, lon_grid, t_field*, vmr_field, wind_u/v/w_field and mag_u/v/w_field.
If any of the variables above is changed, then this method shall be called again (no automatic check that this is fulfilled!).
The tests include that: <br> 1. Atmospheric grids (p/lat/lon_grid) are OK with respect to <br> atmosphere_dim (and vmr_field also regarding abs_species). <br> 2. Atmospheric fields have sizes consistent with the atmospheric <br> grids. <br> 3. abs_f_interp_order is not zero if any wind is nonzero. <br> 4. All values in t_field are > 0.
Default is that values in vmr_field are demanded to be >= 0 (ie. zero allowed, in contrast to t_field), but this requirement can be removed by the negative_vmr_ok argument.
If any test fails, there is an error. Otherwise, atmfields_checked* is set to 1.
The cloudbox is covered by cloudbox_checked, z_field is part of the checks done around atmgeom_checked.
If you choose to use bad_partition_functions_ok please note that this is done on your own risk and that it could introduce hard-to- track errors into your calculations. Do not use this for anything important.
[out] | atmfields_checked | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | abs_species | WS Input |
[in] | t_field | WS Input |
[in] | vmr_field | WS Input |
[in] | wind_u_field | WS Input |
[in] | wind_v_field | WS Input |
[in] | wind_w_field | WS Input |
[in] | mag_u_field | WS Input |
[in] | mag_v_field | WS Input |
[in] | mag_w_field | WS Input |
[in] | partition_functions | WS Input |
[in] | abs_f_interp_order | WS Input |
[in] | negative_vmr_ok | Generic Input (Default: "0") |
[in] | bad_partition_functions_ok | Generic Input (Default: "0") |
Definition at line 125 of file m_checked.cc.
References ARTS::Var::abs_f_interp_order(), ARTS::Var::abs_species(), SpeciesAuxData::AT_PARTITIONFUNCTION_COEFF, SpeciesAuxData::AT_PARTITIONFUNCTION_COEFF_VIBROT, SpeciesAuxData::AT_PARTITIONFUNCTION_TFIELD, ARTS::Var::atmfields_checked(), ARTS::Var::atmosphere_dim(), chk_atm_field(), chk_atm_grids(), chk_atm_vecfield_lat90(), chk_if_in_range(), data, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::mag_u_field(), ARTS::Var::mag_v_field(), ARTS::Var::mag_w_field(), min, Array< base >::nelem(), ARTS::Var::p_grid(), ARTS::Var::partition_functions(), ARTS::Var::t_field(), ARTS::Var::vmr_field(), ARTS::Var::wind_u_field(), ARTS::Var::wind_v_field(), and ARTS::Var::wind_w_field().
Referenced by abs_lookupSetupBatch(), and atmfields_checkedCalc_g().
void atmgeom_checkedCalc | ( | Index & | atmgeom_checked, |
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Tensor3 & | z_field, | ||
const Vector & | refellipsoid, | ||
const Matrix & | z_surface, | ||
const Vector & | lat_true, | ||
const Vector & | lon_true, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: atmgeom_checkedCalc.
Checks consistency of geometric considerations of the atmosphere.
The following WSVs are checked: z_field, refellipsoid, z_surface, lat_true* and lon_true. If any of the variables above is changed, then this method shall be called again (no automatic check that this is fulfilled!).
The tests include that: <br> 1. refellipsoid has correct size, and that eccentricity is <br> set to zero if 1D atmosphere. <br> 2. z_field and z_surface have sizes consistent with the <br> atmospheric grids. <br> 3. There is no gap between z_surface and z_field.
lat_true* and lon_true are allowed to be empty.
If any test fails, there is an error. Otherwise, atmgeom_checked is set to 1.
See further atmgeom_checkedCalc.
[out] | atmgeom_checked | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | z_field | WS Input |
[in] | refellipsoid | WS Input |
[in] | z_surface | WS Input |
[in] | lat_true | WS Input |
[in] | lon_true | WS Input |
Definition at line 383 of file m_checked.cc.
References ARTS::Var::atmgeom_checked(), ARTS::Var::atmosphere_dim(), chk_atm_field(), chk_atm_grids(), chk_atm_surface(), chk_if_in_range(), chk_if_increasing(), joker, ARTS::Var::lat_grid(), ARTS::Var::lat_true(), ARTS::Var::lon_grid(), ARTS::Var::lon_true(), max, min, ARTS::Var::p_grid(), ARTS::Var::refellipsoid(), ARTS::Var::z_field(), and ARTS::Var::z_surface().
Referenced by atmgeom_checkedCalc_g().
void cloudbox_checkedCalc | ( | Index & | cloudbox_checked, |
const Index & | atmfields_checked, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Tensor3 & | z_field, | ||
const Matrix & | z_surface, | ||
const Tensor3 & | wind_u_field, | ||
const Tensor3 & | wind_v_field, | ||
const Tensor3 & | wind_w_field, | ||
const Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Tensor4 & | pnd_field, | ||
const ArrayOfTensor4 & | dpnd_field_dx, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const ArrayOfString & | scat_species, | ||
const Matrix & | particle_masses, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Index & | negative_pnd_ok, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: cloudbox_checkedCalc.
Checks consistency and validity of the cloudbox governing variables.
The following WSVs are treated: cloudbox_on, cloudbox_limits, pnd_field*, scat_data, scat_species, abs_species, particle_masses particle_bulkprop_field*, particle_bulkprop_names and wind_u/v/w_field.
If any of these variables is changed, then this method shall be called again (no automatic check that this is fulfilled!).
The main checks are if the cloudbox limits are OK with respect to the atmospheric dimensionality and the limits of the atmosphere, and that the scattering element variables pnd_field and scat_data* match in size.
Further checks on scat_data are performed in scat_data_checkedCalc
scat_species* and particle_masses must either be empty or have a size that matches the other data. If non-empty, some check of these variables are performed.
If any test fails, there is an error. Otherwise, cloudbox_checked is set to 1.
[out] | cloudbox_checked | WS Output |
[in] | atmfields_checked | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | z_field | WS Input |
[in] | z_surface | WS Input |
[in] | wind_u_field | WS Input |
[in] | wind_v_field | WS Input |
[in] | wind_w_field | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_limits | WS Input |
[in] | pnd_field | WS Input |
[in] | dpnd_field_dx | WS Input |
[in] | jacobian_quantities | WS Input |
[in] | scat_data | WS Input |
[in] | scat_species | WS Input |
[in] | particle_masses | WS Input |
[in] | abs_species | WS Input |
[in] | negative_pnd_ok | Generic Input (Default: "0") |
Definition at line 484 of file m_checked.cc.
References abs, ARTS::Var::abs_species(), ARTS::Var::atmfields_checked(), ARTS::Var::atmosphere_dim(), chk_atm_field(), chk_if_bool(), ARTS::Var::cloudbox_checked(), ARTS::Var::cloudbox_limits(), ARTS::Var::cloudbox_on(), DEG2RAD, ARTS::Var::dpnd_field_dx(), ARTS::Var::jacobian_quantities(), joker, ARTS::Var::lat_grid(), LAT_LON_MIN, ARTS::Var::lon_grid(), max, min, ConstVectorView::nelem(), ARTS::Var::p_grid(), ARTS::Var::particle_masses(), ARTS::Var::pnd_field(), Vector::resize(), ARTS::Var::scat_data(), ARTS::Var::scat_species(), TotalNumberOfElements(), SpeciesTag::TYPE_PARTICLES, ARTS::Var::wind_u_field(), ARTS::Var::wind_v_field(), ARTS::Var::wind_w_field(), ARTS::Var::z_field(), and ARTS::Var::z_surface().
Referenced by cloudbox_checkedCalc_g().
void lbl_checkedCalc | ( | Index & | lbl_checked, |
const ArrayOfArrayOfAbsorptionLines & | abs_lines_per_species, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const SpeciesAuxData & | isotopologue_ratios, | ||
const SpeciesAuxData & | partition_functions, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: lbl_checkedCalc.
Checks that the line-by-line parameters are OK.
On failure, will throw. On success, lbl_checked evals as true
Note that checks may become more stringent as ARTS evolves, especially for "new" options. This test might succeed in one version of ARTS but fail in later versions
[out] | lbl_checked | WS Output |
[in] | abs_lines_per_species | WS Input |
[in] | abs_species | WS Input |
[in] | isotopologue_ratios | WS Input |
[in] | partition_functions | WS Input |
Definition at line 895 of file m_checked.cc.
References ARTS::Var::abs_lines_per_species(), ARTS::Var::abs_species(), checkIsotopologueRatios(), checkPartitionFunctions(), ARTS::Var::isotopologue_ratios(), ARTS::Var::lbl_checked(), ARTS::Var::partition_functions(), and ARTS::Var::x().
Referenced by lbl_checkedCalc_g().
void propmat_clearsky_agenda_checkedCalc | ( | Workspace & | ws, |
Index & | propmat_clearsky_agenda_checked, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Agenda & | propmat_clearsky_agenda, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: propmat_clearsky_agenda_checkedCalc.
Checks if the propmat_clearsky_agenda contains all necessary methods to calculate all the species in abs_species.
This method should be called just before the propmat_clearsky_agenda is used, e.g. DoitGetIncoming, ybatchCalc, yCalc
[in,out] | ws | Workspace |
[out] | propmat_clearsky_agenda_checked | WS Output |
[in] | abs_species | WS Input |
[in] | propmat_clearsky_agenda | WS Input |
Definition at line 976 of file m_checked.cc.
References ARTS::Var::abs_species(), ARTS::Var::propmat_clearsky_agenda(), ARTS::Var::propmat_clearsky_agenda_checked(), SpeciesTag::TYPE_CIA, SpeciesTag::TYPE_FREE_ELECTRONS, SpeciesTag::TYPE_HITRAN_XSEC, SpeciesTag::TYPE_PARTICLES, SpeciesTag::TYPE_PLAIN, SpeciesTag::TYPE_PREDEF, and SpeciesTag::TYPE_ZEEMAN.
Referenced by propmat_clearsky_agenda_checkedCalc_g().
void scat_data_checkedCalc | ( | Index & | scat_data_checked, |
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Vector & | f_grid, | ||
const Numeric & | dfrel_threshold, | ||
const String & | check_level, | ||
const Numeric & | sca_mat_threshold, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: scat_data_checkedCalc.
Checks dimensions, grids and single scattering properties of all scattering elements in scat_data.
Dimension and grid equirements:
The single scattering property contents are checked using scat_dataCheck*. For details, see there. The depth of these checks and their rigour can adapted (see description of parameters check_level* and sca_mat_threshold in scat_dataCheck) or can be skipped entirely (setting check_level to 'none'). NOTE: These test shall only be skipped when one is confident that the data is correct, e.g. by having run scat_dataCheck on the set of data before, e.g. in a separate ARTS run.
[out] | scat_data_checked | WS Output |
[in] | scat_data | WS Input |
[in] | f_grid | WS Input |
[in] | dfrel_threshold | Generic Input (Default: "0.1") |
[in] | check_level | Generic Input (Default: "all") |
[in] | sca_mat_threshold | Generic Input (Default: "5e-2") |
Definition at line 741 of file m_checked.cc.
References chk_if_increasing(), ARTS::Var::f_grid(), is_same_within_epsilon(), and ARTS::Var::scat_data().
Referenced by scat_data_checkedCalc_g().
void sensor_checkedCalc | ( | Index & | sensor_checked, |
const Index & | atmosphere_dim, | ||
const Index & | stokes_dim, | ||
const Vector & | f_grid, | ||
const Matrix & | sensor_pos, | ||
const Matrix & | sensor_los, | ||
const Matrix & | transmitter_pos, | ||
const Matrix & | mblock_dlos_grid, | ||
const Sparse & | sensor_response, | ||
const Vector & | sensor_response_f, | ||
const ArrayOfIndex & | sensor_response_pol, | ||
const Matrix & | sensor_response_dlos, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_checkedCalc.
Checks consistency of the sensor variables.
The following WSVs are examined: f_grid, sensor_pos, sensor_los, transmitter_pos*, mblock_dlos_grid, antenna_dim, sensor_response*, sensor_response_f, sensor_response_pol, and sensor_response_dlos.
If any of these variables are changed, then this method shall be called again (no automatic check that this is fulfilled!).
The main tests are that dimensions of sensor variables agree with other settings, e.g., the size of f_grid, atmosphere_dim, stokes_dim, etc.
If any test fails, there is an error. Otherwise, sensor_checked is set to 1.
[out] | sensor_checked | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | stokes_dim | WS Input |
[in] | f_grid | WS Input |
[in] | sensor_pos | WS Input |
[in] | sensor_los | WS Input |
[in] | transmitter_pos | WS Input |
[in] | mblock_dlos_grid | WS Input |
[in] | sensor_response | WS Input |
[in] | sensor_response_f | WS Input |
[in] | sensor_response_pol | WS Input |
[in] | sensor_response_dlos | WS Input |
Definition at line 1059 of file m_checked.cc.
References ARTS::Var::atmosphere_dim(), ARTS::Var::f_grid(), is_increasing(), joker, max, ARTS::Var::mblock_dlos_grid(), min, ARTS::Var::sensor_checked(), ARTS::Var::sensor_los(), ARTS::Var::sensor_pos(), ARTS::Var::sensor_response(), ARTS::Var::sensor_response_dlos(), ARTS::Var::sensor_response_f(), ARTS::Var::sensor_response_pol(), ARTS::Var::stokes_dim(), and ARTS::Var::transmitter_pos().
Referenced by sensor_checkedCalc_g().
|
extern |
Referenced by cloudbox_checkedCalc().
|
extern |
Referenced by cloudbox_checkedCalc().