ARTS 2.5.9 (git: 825fa5f2)
agenda_set.cc
Go to the documentation of this file.
1#include "agenda_set.h"
2
3#include <default_gins.h>
4
5#include "arts_options.h"
6
7namespace AgendaManip {
8std::ostream& operator<<(std::ostream& os, const AgendaMethodVariable& x) {
9 return os << x.name << "@" << x.ws_pos;
10}
11
13 const String& method_name) {
14 static const Index any_pos = global_data::WsvGroupMap.at("Any");
15
16 auto& method =
18
20
21 for (auto& output : method.Out()) {
22 auto& var = var_order.emplace_back();
23 var.name = ws.wsv_data_ptr->operator[](output).Name();
24 var.group = ws.wsv_data_ptr->operator[](output).Group();
25 var.ws_pos = output;
26 var.input = false;
27 }
28
29 for (Index i = 0; i < method.GOut().nelem(); i++) {
30 auto& var = var_order.emplace_back();
31 var.name = method.GOut()[i];
32 var.group = method.GOutType()[i];
33 var.g_pos = i;
34 var.input = false;
35 var.any = var.group == any_pos;
36 }
37
38 for (auto& input : method.In()) {
39 // Skip inout
40 if (std::any_of(method.Out().begin(),
41 method.Out().end(),
42 [input](auto& output) { return input == output; }))
43 continue;
44
45 auto& var = var_order.emplace_back();
46 var.name = ws.wsv_data_ptr->operator[](input).Name();
47 var.group = ws.wsv_data_ptr->operator[](input).Group();
48 var.ws_pos = input;
49 var.input = true;
50 }
51
52 for (Index i = 0; i < method.GIn().nelem(); i++) {
53 auto& var = var_order.emplace_back();
54 var.name = method.GIn()[i];
55 var.group = method.GInType()[i];
56 var.g_pos = i;
57 var.input = true;
58 var.any = var.group == any_pos;
59
60 // Create defaults (on the workspace)
61 if (method.GInDefault()[i] not_eq NODEF) {
62 var.ws_pos =
63 create_workspace_gin_default_internal(ws, method_name, var.name);
64 }
65 }
66
67 return var_order;
68}
69
70std::pair<ArrayOfIndex, ArrayOfIndex> split_io(
71 Array<AgendaMethodVariable>& var_order) {
72 ArrayOfIndex in, out;
73 for (auto& var : var_order) {
74 if (var.input)
75 in.push_back(var.ws_pos);
76 else
77 out.push_back(var.ws_pos);
78 }
79 return {in, out};
80}
81
82SetWsv::SetWsv(const std::string& x, const std::string& y)
83 : test(opt::NameOnly), str(x + "=" + y) {}
84
85SetWsv::SetWsv(std::string_view x) : test(opt::NameOnly), str(x) {}
86
89 const SetWsv& wsv) {
90 using enum SetWsv::opt;
91 switch (wsv.test) {
92 case NameOnly: {
93 const std::string_view expr = wsv.str;
94 auto equal_sign = expr.find('=');
95 if (equal_sign == expr.npos) {
96 positional = true;
97 ws_pos = ws.WsvMap_ptr->at(expr);
98 } else {
99 positional = false;
100 auto rhs = expr;
101 rhs.remove_prefix(equal_sign);
102
103 auto lhs = expr;
104 lhs.remove_suffix(rhs.size());
105
106 while (lhs.size() and (std::isspace(lhs.front()) or lhs.front() == '='))
107 lhs.remove_prefix(1);
108 while (lhs.size() and (std::isspace(lhs.back()) or lhs.back() == '='))
109 lhs.remove_suffix(1);
110 while (rhs.size() and (std::isspace(rhs.front()) or rhs.front() == '='))
111 rhs.remove_prefix(1);
112 while (rhs.size() and (std::isspace(rhs.back()) or rhs.back() == '='))
113 rhs.remove_suffix(1);
114
115 method_position(list, lhs);
116 ws_pos = ws.WsvMap_ptr->at(rhs);
117 }
118 } break;
119 case ValueOnly:
120 positional = true;
121 wsv_position(ws, wsv.val);
122 break;
123 case NameAndValue:
124 positional = false;
125 method_position(list, wsv.str);
126 wsv_position(ws, wsv.val);
127 break;
128 }
129}
130
132 if (new_value)
133 a.push_back(MRecord(
135 "Delete_sg_",
136 global_data::wsv_groups.at(ws.wsv_data_ptr->at(ws_pos).Group()))),
137 {},
138 {ws_pos},
139 {},
140 Agenda{ws}));
141}
142
144 if (new_value)
145 a.push_back(MRecord(
148 .name,
149 "Set")),
150 {ws_pos},
151 {},
152 ws.wsv_data_ptr->at(ws_pos).default_value(),
153 Agenda{ws}));
154}
155
157 const std::string_view rhs) {
158 auto ptr = std::find_if(
159 list.begin(), list.end(), [rhs](auto& x) { return x.name == rhs; });
161 ptr not_eq list.end(), "Wrongly named parameter selection: ", rhs);
162 method_pos = std::distance(list.begin(), ptr);
163}
164
166 new_value = true;
168 var_string("::wsv", ws.nelem()).c_str(), "method value", value.type(), value));
169}
170
171AgendaCreator::AgendaCreator(Workspace& workspace, const char* name)
172 : ws(workspace), agenda(ws) {
173 agenda.set_name(name);
174}
175
179
180 ArrayOfIndex input, output;
181 for (auto& method: agenda.Methods()) {
182 for (auto& wsv: method.In()) input.push_back(wsv);
183 for (auto& wsv: method.Out()) output.push_back(wsv);
184 }
185 std::sort(input.begin(), input.end());
186 std::sort(output.begin(), output.end());
187
189 for (auto& wsv: agrecord.In()) {
190 auto test = [wsv](auto& x){return x == wsv;};
191 if (std::none_of(input.begin(), input.end(), test) and std::none_of(output.begin(), output.end(), test)) {
192 auto& group = global_data::wsv_groups.at(ws.wsv_data_ptr -> at(wsv).Group()).name;
193 auto pos = global_data::MdMap.at(var_string("Ignore_sg_", group));
194 agenda.push_back(MRecord(pos, {}, {wsv}, {}, Agenda(ws)));
195 }
196 }
197
199 for (auto& wsv: agrecord.Out()) {
200 auto test = [wsv](auto& x){return x == wsv;};
201 if (std::none_of(output.begin(), output.end(), test)) {
202 auto& group = global_data::wsv_groups.at(ws.wsv_data_ptr -> at(wsv).Group()).name;
203 auto pos = global_data::MdMap.at(var_string("Touch_sg_", group));
204 agenda.push_back(MRecord(pos, {wsv}, {}, {}, Agenda(ws)));
205 }
206 }
207
210
211 return agenda;
212}
213
214void AgendaCreator::set(const std::string_view var, const TokVal& value) {
215 auto pos = global_data::MdMap.at(var_string(value.type(), "Set"));
216 auto ws_pos = ws.WsvMap_ptr -> at(var);
217 if (value.holdsAgenda())
218 agenda.push_back(MRecord(pos, {ws_pos}, {}, {}, Agenda{value}));
219 else
220 agenda.push_back(MRecord(pos, {ws_pos}, {}, value, Agenda{ws}));
221}
222
223void AgendaCreator::ignore(const std::string_view var) { add("Ignore", var); }
224
226 AgendaCreator agenda(ws, "iy_main_agenda");
227
228 using enum Options::iy_main_agendaDefaultOptions;
229 switch (Options::toiy_main_agendaDefaultOptionsOrThrow(option)) {
230 case Emission:
231 agenda.add("ppathCalc");
232 agenda.add("iyEmissionStandard");
233 agenda.set("geo_pos", Vector{});
234 break;
235 case EmissionPlaneParallel:
236 agenda.add("ppathPlaneParallel");
237 agenda.add("iyEmissionStandard");
238 agenda.set("geo_pos", Vector{});
239 break;
240 case Clearsky:
241 agenda.add("ppathCalc");
242 agenda.add("iyClearsky");
243 agenda.set("geo_pos", Vector{});
244 break;
245 case Transmission:
246 agenda.add("ppathCalc", SetWsv{"cloudbox_on", Index{0}});
247 agenda.add("iyTransmissionStandard");
248 agenda.set("geo_pos", Vector{});
249 break;
250 case TransmissionUnitUnpolIntensity:
251 agenda.add(
252 "MatrixUnitIntensity", "iy_transmitter", "stokes_dim", "f_grid");
253 agenda.add("ppathCalc", SetWsv{"cloudbox_on", Index{0}});
254 agenda.add("iyTransmissionStandard");
255 agenda.set("geo_pos", Vector{});
256 break;
257 case TransmissionUnitPolIntensity:
258 agenda.add("iy_transmitterSinglePol");
259 agenda.add("ppathCalc", SetWsv{"cloudbox_on", Index{0}});
260 agenda.add("iyTransmissionStandard");
261 agenda.set("geo_pos", Vector{});
262 break;
263 case Freqloop:
264 agenda.add("iyLoopFrequencies");
265 agenda.set("geo_pos", Vector{});
266 agenda.ignore("diy_dx");
267 break;
268 case ScattMC:
269 agenda.add("iyMC");
270 agenda.set("geo_pos", Vector{});
271 agenda.ignore("diy_dx");
272 break;
273 case FINAL:
274 break;
275 }
276
277 return agenda.finalize();
278}
279
281 AgendaCreator agenda(ws, "iy_loop_freqs_agenda");
282
283 using enum Options::iy_loop_freqs_agendaDefaultOptions;
284 switch (Options::toiy_loop_freqs_agendaDefaultOptionsOrThrow(option)) {
285 case Emission:
286 agenda.add("ppathCalc");
287 agenda.add("iyEmissionStandard");
288 break;
289 case Transmission:
290 agenda.add("ppathCalc");
291 agenda.add("iyTransmissionStandard");
292 break;
293 case FINAL:
294 break;
295 }
296
297 return agenda.finalize();
298}
299
301 AgendaCreator agenda(ws, "iy_space_agenda");
302
303 using enum Options::iy_space_agendaDefaultOptions;
304 switch (Options::toiy_space_agendaDefaultOptionsOrThrow(option)) {
305 case CosmicBackground:
306 agenda.add("MatrixCBR", "iy", "stokes_dim", "f_grid");
307 break;
308 case FINAL:
309 break;
310 }
311
312 return agenda.finalize();
313}
314
316 AgendaCreator agenda(ws, "iy_surface_agenda");
317
318 using enum Options::iy_surface_agendaDefaultOptions;
319 switch (Options::toiy_surface_agendaDefaultOptionsOrThrow(option)) {
320 case UseSurfaceRtprop:
321 agenda.add("SurfaceDummy");
322 agenda.add("iySurfaceRtpropAgenda");
323 break;
324 case FINAL:
325 break;
326 }
327
328 return agenda.finalize();
329}
330
332 AgendaCreator agenda(ws, "iy_cloudbox_agenda");
333
334 using enum Options::iy_cloudbox_agendaDefaultOptions;
335 switch (Options::toiy_cloudbox_agendaDefaultOptionsOrThrow(option)) {
336 case LinInterpField:
337 agenda.add("iyInterpCloudboxField");
338 break;
339 case QuarticInterpField:
340 agenda.add("iyInterpCloudboxField", SetWsv{"za_interp_order", Index{4}});
341 break;
342 case FINAL:
343 break;
344 }
345
346 return agenda.finalize();
347}
348
350 AgendaCreator agenda(ws, "ppath_agenda");
351
352 using enum Options::ppath_agendaDefaultOptions;
353 switch (Options::toppath_agendaDefaultOptionsOrThrow(option)) {
354 case FollowSensorLosPath:
355 agenda.add("ppathStepByStep");
356 break;
357 case PlaneParallel:
358 agenda.add("ppathPlaneParallel");
359 break;
360 case TransmitterReceiverPath:
361 agenda.add("rte_losGeometricFromRtePosToRtePos2");
362 agenda.add("ppathFromRtePos2");
363 break;
364 case FINAL:
365 break;
366 }
367
368 return agenda.finalize();
369}
370
372 AgendaCreator agenda(ws, "ppath_step_agenda");
373
374 using enum Options::ppath_step_agendaDefaultOptions;
375 switch (Options::toppath_step_agendaDefaultOptionsOrThrow(option)) {
376 case GeometricPath:
377 agenda.add("ppath_stepGeometric");
378 break;
379 case RefractedPath:
380 agenda.add("ppath_stepRefractionBasic");
381 break;
382 case FINAL:
383 break;
384 }
385
386 return agenda.finalize();
387}
388
390 AgendaCreator agenda(ws, "refr_index_air_agenda");
391
392 using enum Options::refr_index_air_agendaDefaultOptions;
393 switch (Options::torefr_index_air_agendaDefaultOptionsOrThrow(option)) {
394 case NoRefrac:
395 agenda.set("refr_index_air", Numeric{1.0});
396 agenda.set("refr_index_air_group", Numeric{1.0});
397 break;
398 case GasMicrowavesEarth:
399 agenda.set("refr_index_air", Numeric{1.0});
400 agenda.set("refr_index_air_group", Numeric{1.0});
401 agenda.add("refr_index_airMicrowavesEarth");
402 break;
403 case GasInfraredEarth:
404 agenda.set("refr_index_air", Numeric{1.0});
405 agenda.set("refr_index_air_group", Numeric{1.0});
406 agenda.add("refr_index_airInfraredEarth");
407 break;
408 case GasMicrowavesGeneral:
409 agenda.set("refr_index_air", Numeric{1.0});
410 agenda.set("refr_index_air_group", Numeric{1.0});
411 agenda.add("refr_index_airMicrowavesGeneral");
412 break;
413 case FreeElectrons:
414 agenda.set("refr_index_air", Numeric{1.0});
415 agenda.set("refr_index_air_group", Numeric{1.0});
416 agenda.add("refr_index_airFreeElectrons");
417 break;
418 case GasMicrowavesGeneralAndElectrons:
419 agenda.set("refr_index_air", Numeric{1.0});
420 agenda.set("refr_index_air_group", Numeric{1.0});
421 agenda.add("refr_index_airMicrowavesGeneral");
422 agenda.add("refr_index_airFreeElectrons");
423 break;
424 case GasMicrowavesEarthAndElectrons:
425 agenda.set("refr_index_air", Numeric{1.0});
426 agenda.set("refr_index_air_group", Numeric{1.0});
427 agenda.add("refr_index_airMicrowavesEarth");
428 agenda.add("refr_index_airFreeElectrons");
429 break;
430 case FINAL:
431 break;
432 }
433
434 return agenda.finalize();
435}
436
438 AgendaCreator agenda(ws, "water_p_eq_agenda");
439
440 using enum Options::water_p_eq_agendaDefaultOptions;
441 switch (Options::towater_p_eq_agendaDefaultOptionsOrThrow(option)) {
442 case MK05:
443 agenda.add("water_p_eq_fieldMK05");
444 break;
445 case FINAL:
446 break;
447 }
448
449 return agenda.finalize();
450}
451
453 AgendaCreator agenda(ws, "gas_scattering_agenda");
454
455 using enum Options::gas_scattering_agendaDefaultOptions;
456 switch (Options::togas_scattering_agendaDefaultOptionsOrThrow(option)) {
457 case Dummy:
458 break;
459 case FINAL:
460 break;
461 }
462
463 return agenda.finalize();
464}
465
467 AgendaCreator agenda(ws, "surface_rtprop_agenda");
468
469 using enum Options::surface_rtprop_agendaDefaultOptions;
470 switch (Options::tosurface_rtprop_agendaDefaultOptionsOrThrow(option)) {
471 case Blackbody_SurfTFromt_surface:
472 agenda.add("InterpSurfaceFieldToPosition",
473 "out=surface_skin_t",
474 "field=t_surface");
475 agenda.add("surfaceBlackbody");
476 break;
477 case Blackbody_SurfTFromt_field:
478 agenda.add(
479 "InterpAtmFieldToPosition", "out=surface_skin_t", "field=t_field");
480 agenda.add("surfaceBlackbody");
481 break;
482 case Specular_NoPol_ReflFix_SurfTFromt_surface:
483 agenda.add("specular_losCalc");
484 agenda.add("InterpSurfaceFieldToPosition",
485 "out=surface_skin_t",
486 "field=t_surface");
487 agenda.add("surfaceFlatScalarReflectivity");
488 break;
489 case Specular_NoPol_ReflFix_SurfTFromt_field:
490 agenda.add("specular_losCalc");
491 agenda.add(
492 "InterpAtmFieldToPosition", "out=surface_skin_t", "field=t_field");
493 agenda.add("surfaceFlatScalarReflectivity");
494 break;
495 case Specular_WithPol_ReflFix_SurfTFromt_surface:
496 agenda.add("specular_losCalc");
497 agenda.add("InterpSurfaceFieldToPosition",
498 "out=surface_skin_t",
499 "field=t_surface");
500 agenda.add("surfaceFlatReflectivity");
501 break;
502 case lambertian_ReflFix_SurfTFromt_surface:
503 agenda.add("InterpSurfaceFieldToPosition",
504 "out=surface_skin_t",
505 "field=t_surface");
506 agenda.add("specular_losCalc");
507 agenda.add("surfaceLambertianSimple");
508 break;
509 case lambertian_ReflFix_SurfTFromt_field:
510 agenda.add(
511 "InterpAtmFieldToPosition", "out=surface_skin_t", "field=t_field");
512 agenda.add("specular_losCalc");
513 agenda.add("surfaceLambertianSimple");
514 break;
515 case FINAL:
516 break;
517 }
518
519 return agenda.finalize();
520}
521
523 AgendaCreator agenda(ws, "g0_agenda");
524
525 using enum Options::g0_agendaDefaultOptions;
526 switch (Options::tog0_agendaDefaultOptionsOrThrow(option)) {
527 case Earth:
528 agenda.add("g0Earth");
529 break;
530 case Io:
531 agenda.add("g0Io");
532 break;
533 case Jupiter:
534 agenda.add("g0Jupiter");
535 break;
536 case Mars:
537 agenda.add("g0Mars");
538 break;
539 case Venus:
540 agenda.add("g0Venus");
541 break;
542 case FINAL:
543 break;
544 }
545
546 return agenda.finalize();
547}
548
550 AgendaCreator agenda(ws, "dobatch_calc_agenda");
551
552 using enum Options::dobatch_calc_agendaDefaultOptions;
553 switch (Options::todobatch_calc_agendaDefaultOptionsOrThrow(option)) {
554 case FINAL:
555 break;
556 }
557
558 return agenda.finalize();
559}
560
562 AgendaCreator agenda(ws, "ybatch_calc_agenda");
563
564 using enum Options::ybatch_calc_agendaDefaultOptions;
565 switch (Options::toybatch_calc_agendaDefaultOptionsOrThrow(option)) {
566 case FINAL:
567 break;
568 }
569
570 return agenda.finalize();
571}
572
574 AgendaCreator agenda(ws, "test_agenda");
575
576 using enum Options::test_agendaDefaultOptions;
577 switch (Options::totest_agendaDefaultOptionsOrThrow(option)) {
578 case FINAL:
579 break;
580 }
581
582 return agenda.finalize();
583}
584
586 AgendaCreator agenda(ws, "surface_rtprop_sub_agenda");
587
588 using enum Options::surface_rtprop_sub_agendaDefaultOptions;
589 switch (Options::tosurface_rtprop_sub_agendaDefaultOptionsOrThrow(option)) {
590 case FINAL:
591 break;
592 }
593
594 return agenda.finalize();
595}
596
598 AgendaCreator agenda(ws, "spt_calc_agenda");
599
600 using enum Options::spt_calc_agendaDefaultOptions;
601 switch (Options::tospt_calc_agendaDefaultOptionsOrThrow(option)) {
602 case FINAL:
603 break;
604 }
605
606 return agenda.finalize();
607}
608
610 AgendaCreator agenda(ws, "sensor_response_agenda");
611
612 using enum Options::sensor_response_agendaDefaultOptions;
613 switch (Options::tosensor_response_agendaDefaultOptionsOrThrow(option)) {
614 case FINAL:
615 break;
616 }
617
618 return agenda.finalize();
619}
620
622 AgendaCreator agenda(ws, "propmat_clearsky_agenda");
623
624 using enum Options::propmat_clearsky_agendaDefaultOptions;
625 switch (Options::topropmat_clearsky_agendaDefaultOptionsOrThrow(option)) {
626 case Empty:
627 agenda.add("propmat_clearskyInit");
628 case FINAL:
629 break;
630 }
631
632 return agenda.finalize();
633}
634
636 AgendaCreator agenda(ws, "pha_mat_spt_agenda");
637
638 using enum Options::pha_mat_spt_agendaDefaultOptions;
639 switch (Options::topha_mat_spt_agendaDefaultOptionsOrThrow(option)) {
640 case FINAL:
641 break;
642 }
643
644 return agenda.finalize();
645}
646
648 AgendaCreator agenda(ws, "met_profile_calc_agenda");
649
650 using enum Options::met_profile_calc_agendaDefaultOptions;
651 switch (Options::tomet_profile_calc_agendaDefaultOptionsOrThrow(option)) {
652 case FINAL:
653 break;
654 }
655
656 return agenda.finalize();
657}
658
660 AgendaCreator agenda(ws, "main_agenda");
661
662 using enum Options::main_agendaDefaultOptions;
663 switch (Options::tomain_agendaDefaultOptionsOrThrow(option)) {
664 case FINAL:
665 break;
666 }
667
668 return agenda.finalize();
669}
670
672 AgendaCreator agenda(ws, "jacobian_agenda");
673
674 using enum Options::jacobian_agendaDefaultOptions;
675 switch (Options::tojacobian_agendaDefaultOptionsOrThrow(option)) {
676 case FINAL:
677 break;
678 }
679
680 return agenda.finalize();
681}
682
684 AgendaCreator agenda(ws, "iy_radar_agenda");
685
686 using enum Options::iy_radar_agendaDefaultOptions;
687 switch (Options::toiy_radar_agendaDefaultOptionsOrThrow(option)) {
688 case FINAL:
689 break;
690 }
691
692 return agenda.finalize();
693}
694
696 AgendaCreator agenda(ws, "iy_independent_beam_approx_agenda");
697
698 using enum Options::iy_independent_beam_approx_agendaDefaultOptions;
699 switch (Options::toiy_independent_beam_approx_agendaDefaultOptionsOrThrow(option)) {
700 case FINAL:
701 break;
702 }
703
704 return agenda.finalize();
705}
706
708 AgendaCreator agenda(ws, "inversion_iterate_agenda");
709
710 using enum Options::inversion_iterate_agendaDefaultOptions;
711 switch (Options::toinversion_iterate_agendaDefaultOptionsOrThrow(option)) {
712 case FINAL:
713 break;
714 }
715
716 return agenda.finalize();
717}
718
720 AgendaCreator agenda(ws, "forloop_agenda");
721
722 using enum Options::forloop_agendaDefaultOptions;
723 switch (Options::toforloop_agendaDefaultOptionsOrThrow(option)) {
724 case FINAL:
725 break;
726 }
727
728 return agenda.finalize();
729}
730
732 AgendaCreator agenda(ws, "doit_scat_field_agenda");
733
734 using enum Options::doit_scat_field_agendaDefaultOptions;
735 switch (Options::todoit_scat_field_agendaDefaultOptionsOrThrow(option)) {
736 case FINAL:
737 break;
738 }
739
740 return agenda.finalize();
741}
742
744 AgendaCreator agenda(ws, "doit_rte_agenda");
745
746 using enum Options::doit_rte_agendaDefaultOptions;
747 switch (Options::todoit_rte_agendaDefaultOptionsOrThrow(option)) {
748 case FINAL:
749 break;
750 }
751
752 return agenda.finalize();
753}
754
756 AgendaCreator agenda(ws, "doit_mono_agenda");
757
758 using enum Options::doit_mono_agendaDefaultOptions;
759 switch (Options::todoit_mono_agendaDefaultOptionsOrThrow(option)) {
760 case FINAL:
761 break;
762 }
763
764 return agenda.finalize();
765}
766
768 AgendaCreator agenda(ws, "doit_conv_test_agenda");
769
770 using enum Options::doit_conv_test_agendaDefaultOptions;
771 switch (Options::todoit_conv_test_agendaDefaultOptionsOrThrow(option)) {
772 case FINAL:
773 break;
774 }
775
776 return agenda.finalize();
777}
778} // namespace AgendaManip
Options for ARTS from enumeration (including error handling)
The Agenda class.
Definition: agenda_class.h:69
String name() const
Agenda name.
void check(Workspace &ws_in, const Verbosity &verbosity)
Checks consistency of an agenda.
void push_back(const MRecord &n)
Append a new method to end of list.
void set_name(const String &nname)
Set agenda name.
const Array< MRecord > & Methods() const
Definition: agenda_class.h:86
This can be used to make arrays out of anything.
Definition: array.h:48
Method runtime data.
Definition: agenda_class.h:142
Definition: tokval.h:245
bool holdsAgenda() const
Definition: tokval.cc:202
std::string_view type() const
Definition: tokval.cc:682
The Vector class.
Definition: matpackI.h:910
Workspace class.
Definition: workspace_ng.h:53
std::shared_ptr< wsv_data_type > wsv_data_ptr
Definition: workspace_ng.h:76
Index add_wsv(const WsvRecord &wsv)
Add a new variable to this workspace.
Definition: workspace_ng.cc:42
Index nelem() const
Get the number of workspace variables.
Definition: workspace_ng.h:178
std::shared_ptr< WsvMap_type > WsvMap_ptr
Definition: workspace_ng.h:79
This class contains all static information for one workspace variable.
Definition: wsv_aux.h:58
#define ARTS_ASSERT(condition,...)
Definition: debug.h:82
std::string var_string(Args &&... args)
Definition: debug.h:35
Index create_workspace_gin_default_internal(Workspace &ws, const std::string_view method, const std::string_view gin)
Definition: default_gins.cc:16
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
#define NODEF
Definition: methods.h:35
Agenda get_g0_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:522
std::ostream & operator<<(std::ostream &os, const AgendaMethodVariable &x)
Definition: agenda_set.cc:8
Agenda get_ppath_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:349
Agenda get_iy_surface_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:315
Agenda get_ppath_step_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:371
Agenda get_iy_loop_freqs_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:280
Agenda get_iy_independent_beam_approx_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:695
Agenda get_main_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:659
Agenda get_iy_main_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:225
Agenda get_iy_cloudbox_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:331
std::pair< ArrayOfIndex, ArrayOfIndex > split_io(Array< AgendaMethodVariable > &var_order)
Split input and output of method variables.
Definition: agenda_set.cc:70
Agenda get_water_p_eq_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:437
Agenda get_dobatch_calc_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:549
Agenda get_inversion_iterate_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:707
Agenda get_surface_rtprop_sub_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:585
Agenda get_refr_index_air_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:389
Agenda get_spt_calc_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:597
Agenda get_pha_mat_spt_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:635
Agenda get_propmat_clearsky_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:621
Agenda get_met_profile_calc_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:647
Agenda get_test_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:573
Agenda get_doit_scat_field_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:731
Agenda get_iy_radar_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:683
Agenda get_forloop_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:719
Agenda get_doit_conv_test_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:767
Agenda get_ybatch_calc_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:561
Agenda get_gas_scattering_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:452
Agenda get_doit_rte_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:743
Agenda get_iy_space_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:300
Agenda get_doit_mono_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:755
Array< AgendaMethodVariable > sorted_mdrecord(Workspace &ws, const String &method_name)
Return a full list of all the Method Variables with defaults on the workspace.
Definition: agenda_set.cc:12
Agenda get_sensor_response_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:609
Agenda get_surface_rtprop_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:466
Agenda get_jacobian_agenda(Workspace &ws, const String &option)
Definition: agenda_set.cc:671
const ArrayOfGroupRecord wsv_groups
The names associated with Wsv groups as Strings.
Definition: global_data.h:91
const Array< MdRecord > md_data_raw
Lookup information for workspace methods.
Definition: methods.cc:42
const map< String, Index > MdMap
The map associated with md_data.
Definition: methods_aux.cc:41
const Array< AgRecord > agenda_data
The lookup information for the agendas.
Definition: agendas.cc:41
const map< String, Index > WsvGroupMap
The map associated with wsv_groups.
Definition: groups.cc:43
const map< String, Index > MdRawMap
The map associated with md_data_raw.
Definition: methods_aux.cc:43
map< String, Index > AgendaMap
The map associated with agenda_data.
Helper class to create an agenda.
Definition: agenda_set.h:144
AgendaCreator(Workspace &workspace, const char *name)
Definition: agenda_set.cc:171
void add(const std::string_view method, Input &&... input)
Add a method with as many inputs as you want. These inputs must be of type Wsv.
Definition: agenda_set.h:155
Agenda finalize()
Check the agenda and return a copy of it (ignoring/touching all agenda input/output not dealt with)
Definition: agenda_set.cc:177
void set(const std::string_view var, const TokVal &value)
Set a variable to a value.
Definition: agenda_set.cc:214
void ignore(const std::string_view var)
Ignores a variable (only call if the variable input is ignored despite being BOTH in- and output)
Definition: agenda_set.cc:223
A Complete Description of a Method Variable.
Definition: agenda_set.h:12
void add_del(Workspace &ws, Agenda &a) const
Definition: agenda_set.cc:131
void method_position(const Array< AgendaMethodVariable > &list, const std::string_view rhs)
Definition: agenda_set.cc:156
void add_set(Workspace &ws, Agenda &a) const
Definition: agenda_set.cc:143
void wsv_position(Workspace &ws, const TokVal &value)
Definition: agenda_set.cc:165
opt
Checks for which type of information should be used later on.
Definition: agenda_set.h:35
SetWsv(const std::string &x, const std::string &y)
For named wsv1=wsv2.
Definition: agenda_set.cc:82
std::string str
Definition: agenda_set.h:38
#define a