ARTS 2.5.11 (git: 6827797f)
|
A telsem atlas. More...
#include <telsem.h>
Public Member Functions | |
TelsemAtlas ()=default | |
TelsemAtlas (const TelsemAtlas &)=default | |
TelsemAtlas (TelsemAtlas &&)=default | |
TelsemAtlas & | operator= (const TelsemAtlas &)=default |
TelsemAtlas & | operator= (TelsemAtlas &&)=default |
~TelsemAtlas ()=default | |
TelsemAtlas (String filename) | |
void | set_month (Index m) |
Index | get_month () const |
const Tensor3 & | get_correl () const |
void | set_correl (const Tensor3 &t) |
bool | contains (Index cellnumber) const |
Index | get_class1 (Index cellnumber) const |
Index | get_class2 (Index cellnumber) const |
Vector | get_emis_v (Index i) const |
Vector | get_emis_h (Index cellnum) const |
ConstVectorView | operator[] (Index cellnumber) const |
void | read (std::istream &is) |
void | equare () |
void | telsem_calc_correspondence () |
Index | calc_cellnum (Numeric lat, Numeric lon) const |
Index | calc_cellnum_nearest_neighbor (Numeric lat, Numeric lon) const |
std::pair< Numeric, Numeric > | get_coordinates (Index cellnum) const |
Numeric | interp_freq2 (Numeric emiss19, Numeric emiss37, Numeric emiss85, Numeric f, Index class2) const |
std::pair< Numeric, Numeric > | emis_interp (Numeric theta, Numeric freq, Index class1, Index class2, const ConstVectorView &ev, const ConstVectorView &eh) const |
Index & | DataCount () |
Index & | ChannelCount () |
String & | Name () |
Index & | Month () |
Numeric & | Lat () |
ArrayOfIndex & | Cells () |
ArrayOfIndex & | FirstCells () |
Matrix & | Emis () |
Matrix & | Emis_err () |
Tensor3 & | Correlations () |
ArrayOfIndex & | Classes1 () |
ArrayOfIndex & | Classes2 () |
ArrayOfIndex & | Cellnumber () |
ArrayOfIndex & | Correspondance () |
Numeric | A0_K0 (Index i) |
Numeric | A0_K1 (Index i) |
Numeric | A0_K2 (Index i) |
Numeric | A0_EVEH (Index i) |
Numeric | A1_EVEH (Index i) |
Numeric | A2_EVEH (Index i) |
Numeric | A3_EVEH (Index i) |
Numeric | B0_EVEH (Index i) |
Numeric | B1_EVEH (Index i) |
Numeric | B2_EVEH (Index i) |
Numeric | B3_EVEH (Index i) |
Numeric | RAPPORT43_32 (Index i) |
Numeric | RAPPORT54_43 (Index i) |
Private Attributes | |
Index | ndat |
Index | nchan |
String | name |
Index | month |
Numeric | dlat |
ArrayOfIndex | ncells |
ArrayOfIndex | firstcells |
Matrix | emis |
Matrix | emis_err |
Tensor3 | correl |
ArrayOfIndex | classes1 |
ArrayOfIndex | classes2 |
ArrayOfIndex | cellnums |
ArrayOfIndex | correspondence |
Static Private Attributes | |
static const std::array< Numeric, 30 > | a0_k0 |
static const std::array< Numeric, 30 > | a0_k1 |
static const std::array< Numeric, 30 > | a0_k2 |
static const std::array< Numeric, 30 > | a0_eveh |
static const std::array< Numeric, 30 > | a1_eveh |
static const std::array< Numeric, 30 > | a2_eveh |
static const std::array< Numeric, 30 > | a3_eveh |
static const std::array< Numeric, 30 > | b0_eveh |
static const std::array< Numeric, 30 > | b1_eveh |
static const std::array< Numeric, 30 > | b2_eveh |
static const std::array< Numeric, 30 > | b3_eveh |
static const std::array< Numeric, 4 > | rapport43_32 |
static const std::array< Numeric, 4 > | rapport54_43 |
Friends | |
std::ostream & | operator<< (std::ostream &os, const TelsemAtlas &ta) |
void | xml_write_to_stream (ostream &, const TelsemAtlas &, bofstream *, const String &, const Verbosity &) |
Writes TelsemAtlas to XML output stream. | |
void | xml_read_from_stream (istream &, TelsemAtlas &, bifstream *, const Verbosity &) |
Reads TelsemAtlas from XML input stream. | |
A telsem atlas.
Represents a Telsem2 atlas containing land surface microwave emissivities. Since the Atlas contains emissivities only for land surfaces, the data is stored in a sparse format.
The emissivities are represented on an equal area grid and numbered sequentially starting with the first latitude band at -90 degrees and moving up to 90 degrees.
The correspondance array contains the data indices for each cellnumber if it is contained in the Atlas and NAN otherwise.
|
default |
|
default |
|
default |
|
default |
TelsemAtlas::TelsemAtlas | ( | String | filename | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Index TelsemAtlas::calc_cellnum | ( | Numeric | lat, |
Numeric | lon | ||
) | const |
Compute the cellnumber corrsponding to given coordinates.
Computes the cellnumber of the lon/lat grid that contains the given coordinates.
Note: The cell may not be contained in the atlas if it is above the sea. The result should be checked using the contains(...) member function before it is used.
[in] | lat | The latitude coordinate for which to compute the containing cell. |
[out] | lon | The longitude coordinates for which to compute the containing cell. |
Definition at line 124 of file telsem.cc.
References ARTS_USER_ERROR_IF, dlat, and ncells.
Referenced by calc_cellnum_nearest_neighbor(), surfaceTelsem(), telsemAtlasLookup(), telsemStandalone(), and telsemSurfaceTypeLandSea().
Index TelsemAtlas::calc_cellnum_nearest_neighbor | ( | Numeric | lat, |
Numeric | lon | ||
) | const |
Compute the cellnumber of closest cell contained in atlas.
[in] | lat | The latitude coordinate for which to compute the containing cell. |
[out] | lon | The longitude coordinates for which to compute the containing cell. |
Definition at line 152 of file telsem.cc.
References calc_cellnum(), contains(), cycle_lat_lon(), and dlat.
Referenced by surfaceTelsem(), and telsemStandalone().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Check if cell is contained in atlas.
cellnumber | The cellnumber for given coordinates obtained from calc cellnum. |
Definition at line 68 of file telsem.h.
References correspondence, and Array< base >::nelem().
Referenced by calc_cellnum_nearest_neighbor(), surfaceTelsem(), telsemAtlasLookup(), telsemStandalone(), and telsemSurfaceTypeLandSea().
|
inline |
|
inline |
Definition at line 317 of file telsem.h.
References correspondence.
|
inline |
std::pair< Numeric, Numeric > TelsemAtlas::emis_interp | ( | Numeric | theta, |
Numeric | freq, | ||
Index | class1, | ||
Index | class2, | ||
const ConstVectorView & | ev, | ||
const ConstVectorView & | eh | ||
) | const |
Interpolat emissivities to given zenith angle and frequency.
theta | The zenith angle |
freq | The frequency in GHz (!!!) |
class1 | The surface type class |
class2 | The sruface type class |
ev | The vertical emissivities from the atlas |
eh | The horizontal emissivities from atlas |
Definition at line 269 of file telsem.cc.
References a0_eveh, a0_k0, a0_k1, a0_k2, a1_eveh, a2_eveh, a3_eveh, b0_eveh, b1_eveh, b2_eveh, b3_eveh, and interp_freq2().
Referenced by surfaceTelsem(), and telsemStandalone().
void TelsemAtlas::equare | ( | ) |
Compute the number of cells in each latitude band.
Telsem surface emissivities are represented on an equal area grid. This functions computes the number of grid cells for each latitude band as well as the cell number of the first grid cell in each band.
Definition at line 75 of file telsem.cc.
References DEG2RAD, dlat, EARTH_RADIUS, firstcells, ncells, and PI.
Referenced by read().
|
inline |
Definition at line 298 of file telsem.h.
References firstcells.
|
inline |
Class of a given cell. Return the class1 value of the given cell. Indexed by cellnumber obtained from calc_cellnum(...).
Throws a runtime error if cellnumber is not contained in the atlas, i.e. is not over land.
cellnumber | The cellnumber for which to lookup the class. |
Definition at line 85 of file telsem.h.
References classes1, and correspondence.
Referenced by surfaceTelsem(), and telsemStandalone().
|
inline |
Class of a given cell. Return the class2 value of the given cell. Indexed by cellnumber obtained from calc_cellnum(...).
Throws a runtime error if cellnumber is not contained in the atlas, i.e. is not over land.
cellnumber | The cellnumber for which to lookup the class. |
Definition at line 103 of file telsem.h.
References classes2, and correspondence.
Referenced by surfaceTelsem(), and telsemStandalone().
std::pair< Numeric, Numeric > TelsemAtlas::get_coordinates | ( | Index | cellnum | ) | const |
Compute corrdinates of a given cell.
[in] | cellnum | The cell number for which to compute the coordinates. |
[out] | The | latitiude and longitude coordinates of the cell. |
Definition at line 207 of file telsem.cc.
References dlat, firstcells, and ncells.
Referenced by surfaceTelsem(), and telsemStandalone().
|
inline |
|
inline |
Horizontally polarized emissivities at 19, 37 and 85 GHz.
The horizontally polarized emissivities that are used for the Telsem2 emissivity interpolation. The index here is the cellnumber obtained for given latitude and longitude using calc_cellnum(...).
cellnum | The atlas' cellunmber from which to extract the emissivities. |
Definition at line 142 of file telsem.h.
References correspondence, and emis.
Referenced by surfaceTelsem(), and telsemStandalone().
|
inline |
Verically polarized emissivities at 19, 37 and 85 GHz.
The vertically polarized emissivities that are used for the Telsem2 emissivity interpolation. The index here is the cellnumber obtained for given latitude and longitude using calc_cellnum(...).
cellnum | The atlas' cellunmber from which to extract the emissivities. |
Definition at line 120 of file telsem.h.
References correspondence, and emis.
Referenced by surfaceTelsem(), and telsemStandalone().
|
inline |
Numeric TelsemAtlas::interp_freq2 | ( | Numeric | emiss19, |
Numeric | emiss37, | ||
Numeric | emiss85, | ||
Numeric | f, | ||
Index | class2 | ||
) | const |
Inter-/Extrapolate emissivities to given frequency.
This function interpolates the SSMI emissivities at 19, 37, 85 GHz to the given frequency value.
emiss19 | The SSMI emissivity at 19 GHz |
emiss37 | The SSMI emissivity at 37 GHz |
emiss85 | The SSMI emissivity at 85 GHz |
f | The frequency in GHz (!) |
class2 | The surface class |
Definition at line 228 of file telsem.cc.
References a, b, c, rapport43_32, and rapport54_43.
Referenced by emis_interp().
|
default |
|
default |
|
inline |
ConstVectorView on emissivities at given index.
The vector containing the seven SSMI emissivities contained in the atlas.
Throws a runtime error if cellnumber is not contained in the atlas, i.e. over land.
The | cellnumber |
Definition at line 166 of file telsem.h.
References correspondence, and emis.
|
inline |
Definition at line 331 of file telsem.h.
References rapport43_32.
|
inline |
Definition at line 332 of file telsem.h.
References rapport54_43.
void TelsemAtlas::read | ( | std::istream & | is | ) |
Read Telsem Atlas from input stream.
Definition at line 28 of file telsem.cc.
References ARTS_USER_ERROR_IF, cellnums, classes1, classes2, dlat, emis, emis_err, equare(), name, nchan, ndat, and telsem_calc_correspondence().
Referenced by telsem_atlasReadAscii(), and TelsemAtlas().
|
inline |
|
inline |
void TelsemAtlas::telsem_calc_correspondence | ( | ) |
|
friend |
|
friend |
Reads TelsemAtlas from XML input stream.
is_xml | XML Input stream |
pm | TelsemAtlas return value |
pbifs | Pointer to binary input stream. NULL in case of ASCII file. |
Definition at line 1850 of file xml_io_compound_types.cc.
|
friend |
Writes TelsemAtlas to XML output stream.
os_xml | XML Output stream |
pm | TelsemAtlas |
pbofs | Pointer to binary file stream. NULL for ASCII output. |
name | Optional name attribute |
Definition at line 1882 of file xml_io_compound_types.cc.
|
staticprivate |
Definition at line 367 of file telsem.h.
Referenced by A0_EVEH(), and emis_interp().
|
staticprivate |
Definition at line 364 of file telsem.h.
Referenced by A0_K0(), and emis_interp().
|
staticprivate |
Definition at line 365 of file telsem.h.
Referenced by A0_K1(), and emis_interp().
|
staticprivate |
Definition at line 366 of file telsem.h.
Referenced by A0_K2(), and emis_interp().
|
staticprivate |
Definition at line 368 of file telsem.h.
Referenced by A1_EVEH(), and emis_interp().
|
staticprivate |
Definition at line 369 of file telsem.h.
Referenced by A2_EVEH(), and emis_interp().
|
staticprivate |
Definition at line 370 of file telsem.h.
Referenced by A3_EVEH(), and emis_interp().
|
staticprivate |
Definition at line 371 of file telsem.h.
Referenced by B0_EVEH(), and emis_interp().
|
staticprivate |
Definition at line 372 of file telsem.h.
Referenced by B1_EVEH(), and emis_interp().
|
staticprivate |
Definition at line 373 of file telsem.h.
Referenced by B2_EVEH(), and emis_interp().
|
staticprivate |
Definition at line 374 of file telsem.h.
Referenced by B3_EVEH(), and emis_interp().
|
private |
Definition at line 359 of file telsem.h.
Referenced by Cellnumber(), read(), and telsem_calc_correspondence().
|
private |
Definition at line 356 of file telsem.h.
Referenced by Classes1(), get_class1(), and read().
|
private |
Definition at line 357 of file telsem.h.
Referenced by Classes2(), get_class2(), and read().
|
private |
Definition at line 354 of file telsem.h.
Referenced by Correlations(), get_correl(), and set_correl().
|
private |
Definition at line 361 of file telsem.h.
Referenced by contains(), Correspondance(), get_class1(), get_class2(), get_emis_h(), get_emis_v(), operator[](), and telsem_calc_correspondence().
|
private |
Definition at line 344 of file telsem.h.
Referenced by calc_cellnum(), calc_cellnum_nearest_neighbor(), equare(), get_coordinates(), Lat(), and read().
|
private |
Definition at line 350 of file telsem.h.
Referenced by Emis(), get_emis_h(), get_emis_v(), operator[](), and read().
|
private |
Definition at line 352 of file telsem.h.
Referenced by Emis_err(), and read().
|
private |
Definition at line 348 of file telsem.h.
Referenced by equare(), FirstCells(), and get_coordinates().
|
private |
Definition at line 342 of file telsem.h.
Referenced by get_month(), Month(), and set_month().
|
private |
|
private |
Definition at line 346 of file telsem.h.
Referenced by calc_cellnum(), Cells(), equare(), and get_coordinates().
|
private |
Definition at line 338 of file telsem.h.
Referenced by ChannelCount(), and read().
|
private |
Definition at line 336 of file telsem.h.
Referenced by DataCount(), read(), and telsem_calc_correspondence().
|
staticprivate |
Definition at line 375 of file telsem.h.
Referenced by interp_freq2(), and RAPPORT43_32().
|
staticprivate |
Definition at line 376 of file telsem.h.
Referenced by interp_freq2(), and RAPPORT54_43().