Go to the documentation of this file.
83 os <<
" " <<
x.
name() <<
" {\n";
99 os <<
" " <<
x.nelem() <<
" agendas: {\n";
100 for (
Index i = 0; i <
x.nelem(); i++) {
101 os <<
" " <<
x[i].
name() <<
": {\n";
119 for (
Index i = 0; i <
x.nelem(); i++) {
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()
160 for (
Index i = 0; i <
x.nelem(); i++) {
226 for (
Index i = 0; i <
x.nelem(); i++) {
228 os <<
"Ppath element " << i <<
": ";
243 if (!
timer.finished) {
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)
269 os <<
" system: " << setprecision(2)
273 os <<
"\n real: " << setprecision(2)
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)) /
291 SWITCH_OUTPUT(level,
"Timer error: ARTS was compiled without timer support");
303 os <<
"TessemNN size: Inputs = " <<
x.nb_inputs
304 <<
", Outputs = " <<
x.nb_outputs <<
", Cache = " <<
x.nb_cache;
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");
361 timer.running =
true;
362 timer.finished =
false;
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");
385 timer.running =
false;
386 timer.finished =
true;
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 "
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());
485 std::ostringstream os;
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) {
506 std::ostringstream os;
507 os <<
"Environment variable " << envvar <<
" is empty or does not exist.";
508 throw std::runtime_error(os.str());
510 std::istringstream is(cstr);
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";
void timerStart(Timer &, const Verbosity &)
WORKSPACE METHOD: timerStart.
void Exit(const Verbosity &verbosity)
WORKSPACE METHOD: Exit.
void SetNumberOfThreads(const Index &, const Verbosity &verbosity)
WORKSPACE METHOD: SetNumberOfThreads.
void Print(Workspace &ws, const Agenda &x, const Index &level, const Verbosity &verbosity)
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 verbositySetFile(Verbosity &verbosity, const Index &level)
WORKSPACE METHOD: verbositySetFile.
Verbosity verbosity(Workspace &ws) noexcept
Timer timer(Workspace &ws) noexcept
int arts_omp_get_max_threads()
Wrapper for omp_get_max_threads.
#define SWITCH_OUTPUT(x, y)
ArrayOfAgenda test_agenda_array(Workspace &ws) noexcept
This file contains the definition of Array.
std::size_t pos() const noexcept
The structure to describe a propagation path and releated quantities.
This can be used to make arrays out of anything.
void verbositySetAgenda(Verbosity &verbosity, const Index &level)
WORKSPACE METHOD: verbositySetAgenda.
void GetNumberOfThreads(Index &nthreads, const Verbosity &)
WORKSPACE METHOD: GetNumberOfThreads.
Sensor modelling functions.
This file contains functions that are adapted from TESSEM code which is used to calculate surface emi...
Declarations having to do with the four output streams.
void verbositySetScreen(Verbosity &verbosity, const Index &level)
WORKSPACE METHOD: verbositySetScreen.
void timerStop(const Timer &, const Verbosity &)
Index nelem() const
Returns the number of elements.
const Numeric SPEED_OF_LIGHT
NUMERIC Numeric
The type to use for all floating point numbers.
This file contains functions that are adapted from FASTEM code which is used to calculate surface emi...
Verbosity verbosity_at_launch
The global message verbosity settings:
Index get_agenda_verbosity() const
void verbositySet(Verbosity &verbosity, const Index &agenda, const Index &screen, const Index &file)
WORKSPACE METHOD: verbositySet.
void test_agenda_arrayExecute(Workspace &ws, const Index agenda_array_index, const String &iy_unit, const ArrayOfAgenda &input_agenda_array)
Index nelem()
Get the number of workspace variables.
void INCLUDE(const Verbosity &)
WORKSPACE METHOD: INCLUDE.
Index depth(Index i)
Return scoping level of the given WSV.
void PrintWsvName(OutputStream &outstream, Index i)
Print WSV name to output stream.
void PrintWorkspace(Workspace &ws, const Index &only_allocated, const Index &level, const Verbosity &verbosity)
void Error(const String &msg, const Verbosity &verbosity)
WORKSPACE METHOD: Error.
This file contains the Workspace class.
void TestArrayOfAgenda(Workspace &ws, const ArrayOfAgenda &test_agenda_array, const Index &index, const Verbosity &)
WORKSPACE METHOD: TestArrayOfAgenda.
my_basic_string< char > String
The String type for ARTS.
void Test(const Verbosity &)
WORKSPACE METHOD: Test.
const Group::String & name() const noexcept
Index get_screen_verbosity() const
bool is_initialized(Index i)
Checks existence of the given WSV.
Index get_file_verbosity() const
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.
Vector x(Workspace &ws) noexcept
INDEX Index
The type to use for all integer numbers and indices.
void verbosityInit(Verbosity &verbosity)
WORKSPACE METHOD: verbosityInit.
void arts_exit(int status)
This is the exit function of ARTS.
void GetEnvironmentVariable(String &str, const String &envvar, const Verbosity &)
WORKSPACE METHOD: GetEnvironmentVariable.
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 nelem() const
Number of elements.
Auxiliary header stuff related to workspace variable groups.
This file contains the definition of String, the ARTS string class.
The global header file for ARTS.
Template functions for general supergeneric ws methods.