83 os <<
" " << x.
name() <<
" {\n";
99 os <<
" " << x.
nelem() <<
" agendas: {\n";
101 os <<
" " << x[
i].name() <<
": {\n";
121 os <<
" " << x[
i].idx <<
" " << x[
i].fd[0] <<
" " << x[
i].fd[1];
136 os <<
" CIA tag; Spectral range [cm-1]; Temp range [K]; # of sets\n";
138 for (
Index j = 0; j < cia_data[
i].DatasetCount(); j++) {
139 Vector temp_grid = cia_data[
i].TemperatureGrid(j);
140 Vector freq_grid = cia_data[
i].FrequencyGrid(j);
142 os << setprecision(2) << std::fixed <<
" " << cia_data[
i].MoleculeName(0)
143 <<
"-CIA-" << cia_data[
i].MoleculeName(1) <<
"-" << j <<
"; " 146 << std::fixed <<
"; " << temp_grid[0] <<
" - " 147 << temp_grid[temp_grid.
nelem() - 1] <<
"; " << temp_grid.
nelem()
194 Print(x.
r, level, verbosity);
228 os <<
"Ppath element " <<
i <<
": ";
230 Print(x[i], level, verbosity);
246 "Timer error: Nothing to output. Use timerStart/timerStop first.");
251 os.setf(ios::showpoint | ios::fixed);
253 static long clktck = 0;
256 if ((clktck = sysconf(_SC_CLK_TCK)) < 0)
257 throw runtime_error(
"Timer error: Unable to determine CPU clock ticks");
259 os <<
" * CPU time total: " << setprecision(2)
261 (timer.cputime_end.tms_stime - timer.cputime_start.tms_stime) +
262 (timer.cputime_end.tms_utime - timer.cputime_start.tms_utime)) /
265 os <<
" user: " << setprecision(2)
266 << (
Numeric)(timer.cputime_end.tms_utime - timer.cputime_start.tms_utime) /
269 os <<
" system: " << setprecision(2)
270 << (
Numeric)(timer.cputime_end.tms_stime - timer.cputime_start.tms_stime) /
273 os <<
"\n real: " << setprecision(2)
274 << (
Numeric)(timer.realtime_end - timer.realtime_start) / (
Numeric)clktck;
276 os <<
" " << setprecision(2)
278 (timer.cputime_end.tms_stime - timer.cputime_start.tms_stime) +
279 (timer.cputime_end.tms_utime - timer.cputime_start.tms_utime)) /
280 (
Numeric)(timer.realtime_end - timer.realtime_start) * 100.
291 SWITCH_OUTPUT(level,
"Timer error: ARTS was compiled without timer support");
303 os <<
"TessemNN size: Inputs = " << x.
nb_inputs 312 const Index& only_allocated,
318 os <<
" Allocated workspace variables: \n";
320 os <<
" Workspace variables: \n";
322 if (!only_allocated) {
330 os << ws.
depth(
i) <<
"\n";
350 out = in1 + in2 + in3 + in4 + in5 + in6 + in7 + in8 + in9 + in10;
358 if ((timer.realtime_start = times(&timer.cputime_start)) == (clock_t)-1)
359 throw runtime_error(
"Timer error: Unable to get current CPU time");
369 "Timer error: ARTS was compiled without POSIX support, thus timer\nfunctions are not available.");
380 "Timer error: Unable to stop timer that's not running.");
382 if ((timer.realtime_end = times(&(timer.cputime_end))) == (clock_t)-1)
383 throw runtime_error(
"Timer error: Unable to get current CPU time");
393 "Timer error: ARTS was compiled without POSIX support, thus timer\nfunctions are not available.");
400 throw runtime_error(msg);
406 out1 <<
" Forced exit.\n";
416 os <<
" Local value of iy_unit, agenda #" << index <<
" of " 417 << test_agenda_array.
nelem();
422 Numeric za, aa, dza_new, daa_new;
423 const Numeric za0 = 67, aa0 = 12, dza = 9, daa = 11;
425 cout << za <<
" " << aa << endl;
426 diff_za_aa(dza_new, daa_new, za0, aa0, za, aa);
427 cout << dza_new <<
" " << daa_new << endl;
456 const Index& level) {
464 const Index& level) {
472 const Index& level) {
483 cstr = std::getenv(envvar.c_str());
486 os <<
"Environment variable " << envvar <<
" does not exist.";
487 throw std::runtime_error(os.str());
489 str = cstr != NULL ?
String(cstr) :
"";
504 cstr = std::getenv(envvar.c_str());
505 if (cstr == NULL || std::strlen(cstr) == 0) {
507 os <<
"Environment variable " << envvar <<
" is empty or does not exist.";
508 throw std::runtime_error(os.str());
514 os <<
"Cannot convert environment variable " << envvar
515 <<
" to Index: " << cstr;
516 throw std::runtime_error(os.
str());
524 omp_set_num_threads((
int)nthreads);
530 out1 <<
"No OpenMP support. Can't change number of threads.\n";
INDEX Index
The type to use for all integer numbers and indices.
Template functions for general supergeneric ws methods.
ArrayOfGridPos gp_lat
Index position with respect to the latitude grid.
Index depth(Index i)
Return scoping level of the given WSV.
void verbositySetScreen(Verbosity &verbosity, const Index &level)
WORKSPACE METHOD: verbositySetScreen.
Numeric constant
The propagation path constant (only used for 1D)
void test_agenda_arrayExecute(Workspace &ws, const Index agenda_array_index, const String &iy_unit, const ArrayOfAgenda &input_agenda_array)
Index get_agenda_verbosity() const
void Print(Workspace &ws, const Agenda &x, const Index &level, const Verbosity &verbosity)
String name() const
Agenda name.
Index nelem() const
Number of elements.
void verbositySetAgenda(Verbosity &verbosity, const Index &level)
WORKSPACE METHOD: verbositySetAgenda.
void arts_exit(int status)
This is the exit function of ARTS.
void GetNumberOfThreads(Index &nthreads, const Verbosity &)
WORKSPACE METHOD: GetNumberOfThreads.
Declarations having to do with the four output streams.
void verbositySetFile(Verbosity &verbosity, const Index &level)
WORKSPACE METHOD: verbositySetFile.
Matrix los
Line-of-sight at each ppath point.
void Error(const String &msg, const Verbosity &verbosity)
WORKSPACE METHOD: Error.
Vector end_pos
End position.
Index dim
Atmospheric dimensionality.
void GetEnvironmentVariable(String &str, const String &envvar, const Verbosity &)
WORKSPACE METHOD: GetEnvironmentVariable.
Vector lstep
The length between ppath points.
int arts_omp_get_max_threads()
Wrapper for omp_get_max_threads.
bool is_initialized(Index i)
Checks existence of the given WSV.
Matrix pos
The distance between start pos and the last position in pos.
void set_agenda_verbosity(Index v)
Vector ngroup
The group index of refraction.
void timerStart(Timer &, const Verbosity &)
WORKSPACE METHOD: timerStart.
Vector start_pos
Start position.
Vector r
Radius of each ppath point.
basic_istringstream< char, string_char_traits< char >, alloc > istringstream
Index nelem() const
Returns the number of elements.
Numeric end_lstep
The distance between end pos and the first position in pos.
This file contains the definition of Array.
This file contains the Workspace class.
Sensor modelling functions.
Vector end_los
End line-of-sight.
void diff_za_aa(Numeric &dza, Numeric &daa, const Numeric &za0, const Numeric &aa0, const Numeric &za, const Numeric &aa)
Takes the difference of zenith and azimuth angles.
void verbosityInit(Verbosity &verbosity)
WORKSPACE METHOD: verbosityInit.
The global header file for ARTS.
String background
Radiative background.
void TestArrayOfAgenda(Workspace &ws, const ArrayOfAgenda &test_agenda_array, const Index &index, const Verbosity &)
WORKSPACE METHOD: TestArrayOfAgenda.
This file contains functions that are adapted from FASTEM code which is used to calculate surface emi...
_CS_string_type str() const
void verbositySet(Verbosity &verbosity, const Index &agenda, const Index &screen, const Index &file)
WORKSPACE METHOD: verbositySet.
void SetNumberOfThreads(const Index &, const Verbosity &verbosity)
WORKSPACE METHOD: SetNumberOfThreads.
void set_file_verbosity(Index v)
Index nelem()
Get the number of workspace variables.
This file contains functions that are adapted from TESSEM code which is used to calculate surface emi...
Numeric start_lstep
Length between sensor and atmospheric boundary.
void PrintWsvName(OutputStream &outstream, Index i)
Print WSV name to output stream.
void add_za_aa(Numeric &za, Numeric &aa, const Numeric &za0, const Numeric &aa0, const Numeric &dza, const Numeric &daa)
Adds up zenith and azimuth angles.
void Test(const Verbosity &)
WORKSPACE METHOD: Test.
NUMERIC Numeric
The type to use for all floating point numbers.
Vector nreal
The real part of the refractive index at each path position.
basic_ostringstream< char, string_char_traits< char >, alloc > ostringstream
This can be used to make arrays out of anything.
const Numeric SPEED_OF_LIGHT
void PrintWorkspace(Workspace &ws, const Index &only_allocated, const Index &level, const Verbosity &verbosity)
void print(ostream &os, const String &indent) const
Print an agenda.
void StringJoin(String &out, const String &in1, const String &in2, const String &in3, const String &in4, const String &in5, const String &in6, const String &in7, const String &in8, const String &in9, const String &in10, const Verbosity &)
WORKSPACE METHOD: StringJoin.
Index np
Number of points describing the ppath.
ArrayOfGridPos gp_lon
Index position with respect to the longitude grid.
void Exit(const Verbosity &verbosity)
WORKSPACE METHOD: Exit.
Index get_file_verbosity() const
Vector start_los
Start line-of-sight.
Verbosity verbosity_at_launch
The global message verbosity settings:
The structure to describe a propagation path and releated quantities.
void INCLUDE(const Verbosity &)
WORKSPACE METHOD: INCLUDE.
Index get_screen_verbosity() const
#define SWITCH_OUTPUT(x, y)
ArrayOfGridPos gp_p
Index position with respect to the pressure grid.
void timerStop(const Timer &, const Verbosity &)
my_basic_string< char > String
The String type for ARTS.
This file contains the definition of String, the ARTS string class.
void set_screen_verbosity(Index v)
Auxiliary header stuff related to workspace variable groups.