Go to the documentation of this file.
52 throw std::runtime_error(
53 "Given coordinates are not contained in "
54 " TELSEM atlas. To enable nearest neighbor"
55 "interpolation set *d_max* to a positive "
63 std::ostringstream out{};
64 out <<
"Distance of nearest neighbor exceeds provided limit (";
65 out << d <<
" > " << d_max <<
").";
66 throw std::runtime_error(out.str());
78 std::tie(emis(i, 0), emis(i, 1)) =
79 atlas.
emis_interp(theta, f[i] * 1e-9, class1, class2, emis_v, emis_h);
120 emis = atlas[cellnumber];
130 const String &filename_pattern,
133 const Index imonth = filename_pattern.find(
"@MM@");
136 os <<
"Substring '@MM@' not found in filename_pattern for" << std::endl
137 <<
"month number replacement: " << filename_pattern;
142 ostringstream month_ss;
148 String this_filename = filename_pattern;
149 this_filename.replace(imonth, 4, month_ss.str());
150 this_filename = directory +
'/' + this_filename;
152 out2 <<
"Reading TELSEM atlas: " << this_filename <<
'\n';
157 String corr_filename = directory +
'/' +
"correlations";
158 out2 <<
"Reading correlations: " << corr_filename <<
'\n';
159 std::ifstream corr_is;
163 for (
Index i = 0; i < 10; i++) {
164 std::getline(corr_is, s);
165 for (
Index j = 0; j < 7; j++) {
166 for (
Index k = 0; k < 7; k++) {
167 corr_is >> correlation(i, j, k);
169 throw std::runtime_error(
"Error reading correlation.");
171 std::getline(corr_is, s);
180 const String &filename_pattern,
183 const Index imonth = filename_pattern.find(
"@MM@");
186 os <<
"Substring '@MM@' not found in filename_pattern for" << std::endl
187 <<
"month number replacement: " << filename_pattern;
191 for (
Index i = 1; i <= 12; i++) {
194 if (i < 10) month << 0;
196 String this_filename = filename_pattern;
197 this_filename.replace(imonth, 4, month.str());
198 this_filename = directory +
'/' + this_filename;
200 out2 <<
"Reading TELSEM atlas: " << this_filename <<
'\n';
207 String corr_filename = directory +
'/' +
"correlations";
208 out2 <<
"Reading correlations: " << corr_filename <<
'\n';
212 for (
Index i = 0; i < 10; i++) {
214 for (
Index j = 0; j < 7; j++) {
215 for (
Index k = 0; k < 7; k++) {
216 is >> correlation(i, j, k);
217 if (is.fail())
throw std::runtime_error(
"Error reading correlation.");
223 for (
Index i = 0; i < 12; i++) {
void set_correl(const Tensor3 &t)
Index atmosphere_dim(Workspace &ws) noexcept
Index calc_cellnum(Numeric lat, Numeric lon) const
Numeric lat(Workspace &ws) noexcept
Index surface_type(Workspace &ws) noexcept
ArrayOfTelsemAtlas telsem_atlases(Workspace &ws) noexcept
Vector lat_grid(Workspace &ws) noexcept
void read(std::istream &is)
Verbosity verbosity(Workspace &ws) noexcept
Numeric sphdist(const Numeric &lat1, const Numeric &lon1, const Numeric &lat2, const Numeric &lon2)
sphdist
Index get_class2(Index cellnumber) const
void resize(Index n)
Resize function.
bool contains(Index cellnumber) const
void open_input_file(ifstream &file, const String &name)
Open a file for reading.
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.
Numeric lon(Workspace &ws) noexcept
Vector lon_true(Workspace &ws) noexcept
Vector get_emis_v(Index i) const
Implementation of Matrix, Vector, and such stuff.
This can be used to make arrays out of anything.
void telsem_atlasReadAscii(TelsemAtlas &atlas, const String &directory, const Index &month, const String &filename_pattern, const Verbosity &verbosity)
WORKSPACE METHOD: telsem_atlasReadAscii.
Index get_class1(Index cellnumber) const
void telsemAtlasLookup(Vector &emis, const Numeric &lat, const Numeric &lon, const TelsemAtlas &atlas, const Verbosity &)
WORKSPACE METHOD: telsemAtlasLookup.
Index nelem() const
Returns the number of elements.
NUMERIC Numeric
The type to use for all floating point numbers.
std::pair< Numeric, Numeric > emis_interp(Numeric theta, Numeric freq, Index class1, Index class2, const ConstVectorView &ev, const ConstVectorView &eh) const
Vector lat_true(Workspace &ws) noexcept
Index calc_cellnum_nearest_neighbor(Numeric lat, Numeric lon) const
void resize(Index r, Index c)
Resize function.
void pos2true_latlon(Numeric &lat, Numeric &lon, const Index &atmosphere_dim, ConstVectorView lat_grid, ConstVectorView lat_true, ConstVectorView lon_true, ConstVectorView pos)
Determines the true alt and lon for an "ARTS position".
Declaration of functions in rte.cc.
This file contains basic functions to handle ASCII files.
INDEX Index
The type to use for all integer numbers and indices.
std::pair< Numeric, Numeric > get_coordinates(Index cellnum) const
void telsem_atlasesReadAscii(ArrayOfTelsemAtlas &telsem_atlases, const String &directory, const String &filename_pattern, const Verbosity &verbosity)
WORKSPACE METHOD: telsem_atlasesReadAscii.
Vector get_emis_h(Index cellnum) const
This file contains the definition of the TELSEM atlas format.
This file contains the definition of String, the ARTS string class.
Vector rtp_pos(Workspace &ws) noexcept