ARTS
2.2.66
|
#include <gridded_fields.h>
Public Member Functions | |
Index | get_dim () const |
Get the dimension of this gridded field. More... | |
void | copy_grids (const GriddedField &gf) |
Copy grids. More... | |
const String & | get_grid_name (Index i) const |
Get grid name. More... | |
Index | get_grid_size (Index i) const |
Get the size of a grid. More... | |
GridType | get_grid_type (Index i) const |
Get grid type. More... | |
ConstVectorView | get_numeric_grid (Index i) const |
Get a numeric grid. More... | |
VectorView | get_numeric_grid (Index i) |
Get a numeric grid. More... | |
const ArrayOfString & | get_string_grid (Index i) const |
Get a string grid. More... | |
ArrayOfString & | get_string_grid (Index i) |
Get a string grid. More... | |
const String & | get_name () const |
Get the name of this gridded field. More... | |
void | set_grid (Index i, const Vector &g) |
Set a numeric grid. More... | |
void | set_grid (Index i, const ArrayOfString &g) |
Set a string grid. More... | |
void | set_grid_name (Index i, const String &s) |
Set grid name. More... | |
void | set_name (const String &s) |
Set name of this gridded field. More... | |
virtual bool | checksize () const =0 |
Consistency check. More... | |
virtual void | checksize_strict () const =0 |
Strict consistency check. More... | |
virtual | ~GriddedField () |
GriddedField virtual destructor. More... | |
Protected Member Functions | |
GriddedField () | |
Construct an empty GriddedField. More... | |
GriddedField (const Index d, const String &s) | |
Construct a GriddedField. More... | |
Private Attributes | |
Index | dim |
String | mname |
Array< GridType > | mgridtypes |
ArrayOfString | mgridnames |
Array< ArrayOfString > | mstringgrids |
ArrayOfVector | mnumericgrids |
Friends | |
std::ostream & | operator<< (std::ostream &os, const GriddedField &gf) |
Abstract base class for gridded fields.
Definition at line 55 of file gridded_fields.h.
|
inlineprotected |
Construct an empty GriddedField.
The constructor for GriddedField is protected because it is only used internally by the derived classed.
Definition at line 70 of file gridded_fields.h.
Construct a GriddedField.
Constructs a GriddedField with the given dimension and name.
The constructor for GriddedField is protected because it is only used internally by the derived classes.
[in] | d | Dimension. |
[in] | s | Name. |
Definition at line 88 of file gridded_fields.h.
|
inlinevirtual |
GriddedField virtual destructor.
Definition at line 193 of file gridded_fields.h.
References operator<<.
|
pure virtual |
Consistency check.
Check if the sizes of the grids match the data dimension.
This function must be overwritten by the derived classes.
Implemented in GriddedField6, GriddedField5, GriddedField4, GriddedField3, GriddedField2, and GriddedField1.
Referenced by GriddedField1::checksize_strict(), GriddedField2::checksize_strict(), GriddedField3::checksize_strict(), GriddedField4::checksize_strict(), GriddedField5::checksize_strict(), GriddedField6::checksize_strict(), and set_name().
|
pure virtual |
Strict consistency check.
Same as GriddedField::checksize but throws runtime_error in case of error.
Implemented in GriddedField6, GriddedField5, GriddedField4, GriddedField3, GriddedField2, and GriddedField1.
Referenced by set_name(), and xml_read_from_stream().
void GriddedField::copy_grids | ( | const GriddedField & | gf | ) |
Copy grids.
Copies the grids from the given GriddedField to the current one.
[in] | gf | Source gridded field |
Definition at line 61 of file gridded_fields.cc.
References dim, get_dim(), get_grid_type(), get_numeric_grid(), get_string_grid(), GRID_TYPE_NUMERIC, GRID_TYPE_STRING, mgridtypes, mnumericgrids, and mstringgrids.
Referenced by get_dim().
|
inline |
Get the dimension of this gridded field.
Definition at line 100 of file gridded_fields.h.
References copy_grids(), and dim.
Referenced by chk_griddedfield_gridname(), Compare(), copy_grids(), xml_read_from_stream(), and xml_write_to_stream().
Get grid name.
Returns the name of the grid with index i.
[in] | i | Grid index. |
Definition at line 111 of file gridded_fields.h.
Referenced by GriddedField1::checksize_strict(), GriddedField2::checksize_strict(), GriddedField3::checksize_strict(), GriddedField4::checksize_strict(), GriddedField5::checksize_strict(), GriddedField6::checksize_strict(), chk_griddedfield_gridname(), Compare(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegrid(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), and xml_write_to_stream().
Get the size of a grid.
Returns the size of grid i.
[in] | i | Grid index. |
Definition at line 120 of file gridded_fields.h.
References GRID_TYPE_NUMERIC, GRID_TYPE_STRING, and Array< base >::nelem().
Referenced by AtmFieldsFromCompact(), GriddedField1::checksize(), GriddedField2::checksize(), GriddedField3::checksize(), GriddedField4::checksize(), GriddedField5::checksize(), GriddedField6::checksize(), GriddedField1::checksize_strict(), GriddedField2::checksize_strict(), GriddedField3::checksize_strict(), GriddedField4::checksize_strict(), GriddedField5::checksize_strict(), GriddedField6::checksize_strict(), Compare(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedField1::resize(), GriddedField2::resize(), GriddedField3::resize(), GriddedField4::resize(), GriddedField5::resize(), and GriddedField6::resize().
Get grid type.
Returns the type of the grid with index i.
[in] | i | Grid index. |
Definition at line 141 of file gridded_fields.h.
References get_numeric_grid(), and get_string_grid().
Referenced by copy_grids(), and xml_write_to_stream().
|
inline |
Get the name of this gridded field.
Definition at line 153 of file gridded_fields.h.
References mname, and set_grid().
Referenced by GriddedField1::checksize_strict(), GriddedField2::checksize_strict(), GriddedField3::checksize_strict(), GriddedField4::checksize_strict(), GriddedField5::checksize_strict(), GriddedField6::checksize_strict(), chk_griddedfield_gridname(), main(), and xml_write_to_stream().
ConstVectorView GriddedField::get_numeric_grid | ( | Index | i | ) | const |
Get a numeric grid.
Returns the numeric grid with index i.
Throws a runtime error if grid i is not of type Numeric.
[in] | i | Grid index. |
Definition at line 93 of file gridded_fields.cc.
References dim, GRID_TYPE_NUMERIC, mgridnames, mgridtypes, mname, and mnumericgrids.
Referenced by antenna1d_matrix(), antenna2d_simplified(), AntennaConstantGaussian1D(), atm_fields_compactAddSpecies(), AtmFieldsCalc(), AtmFieldsFromCompact(), chk_if_pnd_zero_lat(), chk_if_pnd_zero_lon(), chk_if_pnd_zero_p(), chk_pnd_data(), cia_interpolation(), complex_n_interp(), copy_grids(), FieldFromGriddedField(), FieldFromGriddedFieldCheckLatLonHelper(), get_grid_type(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegrid(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), GriddedFieldZToPRegridHelper(), lat_gridFromRawField(), lon_gridFromRawField(), mixer_matrix(), p_gridFromZRaw(), sensor_responseAntenna(), sensor_responseMixer(), surface_complex_refr_indexFromGriddedField5(), surface_reflectivityFromGriddedField6(), surface_scalar_reflectivityFromGriddedField4(), xml_write_to_stream(), ybatchMetProfiles(), and ybatchMetProfilesClear().
VectorView GriddedField::get_numeric_grid | ( | Index | i | ) |
Get a numeric grid.
Returns the numeric grid with index i.
Throws a runtime error if grid i is not of type Numeric.
[in] | i | Grid index. |
Definition at line 126 of file gridded_fields.cc.
References dim, GRID_TYPE_NUMERIC, mgridnames, mgridtypes, mname, and mnumericgrids.
const ArrayOfString & GriddedField::get_string_grid | ( | Index | i | ) | const |
Get a string grid.
Returns the string grid with index i.
Throws a runtime error if grid i is not of type String.
[in] | i | Grid index. |
Definition at line 159 of file gridded_fields.cc.
References dim, GRID_TYPE_STRING, mgridnames, mgridtypes, mname, and mstringgrids.
Referenced by antenna1d_matrix(), atm_fields_compactExpand(), AtmFieldsFromCompact(), copy_grids(), get_grid_type(), sensor_responseAntenna(), and xml_write_to_stream().
ArrayOfString & GriddedField::get_string_grid | ( | Index | i | ) |
Get a string grid.
Returns the string grid with index i.
Throws a runtime error if grid i is not of type String.
[in] | i | Grid index. |
Definition at line 193 of file gridded_fields.cc.
References dim, GRID_TYPE_STRING, mgridnames, mgridtypes, mname, and mstringgrids.
Set a numeric grid.
Sets grid i to the given grid.
[in] | i | Grid index. |
[in] | g | New grid. |
Definition at line 225 of file gridded_fields.cc.
References dim, GRID_TYPE_NUMERIC, mgridtypes, mnumericgrids, and mstringgrids.
Referenced by antenna2d_simplified(), antenna_responseGaussian(), antenna_responseVaryingGaussian(), CIARecord::AppendDataset(), atm_fields_compactFromMatrix(), complex_refr_indexConstant(), complex_refr_indexWaterLiebe93(), get_name(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegrid(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), main(), sensor_responseGenericAMSU(), sensor_responseSimpleAMSU(), surface_complex_refr_indexFromGriddedField5(), test01(), and xml_read_from_stream().
void GriddedField::set_grid | ( | Index | i, |
const ArrayOfString & | g | ||
) |
Set a string grid.
Sets grid i to the given grid.
[in] | i | Grid index. |
[in] | g | New grid. |
Definition at line 241 of file gridded_fields.cc.
References dim, GRID_TYPE_STRING, mgridtypes, mnumericgrids, and mstringgrids.
Set grid name.
Sets the name with the given index.
[in] | i | Grid index. |
[in] | s | Grid name. |
Definition at line 166 of file gridded_fields.h.
Referenced by antenna_responseGaussian(), antenna_responseVaryingGaussian(), CIARecord::AppendDataset(), complex_refr_indexConstant(), complex_refr_indexWaterLiebe93(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegrid(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), main(), sensor_responseGenericAMSU(), sensor_responseSimpleAMSU(), surface_complex_refr_indexFromGriddedField5(), and xml_read_from_stream().
|
inline |
Set name of this gridded field.
[in] | s | Gridded field name. |
Definition at line 174 of file gridded_fields.h.
References checksize(), and checksize_strict().
Referenced by antenna_responseGaussian(), antenna_responseVaryingGaussian(), main(), sensor_responseGenericAMSU(), sensor_responseSimpleAMSU(), and xml_read_from_stream().
|
friend |
|
private |
Definition at line 57 of file gridded_fields.h.
Referenced by copy_grids(), get_dim(), get_numeric_grid(), get_string_grid(), operator<<(), and set_grid().
|
private |
Definition at line 60 of file gridded_fields.h.
Referenced by get_numeric_grid(), get_string_grid(), and operator<<().
Definition at line 59 of file gridded_fields.h.
Referenced by copy_grids(), get_numeric_grid(), get_string_grid(), operator<<(), and set_grid().
|
private |
Definition at line 58 of file gridded_fields.h.
Referenced by get_name(), get_numeric_grid(), get_string_grid(), and operator<<().
|
private |
Definition at line 62 of file gridded_fields.h.
Referenced by copy_grids(), get_numeric_grid(), operator<<(), and set_grid().
|
private |
Definition at line 61 of file gridded_fields.h.
Referenced by copy_grids(), get_string_grid(), operator<<(), and set_grid().