ARTS  2.0.49
xml_io_compound_types.cc
Go to the documentation of this file.
1 /* Copyright (C) 2003-2008 Oliver Lemke <olemke@core-dump.info>
2 
3  This program is free software; you can redistribute it and/or modify it
4  under the terms of the GNU General Public License as published by the
5  Free Software Foundation; either version 2, or (at your option) any
6  later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16  USA. */
17 
18 
20 // File description
22 
30 #include "arts.h"
31 #include "xml_io_private.h"
32 #include "xml_io_types.h"
33 #include "matpackI.h"
34 #include "matpackII.h"
35 #include "matpackIII.h"
36 #include "matpackIV.h"
37 #include "matpackV.h"
38 #include "matpackVI.h"
39 #include "matpackVII.h"
40 #include "gridded_fields.h"
41 #include "jacobian.h"
42 
43 
45 // Overloaded functions for reading/writing data from/to XML stream
47 
48 
49 //=== GasAbsLookup ===========================================================
50 
52 
57 void
58 xml_read_from_stream (istream& is_xml,
59  GasAbsLookup& gal,
60  bifstream *pbifs, const Verbosity& verbosity)
61 {
62  ArtsXMLTag tag(verbosity);
63 
64  tag.read_from_stream (is_xml);
65  tag.check_name ("GasAbsLookup");
66 
67  xml_read_from_stream (is_xml, gal.species, pbifs, verbosity);
68  xml_read_from_stream (is_xml, gal.nonlinear_species, pbifs, verbosity);
69  xml_read_from_stream (is_xml, gal.f_grid, pbifs, verbosity);
70  xml_read_from_stream (is_xml, gal.p_grid, pbifs, verbosity);
71  xml_read_from_stream (is_xml, gal.vmrs_ref, pbifs, verbosity);
72  xml_read_from_stream (is_xml, gal.t_ref, pbifs, verbosity);
73  xml_read_from_stream (is_xml, gal.t_pert, pbifs, verbosity);
74  xml_read_from_stream (is_xml, gal.nls_pert, pbifs, verbosity);
75  xml_read_from_stream (is_xml, gal.xsec, pbifs, verbosity);
76 
77  tag.read_from_stream (is_xml);
78  tag.check_name ("/GasAbsLookup");
79 }
80 
81 
83 
89 void
90 xml_write_to_stream (ostream& os_xml,
91  const GasAbsLookup& gal,
92  bofstream *pbofs,
93  const String& name, const Verbosity& verbosity)
94 {
95  ArtsXMLTag open_tag(verbosity);
96  ArtsXMLTag close_tag(verbosity);
97 
98  open_tag.set_name ("GasAbsLookup");
99  if (name.length ())
100  open_tag.add_attribute ("name", name);
101  open_tag.write_to_stream (os_xml);
102 
103  xml_write_to_stream (os_xml, gal.species, pbofs, "", verbosity);
104  xml_write_to_stream (os_xml, gal.nonlinear_species, pbofs,
105  "NonlinearSpecies", verbosity);
106  xml_write_to_stream (os_xml, gal.f_grid, pbofs, "FrequencyGrid", verbosity);
107  xml_write_to_stream (os_xml, gal.p_grid, pbofs, "PressureGrid", verbosity);
108  xml_write_to_stream (os_xml, gal.vmrs_ref, pbofs, "ReferenceVmrProfiles", verbosity);
109  xml_write_to_stream (os_xml, gal.t_ref, pbofs, "ReferenceTemperatureProfile", verbosity);
110  xml_write_to_stream (os_xml, gal.t_pert, pbofs, "TemperaturePertubations", verbosity);
111  xml_write_to_stream (os_xml, gal.nls_pert, pbofs,
112  "NonlinearSpeciesVmrPertubations", verbosity);
113  xml_write_to_stream (os_xml, gal.xsec, pbofs, "AbsorptionCrossSections", verbosity);
114 
115  close_tag.set_name ("/GasAbsLookup");
116  close_tag.write_to_stream (os_xml);
117  os_xml << '\n';
118 }
119 
120 
121 //=== GriddedField ===========================================================
122 
124 
129 void
130 xml_read_from_stream (istream& is_xml,
131  GriddedField& gfield,
132  bifstream *pbifs, const Verbosity& verbosity)
133 {
134  ArtsXMLTag tag(verbosity);
135 
136  for(Index i=0; i < gfield.get_dim(); i++)
137  {
138  tag.read_from_stream (is_xml);
139  if (tag.get_name() == "Vector")
140  {
141  String s;
142  tag.get_attribute_value ("name", s);
143  if (s.length())
144  gfield.set_grid_name (i, s);
145 
146  Vector v;
147  xml_parse_from_stream (is_xml, v, pbifs, tag, verbosity);
148  gfield.set_grid (i, v);
149  tag.read_from_stream (is_xml);
150  tag.check_name ("/Vector");
151  }
152  else if (tag.get_name() == "Array")
153  {
154  String s;
155  tag.get_attribute_value ("name", s);
156  if (s.length())
157  gfield.set_grid_name (i, s);
158 
159  tag.get_attribute_value ("type", s);
160  if (s == "String")
161  {
162  ArrayOfString as;
163  xml_parse_from_stream (is_xml, as, pbifs, tag, verbosity);
164  gfield.set_grid (i, as);
165  tag.read_from_stream (is_xml);
166  tag.check_name ("/Array");
167 
168  }
169  else
170  {
171  xml_parse_error ("Grids must be of type <Vector> or <ArrayOfString> but <ArrayOf"
172  + s + "> found.");
173  }
174  }
175  else
176  {
177  xml_parse_error ("Grids must be of type <Vector> or <ArrayOfString> but <"
178  + tag.get_name() + "> found.");
179  }
180  }
181 }
182 
183 
185 
190 void
191 xml_write_to_stream (ostream& os_xml,
192  const GriddedField& gfield,
193  bofstream *pbofs,
194  const String& /* name */,
195  const Verbosity& verbosity)
196 {
197  for (Index i = 0; i < gfield.get_dim(); i++)
198  {
199  switch (gfield.get_grid_type(i))
200  {
201  case GRID_TYPE_NUMERIC:
202  xml_write_to_stream (os_xml, gfield.get_numeric_grid(i),
203  pbofs, gfield.get_grid_name(i), verbosity);
204  break;
205  case GRID_TYPE_STRING:
206  xml_write_to_stream (os_xml, gfield.get_string_grid(i),
207  pbofs, gfield.get_grid_name(i), verbosity);
208  break;
209  }
210  }
211 }
212 
213 
214 //=== GriddedField1 ===========================================================
215 
217 
222 void
223 xml_read_from_stream (istream& is_xml,
224  GriddedField1& gfield,
225  bifstream *pbifs, const Verbosity& verbosity)
226 {
227  ArtsXMLTag tag(verbosity);
228 
229  tag.read_from_stream (is_xml);
230  tag.check_name ("GriddedField1");
231 
232  String s;
233  tag.get_attribute_value ("name", s);
234  if (s.length())
235  gfield.set_name (s);
236 
237  xml_read_from_stream (is_xml, *((GriddedField*)&gfield), pbifs, verbosity);
238  xml_read_from_stream (is_xml, gfield.data, pbifs, verbosity);
239 
240  tag.read_from_stream (is_xml);
241  tag.check_name ("/GriddedField1");
242 
243  if (!gfield.checksize())
244  throw runtime_error ("Dimension mismatch between the grids and the data");
245 }
246 
247 
249 
255 void
256 xml_write_to_stream (ostream& os_xml,
257  const GriddedField1& gfield,
258  bofstream *pbofs,
259  const String& name, const Verbosity& verbosity)
260 {
261  ArtsXMLTag open_tag(verbosity);
262  ArtsXMLTag close_tag(verbosity);
263 
264  open_tag.set_name ("GriddedField1");
265  if (!name.length () && (gfield.get_name().length ()))
266  open_tag.add_attribute ("name", gfield.get_name());
267  else if (name.length ())
268  open_tag.add_attribute ("name", name);
269 
270  open_tag.write_to_stream (os_xml);
271  os_xml << '\n';
272 
273  xml_write_to_stream (os_xml, *((GriddedField*)&gfield), pbofs, "", verbosity);
274  xml_write_to_stream (os_xml, gfield.data, pbofs, "Data", verbosity);
275 
276  close_tag.set_name ("/GriddedField1");
277  close_tag.write_to_stream (os_xml);
278  os_xml << '\n';
279 }
280 
281 
282 //=== GriddedField2 ===========================================================
283 
285 
290 void
291 xml_read_from_stream (istream& is_xml,
292  GriddedField2& gfield,
293  bifstream *pbifs, const Verbosity& verbosity)
294 {
295  ArtsXMLTag tag(verbosity);
296 
297  tag.read_from_stream (is_xml);
298  tag.check_name ("GriddedField2");
299 
300  String s;
301  tag.get_attribute_value ("name", s);
302  if (s.length())
303  gfield.set_name (s);
304 
305  xml_read_from_stream (is_xml, *((GriddedField*)&gfield), pbifs, verbosity);
306  xml_read_from_stream (is_xml, gfield.data, pbifs, verbosity);
307 
308  tag.read_from_stream (is_xml);
309  tag.check_name ("/GriddedField2");
310 
311  if (!gfield.checksize())
312  throw runtime_error ("Dimension mismatch between the grids and the data");
313 }
314 
315 
317 
323 void
324 xml_write_to_stream (ostream& os_xml,
325  const GriddedField2& gfield,
326  bofstream *pbofs,
327  const String& name, const Verbosity& verbosity)
328 {
329  ArtsXMLTag open_tag(verbosity);
330  ArtsXMLTag close_tag(verbosity);
331 
332  open_tag.set_name ("GriddedField2");
333  if (!name.length () && (gfield.get_name().length ()))
334  open_tag.add_attribute ("name", gfield.get_name());
335  else if (name.length ())
336  open_tag.add_attribute ("name", name);
337 
338  open_tag.write_to_stream (os_xml);
339  os_xml << '\n';
340 
341  xml_write_to_stream (os_xml, *((GriddedField*)&gfield), pbofs, "", verbosity);
342  xml_write_to_stream (os_xml, gfield.data, pbofs, "Data", verbosity);
343 
344  close_tag.set_name ("/GriddedField2");
345  close_tag.write_to_stream (os_xml);
346  os_xml << '\n';
347 }
348 
349 
350 //=== GriddedField3 ===========================================================
351 
353 
358 void
359 xml_read_from_stream (istream& is_xml,
360  GriddedField3& gfield,
361  bifstream *pbifs, const Verbosity& verbosity)
362 {
363  ArtsXMLTag tag(verbosity);
364 
365  tag.read_from_stream (is_xml);
366  tag.check_name ("GriddedField3");
367 
368  String s;
369  tag.get_attribute_value ("name", s);
370  if (s.length())
371  gfield.set_name (s);
372 
373  xml_read_from_stream (is_xml, *((GriddedField*)&gfield), pbifs, verbosity);
374  xml_read_from_stream (is_xml, gfield.data, pbifs, verbosity);
375 
376  tag.read_from_stream (is_xml);
377  tag.check_name ("/GriddedField3");
378 
379  if (!gfield.checksize())
380  throw runtime_error ("Dimension mismatch between the grids and the data");
381 }
382 
383 
385 
391 void
392 xml_write_to_stream (ostream& os_xml,
393  const GriddedField3& gfield,
394  bofstream *pbofs,
395  const String& name, const Verbosity& verbosity)
396 {
397  ArtsXMLTag open_tag(verbosity);
398  ArtsXMLTag close_tag(verbosity);
399 
400  open_tag.set_name ("GriddedField3");
401  if (!name.length () && (gfield.get_name().length ()))
402  open_tag.add_attribute ("name", gfield.get_name());
403  else if (name.length ())
404  open_tag.add_attribute ("name", name);
405 
406  open_tag.write_to_stream (os_xml);
407  os_xml << '\n';
408 
409  xml_write_to_stream (os_xml, *((GriddedField*)&gfield), pbofs, "", verbosity);
410  xml_write_to_stream (os_xml, gfield.data, pbofs, "Data", verbosity);
411 
412  close_tag.set_name ("/GriddedField3");
413  close_tag.write_to_stream (os_xml);
414  os_xml << '\n';
415 }
416 
417 
418 //=== GriddedField4 ===========================================================
419 
421 
426 void
427 xml_read_from_stream (istream& is_xml,
428  GriddedField4& gfield,
429  bifstream *pbifs, const Verbosity& verbosity)
430 {
431  ArtsXMLTag tag(verbosity);
432 
433  tag.read_from_stream (is_xml);
434  tag.check_name ("GriddedField4");
435 
436  String s;
437  tag.get_attribute_value ("name", s);
438  if (s.length())
439  gfield.set_name (s);
440 
441  xml_read_from_stream (is_xml, *((GriddedField*)&gfield), pbifs, verbosity);
442  xml_read_from_stream (is_xml, gfield.data, pbifs, verbosity);
443 
444  tag.read_from_stream (is_xml);
445  tag.check_name ("/GriddedField4");
446 }
447 
448 
450 
456 void
457 xml_write_to_stream (ostream& os_xml,
458  const GriddedField4& gfield,
459  bofstream *pbofs,
460  const String& name, const Verbosity& verbosity)
461 {
462  ArtsXMLTag open_tag(verbosity);
463  ArtsXMLTag close_tag(verbosity);
464 
465  open_tag.set_name ("GriddedField4");
466  if (!name.length () && (gfield.get_name().length ()))
467  open_tag.add_attribute ("name", gfield.get_name());
468  else if (name.length ())
469  open_tag.add_attribute ("name", name);
470 
471  open_tag.write_to_stream (os_xml);
472  os_xml << '\n';
473 
474  xml_write_to_stream(os_xml, *((GriddedField*)&gfield), pbofs, "", verbosity);
475  xml_write_to_stream (os_xml, gfield.data, pbofs, "Data", verbosity);
476 
477  close_tag.set_name ("/GriddedField4");
478  close_tag.write_to_stream (os_xml);
479  os_xml << '\n';
480 }
481 
482 
483 //=== GridPos =====================================================
484 
486 
491 void
492 xml_read_from_stream (istream& is_xml,
493  GridPos& gpos,
494  bifstream *pbifs, const Verbosity& verbosity)
495 {
496  ArtsXMLTag tag(verbosity);
497 
498  tag.read_from_stream (is_xml);
499  tag.check_name ("GridPos");
500 
501  xml_read_from_stream (is_xml, gpos.idx, pbifs, verbosity);
502  xml_read_from_stream (is_xml, gpos.fd[0], pbifs, verbosity);
503  xml_read_from_stream (is_xml, gpos.fd[1], pbifs, verbosity);
504 
505  tag.read_from_stream (is_xml);
506  tag.check_name ("/GridPos");
507 }
508 
510 
516 void
517 xml_write_to_stream (ostream& os_xml,
518  const GridPos& gpos,
519  bofstream *pbofs,
520  const String& name, const Verbosity& verbosity)
521 {
522  ArtsXMLTag open_tag(verbosity);
523  ArtsXMLTag close_tag(verbosity);
524 
525  open_tag.set_name ("GridPos");
526  if (name.length ())
527  open_tag.add_attribute ("name", name);
528  open_tag.write_to_stream (os_xml);
529 
530  xml_write_to_stream (os_xml, gpos.idx, pbofs,
531  "OriginalGridIndexBelowInterpolationPoint", verbosity);
532  xml_write_to_stream (os_xml, gpos.fd[0], pbofs,
533  "FractionalDistanceToNextPoint_1", verbosity);
534  xml_write_to_stream (os_xml, gpos.fd[1], pbofs,
535  "FractionalDistanceToNextPoint_2", verbosity);
536 
537  close_tag.set_name ("/GridPos");
538  close_tag.write_to_stream (os_xml);
539  os_xml << '\n';
540 }
541 
542 
543 //=== IsotopeRecord ================================================
544 
546 
551 void
552 xml_read_from_stream (istream& is_xml,
553  IsotopeRecord& irecord,
554  bifstream *pbifs, const Verbosity& verbosity)
555 {
556  ArtsXMLTag tag(verbosity);
557  String name;
558  Numeric abundance;
559  Numeric mass;
560  Index mytrantag;
561  Index hitrantag;
562  ArrayOfIndex jpltags;
563 
564  tag.read_from_stream (is_xml);
565  tag.check_name ("IsotopeRecord");
566 
567  xml_read_from_stream (is_xml, name, pbifs, verbosity);
568  xml_read_from_stream (is_xml, abundance, pbifs, verbosity);
569  xml_read_from_stream (is_xml, mass, pbifs, verbosity);
570  xml_read_from_stream (is_xml, mytrantag, pbifs, verbosity);
571  xml_read_from_stream (is_xml, hitrantag, pbifs, verbosity);
572  xml_read_from_stream (is_xml, jpltags, pbifs, verbosity);
573 
574  tag.read_from_stream (is_xml);
575  tag.check_name ("/IsotopeRecord");
576 
577  irecord = IsotopeRecord (name, abundance, mass, mytrantag, hitrantag,
578  jpltags);
579 }
580 
581 
583 
589 void
590 xml_write_to_stream (ostream& os_xml,
591  const IsotopeRecord& irecord,
592  bofstream *pbofs,
593  const String& name, const Verbosity& verbosity)
594 {
595  ArtsXMLTag open_tag(verbosity);
596  ArtsXMLTag close_tag(verbosity);
597 
598  open_tag.set_name ("IsotopeRecord");
599  if (name.length ())
600  open_tag.add_attribute ("name", name);
601  open_tag.write_to_stream (os_xml);
602  os_xml << '\n';
603 
604  xml_write_to_stream (os_xml, irecord.Name (), pbofs, "Name", verbosity);
605  xml_write_to_stream (os_xml, irecord.Abundance (), pbofs, "Abundance", verbosity);
606  xml_write_to_stream (os_xml, irecord.Mass (), pbofs, "Mass", verbosity);
607  xml_write_to_stream (os_xml, irecord.MytranTag (), pbofs, "MytranTag", verbosity);
608  xml_write_to_stream (os_xml, irecord.HitranTag (), pbofs, "HitranTag", verbosity);
609  xml_write_to_stream (os_xml, irecord.JplTags (), pbofs, "JplTags", verbosity);
610 
611  close_tag.set_name ("/IsotopeRecord");
612  close_tag.write_to_stream (os_xml);
613  os_xml << '\n';
614 }
615 
616 
617 
618 //=== Ppath =====================================================
619 
621 
626 void
627 xml_read_from_stream (istream& is_xml,
628  Ppath& ppath,
629  bifstream *pbifs, const Verbosity& verbosity)
630 {
631  ArtsXMLTag tag(verbosity);
632 
633  tag.read_from_stream (is_xml);
634  tag.check_name ("Ppath");
635 
636  xml_read_from_stream (is_xml, ppath.dim, pbifs, verbosity);
637  xml_read_from_stream (is_xml, ppath.np, pbifs, verbosity);
638  xml_read_from_stream (is_xml, ppath.constant, pbifs, verbosity);
639  xml_read_from_stream (is_xml, ppath.pos, pbifs, verbosity);
640  xml_read_from_stream (is_xml, ppath.z, pbifs, verbosity);
641  xml_read_from_stream (is_xml, ppath.l_step, pbifs, verbosity);
642  xml_read_from_stream (is_xml, ppath.gp_p, pbifs, verbosity);
643  xml_read_from_stream (is_xml, ppath.gp_lat, pbifs, verbosity);
644  xml_read_from_stream (is_xml, ppath.gp_lon, pbifs, verbosity);
645  xml_read_from_stream (is_xml, ppath.los, pbifs, verbosity);
646  xml_read_from_stream (is_xml, ppath.background, pbifs, verbosity);
647  xml_read_from_stream (is_xml, ppath.tan_pos, pbifs, verbosity);
648  xml_read_from_stream (is_xml, ppath.geom_tan_pos, pbifs, verbosity);
649  xml_read_from_stream (is_xml, ppath.nreal, pbifs, verbosity);
650  xml_read_from_stream (is_xml, ppath.next_parts, pbifs, verbosity);
651 
652  tag.read_from_stream (is_xml);
653  tag.check_name ("/Ppath");
654 }
655 
657 
663 void
664 xml_write_to_stream (ostream& os_xml,
665  const Ppath& ppath,
666  bofstream *pbofs,
667  const String& name, const Verbosity& verbosity)
668 {
669  ArtsXMLTag open_tag(verbosity);
670  ArtsXMLTag close_tag(verbosity);
671 
672  open_tag.set_name ("Ppath");
673  if (name.length ())
674  open_tag.add_attribute ("name", name);
675  open_tag.write_to_stream (os_xml);
676 
677  xml_write_to_stream (os_xml, ppath.dim, pbofs, "AtmosphericDimensionality", verbosity);
678  xml_write_to_stream (os_xml, ppath.np, pbofs,
679  "NumberOfPositionInPropagationPath", verbosity);
680  xml_write_to_stream (os_xml, ppath.constant, pbofs,
681  "PropagationPathConstant", verbosity);
682  xml_write_to_stream (os_xml, ppath.pos, pbofs,
683  "PropagationPathPointPositions", verbosity);
684  xml_write_to_stream (os_xml, ppath.z, pbofs, "GeometricalAltitudes", verbosity);
685  xml_write_to_stream (os_xml, ppath.l_step, pbofs,
686  "PropagationPathPositionLength", verbosity);
687  xml_write_to_stream (os_xml, ppath.gp_p, pbofs, "PressureGridIndexPosition", verbosity);
688  xml_write_to_stream (os_xml, ppath.gp_lat, pbofs,
689  "LatitudeGridIndexPosition", verbosity);
690  xml_write_to_stream (os_xml, ppath.gp_lon, pbofs,
691  "LongitudeGridIndexPosition", verbosity);
692  xml_write_to_stream (os_xml, ppath.los, pbofs, "LineOfSight", verbosity);
693  xml_write_to_stream (os_xml, ppath.background, pbofs, "RadiativeBackground", verbosity);
694  xml_write_to_stream (os_xml, ppath.tan_pos, pbofs, "TangentPointPosition", verbosity);
695  xml_write_to_stream (os_xml, ppath.geom_tan_pos, pbofs,
696  "GeometricalTangentPointPosition", verbosity);
697  xml_write_to_stream (os_xml, ppath.nreal, pbofs, "RefractiveIndexRealPart", verbosity);
698  xml_write_to_stream (os_xml, ppath.next_parts, pbofs, "NextPpathParts", verbosity);
699 
700  close_tag.set_name ("/Ppath");
701  close_tag.write_to_stream (os_xml);
702  os_xml << '\n';
703 }
704 
705 
706 //=== RetrievalQuantity =========================================
707 
709 
714 void
715 xml_read_from_stream (istream& is_xml,
716  RetrievalQuantity& rq,
717  bifstream *pbifs, const Verbosity& verbosity)
718 {
719  ArtsXMLTag tag(verbosity);
720  String maintag;
721  String subtag;
722  String mode;
723  Index analytical;
724  Numeric perturbation;
725  ArrayOfVector grids;
726 
727  tag.read_from_stream (is_xml);
728  tag.check_name ("RetrievalQuantity");
729 
730  xml_read_from_stream (is_xml, maintag, pbifs, verbosity);
731  xml_read_from_stream (is_xml, subtag, pbifs, verbosity);
732  xml_read_from_stream (is_xml, mode, pbifs, verbosity);
733  xml_read_from_stream (is_xml, analytical, pbifs, verbosity);
734  xml_read_from_stream (is_xml, perturbation, pbifs, verbosity);
735  xml_read_from_stream (is_xml, grids, pbifs, verbosity);
736 
737  tag.read_from_stream (is_xml);
738  tag.check_name ("/RetrievalQuantity");
739 
740  rq = RetrievalQuantity( maintag, subtag, mode, analytical, perturbation,
741  grids );
742 }
743 
745 
751 void
752 xml_write_to_stream (ostream& os_xml,
753  const RetrievalQuantity& rq,
754  bofstream *pbofs,
755  const String& name, const Verbosity& verbosity)
756 {
757  ArtsXMLTag open_tag(verbosity);
758  ArtsXMLTag close_tag(verbosity);
759 
760  open_tag.set_name ("RetrievalQuantity");
761  if (name.length ())
762  open_tag.add_attribute ("name", name);
763  open_tag.write_to_stream (os_xml);
764 
765  xml_write_to_stream (os_xml, rq.MainTag(), pbofs, "MainTag", verbosity);
766  xml_write_to_stream (os_xml, rq.Subtag(), pbofs, "Subtag", verbosity);
767  xml_write_to_stream (os_xml, rq.Mode(), pbofs, "Mode", verbosity);
768  xml_write_to_stream (os_xml, rq.Analytical(), pbofs, "Analytical", verbosity);
769  xml_write_to_stream (os_xml, rq.Perturbation(), pbofs, "Perturbation", verbosity);
770  xml_write_to_stream (os_xml, rq.Grids(), pbofs, "Grids", verbosity);
771 
772  close_tag.set_name ("/RetrievalQuantity");
773  close_tag.write_to_stream (os_xml);
774  os_xml << '\n';
775 }
776 
777 
778 //=== SingleScatteringData ======================================
779 
781 
786 void
787 xml_read_from_stream (istream& is_xml,
788  SingleScatteringData& ssdata,
789  bifstream *pbifs, const Verbosity& verbosity)
790 {
791  ArtsXMLTag tag(verbosity);
792  Index ptype;
793 
794  tag.read_from_stream (is_xml);
795  tag.check_name ("SingleScatteringData");
796 
797  xml_read_from_stream (is_xml, ptype, pbifs, verbosity);
798  ssdata.ptype = ParticleType (ptype);
799  xml_read_from_stream (is_xml, ssdata.description, pbifs, verbosity);
800  xml_read_from_stream (is_xml, ssdata.f_grid, pbifs, verbosity);
801  xml_read_from_stream (is_xml, ssdata.T_grid, pbifs, verbosity);
802  xml_read_from_stream (is_xml, ssdata.za_grid, pbifs, verbosity);
803  /* Verify that we have a good coverage for the za grid */
804  if ((ssdata.za_grid[0]>1) || ssdata.za_grid[ssdata.za_grid.nelem()-1]<179)
805  {
806  ostringstream os;
807  os << "Missing data in xml-stream. Expected za_grid: [0, 180]. "
808  << "Found za_grid: [" << ssdata.za_grid[0]
809  << ", "
810  << ssdata.za_grid[ssdata.za_grid.nelem()-1]
811  << "]";
812  throw runtime_error(os.str());
813  }
814  xml_read_from_stream (is_xml, ssdata.aa_grid, pbifs, verbosity);
815 
816  xml_read_from_stream (is_xml, ssdata.pha_mat_data, pbifs, verbosity);
817  if (ssdata.pha_mat_data.nlibraries () != ssdata.f_grid.nelem ())
818  {
819  throw runtime_error("Number of frequencies in f_grid and pha_mat_data "
820  "not matching!!!");
821  }
822 
823  xml_read_from_stream (is_xml, ssdata.ext_mat_data, pbifs, verbosity);
824  xml_read_from_stream (is_xml, ssdata.abs_vec_data, pbifs, verbosity);
825 
826  tag.read_from_stream (is_xml);
827  tag.check_name ("/SingleScatteringData");
828 }
829 
830 
832 
838 void
839 xml_write_to_stream (ostream& os_xml,
840  const SingleScatteringData& ssdata,
841  bofstream *pbofs,
842  const String& name, const Verbosity& verbosity)
843 {
844  ArtsXMLTag open_tag(verbosity);
845  ArtsXMLTag close_tag(verbosity);
846 
847  open_tag.set_name ("SingleScatteringData");
848  if (name.length ())
849  open_tag.add_attribute ("name", name);
850  open_tag.write_to_stream (os_xml);
851 
852  xml_write_to_stream (os_xml, Index (ssdata.ptype), pbofs, "", verbosity);
853  xml_write_to_stream (os_xml, ssdata.description, pbofs, "", verbosity);
854  xml_write_to_stream (os_xml, ssdata.f_grid, pbofs, "", verbosity);
855  xml_write_to_stream (os_xml, ssdata.T_grid, pbofs, "", verbosity);
856  xml_write_to_stream (os_xml, ssdata.za_grid, pbofs, "", verbosity);
857  xml_write_to_stream (os_xml, ssdata.aa_grid, pbofs, "", verbosity);
858  xml_write_to_stream (os_xml, ssdata.pha_mat_data, pbofs, "", verbosity);
859  xml_write_to_stream (os_xml, ssdata.ext_mat_data, pbofs, "", verbosity);
860  xml_write_to_stream (os_xml, ssdata.abs_vec_data, pbofs, "", verbosity);
861 
862  close_tag.set_name ("/SingleScatteringData");
863  close_tag.write_to_stream (os_xml);
864  os_xml << '\n';
865 }
866 
867 
868 //=== ScatteringMetaData ======================================
869 
871 
876 void
877 xml_read_from_stream (istream& is_xml,
878  ScatteringMetaData& smdata,
879  bifstream *pbifs, const Verbosity& verbosity)
880 {
881  ArtsXMLTag tag(verbosity);
882  //Index ptype;
883 
884  tag.read_from_stream (is_xml);
885  tag.check_name ("ScatteringMetaData");
886 
887  //xml_read_from_stream (is_xml, ptype, pbifs, verbosity);
888  //ssdata.ptype = ParticleType (ptype);
889  xml_read_from_stream (is_xml, smdata.description, pbifs, verbosity);
890  xml_read_from_stream (is_xml, smdata.type, pbifs, verbosity);
891  xml_read_from_stream (is_xml, smdata.shape, pbifs, verbosity);
892  xml_read_from_stream (is_xml, smdata.density, pbifs, verbosity);
893  xml_read_from_stream (is_xml, smdata.d_max, pbifs, verbosity);
894  xml_read_from_stream (is_xml, smdata.V, pbifs, verbosity);
895  xml_read_from_stream (is_xml, smdata.A_projec, pbifs, verbosity);
896  xml_read_from_stream (is_xml, smdata.asratio, pbifs, verbosity);
897 
898 
899  tag.read_from_stream (is_xml);
900  tag.check_name ("/ScatteringMetaData");
901 }
902 
903 
905 
911 void
912 xml_write_to_stream (ostream& os_xml,
913  const ScatteringMetaData& smdata,
914  bofstream *pbofs,
915  const String& name, const Verbosity& verbosity)
916 {
917  ArtsXMLTag open_tag(verbosity);
918  ArtsXMLTag close_tag(verbosity);
919 
920  open_tag.set_name ("ScatteringMetaData");
921  if (name.length ())
922  open_tag.add_attribute ("name", name);
923  open_tag.write_to_stream (os_xml);
924 
925  xml_write_to_stream (os_xml, smdata.description, pbofs, "", verbosity);
926  xml_write_to_stream (os_xml, smdata.type, pbofs, "", verbosity);
927  xml_write_to_stream (os_xml, smdata.shape, pbofs, "", verbosity);
928  xml_write_to_stream (os_xml, smdata.density, pbofs, "", verbosity);
929  xml_write_to_stream (os_xml, smdata.d_max, pbofs, "", verbosity);
930  xml_write_to_stream (os_xml, smdata.V, pbofs, "", verbosity);
931  xml_write_to_stream (os_xml, smdata.A_projec, pbofs, "", verbosity);
932  xml_write_to_stream (os_xml, smdata.asratio, pbofs, "", verbosity);
933 
934  close_tag.set_name ("/ScatteringMetaData");
935  close_tag.write_to_stream (os_xml);
936  os_xml << '\n';
937 }
938 
939 
940 
941 //=== SLIData2 =====================================================
943 
949 void
950 xml_read_from_stream (istream& is_xml,
951  SLIData2& slidata,
952  bifstream *pbifs, const Verbosity& verbosity)
953 {
954  ArtsXMLTag tag(verbosity);
955 
956  tag.read_from_stream (is_xml);
957  tag.check_name ("SLIData2");
958 
959  xml_read_from_stream (is_xml, slidata.x1a, pbifs, verbosity);
960  xml_read_from_stream (is_xml, slidata.x2a, pbifs, verbosity);
961  xml_read_from_stream (is_xml, slidata.ya, pbifs, verbosity);
962 
963  tag.read_from_stream (is_xml);
964  tag.check_name ("/SLIData2");
965 }
966 
967 
968 void
969 xml_write_to_stream (ostream& os_xml,
970  const SLIData2& slidata,
971  bofstream *pbofs,
972  const String& name, const Verbosity& verbosity)
973 {
974  ArtsXMLTag open_tag(verbosity);
975  ArtsXMLTag close_tag(verbosity);
976 
977  open_tag.set_name ("SLIData2");
978  if (name.length ())
979  open_tag.add_attribute ("name", name);
980  open_tag.write_to_stream (os_xml);
981 
982  xml_write_to_stream (os_xml, slidata.x1a, pbofs, "", verbosity);
983  xml_write_to_stream (os_xml, slidata.x2a, pbofs, "", verbosity);
984  xml_write_to_stream (os_xml, slidata.ya, pbofs, "", verbosity);
985 
986  close_tag.set_name ("/SLIData2");
987  close_tag.write_to_stream (os_xml);
988  os_xml << '\n';
989 }
990 
991 //=== SpeciesRecord ================================================
992 
994 
999 void
1000 xml_read_from_stream (istream& is_xml,
1001  SpeciesRecord& srecord,
1002  bifstream *pbifs, const Verbosity& verbosity)
1003 {
1004  ArtsXMLTag tag(verbosity);
1005  String sname;
1006  Index degfr;
1007  Array<IsotopeRecord> airecord;
1008 
1009  tag.read_from_stream (is_xml);
1010  tag.check_name ("SpeciesRecord");
1011 
1012  xml_read_from_stream (is_xml, sname, pbifs, verbosity);
1013  xml_read_from_stream (is_xml, degfr, pbifs, verbosity);
1014  xml_read_from_stream (is_xml, airecord, pbifs, verbosity);
1015 
1016  srecord = SpeciesRecord (sname.c_str (), degfr, airecord);
1017 
1018  tag.read_from_stream (is_xml);
1019  tag.check_name ("/SpeciesRecord");
1020 }
1021 
1022 
1024 
1030 void
1031 xml_write_to_stream (ostream& os_xml,
1032  const SpeciesRecord& srecord,
1033  bofstream *pbofs,
1034  const String& name, const Verbosity& verbosity)
1035 {
1036  ArtsXMLTag open_tag(verbosity);
1037  ArtsXMLTag close_tag(verbosity);
1038 
1039  open_tag.set_name ("SpeciesRecord");
1040  if (name.length ())
1041  open_tag.add_attribute ("name", name);
1042  open_tag.write_to_stream (os_xml);
1043  os_xml << '\n';
1044 
1045  xml_write_to_stream (os_xml, srecord.Name (), pbofs, "", verbosity);
1046  xml_write_to_stream (os_xml, srecord.Degfr (), pbofs, "", verbosity);
1047  xml_write_to_stream (os_xml, srecord.Isotope (), pbofs, "", verbosity);
1048 
1049  close_tag.set_name ("/SpeciesRecord");
1050  close_tag.write_to_stream (os_xml);
1051  os_xml << '\n';
1052 }
1053 
1054 
1055 //=== SpeciesTag ================================================
1056 
1058 
1062 /* param pbifs Pointer to binary input stream. NULL in case of ASCII file.
1063  Ignored because SpeciesTag is always stored in ASCII format.*/
1064 void
1065 xml_read_from_stream (istream& is_xml,
1066  SpeciesTag& stag,
1067  bifstream * /* pbifs */, const Verbosity& verbosity)
1068 {
1069  ArtsXMLTag tag(verbosity);
1070  stringbuf strbuf;
1071  char dummy;
1072 
1073  tag.read_from_stream (is_xml);
1074  tag.check_name ("SpeciesTag");
1075 
1076  // Skip whitespaces
1077  bool string_starts_with_quotes = true;
1078  do
1079  {
1080  is_xml >> dummy;
1081  switch (dummy)
1082  {
1083  case ' ':
1084  case '\"':
1085  case '\n':
1086  case '\r':
1087  case '\t':
1088  break;
1089  default:
1090  string_starts_with_quotes = false;
1091  }
1092  } while (is_xml.good () && dummy != '"' && string_starts_with_quotes);
1093 
1094  // Throw exception if first char after whitespaces is not a quote
1095  if (!string_starts_with_quotes)
1096  {
1097  xml_parse_error ("SpeciesTag must begin with \"");
1098  }
1099 
1100  is_xml.get (strbuf, '"');
1101  if (is_xml.fail ())
1102  {
1103  xml_parse_error ("SpeciesTag must end with \"");
1104  }
1105 
1106  stag = SpeciesTag (strbuf.str ());
1107 
1108  // Ignore quote
1109  is_xml >> dummy;
1110 
1111  tag.read_from_stream (is_xml);
1112  tag.check_name ("/SpeciesTag");
1113 }
1114 
1115 
1117 
1122 /* param pbofs Pointer to binary file stream. NULL for ASCII output.
1123  Ignore because SpeciesTag is always stored in ASCII format. */
1124 void
1125 xml_write_to_stream (ostream& os_xml,
1126  const SpeciesTag& stag,
1127  bofstream * /* pbofs */,
1128  const String& name, const Verbosity& verbosity)
1129 {
1130  ArtsXMLTag open_tag(verbosity);
1131  ArtsXMLTag close_tag(verbosity);
1132 
1133  open_tag.set_name ("SpeciesTag");
1134  if (name.length ())
1135  open_tag.add_attribute ("name", name);
1136  open_tag.write_to_stream (os_xml);
1137 
1138  os_xml << '\"' << stag.Name () << '\"';
1139 
1140  close_tag.set_name ("/SpeciesTag");
1141  close_tag.write_to_stream (os_xml);
1142  os_xml << '\n';
1143 }
1144 
1145 
1147 // Dummy funtion for groups for which
1148 // IO function have not yet been implemented
1150 
1151 // FIXME: These should be implemented, sooner or later...
1152 
1153 void
1155  Agenda&,
1156  bifstream * /* pbifs */, const Verbosity&)
1157 {
1158  throw runtime_error("Method not implemented!");
1159 }
1160 
1161 void
1163  const Agenda&,
1164  bofstream * /* pbofs */,
1165  const String& /* name */, const Verbosity&)
1166 {
1167  throw runtime_error("Method not implemented!");
1168 }
1169 
1170 //=== MCAntenna ================================================
1171 
1172 void
1174  MCAntenna&,
1175  bifstream * /* pbifs */, const Verbosity&)
1176 {
1177  throw runtime_error("Method not implemented!");
1178 }
1179 
1180 void
1182  const MCAntenna&,
1183  bofstream * /* pbofs */,
1184  const String& /* name */, const Verbosity&)
1185 {
1186  throw runtime_error("Method not implemented!");
1187 }
1188 
1189 //=== Verbosity ================================================
1190 
1191 void
1193  Verbosity&,
1194  bifstream * /* pbifs */, const Verbosity&)
1195 {
1196  throw runtime_error("Method not implemented!");
1197 }
1198 
1199 void
1201  const Verbosity&,
1202  bofstream * /* pbofs */,
1203  const String& /* name */, const Verbosity&)
1204 {
1205  throw runtime_error("Method not implemented!");
1206 }
1207 
GriddedField2
Definition: gridded_fields.h:230
gridded_fields.h
Implementation of gridded fields.
SLIData2::x1a
Vector x1a
Definition: mc_interp.h:61
GriddedField::get_string_grid
const ArrayOfString & get_string_grid(Index i) const
Get a string grid.
Definition: gridded_fields.cc:157
GriddedField::set_grid_name
void set_grid_name(Index i, const String &s)
Set grid name.
Definition: gridded_fields.h:161
SpeciesRecord::Degfr
Index Degfr() const
Definition: absorption.h:363
ScatteringMetaData::V
Numeric V
Definition: optproperties.h:105
RetrievalQuantity::Analytical
const Index & Analytical() const
Boolean to make analytical calculations (if possible).
Definition: jacobian.h:96
SingleScatteringData::za_grid
Vector za_grid
Definition: optproperties.h:79
ArtsXMLTag::check_name
void check_name(const String &expected_name)
Check tag name.
Definition: xml_io.cc:56
SingleScatteringData::f_grid
Vector f_grid
Definition: optproperties.h:77
GasAbsLookup::nonlinear_species
ArrayOfIndex nonlinear_species
The species tags with non-linear treatment.
Definition: gas_abs_lookup.h:167
GriddedField
Definition: gridded_fields.h:51
RetrievalQuantity::Grids
const ArrayOfVector & Grids() const
Grids.
Definition: jacobian.h:102
IsotopeRecord::JplTags
const ArrayOfIndex & JplTags() const
JPL tag numbers for all isotopes.
Definition: absorption.h:249
SingleScatteringData::description
String description
Definition: optproperties.h:76
SingleScatteringData::ptype
ParticleType ptype
Definition: optproperties.h:75
xml_write_to_stream
void xml_write_to_stream(ostream &os_xml, const GasAbsLookup &gal, bofstream *pbofs, const String &name, const Verbosity &verbosity)
Writes GasAbsLookup to XML output stream.
Definition: xml_io_compound_types.cc:90
SpeciesTag::Name
String Name() const
Return the full name of the tag.
Definition: abs_species_tags.cc:227
Ppath::background
String background
Definition: ppath.h:70
ParticleType
ParticleType
An attribute to classify the particle type in a SingleScatteringData.
Definition: optproperties.h:55
SingleScatteringData::aa_grid
Vector aa_grid
Definition: optproperties.h:80
GRID_TYPE_NUMERIC
@ GRID_TYPE_NUMERIC
Definition: gridded_fields.h:43
GriddedField::get_dim
Index get_dim() const
Get the dimension of this gridded field.
Definition: gridded_fields.h:96
SLIData2::x2a
ArrayOfVector x2a
Definition: mc_interp.h:63
xml_parse_from_stream
void xml_parse_from_stream(istream &is_xml, ArrayOfString &astring, bifstream *pbifs, ArtsXMLTag &tag, const Verbosity &verbosity)
Parse ArrayOfString from XML input stream.
Definition: xml_io_array_types.cc:2692
ArtsXMLTag::get_attribute_value
void get_attribute_value(const String &aname, String &value)
Returns value of attribute as String.
Definition: xml_io.cc:140
MCAntenna
An Antenna object used by MCGeneral.
Definition: mc_antenna.h:56
IsotopeRecord::Abundance
const Numeric & Abundance() const
Normal abundance ( = isotopic ratio).
Definition: absorption.h:238
GriddedField::get_numeric_grid
ConstVectorView get_numeric_grid(Index i) const
Get a numeric grid.
Definition: gridded_fields.cc:91
GridPos::fd
Numeric fd[2]
Definition: interpolation.h:76
ArtsXMLTag::write_to_stream
void write_to_stream(ostream &os)
Write XML tag.
Definition: xml_io.cc:333
IsotopeRecord::Name
const String & Name() const
Isotope name.
Definition: absorption.h:236
Ppath
The structure to describe a propagation path and releated quantities.
Definition: ppath.h:59
Ppath::gp_p
ArrayOfGridPos gp_p
Definition: ppath.h:66
Agenda
The Agenda class.
Definition: agenda_class.h:44
GriddedField3
Definition: gridded_fields.h:274
SingleScatteringData
Structure which describes the single scattering properties of a.
Definition: optproperties.h:74
GasAbsLookup
An absorption lookup table.
Definition: gas_abs_lookup.h:44
matpackIV.h
ConstTensor7View::nlibraries
Index nlibraries() const
Returns the number of libraries.
Definition: matpackVII.cc:31
matpackI.h
IsotopeRecord::MytranTag
const Index & MytranTag() const
MYTRAN2 tag numbers for all isotopes.
Definition: absorption.h:243
GriddedField::get_grid_type
GridType get_grid_type(Index i) const
Get grid type.
Definition: gridded_fields.h:136
Array
This can be used to make arrays out of anything.
Definition: array.h:103
xml_io_private.h
This file contains private function declarations and template instantiation to handle XML data files.
SpeciesTag
A tag group can consist of the sum of several of these.
Definition: abs_species_tags.h:45
IsotopeRecord::HitranTag
const Index & HitranTag() const
HITRAN-96 tag numbers for all isotopes.
Definition: absorption.h:245
Ppath::next_parts
ArrayOfIndex next_parts
Definition: ppath.h:74
Ppath::gp_lat
ArrayOfGridPos gp_lat
Definition: ppath.h:67
ScatteringMetaData::density
Numeric density
Definition: optproperties.h:103
ArtsXMLTag::read_from_stream
void read_from_stream(istream &is)
Reads next XML tag.
Definition: xml_io.cc:194
my_basic_string
The implementation for String, the ARTS string class.
Definition: mystring.h:62
Ppath::los
Matrix los
Definition: ppath.h:69
ScatteringMetaData
Definition: optproperties.h:99
SingleScatteringData::ext_mat_data
Tensor5 ext_mat_data
Definition: optproperties.h:82
RetrievalQuantity::MainTag
const String & MainTag() const
Main tag.
Definition: jacobian.h:87
Ppath::gp_lon
ArrayOfGridPos gp_lon
Definition: ppath.h:68
IsotopeRecord
Contains the lookup data for one isotope.
Definition: absorption.h:181
ScatteringMetaData::A_projec
Numeric A_projec
Definition: optproperties.h:106
Ppath::np
Index np
Definition: ppath.h:61
xml_parse_error
void xml_parse_error(const String &str_error)
Throws XML parser runtime error.
Definition: xml_io.cc:620
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition: matpackI.cc:175
GasAbsLookup::t_ref
Vector t_ref
The reference temperature profile [K].
Definition: gas_abs_lookup.h:198
xml_io_types.h
This file contains private function declarations and template instantiation to handle XML data files.
Ppath::z
Vector z
Definition: ppath.h:64
GasAbsLookup::f_grid
Vector f_grid
The frequency grid [Hz].
Definition: gas_abs_lookup.h:171
GasAbsLookup::p_grid
Vector p_grid
The pressure grid for the table [Pa].
Definition: gas_abs_lookup.h:175
SpeciesRecord::Isotope
const Array< IsotopeRecord > & Isotope() const
Definition: absorption.h:364
RetrievalQuantity::Mode
const String & Mode() const
Calculation mode.
Definition: jacobian.h:93
GRID_TYPE_STRING
@ GRID_TYPE_STRING
Definition: gridded_fields.h:44
Ppath::tan_pos
Vector tan_pos
Definition: ppath.h:71
jacobian.h
Declarations required for the calculation of jacobians.
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Verbosity
Definition: messages.h:50
ArtsXMLTag::add_attribute
void add_attribute(const String &aname, const String &value)
Adds a String attribute to tag.
Definition: xml_io.cc:74
Ppath::l_step
Vector l_step
Definition: ppath.h:65
bifstream
Binary output file stream class.
Definition: bifstream.h:45
ArtsXMLTag::get_name
String & get_name()
Definition: xml_io_private.h:88
GriddedField4
Definition: gridded_fields.h:328
matpackIII.h
GriddedField::set_name
void set_name(const String &s)
Set name of this gridded field.
Definition: gridded_fields.h:169
GasAbsLookup::nls_pert
Vector nls_pert
The vector of perturbations for the VMRs of the nonlinear species.
Definition: gas_abs_lookup.h:227
SLIData2::ya
ArrayOfVector ya
Definition: mc_interp.h:65
GriddedField::get_name
const String & get_name() const
Get the name of this gridded field.
Definition: gridded_fields.h:148
GasAbsLookup::xsec
Tensor4 xsec
Absorption cross sections.
Definition: gas_abs_lookup.h:261
ScatteringMetaData::shape
String shape
Definition: optproperties.h:102
SpeciesRecord
Contains the lookup data for one species.
Definition: absorption.h:307
Ppath::nreal
Vector nreal
Definition: ppath.h:73
xml_read_from_stream
void xml_read_from_stream(istream &is_xml, GasAbsLookup &gal, bifstream *pbifs, const Verbosity &verbosity)
Reads GasAbsLookup from XML input stream.
Definition: xml_io_compound_types.cc:58
GriddedField::checksize
virtual bool checksize() const
Consistency check.
Definition: gridded_fields.h:179
GasAbsLookup::species
ArrayOfArrayOfSpeciesTag species
The species tags for which the table is valid.
Definition: gas_abs_lookup.h:158
ScatteringMetaData::description
String description
Definition: optproperties.h:100
GridPos
Structure to store a grid position.
Definition: interpolation.h:74
GriddedField::set_grid
void set_grid(Index i, const Vector &g)
Set a numeric grid.
Definition: gridded_fields.cc:223
IsotopeRecord::Mass
const Numeric & Mass() const
Mass of the isotope.
Definition: absorption.h:241
matpackV.h
Ppath::constant
Numeric constant
Definition: ppath.h:62
SpeciesRecord::Name
const String & Name() const
Definition: absorption.h:362
ScatteringMetaData::d_max
Numeric d_max
Definition: optproperties.h:104
SLIData2
A 2D sequential linear interpolation (SLI) lookup table.
Definition: mc_interp.h:58
GriddedField1
Definition: gridded_fields.h:189
ScatteringMetaData::asratio
Numeric asratio
Definition: optproperties.h:107
matpackII.h
Header file for sparse matrices.
SingleScatteringData::abs_vec_data
Tensor5 abs_vec_data
Definition: optproperties.h:83
ArtsXMLTag
The ARTS XML tag class.
Definition: xml_io_private.h:83
Ppath::geom_tan_pos
Vector geom_tan_pos
Definition: ppath.h:72
GridPos::idx
Index idx
Definition: interpolation.h:75
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
GriddedField::get_grid_name
const String & get_grid_name(Index i) const
Get grid name.
Definition: gridded_fields.h:107
RetrievalQuantity
Contains the data for one retrieval quantity.
Definition: jacobian.h:45
GasAbsLookup::vmrs_ref
Matrix vmrs_ref
The reference VMR profiles.
Definition: gas_abs_lookup.h:193
Ppath::dim
Index dim
Definition: ppath.h:60
ScatteringMetaData::type
String type
Definition: optproperties.h:101
GasAbsLookup::t_pert
Vector t_pert
The vector of temperature perturbations [K].
Definition: gas_abs_lookup.h:212
Vector
The Vector class.
Definition: matpackI.h:555
SingleScatteringData::pha_mat_data
Tensor7 pha_mat_data
Definition: optproperties.h:81
ArtsXMLTag::set_name
void set_name(const String &new_name)
Definition: xml_io_private.h:94
Ppath::pos
Matrix pos
Definition: ppath.h:63
SingleScatteringData::T_grid
Vector T_grid
Definition: optproperties.h:78
RetrievalQuantity::Subtag
const String & Subtag() const
Subtag.
Definition: jacobian.h:90
matpackVI.h
matpackVII.h
arts.h
The global header file for ARTS.
bofstream
Binary output file stream class.
Definition: bofstream.h:45
RetrievalQuantity::Perturbation
const Numeric & Perturbation() const
Size of perturbation used for perturbation calculations.
Definition: jacobian.h:99