54 "Given coordinates are not contained in "
55 " TELSEM atlas. To enable nearest neighbor"
56 "interpolation set *d_max* to a positive "
63 "Distance of nearest neighbor exceeds provided limit (",
64 d,
" > ", d_max,
").")
74 std::tie(emis(i, 0), emis(i, 1)) =
75 atlas.
emis_interp(theta, f[i] * 1e-9, class1, class2, emis_v, emis_h);
81 const Index &atmosphere_dim,
93 lat, lon, atmosphere_dim, lat_grid, lat_true, lon_true, rtp_pos);
116 emis = atlas[cellnumber];
126 const String &filename_pattern,
129 const Index imonth = filename_pattern.find(
"@MM@");
131 "Substring '@MM@' not found in filename_pattern for\n",
132 "month number replacement: ",
137 ostringstream month_ss;
143 String this_filename = filename_pattern;
144 this_filename.replace(imonth, 4, month_ss.str());
145 this_filename = directory +
'/' + this_filename;
147 out2 <<
"Reading TELSEM atlas: " << this_filename <<
'\n';
152 String corr_filename = directory +
'/' +
"correlations";
153 out2 <<
"Reading correlations: " << corr_filename <<
'\n';
154 std::ifstream corr_is;
158 for (
Index i = 0; i < 10; i++) {
159 std::getline(corr_is, s);
160 for (
Index j = 0; j < 7; j++) {
161 for (
Index k = 0; k < 7; k++) {
164 "Error reading correlation.");
166 std::getline(corr_is, s);
175 const String &filename_pattern,
178 const Index imonth = filename_pattern.find(
"@MM@");
180 "Substring '@MM@' not found in filename_pattern for\n",
181 "month number replacement: ",
184 telsem_atlases.resize(12);
185 for (
Index i = 1; i <= 12; i++) {
188 if (i < 10) month << 0;
190 String this_filename = filename_pattern;
191 this_filename.replace(imonth, 4, month.str());
192 this_filename = directory +
'/' + this_filename;
194 out2 <<
"Reading TELSEM atlas: " << this_filename <<
'\n';
196 telsem_atlases[i - 1].read(is);
197 telsem_atlases[i - 1].set_month(i);
201 String corr_filename = directory +
'/' +
"correlations";
202 out2 <<
"Reading correlations: " << corr_filename <<
'\n';
206 for (
Index i = 0; i < 10; i++) {
208 for (
Index j = 0; j < 7; j++) {
209 for (
Index k = 0; k < 7; k++) {
217 for (
Index i = 0; i < 12; i++) {
218 telsem_atlases[i].set_correl(correlation);
This can be used to make arrays out of anything.
Index nelem() const noexcept
Returns the number of elements.
void resize(Index r, Index c)
Resize function.
void read(std::istream &is)
Index calc_cellnum(Numeric lat, Numeric lon) const
bool contains(Index cellnumber) const
Index get_class2(Index cellnumber) const
Index calc_cellnum_nearest_neighbor(Numeric lat, Numeric lon) const
void set_correl(const Tensor3 &t)
Vector get_emis_h(Index cellnum) const
std::pair< Numeric, Numeric > get_coordinates(Index cellnum) const
Index get_class1(Index cellnumber) const
std::pair< Numeric, Numeric > emis_interp(Numeric theta, Numeric freq, Index class1, Index class2, const ConstVectorView &ev, const ConstVectorView &eh) const
Vector get_emis_v(Index i) const
void resize(Index n)
Resize function.
Input manipulator class for doubles to enable nan and inf parsing.
static const Index npos
Define npos:
#define ARTS_USER_ERROR_IF(condition,...)
void open_input_file(ifstream &file, const std::string_view name)
Open a file for reading.
This file contains basic functions to handle ASCII files.
Numeric sphdist(const Numeric &lat1, const Numeric &lon1, const Numeric &lat2, const Numeric &lon2)
sphdist
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.
constexpr Numeric EARTH_RADIUS
constexpr Numeric DEG2RAD
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 telsem_atlasesReadAscii(ArrayOfTelsemAtlas &telsem_atlases, const String &directory, const String &filename_pattern, const Verbosity &verbosity)
WORKSPACE METHOD: telsem_atlasesReadAscii.
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.
Implementation of Matrix, Vector, and such stuff.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
This file contains the definition of String, the ARTS string class.
constexpr Numeric earth_radius
Global constant, the radius of the Earth [m].
constexpr auto deg2rad(auto x) noexcept
Converts degrees to radians.
void pos2true_latlon(Numeric &lat, Numeric &lon, const Index &atmosphere_dim, const ConstVectorView &lat_grid, const ConstVectorView &lat_true, const ConstVectorView &lon_true, const ConstVectorView &pos)
Determines the true alt and lon for an "ARTS position".
Declaration of functions in rte.cc.
This file contains the definition of the TELSEM atlas format.