ARTS  2.4.0(git:4fb77825)
m_telsem.cc File Reference

This file contains functions to read TELSEM atlases. More...

#include "file.h"
#include "geodetic.h"
#include "matpackI.h"
#include "mystring.h"
#include "rte.h"
#include "telsem.h"

Go to the source code of this file.

Functions

void telsemStandalone (Matrix &emis, const Numeric &lat, const Numeric &lon, const Numeric &theta, const Vector &f, const TelsemAtlas &atlas, const Numeric &d_max, const Verbosity &)
 WORKSPACE METHOD: telsemStandalone. More...
 
void telsemSurfaceTypeLandSea (Index &surface_type, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lat_true, const Vector &lon_true, const Vector &rtp_pos, const TelsemAtlas &atlas, const Verbosity &)
 WORKSPACE METHOD: telsemSurfaceTypeLandSea. More...
 
void telsemAtlasLookup (Vector &emis, const Numeric &lat, const Numeric &lon, const TelsemAtlas &atlas, const Verbosity &)
 WORKSPACE METHOD: telsemAtlasLookup. More...
 
void telsem_atlasReadAscii (TelsemAtlas &atlas, const String &directory, const Index &month, const String &filename_pattern, const Verbosity &verbosity)
 WORKSPACE METHOD: telsem_atlasReadAscii. More...
 
void telsem_atlasesReadAscii (ArrayOfTelsemAtlas &telsem_atlases, const String &directory, const String &filename_pattern, const Verbosity &verbosity)
 WORKSPACE METHOD: telsem_atlasesReadAscii. More...
 

Variables

Numeric EARTH_RADIUS
 
Numeric DEG2RAD
 

Detailed Description

This file contains functions to read TELSEM atlases.

Definition in file m_telsem.cc.

Function Documentation

◆ telsem_atlasesReadAscii()

void telsem_atlasesReadAscii ( ArrayOfTelsemAtlas telsem_atlases,
const String directory,
const String filename_pattern,
const Verbosity verbosity 
)

WORKSPACE METHOD: telsem_atlasesReadAscii.

Reads TELSEM atlas files.

'directory' needs to contain the original 12 Telsem atlas files and the correlations file. The whole data is combined into the WSV telsem_atlases

Author
Oliver Lemke
Parameters
[out]telsem_atlasesWS Output
[in]directoryGeneric Input
[in]filename_patternGeneric Input (Default: "ssmi_mean_emis_climato_@MM@_cov_interpol_M2")

Definition at line 178 of file m_telsem.cc.

References CREATE_OUT2, open_input_file(), and ARTS::Var::telsem_atlases().

Referenced by telsem_atlasesReadAscii_g().

◆ telsem_atlasReadAscii()

void telsem_atlasReadAscii ( TelsemAtlas atlas,
const String directory,
const Index month,
const String filename_pattern,
const Verbosity verbosity 
)

WORKSPACE METHOD: telsem_atlasReadAscii.

Reads single TELSEM atlas.

'directory' needs to contain the original 12 Telsem atlas files and the correlations file. This WSM reads the atlas for the specified month and stores the result in the provided output atlas.

Author
Simon Pfreundschuh
Parameters
[out]atlasGeneric output
[in]directoryGeneric Input
[in]monthGeneric Input
[in]filename_patternGeneric Input (Default: "ssmi_mean_emis_climato_@MM@_cov_interpol_M2")

Definition at line 127 of file m_telsem.cc.

References CREATE_OUT2, open_input_file(), TelsemAtlas::read(), and TelsemAtlas::set_month().

Referenced by telsem_atlasReadAscii_g().

◆ telsemAtlasLookup()

void telsemAtlasLookup ( Vector emissivities,
const Numeric lat,
const Numeric lon,
const TelsemAtlas atlas,
const Verbosity verbosity 
)

WORKSPACE METHOD: telsemAtlasLookup.

Lookup SSMI emissivities from Telsem Atlas.

This returns the emissivities (indices [0,..,6]) <br> for the SSMI channels that are contained in the Telsem atlas.

If given latitude and longitude are not in the atlas an empty vector is returned.

Author
Simon Pfreundschuh
Parameters
[out]emissivitiesGeneric output
[in]latGeneric Input
[in]lonGeneric Input
[in]atlasGeneric Input

Definition at line 110 of file m_telsem.cc.

References TelsemAtlas::calc_cellnum(), chk_if_in_range(), TelsemAtlas::contains(), ARTS::Var::lat(), ARTS::Var::lon(), and Vector::resize().

Referenced by telsemAtlasLookup_g().

◆ telsemStandalone()

void telsemStandalone ( Matrix emissivities,
const Numeric lat,
const Numeric lon,
const Numeric theta,
const Vector f,
const TelsemAtlas ta,
const Numeric d_max,
const Verbosity verbosity 
)

WORKSPACE METHOD: telsemStandalone.

Stand-alone evaluation of the Telsem model.

This evaluates the Telsem land surface emissivity model using the data from the provided atlas.

Since TELSEM atlases do not contain data for all locations this function allows for nearest neighbor interpolation, which can be enabled by setting the d_max GIN to a positive value.

This WSM throws a runtime error if the queried location is not contained in the atlas or the distance of the neighboring cell exceeds the given d_max value.

Author
Simon Pfreundschuh
Parameters
[out]emissivitiesGeneric output
[in]latGeneric Input
[in]lonGeneric Input
[in]thetaGeneric Input
[in]fGeneric Input
[in]taGeneric Input
[in]d_maxGeneric Input (Default: "-1")

Definition at line 37 of file m_telsem.cc.

References TelsemAtlas::calc_cellnum(), TelsemAtlas::calc_cellnum_nearest_neighbor(), chk_if_in_range(), TelsemAtlas::contains(), TelsemAtlas::emis_interp(), TelsemAtlas::get_class1(), TelsemAtlas::get_class2(), TelsemAtlas::get_coordinates(), TelsemAtlas::get_emis_h(), TelsemAtlas::get_emis_v(), ARTS::Var::lat(), ARTS::Var::lon(), ConstVectorView::nelem(), Matrix::resize(), and sphdist().

Referenced by telsemStandalone_g().

◆ telsemSurfaceTypeLandSea()

void telsemSurfaceTypeLandSea ( Index surface_type,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lat_true,
const Vector lon_true,
const Vector rtp_pos,
const TelsemAtlas atlas,
const Verbosity verbosity 
)

WORKSPACE METHOD: telsemSurfaceTypeLandSea.

TELSEM based land sea mask.

This method determines whether the position in rtp_pos is of type ocean or land depending on whether a corresponding cell is contained in the provided TELSEM atlas. In combination with the WSM surface_rtpropCallAgendaX this can be used to used different methods to compute surface radiative properties.

Author
Simon Pfreundschuh
Parameters
[out]surface_typeWS Output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]rtp_posWS Input
[in]atlasGeneric Input

Definition at line 84 of file m_telsem.cc.

References ARTS::Var::atmosphere_dim(), TelsemAtlas::calc_cellnum(), chk_if_in_range(), chk_latlon_true(), TelsemAtlas::contains(), ARTS::Var::lat(), ARTS::Var::lat_grid(), ARTS::Var::lat_true(), ARTS::Var::lon(), ARTS::Var::lon_true(), pos2true_latlon(), ARTS::Var::rtp_pos(), and ARTS::Var::surface_type().

Referenced by telsemSurfaceTypeLandSea_g().

Variable Documentation

◆ DEG2RAD

Numeric DEG2RAD
extern

◆ EARTH_RADIUS

Numeric EARTH_RADIUS
extern