ARTS 2.5.11 (git: 6827797f)
m_telsem.cc File Reference

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

#include "arts_conversions.h"
#include "file.h"
#include "geodetic.h"
#include "matpack_data.h"
#include "mystring.h"
#include "rte.h"
#include "telsem.h"
#include "check_input.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.
 
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.
 
void telsemAtlasLookup (Vector &emis, const Numeric &lat, const Numeric &lon, const TelsemAtlas &atlas, const Verbosity &)
 WORKSPACE METHOD: telsemAtlasLookup.
 
void telsem_atlasReadAscii (TelsemAtlas &atlas, const String &directory, const Index &month, const String &filename_pattern, const Verbosity &verbosity)
 WORKSPACE METHOD: telsem_atlasReadAscii.
 
void telsem_atlasesReadAscii (ArrayOfTelsemAtlas &telsem_atlases, const String &directory, const String &filename_pattern, const Verbosity &verbosity)
 WORKSPACE METHOD: telsem_atlasesReadAscii.
 

Variables

constexpr Numeric EARTH_RADIUS =Constant::earth_radius
 
constexpr Numeric DEG2RAD =Conversion::deg2rad(1)
 

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 154 of file m_telsem.cc.

References ARTS_USER_ERROR_IF, CREATE_OUT2, my_basic_string< char >::npos, and open_input_file().

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 104 of file m_telsem.cc.

References ARTS_USER_ERROR_IF, CREATE_OUT2, my_basic_string< char >::npos, open_input_file(), TelsemAtlas::read(), TelsemAtlas::set_correl(), 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 87 of file m_telsem.cc.

References TelsemAtlas::calc_cellnum(), chk_if_in_range(), and TelsemAtlas::contains().

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 20 of file m_telsem.cc.

References ARTS_USER_ERROR_IF, TelsemAtlas::calc_cellnum(), TelsemAtlas::calc_cellnum_nearest_neighbor(), chk_if_in_range(), TelsemAtlas::contains(), d, TelsemAtlas::emis_interp(), TelsemAtlas::get_class1(), TelsemAtlas::get_class2(), TelsemAtlas::get_coordinates(), TelsemAtlas::get_emis_h(), TelsemAtlas::get_emis_v(), 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.

Author
Simon Pfreundschuh
Parameters
[out]surface_typeGeneric 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 61 of file m_telsem.cc.

References TelsemAtlas::calc_cellnum(), chk_if_in_range(), chk_latlon_true(), TelsemAtlas::contains(), and pos2true_latlon().

Referenced by telsemSurfaceTypeLandSea_g().

Variable Documentation

◆ DEG2RAD

constexpr Numeric DEG2RAD =Conversion::deg2rad(1)
inlineconstexpr

Definition at line 17 of file m_telsem.cc.

◆ EARTH_RADIUS

constexpr Numeric EARTH_RADIUS =Constant::earth_radius
inlineconstexpr

Definition at line 16 of file m_telsem.cc.