ARTS
2.0.49
|
Workspace functions of a general and overall character. More...
#include "arts.h"
#include <stdexcept>
#include "m_general.h"
#include "array.h"
#include "check_input.h"
#include "messages.h"
#include "mystring.h"
#include "math_funcs.h"
#include "make_vector.h"
#include "wsv_aux.h"
#include "workspace_ng.h"
Go to the source code of this file.
Functions | |
void | INCLUDE (const Verbosity &) |
WORKSPACE METHOD: INCLUDE. More... | |
void | Print (Workspace &ws, const Agenda &x, const Index &level, const Verbosity &verbosity) |
void | Print (const ArrayOfGridPos &x, const Index &level, const Verbosity &verbosity) |
void | Print (const ArrayOfIndex &x, const Index &level, const Verbosity &verbosity) |
void | Print (const ArrayOfString &x, const Index &level, const Verbosity &verbosity) |
void | Print (const Ppath &x, const Index &level, const Verbosity &verbosity) |
void | Print (const ArrayOfPpath &x, const Index &level, const Verbosity &verbosity) |
void | Print (const Timer &, const Index &, const Verbosity &) |
void | PrintWorkspace (Workspace &ws, const Index &only_allocated, const Index &level, const Verbosity &verbosity) |
void | timerStart (Timer &, const Verbosity &) |
WORKSPACE METHOD: timerStart. More... | |
void | timerStop (const Timer &, const Verbosity &) |
WORKSPACE METHOD: timerStop. More... | |
void | Error (const String &msg, const Verbosity &verbosity) |
WORKSPACE METHOD: Error. More... | |
void | Exit (const Verbosity &verbosity) |
WORKSPACE METHOD: Exit. More... | |
void | Test (const Verbosity &verbosity) |
WORKSPACE METHOD: Test. More... | |
void | verbosityInit (Verbosity &verbosity) |
WORKSPACE METHOD: verbosityInit. More... | |
void | verbositySet (Verbosity &verbosity, const Index &agenda, const Index &screen, const Index &file) |
WORKSPACE METHOD: verbositySet. More... | |
void | verbositySetAgenda (Verbosity &verbosity, const Index &level) |
WORKSPACE METHOD: verbositySetAgenda. More... | |
void | verbositySetFile (Verbosity &verbosity, const Index &level) |
WORKSPACE METHOD: verbositySetFile. More... | |
void | verbositySetScreen (Verbosity &verbosity, const Index &level) |
WORKSPACE METHOD: verbositySetScreen. More... | |
Workspace functions of a general and overall character.
This file is for general functions that do not fit in any other "m_"-file.
These functions are listed in the doxygen documentation as entries of the file auto_md.h.
Definition in file m_general.cc.
WORKSPACE METHOD: Error.
Issues an error and exits ARTS.
This method can be placed in agendas that must be specified, but are expected not to be used for the particular case. An inclusion in surface_prop_agenda could look like: <br> Error{"Surface interceptions of propagation path not expected."}
Ignore and other dummy method calls must still be included.
[in] | msg | Generic Input |
Definition at line 331 of file m_general.cc.
References arts_exit(), and CREATE_OUT0.
Referenced by Error_g().
void Exit | ( | const Verbosity & | verbosity | ) |
WORKSPACE METHOD: Exit.
Stops the execution and exits ARTS.
This method is handy if you want to debug one of your control files. You can insert it anywhere in the control file. When it is reached, it will terminate the program.
Definition at line 340 of file m_general.cc.
References arts_exit(), and CREATE_OUT1.
Referenced by Exit_g().
void INCLUDE | ( | const Verbosity & | verbosity | ) |
WORKSPACE METHOD: INCLUDE.
Includes the contents of another controlfile.
The INCLUDE statement inserts the contents of the controlfile with the given name into the current controlfile. If the filename is given without path information, ARTS will first search for the file in all directories specified with the -I (see arts -h) commandline option and then in directories given in the environment variable ARTS_INCLUDE_PATH. In the environment variable multiple paths have to be separated by colons.
Note that INCLUDE is not a workspace method and thus the syntax is different:
Arts { <br> INCLUDE "general.arts" }
Includes can also be nested. In the example above general.arts can contain further includes which will then be treated the same way.
The idea behind this mechanism is that you can write common settings for a bunch of calculations into one file. Then, you can create several controlfiles which include the basic settings and tweak them for different cases. When you decide to make changes to your setup that should apply to all calculations, you only have to make a single change in the include file instead of modifying all your controlfiles.
Definition at line 69 of file m_general.cc.
Referenced by INCLUDE_g().
void Print | ( | const ArrayOfGridPos & | x, |
const Index & | level, | ||
const Verbosity & | verbosity | ||
) |
Definition at line 90 of file m_general.cc.
References CREATE_OUTS, Array< base >::nelem(), and SWITCH_OUTPUT.
void Print | ( | const ArrayOfIndex & | x, |
const Index & | level, | ||
const Verbosity & | verbosity | ||
) |
Definition at line 106 of file m_general.cc.
References CREATE_OUTS, Array< base >::nelem(), and SWITCH_OUTPUT.
void Print | ( | const ArrayOfPpath & | x, |
const Index & | level, | ||
const Verbosity & | verbosity | ||
) |
Definition at line 186 of file m_general.cc.
References CREATE_OUTS, Array< base >::nelem(), Print(), and SWITCH_OUTPUT.
void Print | ( | const ArrayOfString & | x, |
const Index & | level, | ||
const Verbosity & | verbosity | ||
) |
Definition at line 121 of file m_general.cc.
References CREATE_OUTS, Array< base >::nelem(), and SWITCH_OUTPUT.
Definition at line 137 of file m_general.cc.
References Ppath::background, Ppath::constant, CREATE_OUTS, Ppath::dim, Ppath::geom_tan_pos, Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, Ppath::l_step, Ppath::los, ConstVectorView::nelem(), Ppath::np, Ppath::pos, Print(), SWITCH_OUTPUT, Ppath::tan_pos, and Ppath::z.
Definition at line 204 of file m_general.cc.
Definition at line 75 of file m_general.cc.
References CREATE_OUTS, and SWITCH_OUTPUT.
Referenced by Print(), Print_sg_Agenda_g(), Print_sg_ArrayOfArrayOfGriddedField1_g(), Print_sg_ArrayOfArrayOfGriddedField3_g(), Print_sg_ArrayOfArrayOfIndex_g(), Print_sg_ArrayOfArrayOfLineRecord_g(), Print_sg_ArrayOfArrayOfMatrix_g(), Print_sg_ArrayOfArrayOfSpeciesTag_g(), Print_sg_ArrayOfArrayOfTensor3_g(), Print_sg_ArrayOfArrayOfTensor6_g(), Print_sg_ArrayOfGriddedField1_g(), Print_sg_ArrayOfGriddedField2_g(), Print_sg_ArrayOfGriddedField3_g(), Print_sg_ArrayOfGriddedField4_g(), Print_sg_ArrayOfIndex_g(), Print_sg_ArrayOfLineRecord_g(), Print_sg_ArrayOfLineshapeSpec_g(), Print_sg_ArrayOfMatrix_g(), Print_sg_ArrayOfRetrievalQuantity_g(), Print_sg_ArrayOfScatteringMetaData_g(), Print_sg_ArrayOfSingleScatteringData_g(), Print_sg_ArrayOfSparse_g(), Print_sg_ArrayOfString_g(), Print_sg_ArrayOfTensor3_g(), Print_sg_ArrayOfTensor4_g(), Print_sg_ArrayOfTensor6_g(), Print_sg_ArrayOfTensor7_g(), Print_sg_ArrayOfVector_g(), Print_sg_GasAbsLookup_g(), Print_sg_GriddedField1_g(), Print_sg_GriddedField2_g(), Print_sg_GriddedField3_g(), Print_sg_GriddedField4_g(), Print_sg_GridPos_g(), Print_sg_Index_g(), Print_sg_Matrix_g(), Print_sg_MCAntenna_g(), Print_sg_Numeric_g(), Print_sg_Ppath_g(), Print_sg_ScatteringMetaData_g(), Print_sg_SingleScatteringData_g(), Print_sg_Sparse_g(), Print_sg_String_g(), Print_sg_Tensor3_g(), Print_sg_Tensor4_g(), Print_sg_Tensor5_g(), Print_sg_Tensor6_g(), Print_sg_Tensor7_g(), Print_sg_Timer_g(), Print_sg_Vector_g(), Print_sg_Verbosity_g(), and Test().
void PrintWorkspace | ( | Workspace & | ws, |
const Index & | only_allocated, | ||
const Index & | level, | ||
const Verbosity & | verbosity | ||
) |
Definition at line 221 of file m_general.cc.
References CREATE_OUTS, Workspace::is_initialized(), Workspace::nelem(), PrintWsvName(), and SWITCH_OUTPUT.
Referenced by PrintWorkspace_g().
void Test | ( | const Verbosity & | verbosity | ) |
WORKSPACE METHOD: Test.
A dummy method that can be used for test purposes.
This method can be used by ARTS developers to quickly test stuff. The implementation is in file m_general.cc. This just saves you the trouble of adding a dummy method everytime you want to try something out quickly.
Definition at line 349 of file m_general.cc.
References gridpos(), ConstVectorView::nelem(), and Print().
Referenced by Test_g().
WORKSPACE METHOD: timerStart.
Initializes the CPU timer. Use timerStop to output the consumed cpu time since timerStart.
Usage example: <br> timerStart <br> ReadXML(f_grid,"frequencies.xml") <br> timerStop
[out] | timer | WS Output |
Definition at line 267 of file m_general.cc.
Referenced by timerStart_g().
WORKSPACE METHOD: timerStop.
Stops the CPU timer. Use timerStop to output the consumed cpu time since timerStart. See timerStart for example usage.
[in] | timer | WS Input |
Definition at line 322 of file m_general.cc.
Referenced by timerStop_g().
void verbosityInit | ( | Verbosity & | verbosity | ) |
WORKSPACE METHOD: verbosityInit.
Initializes the verbosity levels.
Sets verbosity to defaults or the levels specified by -r on the command line.
[out] | verbosity | WS Output |
Definition at line 366 of file m_general.cc.
References Verbosity::get_agenda_verbosity(), Verbosity::get_file_verbosity(), Verbosity::get_screen_verbosity(), Verbosity::set_agenda_verbosity(), Verbosity::set_file_verbosity(), Verbosity::set_screen_verbosity(), and verbosity_at_launch.
Referenced by verbosityInit_g().
void verbositySet | ( | Verbosity & | verbosity, |
const Index & | agenda, | ||
const Index & | screen, | ||
const Index & | file | ||
) |
WORKSPACE METHOD: verbositySet.
Sets the verbosity levels.
Sets the reporting level for agenda calls, screen and file. All reporting levels can reach from 0 (only error messages) to 3 (everything). The agenda setting applies in addition to both screen and file output.
[out] | verbosity | WS Output |
[in] | agenda | Generic Input |
[in] | screen | Generic Input |
[in] | file | Generic Input |
Definition at line 378 of file m_general.cc.
References Verbosity::set_agenda_verbosity(), Verbosity::set_file_verbosity(), and Verbosity::set_screen_verbosity().
Referenced by verbositySet_g().
WORKSPACE METHOD: verbositySetAgenda.
Sets the verbosity level for agenda output.
See verbositySet
[out] | verbosity | WS Output |
[in] | level | Generic Input |
Definition at line 392 of file m_general.cc.
References Verbosity::set_agenda_verbosity().
Referenced by verbositySetAgenda_g().
WORKSPACE METHOD: verbositySetFile.
Sets the verbosity level for report file output.
See verbositySet
[out] | verbosity | WS Output |
[in] | level | Generic Input |
Definition at line 402 of file m_general.cc.
References Verbosity::set_file_verbosity().
Referenced by verbositySetFile_g().
WORKSPACE METHOD: verbositySetScreen.
Sets the verbosity level for screen output.
See verbositySet
[out] | verbosity | WS Output |
[in] | level | Generic Input |
Definition at line 412 of file m_general.cc.
References Verbosity::set_screen_verbosity().
Referenced by verbositySetScreen_g().