63 asrecord.resize (nelem);
68 for (n = 0; n < nelem; n++)
72 }
catch (runtime_error e) {
74 os <<
"Error reading SpeciesData: "
75 <<
"\n Element: " << n
77 throw runtime_error(os.str());
145 aastag.resize (nelem);
150 for (n = 0; n < nelem; n++)
154 }
catch (runtime_error e) {
156 os <<
"Error reading ArrayOfArrayOfSpeciesTag: "
157 <<
"\n Element: " << n
159 throw runtime_error(os.str());
228 appath.resize (nelem);
233 for (n = 0; n < nelem; n++)
237 }
catch (runtime_error e) {
239 os <<
"Error reading ArrayOfPpath: "
240 <<
"\n Element: " << n
242 throw runtime_error(os.str());
312 aatensor3.resize (nelem);
317 for (n = 0; n < nelem; n++)
321 }
catch (runtime_error e) {
323 os <<
"Error reading ArrayOfArrayOfTensor3: "
324 <<
"\n Element: " << n
326 throw runtime_error(os.str());
361 for (
Index n = 0; n < aatensor3.
nelem (); n++)
394 aatensor6.resize (nelem);
399 for (n = 0; n < nelem; n++)
403 }
catch (runtime_error e) {
405 os <<
"Error reading ArrayOfArrayOfTensor6: "
406 <<
"\n Element: " << n
408 throw runtime_error(os.str());
442 for (
Index n = 0; n < aatensor6.
nelem (); n++)
475 agpos.resize (nelem);
480 for (n = 0; n < nelem; n++)
484 }
catch (runtime_error e) {
486 os <<
"Error reading ArrayOfGridPos: "
487 <<
"\n Element: " << n
489 throw runtime_error(os.str());
556 aagpos.resize (nelem);
561 for (n = 0; n < nelem; n++)
565 }
catch (runtime_error e) {
567 os <<
"Error reading ArrayOfArrayOfGridPos: "
568 <<
"\n Element: " << n
570 throw runtime_error(os.str());
637 aaagpos.resize (nelem);
642 for (n = 0; n < nelem; n++)
646 }
catch (runtime_error e) {
648 os <<
"Error reading ArrayOfArrayOfArrayOfGridPos: "
649 <<
"\n Element: " << n
651 throw runtime_error(os.str());
719 aaaagpos.resize (nelem);
724 for (n = 0; n < nelem; n++)
728 }
catch (runtime_error e) {
730 os <<
"Error reading ArrayOfArrayOfArrayOfArrayOfGridPos: "
731 <<
"\n Element: " << n
733 throw runtime_error(os.str());
762 open_tag.
add_attribute (
"type",
"ArrayOfArrayOfArrayOfGridPos");
802 aindex.resize (nelem);
807 for (n = 0; n < nelem; n++)
811 }
catch (runtime_error e) {
813 os <<
"Error reading ArrayOfIndex: "
814 <<
"\n Element: " << n
816 throw runtime_error(os.str());
885 aaindex.resize (nelem);
890 for (n = 0; n < nelem; n++)
894 }
catch (runtime_error e) {
896 os <<
"Error reading ArrayOfArrayOfIndex: "
897 <<
"\n Element: " << n
899 throw runtime_error(os.str());
968 airecord.resize (nelem);
973 for (n = 0; n < nelem; n++)
977 }
catch (runtime_error e) {
979 os <<
"Error reading ArrayOfIsotopeRecord: "
980 <<
"\n Element: " << n
982 throw runtime_error(os.str());
1016 for (
Index n = 0; n < airecord.
nelem (); n++)
1050 amatrix.resize (nelem);
1055 for (n = 0; n < nelem; n++)
1059 }
catch (runtime_error e) {
1061 os <<
"Error reading ArrayOfMatrix: "
1062 <<
"\n Element: " << n
1063 <<
"\n" << e.what();
1064 throw runtime_error(os.str());
1132 aamatrix.resize (nelem);
1137 for (n = 0; n < nelem; n++)
1141 }
catch (runtime_error e) {
1143 os <<
"Error reading ArrayOfArrayOfMatrix: "
1144 <<
"\n Element: " << n
1145 <<
"\n" << e.what();
1146 throw runtime_error(os.str());
1180 for (
Index n = 0; n < aamatrix.
nelem (); n++)
1213 asparse.resize (nelem);
1218 for (n = 0; n < nelem; n++)
1222 }
catch (runtime_error e) {
1224 os <<
"Error reading ArrayOfSparse: "
1225 <<
"\n Element: " << n
1226 <<
"\n" << e.what();
1227 throw runtime_error(os.str());
1300 for (n = 0; n < nelem; n++)
1304 }
catch (runtime_error e) {
1306 os <<
"Error reading ArrayOfRetrievalQuantity: "
1307 <<
"\n Element: " << n
1308 <<
"\n" << e.what();
1309 throw runtime_error(os.str());
1376 astag.resize (nelem);
1381 for (n = 0; n < nelem; n++)
1385 }
catch (runtime_error e) {
1387 os <<
"Error reading ArrayOfSpeciesTag: "
1388 <<
"\n Element: " << n
1389 <<
"\n" << e.what();
1390 throw runtime_error(os.str());
1457 assdata.resize (nelem);
1462 for (n = 0; n < nelem; n++)
1466 }
catch (runtime_error e) {
1468 os <<
"Error reading ArrayOfSingleScatteringData: "
1469 <<
"\n Element: " << n
1470 <<
"\n" << e.what();
1471 throw runtime_error(os.str());
1537 asmdata.resize (nelem);
1542 for (n = 0; n < nelem; n++)
1546 }
catch (runtime_error e) {
1548 os <<
"Error reading ArrayOfScatteringMetaData: "
1549 <<
"\n Element: " << n
1550 <<
"\n" << e.what();
1551 throw runtime_error(os.str());
1618 agfield.resize (nelem);
1623 for (n = 0; n < nelem; n++)
1627 }
catch (runtime_error e) {
1629 os <<
"Error reading ArrayOfGriddedField1: "
1630 <<
"\n Element: " << n
1631 <<
"\n" << e.what();
1632 throw runtime_error(os.str());
1699 agfield.resize (nelem);
1704 for (n = 0; n < nelem; n++)
1708 }
catch (runtime_error e) {
1710 os <<
"Error reading ArrayOfGriddedField2: "
1711 <<
"\n Element: " << n
1712 <<
"\n" << e.what();
1713 throw runtime_error(os.str());
1780 agfield.resize (nelem);
1785 for (n = 0; n < nelem; n++)
1789 }
catch (runtime_error e) {
1791 os <<
"Error reading ArrayOfGriddedField3: "
1792 <<
"\n Element: " << n
1793 <<
"\n" << e.what();
1794 throw runtime_error(os.str());
1861 aagfield.resize (nelem);
1866 for (n = 0; n < nelem; n++)
1870 }
catch (runtime_error e) {
1872 os <<
"Error reading ArrayOfArrayOfGriddedField1: "
1873 <<
"\n Element: " << n
1874 <<
"\n" << e.what();
1875 throw runtime_error(os.str());
1909 for (
Index n = 0; n < aagfield.
nelem (); n++)
1942 aagfield.resize (nelem);
1947 for (n = 0; n < nelem; n++)
1951 }
catch (runtime_error e) {
1953 os <<
"Error reading ArrayOfArrayOfGriddedField3: "
1954 <<
"\n Element: " << n
1955 <<
"\n" << e.what();
1956 throw runtime_error(os.str());
1990 for (
Index n = 0; n < aagfield.
nelem (); n++)
2023 agfield.resize (nelem);
2028 for (n = 0; n < nelem; n++)
2032 }
catch (runtime_error e) {
2034 os <<
"Error reading ArrayOfGriddedField4: "
2035 <<
"\n Element: " << n
2036 <<
"\n" << e.what();
2037 throw runtime_error(os.str());
2128 Index artscat_version;
2132 artscat_version = 3;
2134 else if (version.substr (0,8) !=
"ARTSCAT-")
2137 os <<
"The ARTS line file you are trying to read does not contain a valid version tag.\n"
2138 <<
"Probably it was created with an older version of ARTS that used different units.";
2139 throw runtime_error (os.str());
2142 istringstream is(version.substr(8));
2143 is >> artscat_version;
2146 if (artscat_version < 3 or artscat_version > 4)
2149 os <<
"Unknown ARTS line file version: " << version;
2150 throw runtime_error (os.str());
2153 alrecord.resize (0);
2158 for (n = 0; n < nelem; n++)
2161 switch (artscat_version)
2165 throw runtime_error (
"Cannot read line from file");
2169 throw runtime_error (
"Cannot read line from file");
2172 throw runtime_error (
"Programmer error. This should never be reached.\n"
2173 "Fix version number check above!");
2177 if ( (isnan(fmin) || fmin <= lr.
F()) && (isnan(fmax) || lr.
F() <= fmax ))
2178 alrecord.push_back (lr);
2180 }
catch (runtime_error e) {
2182 os <<
"Error reading ArrayOfLineRecord: "
2183 <<
"\n Element: " << n
2184 <<
"\n" << e.what();
2185 throw runtime_error(os.str());
2211 open_tag.
set_name (
"ArrayOfLineRecord");
2221 for (
Index n = 0; n < alrecord.
nelem(); n++ )
2223 os_xml << alrecord[n] <<
"\n";
2226 close_tag.
set_name (
"/ArrayOfLineRecord");
2254 aalrecord.resize (nelem);
2259 for (n = 0; n < nelem; n++)
2263 }
catch (runtime_error e) {
2265 os <<
"Error reading ArrayOfArrayOfLineRecord: "
2266 <<
"\n Element: " << n
2267 <<
"\n" << e.what();
2268 throw runtime_error(os.str());
2304 for (
Index n = 0; n < aalrecord.
nelem (); n++)
2330 throw runtime_error (
"Boo. Not yet implemented.");
2350 throw runtime_error (
"Boo. Not yet implemented.");
2375 atensor3.resize (nelem);
2380 for (n = 0; n < nelem; n++)
2384 }
catch (runtime_error e) {
2386 os <<
"Error reading ArrayOfTensor3: "
2387 <<
"\n Element: " << n
2388 <<
"\n" << e.what();
2389 throw runtime_error(os.str());
2424 for (
Index n = 0; n < atensor3.
nelem (); n++)
2458 atensor4.resize (nelem);
2463 for (n = 0; n < nelem; n++)
2467 }
catch (runtime_error e) {
2469 os <<
"Error reading ArrayOfTensor4: "
2470 <<
"\n Element: " << n
2471 <<
"\n" << e.what();
2472 throw runtime_error(os.str());
2507 for (
Index n = 0; n < atensor4.
nelem (); n++)
2541 atensor6.resize (nelem);
2546 for (n = 0; n < nelem; n++)
2550 }
catch (runtime_error e) {
2552 os <<
"Error reading ArrayOfTensor6: "
2553 <<
"\n Element: " << n
2554 <<
"\n" << e.what();
2555 throw runtime_error(os.str());
2589 for (
Index n = 0; n < atensor6.
nelem (); n++)
2622 atensor7.resize (nelem);
2627 for (n = 0; n < nelem; n++)
2631 }
catch (runtime_error e) {
2633 os <<
"Error reading ArrayOfTensor7: "
2634 <<
"\n Element: " << n
2635 <<
"\n" << e.what();
2636 throw runtime_error(os.str());
2670 for (
Index n = 0; n < atensor7.
nelem (); n++)
2703 astring.resize (nelem);
2708 for (n = 0; n < nelem; n++)
2712 }
catch (runtime_error e) {
2714 os <<
"Error reading ArrayOfString: "
2715 <<
"\n Element: " << n
2716 <<
"\n" << e.what();
2717 throw runtime_error(os.str());
2803 avector.resize (nelem);
2808 for (n = 0; n < nelem; n++)
2812 }
catch (runtime_error e) {
2814 os <<
"Error reading ArrayOfVector: "
2815 <<
"\n Element: " << n
2816 <<
"\n" << e.what();
2817 throw runtime_error(os.str());