ARTS 2.5.11 (git: 725533f0)
|
#include <gridded_fields.h>
Public Member Functions | |
virtual | ~GriddedField ()=default |
Defaulted con-/de-structors and assignments so unique pointers work w/o warnings. | |
GriddedField (const GriddedField &)=default | |
GriddedField (GriddedField &&)=default | |
GriddedField & | operator= (const GriddedField &)=default |
GriddedField & | operator= (GriddedField &&)=default |
Index | get_dim () const |
Get the dimension of this gridded field. | |
void | copy_grids (const GriddedField &gf) |
Copy grids. | |
const String & | get_grid_name (Index i) const |
Get grid name. | |
Index | get_grid_size (Index i) const |
Get the size of a grid. | |
GridType | get_grid_type (Index i) const |
Get grid type. | |
const Vector & | get_numeric_grid (Index i) const |
Get a numeric grid. | |
Vector & | get_numeric_grid (Index i) |
Get a numeric grid. | |
const ArrayOfString & | get_string_grid (Index i) const |
Get a string grid. | |
ArrayOfString & | get_string_grid (Index i) |
Get a string grid. | |
const String & | get_name () const |
Get the name of this gridded field. | |
void | set_grid (Index i, const Vector &g) |
Set a numeric grid. | |
void | set_grid (Index i, const ArrayOfString &g) |
Set a string grid. | |
void | set_grid_name (Index i, const String &s) |
Set grid name. | |
void | set_name (const String &s) |
Set name of this gridded field. | |
virtual bool | checksize () const =0 |
Consistency check. | |
virtual void | checksize_strict () const =0 |
Strict consistency check. | |
Protected Member Functions | |
GriddedField () | |
Construct an empty GriddedField. | |
GriddedField (const Index d, String s) | |
Construct a GriddedField. | |
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 140 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 155 of file gridded_fields.h.
|
inlineprotected |
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 174 of file gridded_fields.h.
|
virtualdefault |
Defaulted con-/de-structors and assignments so unique pointers work w/o warnings.
|
default |
|
default |
|
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 GriddedField1, GriddedField2, GriddedField3, GriddedField4, GriddedField5, and GriddedField6.
|
pure virtual |
Strict consistency check.
Same as GriddedField::checksize but throws runtime_error in case of error.
Implemented in GriddedField1, GriddedField2, GriddedField3, GriddedField4, GriddedField5, and GriddedField6.
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 41 of file gridded_fields.cc.
References ARTS_ASSERT, dim, get_dim(), get_grid_type(), get_numeric_grid(), get_string_grid(), GRID_TYPE_NUMERIC, GRID_TYPE_STRING, mgridtypes, mnumericgrids, and mstringgrids.
|
inline |
Get the dimension of this gridded field.
Definition at line 193 of file gridded_fields.h.
References dim.
Referenced by chk_griddedfield_gridname(), copy_grids(), xml_read_from_stream(), and xml_write_to_stream().
|
inline |
Get grid name.
Returns the name of the grid with index i.
[in] | i | Grid index. |
Definition at line 204 of file gridded_fields.h.
References mgridnames.
Referenced by chk_griddedfield_gridname(), GriddedFieldLatLonExpand(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegrid(), GriddedFieldPRegrid(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), and xml_write_to_stream().
|
inline |
Get the size of a grid.
Returns the size of grid i.
[in] | i | Grid index. |
Definition at line 213 of file gridded_fields.h.
References ARTS_ASSERT, dim, GRID_TYPE_NUMERIC, GRID_TYPE_STRING, mgridtypes, mnumericgrids, and mstringgrids.
Referenced by GriddedField1::checksize(), GriddedField2::checksize(), GriddedField3::checksize(), GriddedField4::checksize(), GriddedField5::checksize(), GriddedField6::checksize(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedField1::resize(), GriddedField2::resize(), GriddedField3::resize(), GriddedField4::resize(), GriddedField5::resize(), and GriddedField6::resize().
|
inline |
Get grid type.
Returns the type of the grid with index i.
[in] | i | Grid index. |
Definition at line 235 of file gridded_fields.h.
References mgridtypes.
Referenced by copy_grids(), and xml_write_to_stream().
|
inline |
Get the name of this gridded field.
Definition at line 247 of file gridded_fields.h.
References mname.
Referenced by chk_griddedfield_gridname(), xml_write_to_stream(), xml_write_to_stream(), xml_write_to_stream(), xml_write_to_stream(), xml_write_to_stream(), and xml_write_to_stream().
Vector & 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 87 of file gridded_fields.cc.
References ARTS_ASSERT, ARTS_USER_ERROR_IF, dim, GRID_TYPE_NUMERIC, mgridnames, mgridtypes, mname, mnumericgrids, and var_string().
const Vector & 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 69 of file gridded_fields.cc.
References ARTS_ASSERT, ARTS_USER_ERROR_IF, dim, GRID_TYPE_NUMERIC, mgridnames, mgridtypes, mname, mnumericgrids, and var_string().
Referenced by antenna1d_matrix(), antenna2d_gridded_dlos(), antenna2d_interp_response(), atm_fields_compactAddSpecies(), atm_fields_compactCreateFromField(), AtmFieldsCalc(), chk_pnd_data(), cia_interpolation(), complex_n_interp(), copy_grids(), FieldFromGriddedField(), FieldFromGriddedField(), FieldFromGriddedFieldCheckLatLonHelper(), GriddedFieldLatLonExpand(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegrid(), GriddedFieldPRegrid(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), GriddedFieldZToPRegridHelper(), InterpGriddedField2ToPosition(), InterpSurfaceTypeMask(), MagFieldsCalc(), mixer_matrix(), regrid_sun_spectrum(), sensor_responseMixer(), surface_complex_refr_indexFromGriddedField5(), surface_reflectivityFromGriddedField6(), surface_scalar_reflectivityFromGriddedField4(), WindFieldsCalc(), xml_write_to_stream(), ybatchMetProfiles(), and ybatchMetProfilesClear().
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 123 of file gridded_fields.cc.
References ARTS_ASSERT, ARTS_USER_ERROR_IF, dim, GRID_TYPE_STRING, mgridnames, mgridtypes, mname, mstringgrids, and var_string().
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 105 of file gridded_fields.cc.
References ARTS_ASSERT, ARTS_USER_ERROR_IF, dim, GRID_TYPE_STRING, mgridnames, mgridtypes, mname, mstringgrids, and var_string().
Referenced by antenna1d_matrix(), antenna2d_gridded_dlos(), antenna2d_interp_response(), atm_fields_compactAddConstant(), atm_fields_compactCleanup(), atm_fields_compactExpand(), copy_grids(), and xml_write_to_stream().
|
default |
|
default |
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 153 of file gridded_fields.cc.
References ARTS_ASSERT, dim, GRID_TYPE_STRING, mgridtypes, mnumericgrids, and mstringgrids.
void GriddedField::set_grid | ( | Index | i, |
const Vector & | g | ||
) |
Set a numeric grid.
Sets grid i to the given grid.
[in] | i | Grid index. |
[in] | g | New grid. |
Definition at line 139 of file gridded_fields.cc.
References ARTS_ASSERT, dim, GRID_TYPE_NUMERIC, mgridtypes, mnumericgrids, and mstringgrids.
Referenced by CIARecord::AppendDataset(), atm_fields_compactCreateFromField(), atm_fields_compactFromMatrix(), complex_refr_indexConstant(), complex_refr_indexIceMatzler06(), complex_refr_indexTemperatureConstant(), complex_refr_indexWaterLiebe93(), complex_refr_indexWaterVisibleNIRHarvey98(), GriddedFieldLatLonExpand(), GriddedFieldLatLonExpand(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegrid(), GriddedFieldPRegrid(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), HydrotableCalc(), iyIndependentBeamApproximation(), sensor_responseGenericAMSU(), sensor_responseSimpleAMSU(), surface_complex_refr_indexFromGriddedField5(), and xml_read_from_stream().
|
inline |
Set grid name.
Sets the name with the given index.
Definition at line 260 of file gridded_fields.h.
References ARTS_ASSERT, dim, and mgridnames.
Referenced by CIARecord::AppendDataset(), complex_refr_indexConstant(), complex_refr_indexIceMatzler06(), complex_refr_indexTemperatureConstant(), complex_refr_indexWaterLiebe93(), complex_refr_indexWaterVisibleNIRHarvey98(), GriddedFieldLatLonExpand(), GriddedFieldLatLonExpand(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegrid(), GriddedFieldPRegrid(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), HydrotableCalc(), iyIndependentBeamApproximation(), 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 267 of file gridded_fields.h.
References mname.
Referenced by HydrotableCalc(), iyIndependentBeamApproximation(), sensor_responseGenericAMSU(), sensor_responseSimpleAMSU(), xml_read_from_stream(), xml_read_from_stream(), xml_read_from_stream(), xml_read_from_stream(), xml_read_from_stream(), and xml_read_from_stream().
|
friend |
|
private |
Definition at line 142 of file gridded_fields.h.
Referenced by copy_grids(), get_dim(), get_grid_size(), get_numeric_grid(), get_numeric_grid(), get_string_grid(), get_string_grid(), operator<<(), set_grid(), set_grid(), and set_grid_name().
|
private |
Definition at line 145 of file gridded_fields.h.
Referenced by get_grid_name(), get_numeric_grid(), get_numeric_grid(), get_string_grid(), get_string_grid(), operator<<(), and set_grid_name().
Definition at line 144 of file gridded_fields.h.
Referenced by copy_grids(), get_grid_size(), get_grid_type(), get_numeric_grid(), get_numeric_grid(), get_string_grid(), get_string_grid(), operator<<(), set_grid(), and set_grid().
|
private |
Definition at line 143 of file gridded_fields.h.
Referenced by get_name(), get_numeric_grid(), get_numeric_grid(), get_string_grid(), get_string_grid(), operator<<(), and set_name().
|
private |
Definition at line 147 of file gridded_fields.h.
Referenced by copy_grids(), get_grid_size(), get_numeric_grid(), get_numeric_grid(), operator<<(), set_grid(), and set_grid().
|
private |
Definition at line 146 of file gridded_fields.h.
Referenced by copy_grids(), get_grid_size(), get_string_grid(), get_string_grid(), operator<<(), set_grid(), and set_grid().