Go to the documentation of this file.
41 out3 <<
" Manual agenda execution\n";
47 std::ostringstream os;
49 os <<
"This agenda is uninitialized. We don't even know its name.";
51 os <<
"*" << this_agenda.
name() <<
"* is uninitialized.";
52 os <<
" Use *AgendaSet* to add methods to it.";
53 throw std::runtime_error(os.str());
67 sain.insert(ain.begin(), ain.end());
68 saout.insert(aout.begin(), aout.end());
71 set_difference(sain.begin(),
75 insert_iterator<set<Index> >(in_only, in_only.begin()));
76 for (set<Index>::const_iterator it = in_only.begin(); it != in_only.end();
84 for (ArrayOfIndex::const_iterator it = outputs_to_push.begin();
85 it != outputs_to_push.end();
93 for (ArrayOfIndex::const_iterator it = outputs_to_dup.begin();
94 it != outputs_to_dup.end();
100 bool agenda_failed =
false;
104 }
catch (
const std::exception& e) {
106 os <<
"Run-time error in agenda: " << this_agenda.
name() <<
'\n'
108 agenda_failed =
true;
109 agenda_error_msg = os.str();
111 for (ArrayOfIndex::const_iterator it = outputs_to_push.begin();
112 it != outputs_to_push.end();
117 for (ArrayOfIndex::const_iterator it = outputs_to_dup.begin();
118 it != outputs_to_dup.end();
123 for (set<Index>::const_iterator it = in_only.begin(); it != in_only.end();
128 if (agenda_failed)
throw runtime_error(agenda_error_msg);
137 if (agenda_array_index < 0 || agenda_array_index >= agenda_array.
nelem()) {
138 std::ostringstream os;
140 <<
" out of bounds. 0 <= index < " << agenda_array.
nelem();
141 throw std::runtime_error(os.str());
149 const Agenda& this_agenda,
152 out3 <<
" Manual, exclusive agenda execution\n";
154 #pragma omp critical(AgendaExecuteExclusive_region)
163 const String& agenda_name,
165 const Agenda& input_agenda,
167 output_agenda = input_agenda;
168 output_agenda.
set_name(agenda_name);
178 const String& agenda_name,
180 const Agenda& input_agenda,
182 out.push_back(input_agenda);
185 appended_agenda.
set_name(agenda_name);
195 const String& output_agenda_name,
199 const String& in_agenda_name,
201 const Agenda& input_agenda,
203 if (output_agenda_name != in_agenda_name) {
205 os <<
"Output and input agenda must be the same!" << endl
206 <<
"*" << output_agenda_name <<
"* and *" << in_agenda_name <<
"* "
208 throw runtime_error(os.str());
226 "The 'Arts' method is obsolete. Arts1 controlfiles are no longer supported.",
233 const Agenda& input_agenda,
Declarations for AgRecord, storing lookup information for one agenda.
void ArrayOfAgendaExecute(Workspace &ws, const Index &agenda_array_index, const ArrayOfAgenda &agenda_array, const Verbosity &verbosity)
WORKSPACE METHOD: ArrayOfAgendaExecute.
void execute(Workspace &ws) const
Execute an agenda.
Index get_wsv_id(const String &name)
Get index of WSV.
Verbosity verbosity(Workspace &ws) noexcept
void set_methods(const Array< MRecord > &ml)
map< String, Index > AgendaMap
The map associated with agenda_data.
const ArrayOfIndex & get_output2dup() const
void ArrayOfAgendaAppend(Workspace &ws, ArrayOfAgenda &out, const String &agenda_name, const Agenda &input_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: ArrayOfAgendaAppend.
This can be used to make arrays out of anything.
std::vector< Method > methods()
Index nelem(const Lines &l)
Number of lines.
void AgendaExecuteExclusive(Workspace &ws, const Agenda &this_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: AgendaExecuteExclusive.
Declarations for agendas.
void AgendaAppend(Workspace &ws, Agenda &output_agenda, const String &output_agenda_name, const Agenda &in_agenda, const String &in_agenda_name, const Agenda &input_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: AgendaAppend.
Declarations having to do with the four output streams.
Lookup information for one agenda.
void AgendaSet(Workspace &ws, Agenda &output_agenda, const String &agenda_name, const Agenda &input_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: AgendaSet.
String name() const
Agenda name.
void Arts(Workspace &, const Agenda &, const Verbosity &verbosity)
WORKSPACE METHOD: Arts.
void pop_free(Index i)
Remove the topmost WSV from its stack and free its memory.
void check(Workspace &ws, const Verbosity &verbosity)
Checks consistency of an agenda.
Index nelem() const
Number of elements.
void duplicate(Index i)
Duplicate WSV.
const ArrayOfIndex & In() const
void push_uninitialized(Index i, void *wsv)
Put a new WSV onto its stack.
This file contains the Workspace class.
void Arts2(Workspace &ws, const Agenda &input_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: Arts2.
void AgendaExecute(Workspace &ws, const Agenda &this_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: AgendaExecute.
const ArrayOfIndex & get_output2push() const
void set_name(const String &nname)
Set agenda name.
const Array< AgRecord > agenda_data
The lookup information for the agendas.
Index agenda_array_index(Workspace &ws) noexcept
bool is_initialized(Index i)
Checks existence of the given WSV.
INDEX Index
The type to use for all integer numbers and indices.
const Array< MRecord > & Methods() const
void arts_exit_with_error_message(const String &m, ArtsOut &out)
Print error message and exit.
const ArrayOfIndex & Out() const
Index nelem() const
Number of elements.
Auxiliary header stuff related to workspace variable groups.