ARTS  2.2.66
m_checked.cc File Reference

Workspace functions setting the checked WSVs. More...

#include "arts.h"
#include "auto_md.h"
#include "matpackI.h"

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 Index &abs_f_interp_order, const Index &negative_vmr_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 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 ArrayOfSingleScatteringData &scat_data_array, const Matrix &particle_masses, const ArrayOfArrayOfSpeciesTag &abs_species, const Verbosity &)
 WORKSPACE METHOD: cloudbox_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 Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const Vector &sensor_response_f, const ArrayOfIndex &sensor_response_pol, const Vector &sensor_response_za, const Vector &sensor_response_aa, const Verbosity &)
 WORKSPACE METHOD: sensor_checkedCalc. More...
 

Variables

const Numeric DEG2RAD
 

Detailed Description

Workspace functions setting the checked WSVs.

Author
Patrick Eriksson patri.nosp@m.ck.e.nosp@m.rikss.nosp@m.on@c.nosp@m.halme.nosp@m.rs.s.nosp@m.e
Date
2013-08-20

These functions are listed in the doxygen documentation as entries of the file auto_md.h.

Definition in file m_checked.cc.

Function Documentation

◆ abs_xsec_agenda_checkedCalc()

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

Author
Oliver Lemke
Parameters
[in,out]wsWorkspace
[out]abs_xsec_agenda_checkedWS Output
[in]abs_speciesWS Input
[in]abs_xsec_agendaWS Input

Definition at line 46 of file m_checked.cc.

References Agenda::has_method(), Array< base >::nelem(), SpeciesTag::TYPE_CIA, SpeciesTag::TYPE_FREE_ELECTRONS, SpeciesTag::TYPE_PARTICLES, SpeciesTag::TYPE_PLAIN, SpeciesTag::TYPE_PREDEF, and SpeciesTag::TYPE_ZEEMAN.

Referenced by abs_xsec_agenda_checkedCalc_g().

◆ atmfields_checkedCalc()

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 Index abs_f_interp_order,
const Index negative_vmr_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.

Author
Patrick Eriksson
Parameters
[out]atmfields_checkedWS Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]abs_speciesWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input
[in]wind_u_fieldWS Input
[in]wind_v_fieldWS Input
[in]wind_w_fieldWS Input
[in]mag_u_fieldWS Input
[in]mag_v_fieldWS Input
[in]mag_w_fieldWS Input
[in]abs_f_interp_orderWS Input
[in]negative_vmr_okGeneric Input (Default: "0")

Definition at line 115 of file m_checked.cc.

References chk_atm_field(), chk_atm_grids(), chk_atm_vecfield_lat90(), chk_if_in_range(), min, Array< base >::nelem(), and ConstTensor3View::npages().

Referenced by atmfields_checkedCalc_g().

◆ atmgeom_checkedCalc()

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 Verbosity verbosity 
)

WORKSPACE METHOD: atmgeom_checkedCalc.

Checks consistency of geometric considerations of the atmosphere.

The following WSVs are checked: z_field, refellipsoid and z_surface*. 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.

If any test fails, there is an error. Otherwise, atmgeom_checked is set to 1.

See further atmgeom_checkedCalc.

Author
Patrick Eriksson
Parameters
[out]atmgeom_checkedWS Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]refellipsoidWS Input
[in]z_surfaceWS Input

Definition at line 252 of file m_checked.cc.

References chk_atm_field(), chk_atm_grids(), chk_atm_surface(), chk_if_in_range(), chk_if_increasing(), joker, ConstMatrixView::ncols(), ConstTensor3View::ncols(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstMatrixView::nrows(), and ConstTensor3View::nrows().

Referenced by atmgeom_checkedCalc_g().

◆ cloudbox_checkedCalc()

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 ArrayOfSingleScatteringData scat_data_array,
const Matrix particle_masses,
const ArrayOfArrayOfSpeciesTag abs_species,
const Verbosity verbosity 
)

WORKSPACE METHOD: cloudbox_checkedCalc.

Checks consistency between cloudbox and particle variables.

The following WSVs are treated: cloudbox_on, cloudbox_limits, pnd_field*, scat_data_array, particle_masses and wind_u/v/w_field.

If any of these variables are 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 particle variables match in size.

If any test fails, there is an error. Otherwise, cloudbox_checked is set to 1.

Author
Patrick Eriksson
Parameters
[out]cloudbox_checkedWS Output
[in]atmfields_checkedWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]z_surfaceWS Input
[in]wind_u_fieldWS Input
[in]wind_v_fieldWS Input
[in]wind_w_fieldWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]pnd_fieldWS Input
[in]scat_data_arrayWS Input
[in]particle_massesWS Input
[in]abs_speciesWS Input

Definition at line 335 of file m_checked.cc.

References abs, chk_atm_field(), chk_if_bool(), DEG2RAD, joker, max, min, Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstMatrixView::nrows(), Vector::resize(), and SpeciesTag::TYPE_PARTICLES.

Referenced by cloudbox_checkedCalc_g().

◆ propmat_clearsky_agenda_checkedCalc()

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. CloudboxGetIncoming, ybatchCalc, yCalc

Author
Oliver Lemke
Parameters
[in,out]wsWorkspace
[out]propmat_clearsky_agenda_checkedWS Output
[in]abs_speciesWS Input
[in]propmat_clearsky_agendaWS Input

Definition at line 582 of file m_checked.cc.

References Agenda::has_method(), Array< base >::nelem(), SpeciesTag::TYPE_CIA, SpeciesTag::TYPE_FREE_ELECTRONS, SpeciesTag::TYPE_PARTICLES, SpeciesTag::TYPE_PLAIN, SpeciesTag::TYPE_PREDEF, and SpeciesTag::TYPE_ZEEMAN.

Referenced by propmat_clearsky_agenda_checkedCalc_g().

◆ sensor_checkedCalc()

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 Vector mblock_za_grid,
const Vector mblock_aa_grid,
const Index antenna_dim,
const Sparse sensor_response,
const Vector sensor_response_f,
const ArrayOfIndex sensor_response_pol,
const Vector sensor_response_za,
const Vector sensor_response_aa,
const Verbosity verbosity 
)

WORKSPACE METHOD: sensor_checkedCalc.

Checks consistency of the sensor variables.

The following WSVs are treated: sensor_pos, sensor_los, transmitter_pos*, mblock_za_grid, mblock_aa_grid, antenna_dim*, sensor_response, sensor_response_f, sensor_response_pol*, sensor_response_za, sensor_response_aa. 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.

Author
Jana Mendrok
Parameters
[out]sensor_checkedWS Output
[in]atmosphere_dimWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]sensor_posWS Input
[in]sensor_losWS Input
[in]transmitter_posWS Input
[in]mblock_za_gridWS Input
[in]mblock_aa_gridWS Input
[in]antenna_dimWS Input
[in]sensor_responseWS Input
[in]sensor_response_fWS Input
[in]sensor_response_polWS Input
[in]sensor_response_zaWS Input
[in]sensor_response_aaWS Input

Definition at line 658 of file m_checked.cc.

References chk_if_in_range(), chk_if_increasing(), joker, max, min, ConstMatrixView::ncols(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and Sparse::nrows().

Referenced by sensor_checkedCalc_g().

Variable Documentation

◆ DEG2RAD

const Numeric DEG2RAD
extern

Referenced by cloudbox_checkedCalc().