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;
257 "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 ARTS_USER_ERROR_IF ((timer.realtime_start = times(&timer.cputime_start)) == (clock_t)-1,
359 "Timer error: Unable to get current CPU time");
369 "Timer error: ARTS was compiled without POSIX support, thus timer\nfunctions are not available.");
379 "Timer error: Unable to stop timer that's not running.");
381 ARTS_USER_ERROR_IF ((timer.realtime_end = times(&(timer.cputime_end))) == (clock_t)-1,
382 "Timer error: Unable to get current CPU time");
392 "Timer error: ARTS was compiled without POSIX support, thus timer\nfunctions are not available.");
405 out1 <<
" Forced exit.\n";
415 os <<
" Local value of iy_unit, agenda #" << index <<
" of "
416 << test_agenda_array.
nelem();
421 Numeric za, aa, dza_new, daa_new;
422 const Numeric za0 = 67, aa0 = 12, dza = 9, daa = 11;
424 cout << za <<
" " << aa << endl;
425 diff_za_aa(dza_new, daa_new, za0, aa0, za, aa);
426 cout << dza_new <<
" " << daa_new << endl;
455 const Index& level) {
463 const Index& level) {
471 const Index& level) {
482 cstr = std::getenv(envvar.c_str());
484 "Environment variable ", envvar,
" does not exist.")
485 str = cstr != NULL ?
String(cstr) :
"";
500 cstr = std::getenv(envvar.c_str());
502 "Environment variable ", envvar,
" "
503 "is empty or does not exist.")
504 std::istringstream is(cstr);
507 "Cannot convert environment variable ", envvar,
" "
515 omp_set_num_threads((
int)nthreads);
521 out1 <<
"No OpenMP support. Can't change number of threads.\n";
This file contains the definition of Array.
void arts_exit(int status)
This is the exit function of ARTS.
The global header file for ARTS.
int arts_omp_get_max_threads()
Wrapper for omp_get_max_threads.
void test_agenda_arrayExecute(Workspace &ws, const Index agenda_array_index, const String &iy_unit, const ArrayOfAgenda &input_agenda_array)
void print(ostream &os, const String &indent) const
Print an agenda.
String name() const
Agenda name.
This can be used to make arrays out of anything.
Index nelem() const ARTS_NOEXCEPT
Number of elements.
Index nelem() const noexcept
Returns the number of elements.
Index get_screen_verbosity() const
Index get_agenda_verbosity() const
void set_screen_verbosity(Index v)
void set_agenda_verbosity(Index v)
Index get_file_verbosity() const
void set_file_verbosity(Index v)
bool is_initialized(Index i) const
Checks existence of the given WSV.
Index depth(Index i)
Return scoping level of the given WSV.
Index nelem() const
Get the number of workspace variables.
#define ARTS_USER_ERROR(...)
#define ARTS_USER_ERROR_IF(condition,...)
This file contains functions that are adapted from FASTEM code which is used to calculate surface emi...
void GetEnvironmentVariable(String &str, const String &envvar, const Verbosity &)
WORKSPACE METHOD: GetEnvironmentVariable.
void GetNumberOfThreads(Index &nthreads, const Verbosity &)
WORKSPACE METHOD: GetNumberOfThreads.
void Test(const Verbosity &)
WORKSPACE METHOD: Test.
void verbositySetAgenda(Verbosity &verbosity, const Index &level)
WORKSPACE METHOD: verbositySetAgenda.
void SetNumberOfThreads(const Index &, const Verbosity &verbosity)
WORKSPACE METHOD: SetNumberOfThreads.
void INCLUDE(const Verbosity &)
WORKSPACE METHOD: INCLUDE.
void verbosityInit(Verbosity &verbosity)
WORKSPACE METHOD: verbosityInit.
void TestArrayOfAgenda(Workspace &ws, const ArrayOfAgenda &test_agenda_array, const Index &index, const Verbosity &)
WORKSPACE METHOD: TestArrayOfAgenda.
void timerStart(Timer &, const Verbosity &)
WORKSPACE METHOD: timerStart.
void Error(const String &msg, const Verbosity &verbosity)
WORKSPACE METHOD: Error.
void timerStop(const Timer &, const Verbosity &)
const Numeric SPEED_OF_LIGHT
void Exit(const Verbosity &verbosity)
WORKSPACE METHOD: Exit.
void verbositySet(Verbosity &verbosity, const Index &agenda, const Index &screen, const Index &file)
WORKSPACE METHOD: verbositySet.
void verbositySetFile(Verbosity &verbosity, const Index &level)
WORKSPACE METHOD: verbositySetFile.
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.
void verbositySetScreen(Verbosity &verbosity, const Index &level)
WORKSPACE METHOD: verbositySetScreen.
void PrintWorkspace(Workspace &ws, const Index &only_allocated, const Index &level, const Verbosity &verbosity)
void Print(Workspace &ws, const Agenda &x, const Index &level, const Verbosity &verbosity)
Template functions for general supergeneric ws methods.
#define SWITCH_OUTPUT(x, y)
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
Verbosity verbosity_at_launch
The global message verbosity settings:
Declarations having to do with the four output streams.
This file contains the definition of String, the ARTS string class.
my_basic_string< char > String
The String type for ARTS.
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 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.
Sensor modelling functions.
The structure to describe a propagation path and releated quantities.
Matrix los
Line-of-sight at each ppath point.
ArrayOfGridPos gp_lon
Index position with respect to the longitude grid.
String background
Radiative background.
Index np
Number of points describing the ppath.
Matrix pos
The distance between start pos and the last position in pos.
ArrayOfGridPos gp_lat
Index position with respect to the latitude grid.
Numeric end_lstep
The distance between end pos and the first position in pos.
Vector start_pos
Start position.
Vector lstep
The length between ppath points.
Numeric start_lstep
Length between sensor and atmospheric boundary.
Numeric constant
The propagation path constant (only used for 1D)
Vector r
Radius of each ppath point.
ArrayOfGridPos gp_p
Index position with respect to the pressure grid.
Vector ngroup
The group index of refraction.
Index dim
Atmospheric dimensionality.
Vector end_pos
End position.
Vector start_los
Start line-of-sight.
Vector nreal
The real part of the refractive index at each path position.
Vector end_los
End line-of-sight.
This file contains functions that are adapted from TESSEM code which is used to calculate surface emi...
This file contains the Workspace class.
void PrintWsvName(OutputStream &outstream, Index i)
Print WSV name to output stream.
Auxiliary header stuff related to workspace variable groups.