#include <algorithm>
#include <map>
#include "arts.h"
#include "parameters.h"
#include "messages.h"
#include "exceptions.h"
#include "file.h"
#include "methods.h"
#include "parser.h"
#include "auto_md.h"
#include "absorption.h"
#include "wsv_aux.h"
#include "agenda_record.h"
#include "mystring.h"
#include "workspace_ng.h"
#include "arts_omp.h"
Go to the source code of this file.
Functions | |
void | polite_goodby () |
Remind the user of --help and exit return value 1. | |
void | set_reporting_level (Index r) |
Set the reporting level. | |
void | option_methods (const String &methods) |
React to option `methods'. | |
void | option_input (const String &input) |
React to option `input'. | |
void | option_workspacevariables (const String &workspacevariables) |
React to option `workspacevariables'. | |
void | option_describe (const String &describe) |
React to option `describe'. | |
int | main (int argc, char **argv) |
This is the main function of ARTS. |
It also contains the executor, which is the `engine' that executes workspace methods in a controlfile one by one, in order to carry out an ARTS calculations.
Definition in file main.cc.
int main | ( | int | argc, | |
char ** | argv | |||
) |
This is the main function of ARTS.
(You never guessed that, did you?) The getopt_long function is used to parse the command line parameters.
Overview: 1. Get command line parameters. 2. Evaluate the command line parameters. (This also checks if the parameters make sense, where necessary.)
argc | Number of command line parameters | |
argv | Values of command line parameters |
Definition at line 676 of file main.cc.
References Arts(), arts_exit(), arts_exit_with_error_message(), arts_messages, arts_omp_get_max_threads(), Parameters::basename, check_agenda_data(), Parameters::controlfiles, define_agenda_data(), define_agenda_map(), define_lineshape_data(), define_lineshape_norm_data(), define_md_data_raw(), define_md_map(), define_md_raw_map(), define_species_data(), define_species_map(), Workspace::define_wsv_data(), define_wsv_group_names(), Workspace::define_wsv_map(), Parameters::describe, expand_md_data_raw_to_md_data(), full_name, get_parameters(), Parameters::groups, Parameters::help, Parameters::helptext, Workspace::initialize(), Parameters::input, Parameters::methods, Array< base >::nelem(), my_basic_string< charT >::npos, Parameters::numthreads, open_output_file(), option_describe(), option_input(), option_methods(), option_workspacevariables(), out1, out2, out3, out_basename, parameters, ArtsParser::parse_tasklist(), Parameters::plain, polite_goodby(), report_file, Parameters::reporting, Agenda::set_main_agenda(), Agenda::set_name(), set_reporting_level(), Parameters::usage, Messages::va, Parameters::version, Messages::vf, Messages::vs, Parameters::workspacevariables, and wsv_group_names.
void option_describe | ( | const String & | describe | ) |
React to option `describe'.
This should print the description String of the given workspace variable or method.
describe | What to describe. |
Definition at line 622 of file main.cc.
References arts_exit(), md_data_raw, MdRawMap, Workspace::wsv_data, and Workspace::WsvMap.
Referenced by main().
void option_input | ( | const String & | input | ) |
React to option `input'.
Given the name of a variable, it should print all methods that need this variable as input.
input | Name of a variable. |
Definition at line 334 of file main.cc.
References arts_exit(), get_wsv_group_id(), MdRecord::GInSpecType(), MdRecord::GInType(), MdRecord::In(), md_data_raw, MdRecord::Name(), Array< base >::nelem(), Workspace::wsv_data, wsv_group_names, and Workspace::WsvMap.
Referenced by main().
void option_methods | ( | const String & | methods | ) |
React to option `methods'.
If given the argument `all', it should simply prints a list of all methods. If given the name of a variable, it should print all methods that produce this variable as output.
methods | All or name of a variable. |
Definition at line 113 of file main.cc.
References arts_exit(), get_wsv_group_id(), MdRecord::GOutSpecType(), MdRecord::GOutType(), Workspace::initialize(), md_data_raw, MdRecord::Name(), Array< base >::nelem(), MdRecord::Out(), parameters, Parameters::plain, Workspace::wsv_data, wsv_group_names, and Workspace::WsvMap.
Referenced by main().
void option_workspacevariables | ( | const String & | workspacevariables | ) |
React to option `workspacevariables'.
If given the argument `all', it should simply prints a list of all variables. If given the name of a method, it should print all variables that are needed by that method.
workspacevariables | All or name of a method. |
Definition at line 528 of file main.cc.
References arts_exit(), MdRecord::GInType(), MdRecord::In(), md_data, MdMap, MdRecord::Name(), Array< base >::nelem(), parameters, Parameters::plain, Workspace::wsv_data, and wsv_group_names.
Referenced by main().
void polite_goodby | ( | ) |
Remind the user of --help and exit return value 1.
Definition at line 50 of file main.cc.
References arts_exit().
Referenced by main().
void set_reporting_level | ( | Index | r | ) |
Set the reporting level.
Set the reporting level, either the default or based on reporting. If reporting was specified, check if the values make sense. The value -1 for reporting means that it was (probably) not given on the command line, since this is the initialization value.
r | Reporting level from Command line. |
Definition at line 68 of file main.cc.
References arts_exit(), arts_messages, Messages::va, Messages::valid(), Messages::vf, and Messages::vs.
Referenced by main().