Go to the documentation of this file.
59 out0 << message <<
'\n';
92 std::vector<bool> occupied(
wsv_data.nelem(),
false);
94 out3 <<
"\nExecuting methods:\n";
109 const MRecord& mrr = tasklist[i];
122 give_up(
"Method "+mdd.
Name()+
" needs input variable: "+
131 give_up(
"Generic Method "+mdd.
Name()+
" needs input variable: "+
141 for (
Index s=0; s<v.
nelem(); ++s) occupied[v[s]] =
true;
146 for (
Index s=0; s<v.
nelem(); ++s) occupied[v[s]] =
true;
150 catch (runtime_error x)
152 out0 <<
"Run-time error in method: " << mdd.
Name() <<
'\n'
156 catch (logic_error x)
158 out0 <<
"Logic error in method: " << mdd.
Name() <<
'\n'
169 cerr <<
"Try `arts --help' for help.\n";
202 if ( s<0 || s>3 || f<0 || f>3 )
204 cerr <<
"Illegal value specified for --reporting (-r).\n"
205 <<
"The specified value is " << r <<
", which would be\n"
206 <<
"interpreted as screen=" << s <<
", file=" << f <<
".\n"
207 <<
"Only values of 0-3 are allowed for screen and file.\n";
229 extern const std::map<String, Index>
WsvMap;
238 if (
"all" == methods )
241 <<
"\n*--------------------------------------------------------------*\n"
242 <<
"Complete list of ARTS workspace methods:\n"
243 <<
"----------------------------------------------------------------\n";
246 cout <<
"- " <<
md_data[i].Name() <<
'\n';
249 <<
"*--------------------------------------------------------------*\n\n";
257 map<String, Index>::const_iterator mi =
262 Index wsv_key = mi->second;
267 <<
"\n*--------------------------------------------------------------*\n"
268 <<
"Generic methods that can generate " <<
wsv_data[wsv_key].Name()
270 <<
"----------------------------------------------------------------\n";
276 if ( count(
md_data[i].GOutput().begin(),
280 cout <<
"- " <<
md_data[i].Name() <<
'\n';
290 <<
"\n----------------------------------------------------------------\n"
291 <<
"Specific methods that can generate " <<
wsv_data[wsv_key].Name()
293 <<
"----------------------------------------------------------------\n";
299 if ( count(
md_data[i].Output().begin(),
303 cout <<
"- " <<
md_data[i].Name() <<
'\n';
311 <<
"*--------------------------------------------------------------*\n\n";
333 <<
"\n*--------------------------------------------------------------*\n"
334 <<
"Generic methods that can generate variables of group "
336 <<
"----------------------------------------------------------------\n";
342 if ( count(
md_data[i].GOutput().begin(),
346 cout <<
"- " <<
md_data[i].Name() <<
'\n';
354 <<
"*--------------------------------------------------------------*\n\n";
361 cerr <<
"The name " << methods <<
" matches neither `all',\n"
362 <<
"nor the name of a workspace variable, nor the name\n"
363 <<
"of a workspace variable group.\n";
380 extern const std::map<String, Index>
WsvMap;
391 map<String, Index>::const_iterator mi =
396 Index wsv_key = mi->second;
401 <<
"\n*--------------------------------------------------------------*\n"
402 <<
"Generic methods that can use " <<
wsv_data[wsv_key].Name() <<
":\n"
403 <<
"----------------------------------------------------------------\n";
409 if ( count(
md_data[i].GInput().begin(),
413 cout <<
"- " <<
md_data[i].Name() <<
'\n';
423 <<
"\n----------------------------------------------------------------\n"
424 <<
"Specific methods that require " <<
wsv_data[wsv_key].Name()
426 <<
"----------------------------------------------------------------\n";
432 if ( count(
md_data[i].Input().begin(),
436 cout <<
"- " <<
md_data[i].Name() <<
'\n';
444 <<
"*--------------------------------------------------------------*\n\n";
466 <<
"\n*--------------------------------------------------------------*\n"
467 <<
"Generic methods that require a variable of group "
469 <<
"----------------------------------------------------------------\n";
475 if ( count(
md_data[i].GInput().begin(),
479 cout <<
"- " <<
md_data[i].Name() <<
'\n';
487 <<
"*--------------------------------------------------------------*\n\n";
494 cerr <<
"The name " << input <<
" matches neither the name of a\n"
495 <<
"workspace variable, nor the name of a workspace variable group.\n";
512 extern const std::map<String, Index>
MdMap;
522 if (
"all" == workspacevariables )
525 <<
"\n*--------------------------------------------------------------*\n"
526 <<
"Complete list of ARTS workspace variables:\n"
527 <<
"----------------------------------------------------------------\n";
530 cout <<
"- " <<
wsv_data[i].Name() <<
'\n';
533 <<
"*--------------------------------------------------------------*\n\n";
539 map<String, Index>::const_iterator mi =
540 MdMap.find(workspacevariables);
541 if ( mi !=
MdMap.end() )
551 <<
"\n*--------------------------------------------------------------*\n"
552 <<
"Generic workspace variables required by " << mdr.
Name()
554 <<
"----------------------------------------------------------------\n";
566 <<
"\n----------------------------------------------------------------\n"
567 <<
"Specific workspace variables required by " << mdr.
Name() <<
":\n"
568 <<
"----------------------------------------------------------------\n";
578 <<
"*--------------------------------------------------------------*\n\n";
584 cerr <<
"The name " << workspacevariables <<
" matches neither `all',\n"
585 <<
"nor the name of a workspace method.\n";
600 extern const std::map<String, Index>
MdMap;
601 extern const std::map<String, Index>
WsvMap;
608 map<String, Index>::const_iterator i =
609 MdMap.find(describe);
610 if ( i !=
MdMap.end() )
613 cout <<
md_data[i->second] <<
'\n';
621 i =
WsvMap.find(describe);
626 cout <<
wsv_data[i->second] <<
'\n';
631 cerr <<
"The name " << describe
632 <<
" matches neither method nor variable.\n";
675 int main (
int argc,
char **argv)
702 <<
" with HDF support."
703 #endif // HDF_SUPPORT
705 <<
"Compiled on " << OS_NAME <<
" " << OS_VERSION
707 << ((
sizeof (
Numeric) ==
sizeof (
double)) ?
"double" :
"float")
708 <<
" precision." << endl
709 <<
"Compile flags: " << COMPILE_FLAGS << endl;
813 <<
"\n*--------------------------------------------------------------*\n"
814 <<
"Complete list of ARTS workspace variable groups:\n"
815 <<
"----------------------------------------------------------------\n";
821 <<
"*--------------------------------------------------------------*\n\n";
831 cerr <<
"You must specify at least one control file name.\n";
869 catch (runtime_error x)
871 cerr << x.what() <<
'\n'
872 <<
"I have to be able to write to my report file.";
908 out3 <<
"\nReading control files:\n";
922 catch (runtime_error x)
924 out0 << x.what() <<
'\n';
928 out1 <<
"Goodbye.\n";
String input
This is complementary to the methods switch.
WorkSpace workspace
The workspace itself.
const Array< WsvP * > wsv_pointers
The array of WSV pointers.
void AppendFile(const String &name)
Appends contents of file to the source text.
The declarations of all the exception classes.
const ArrayOfIndex & Input() const
Declarations required for the calculation of absorption coefficients.
Index reporting
This should be a two digit integer.
void define_wsv_map()
Define WsvMap.
String describe
Print the description String of the given workspace variable or method.
Out0 out0
Level 0 output stream.
void option_input(const String &input)
React to option ‘input’.
bool groups
Print a list of all workspace variable groups.
void define_wsv_data()
Define the lookup data for the workspace variables.
String methods
If this is given the argument ‘all’, it simply prints a list of all methods.
The verbosity level for screen and file output.
Messages messages
Verbosity levels.
const ArrayOfIndex & Output() const
void define_wsv_pointers(Array< WsvP * > &wsv_pointers, WorkSpace &workspace)
String helptext
Longer message explaining the options.
const Array< WsvRecord > wsv_data
void executor(WorkSpace &workspace, const Array< MRecord > &tasklist)
The arts executor.
std::map< String, Index > WsvMap
const ArrayOfIndex & Input() const
ArrayOfString controlfiles
The filenames of the controlfiles.
This can be used to make arrays out of anything.
String basename
If this is specified (with the -b –basename option), it is used as the base name for the report file ...
std::map< String, Index > MdMap
The map associated with md_data.
String full_name
The ARTS running version number.
void define_md_data()
Define the lookup data for the workspace methods.
Declarations having to do with the four output streams.
Index screen
Verbosity of screen output.
void give_up(const String &message)
Print the error message and exit.
Out1 out1
Level 1 output stream.
NUMERIC Numeric
The type to use for all floating point numbers.
bool get_parameters(int argc, char **argv)
Get the command line parameters.
void define_lineshape_data()
ArrayOfString wsv_group_names
ofstream report_file
The report file.
void define_species_map()
Define the species data map.
void define_wsv_group_names()
Define the array of workspace variable group names.
int main(int argc, char **argv)
This is the main function of ARTS.
void set_reporting_level(Index r)
Set the reporting level, either the default or based on reporting.
const String & Name() const
void check_built_headers()
Checks the dimensions of stuff in generated headers.
A smart class to hold the text for parsing.
const ArrayOfIndex & GInput() const
This file contains header information for the dealing with command line parameters.
String out_basename
The basename for the report file and for all other output files.
void open_output_file(ofstream &file, const String &name)
Open a file for writing.
void define_lineshape_norm_data()
The declaration of the (great) workspace.
void polite_goodby()
Remind the user of –help and exit return value 1.
Array< MdRecord > md_data
The lookup information for the workspace methods.
Out3 out3
Level 3 output stream.
INDEX Index
The type to use for all integer numbers and indices.
This class contains all information for one workspace method.
void(* getaways[])(WorkSpace &, const MRecord &)
Structure to hold all command line Parameters.
bool version
Display version information.
Parameters parameters
Holds the command line parameters.
void option_methods(const String &methods)
React to option ‘methods’.
void parse_main(Array< MRecord > &tasklist, SourceText &text)
The main function of the parser.
String usage
Short message how to call the program.
void option_workspacevariables(const String &workspacevariables)
React to option ‘workspacevariables’.
Index file
Verbosity of file output.
This file contains basic functions to handle ASCII and binary (HDF) data files.
void option_describe(const String &describe)
React to option ‘describe’.
String workspacevariables
If this is given the argument ‘all’, it simply prints a list of all workspace variables.
void define_species_data()
void define_md_map()
Define MdMap.
bool help
Only display the help text.
Index nelem() const
Number of elements.
Declaration of the class MdRecord.
Auxiliary header stuff related to workspace variable groups.
const ArrayOfIndex & Output() const
Declares the enum type that acts as a handle for workspace variables. Also declares the workspace its...
The global header file for ARTS.