89 abs_t = rtp_temperature;
105 abs_lines_per_species.resize( tgs.
nelem() );
109 abs_lines_per_species[i].resize(0);
123 #pragma omp parallel for \ 124 if (!arts_omp_in_parallel() \ 125 && abs_lines.nelem() >= arts_omp_get_max_threads()) 130 abs_lines[i].ARTSCAT4FromARTSCAT3();
132 catch (runtime_error e)
134 #pragma omp critical (abs_linesArtscat4FromArtscat3_fail) 135 { fail_msg = e.what(); failed =
true; }
139 if (failed)
throw runtime_error(fail_msg);
160 out2 <<
" Reading file: " << filename <<
"\n";
175 if ( fmin <= lr.
F() )
177 if ( lr.
F() <= fmax )
178 abs_lines.push_back(lr);
184 out2 <<
" Read " << abs_lines.
nelem() <<
" lines.\n";
204 String filename_lower = filename;
207 filename_lower.
split(splitted_fname,
"/");
208 if (splitted_fname.
nelem())
210 filename_lower = splitted_fname[splitted_fname.
nelem()-1];
214 throw std::runtime_error(
"Catalog filename is empty");
216 #ifdef USE_HITRAN2008 217 if (filename_lower.
nelem() < 8
218 || (filename_lower.substr(0, 8) !=
"hitran08" 219 && filename_lower.substr(0, 8) !=
"hitran04"))
222 os <<
"'" << filename <<
"'\n" 223 <<
"does not appear to be a HITRAN 2008 catalogue. The catalog filename\n" 224 <<
"name must start with HITRAN08. This version of arts was compiled with\n" 225 <<
"support only for HITRAN 2008. To switch back to the latest HITRAN\n" 226 <<
"run 'cmake -DWITH_HITRAN2008=0 ..' and recompile arts";
227 throw std::runtime_error(os.str());
230 if (filename_lower.
nelem() < 10
231 || (filename_lower.substr(0, 10) !=
"hitran2012" 232 && filename_lower.substr(0, 10) !=
"hitran2016"))
235 os <<
"'" << filename <<
"'\n" 236 <<
"does not appear to be a HITRAN 2012 catalogue. The catalog filename\n" 237 <<
"must start with HITRAN2012. If you intend to use a HITRAN 2008 catalog\n" 238 <<
"run 'cmake -DWITH_HITRAN2008 ..' and recompile arts";
239 throw std::runtime_error(os.str());
243 out2 <<
" Reading file: " << filename <<
"\n";
261 if ( fmin <= lr.
F() )
263 if ( lr.
F() <= fmax )
264 abs_lines.push_back(lr);
270 catch (runtime_error e)
273 os << e.what() <<
"\n";
274 os <<
"Error parsing line " << linenr <<
" from catalog.\n";
275 throw runtime_error(os.str());
278 out2 <<
" Read " << abs_lines.
nelem() <<
" lines.\n";
298 out2 <<
" Reading file: " << filename <<
"\n";
314 if ( fmin <= lr.
F() )
315 if ( lr.
F() <= fmax )
316 abs_lines.push_back(lr);
319 out2 <<
" Read " << abs_lines.
nelem() <<
" lines.\n";
339 out2 <<
" Reading file: " << filename <<
"\n";
355 if ( fmin <= lr.
F() )
357 if ( lr.
F() <= fmax )
358 abs_lines.push_back(lr);
364 out2 <<
" Read " << abs_lines.
nelem() <<
" lines.\n";
383 const String& output_file_format,
391 for (ArrayOfArrayOfLineRecord::const_iterator it = abs_lines_per_species.begin();
392 it != abs_lines_per_species.end();
397 String species_filename = basename;
398 if (basename.length() && basename[basename.length()-1] !=
'/')
399 species_filename +=
".";
401 species_filename +=
species_data[(*it)[0].Species()].Name() +
".xml";
402 WriteXML(output_file_format, *it, species_filename, 0,
403 "",
"",
"", verbosity);
423 set<Index> unique_species;
424 for (ArrayOfArrayOfSpeciesTag::const_iterator asp = abs_species.begin();
425 asp != abs_species.end(); asp++)
426 for (ArrayOfSpeciesTag::const_iterator sp = asp->begin();
427 sp != asp->end(); sp++)
433 unique_species.insert(sp->Species());
446 for (set<Index>::const_iterator it = unique_species.begin();
447 it != unique_species.end(); it++)
450 String tmpbasename = basename;
451 if (basename.length() && basename[basename.length()-1] !=
'/')
457 fmin, fmax, verbosity);
458 abs_lines.insert(abs_lines.end(), more_abs_lines.begin(), more_abs_lines.end());
461 out2 <<
" Read " << abs_lines.
nelem() <<
" lines in total.\n";
496 out2 <<
" Reading file: " << filename <<
"\n";
508 if ( 9 <= v.nelem() )
510 if (
"ARTSCAT" == v.substr(0,7) )
512 os <<
"The ARTS line file you are trying contains a version tag " 513 <<
"different from the current version.\n" 514 <<
"Tag in file: " << v <<
"\n" 515 <<
"Current version: " << lr.
Version();
516 throw runtime_error(os.str());
520 os <<
"The ARTS line file you are trying to read does not contain a valid version tag.\n" 521 <<
"Probably it was created with an older version of ARTS that used different units.";
522 throw runtime_error(os.str());
538 if ( fmin <= lr.
F() && lr.
F() <= fmax )
540 abs_lines.push_back(lr);
544 out2 <<
" Read " << abs_lines.
nelem() <<
" lines.\n";
568 if ( n_cat != formats.
nelem() ||
569 n_cat != fmin.
nelem() ||
570 n_cat != fmax.
nelem() )
573 os <<
"abs_lines_per_speciesReadFromCatalogues: All keyword\n" 574 <<
"parameters must get the same number of arguments.\n" 575 <<
"You specified:\n" 576 <<
"filenames: " << n_cat <<
"\n" 577 <<
"formats: " << formats.
nelem() <<
"\n" 578 <<
"fmin: " << fmin.
nelem() <<
"\n" 579 <<
"fmax: " << fmax.
nelem();
580 throw runtime_error(os.str());
589 os <<
"abs_lines_per_speciesReadFromCatalogues: You specified more\n" 590 <<
"catalugues than you have tag groups.\n" 591 <<
"You specified:\n" 592 <<
"Catalogues: " << n_cat <<
"\n" 594 throw runtime_error(os.str());
603 os <<
"abs_lines_per_speciesReadFromCatalogues: You must have at\n" 604 <<
"least one catalogue and at least one tag group.\n" 605 <<
"You specified:\n" 606 <<
"Catalogues: " << n_cat <<
"\n" 608 throw runtime_error(os.str());
622 real_tgs[0].resize(1);
629 for (
Index i=1; i<n_tg; ++i )
641 const Index that_cat = find( real_filenames.begin(),
642 real_filenames.end(),
643 filenames[i] ) - real_filenames.begin();
644 if ( that_cat < real_filenames.nelem() )
648 real_tgs[that_cat].push_back(i);
651 if ( formats[i] != real_formats[that_cat] ||
652 fmin[i] != real_fmin[that_cat] ||
653 fmax[i] != real_fmax[that_cat] )
656 os <<
"abs_lines_per_speciesReadFromCatalogues: If you specify the\n" 657 <<
"same catalogue repeatedly, format, fmin, and fmax must be\n" 658 <<
"consistent. There is an inconsistency between\n" 659 <<
"catalogue " << that_cat <<
" and " << i <<
".";
660 throw runtime_error(os.str());
669 real_filenames.push_back( filenames[i] );
670 real_formats.push_back ( formats[i] );
671 real_fmin.push_back ( fmin[i] );
672 real_fmax.push_back ( fmax[i] );
682 real_tgs[last_cat].push_back(i);
689 out3 <<
" Catalogues to read and tgs for which these will be used:\n";
690 for (
Index i=0; i<n_real_cat; ++i )
692 out3 <<
" " << real_filenames[i] <<
":";
694 out3 <<
" " << real_tgs[i][s];
699 abs_lines_per_species.resize( tgs.
nelem() );
702 for (
Index i=0; i<n_real_cat; ++i )
708 if (
"HITRAN96"==real_formats[i] )
712 else if (
"HITRAN04"==real_formats[i] )
716 else if (
"MYTRAN2"==real_formats[i] )
720 else if (
"JPL"==real_formats[i] )
724 else if (
"ARTS"==real_formats[i] )
731 os <<
"abs_lines_per_speciesReadFromCatalogues: You specified the\n" 732 <<
"format `" << real_formats[i] <<
"', which is unknown.\n" 733 <<
"Allowd formats are: HITRAN96, HITRAN04, MYTRAN2, JPL, ARTS.";
734 throw runtime_error(os.str());
742 these_tgs[s] = tgs[real_tgs[i][s]];
752 abs_lines_per_species[real_tgs[i][s]] = these_abs_lines_per_species[s];
780 std::vector<bool> species_used (
species_data.nelem(),
false);
788 for (
Index i=0; i<abs_lines_per_species.nelem(); ++i )
809 for ( j=0; j<tgs.
nelem() && !found ; ++j )
812 for (
Index k=0; k<tgs[j].
nelem() && !found; ++k )
842 if ( this_tag.
Lf() >= 0 )
843 if ( this_tag.
Lf() > this_line.
F() )
847 if ( this_tag.
Uf() >= 0 )
848 if ( this_tag.
Uf() < this_line.
F() )
863 abs_lines_per_species[j-1].push_back(this_line);
866 if ( !species_used[this_line.
Species()] )
867 species_used[this_line.
Species()] =
true;
873 if ( species_used[this_line.
Species()] )
876 out2 <<
" Your tags include other lines of species " 879 <<
" Why do you not include line " 891 out3 <<
" " << i <<
":";
894 out3 <<
" " << tgs[i][s].Name();
896 out3 <<
": " << abs_lines_per_species[i].
nelem() <<
" lines\n";
910 for (
Index i=0; i<abs_lines_per_species.
nelem(); ++i )
929 for (
Index j=0; j<n; ++j )
931 if( ll[j].F() <= max_f )
936 ll.reserve( n + nnew );
939 for (
Index j=0; j<n; ++j )
941 if( max_f < 0 || ll[j].F() <= max_f )
944 dummy.
setF( -dummy.
F() );
963 if ( (abs_lines_per_species.
nelem() != abs_lineshape.
nelem()) &&
964 (abs_lineshape.
nelem() != 1) )
967 os <<
"Dimension of abs_lines_per_species does\n" 968 <<
"not match that of abs_lineshape.\n" 969 <<
"(Dimension of abs_lineshape must be 1 or\n" 970 <<
"equal to abs_lines_per_species.)";
971 throw runtime_error(os.str());
977 if ( f_grid[s+1] <= f_grid[s] )
980 os <<
"The frequency grid f_grid is not properly sorted.\n" 981 <<
"f_grid[" << s <<
"] = " << f_grid[s] <<
"\n" 982 <<
"f_grid[" << s+1 <<
"] = " << f_grid[s+1];
983 throw runtime_error(os.str());
988 for (
Index i=0; i<abs_lines_per_species.
nelem(); ++i )
994 if (1==abs_lineshape.
nelem())
995 cutoff = abs_lineshape[0].Cutoff();
997 cutoff = abs_lineshape[i].Cutoff();
1007 Numeric low = f_grid[0] - cutoff;
1011 for ( ArrayOfLineRecord::iterator j=ll.begin(); j<ll.end(); ++j )
1016 if ( ( F0 >= low) && ( F0 <= upp) )
1033 = keep.begin(); j != keep.end(); j++)
1035 nll.push_back (**j);
1038 ll.resize (nll.
nelem ());
1049 Index& propmat_clearsky_agenda_checked,
1050 Index& abs_xsec_agenda_checked,
1058 propmat_clearsky_agenda_checked =
false;
1059 abs_xsec_agenda_checked =
false;
1073 String filename = basename;
1074 if (basename.length() && basename[basename.length()-1] !=
'/')
1076 filename += specname;
1081 included.push_back(specname);
1089 this_group[0] = this_tag;
1092 tgs.push_back(this_group);
1094 catch (runtime_error e)
1097 excluded.push_back(specname);
1102 out2 <<
" Included Species (" << included.
nelem() <<
"):\n";
1103 for (
Index i=0; i<included.nelem(); ++i )
1104 out2 <<
" " << included[i] <<
"\n";
1106 out2 <<
" Excluded Species (" << excluded.
nelem() <<
"):\n";
1108 out2 <<
" " << excluded[i] <<
"\n";
1117 const String& normalizationfactor,
1133 abs_lineshape.resize(tag_sz);
1142 out2 <<
" Selected lineshape: " << str <<
"\n";
1152 if (str == normalizationfactor)
1154 out2 <<
" Selected normalization factor : " << normalizationfactor <<
"\n";
1156 if ( (cutoff != -1) && (cutoff < 0.0) )
1157 throw runtime_error(
" Cutoff must be -1 or positive.");
1158 out2 <<
" Selected cutoff frequency [Hz] : " << cutoff <<
"\n";
1166 throw runtime_error(
"Selected lineshape not available.");
1168 throw runtime_error(
"Selected normalization to lineshape not available.");
1172 for (
Index i=0; i<tag_sz; i++)
1174 abs_lineshape[i].SetInd_ls( found0 );
1175 abs_lineshape[i].SetInd_lsn( found1 );
1176 abs_lineshape[i].SetCutoff( cutoff );
1199 if ( (tg_sz != shape.
nelem()) ||
1200 (tg_sz != normalizationfactor.
nelem()) ||
1201 (tg_sz != cutoff.
nelem()) )
1204 os <<
"abs_lineshape_per_tgDefine: number of elements does\n" 1205 <<
"not match the number of tag groups defined.";
1206 throw runtime_error(os.str());
1211 abs_lineshape.resize(tg_sz);
1214 for (
Index k=0; k<tg_sz; ++k)
1220 if (str == shape[k])
1222 out2 <<
" Tag Group: [";
1224 out2 << tgs[k][s].Name() <<
", ";
1225 out2 << tgs[k][tgs[k].
nelem()-1].Name() <<
"]\n";
1226 out2 <<
" Selected lineshape: " << str <<
"\n";
1236 if (str == normalizationfactor[k])
1238 out2 <<
" Selected normalization factor: " << normalizationfactor[k] <<
"\n";
1239 if ( (cutoff[k] != -1) && (cutoff[k] < 0.0) )
1240 throw runtime_error(
" Cutoff must be -1 or positive.");
1241 out2 <<
" Selected cutoff frequency : " << cutoff[k] <<
"\n";
1251 os <<
"Selected lineshape not available: "<< shape[k] <<
"\n";
1252 throw runtime_error(os.str());
1257 os <<
"Selected normalization to lineshape not available: "<<
1258 normalizationfactor[k] <<
"\n";
1259 throw runtime_error(os.str());
1263 abs_lineshape[k].SetInd_ls( found0 );
1264 abs_lineshape[k].SetInd_lsn( found1 );
1265 abs_lineshape[k].SetCutoff( cutoff[k] );
1292 const Index h2o_index
1297 if ( h2o_index < 0 )
1320 const Index n2_index
1347 const Index o2_index
1365 const Index& atmosphere_dim,
1373 if ( 1 != atmosphere_dim )
1376 os <<
"Atmospheric dimension must be 1D, but atmosphere_dim is " 1377 << atmosphere_dim <<
".";
1378 throw runtime_error(os.str());
1382 abs_t = t_field (
joker, 0, 0);
1402 if ( abs_vmrs.
nrows() != abs_xsec_per_species.
nelem() )
1405 os <<
"Variable abs_vmrs must have compatible dimension to abs_xsec_per_species.\n" 1406 <<
"abs_vmrs.nrows() = " << abs_vmrs.
nrows() <<
"\n" 1407 <<
"abs_xsec_per_species.nelem() = " << abs_xsec_per_species.
nelem();
1408 throw runtime_error(os.str());
1414 if ( abs_vmrs.
ncols() != abs_xsec_per_species[0].ncols() )
1417 os <<
"Variable abs_vmrs must have same numbers of altitudes as abs_xsec_per_species.\n" 1418 <<
"abs_vmrs.ncols() = " << abs_vmrs.
ncols() <<
"\n" 1419 <<
"abs_xsec_per_species[0].ncols() = " << abs_xsec_per_species[0].ncols();
1420 throw runtime_error(os.str());
1431 abs_coef.
resize( abs_xsec_per_species[0].nrows(), abs_xsec_per_species[0].ncols() );
1434 abs_coef_per_species.resize( abs_xsec_per_species.
nelem() );
1436 out3 <<
" Computing abs_coef and abs_coef_per_species from abs_xsec_per_species.\n";
1438 for (
Index i=0; i<abs_xsec_per_species.
nelem(); ++i )
1440 out3 <<
" Tag group " << i <<
"\n";
1443 abs_coef_per_species[i].resize( abs_xsec_per_species[i].nrows(), abs_xsec_per_species[i].ncols() );
1444 abs_coef_per_species[i] = 0;
1447 for (
Index j=0; j<abs_xsec_per_species[i].ncols(); j++)
1453 for (
Index k=0; k<abs_xsec_per_species[i].nrows(); k++)
1455 abs_coef_per_species[i](k,j) = abs_xsec_per_species[i](k,j) * n * abs_vmrs(i,j);
1460 abs_coef += abs_coef_per_species[i];
1475 const Index& abs_xsec_agenda_checked,
1481 if (!abs_xsec_agenda_checked)
1482 throw runtime_error(
"You must call *abs_xsec_agenda_checkedCalc* before calling this method.");
1489 if ( tgs.
nelem() < abs_species_active.
nelem() )
1492 os <<
"abs_species_active (n=" << abs_species_active.
nelem()
1493 <<
") not allowed to have more elements than abs_species (n=" 1494 << tgs.
nelem() <<
")!\n";
1495 throw runtime_error(os.str());
1500 abs_xsec_per_species.resize( tgs.
nelem() );
1505 for (
Index ii=0; ii<abs_species_active.
nelem(); ++ii )
1507 const Index i = abs_species_active[ii];
1510 if (i >= tgs.
nelem())
1513 os <<
"*abs_species_active* contains an invalid species index.\n" 1514 <<
"Species index must be between 0 and " << tgs.
nelem()-1;
1515 throw std::runtime_error(os.str());
1518 abs_xsec_per_species[i].resize( f_grid.
nelem(), abs_p.
nelem() );
1519 abs_xsec_per_species[i] = 0;
1523 os <<
" Initialized abs_xsec_per_species.\n" 1524 <<
" Number of frequencies : " << f_grid.
nelem() <<
"\n" 1525 <<
" Number of pressure levels : " << abs_p.
nelem() <<
"\n";
1555 if (
min(abs_t) < 0 )
1558 os <<
"Temperature must be at least 0 K. But you request an absorption\n" 1559 <<
"calculation at " <<
min(abs_t) <<
" K!";
1560 throw runtime_error(os.str());
1567 const Index n_xsec = abs_xsec_per_species.
nelem();
1569 const Index n_lines = abs_lines_per_species.
nelem();
1570 const Index n_shapes = abs_lineshape.
nelem();
1572 if ( n_tgs != n_xsec ||
1575 ( n_tgs != n_shapes &&
1579 os <<
"The following variables must all have the same dimension:\n" 1580 <<
"tgs: " << tgs.
nelem() <<
"\n" 1581 <<
"abs_xsec_per_species: " << abs_xsec_per_species.
nelem() <<
"\n" 1582 <<
"abs_vmrs: " << abs_vmrs.
nrows() <<
"\n" 1583 <<
"abs_lines_per_species: " << abs_lines_per_species.
nelem() <<
"\n" 1584 <<
"abs_lineshape: " << abs_lineshape.
nelem() <<
"\n" 1585 <<
"(As a special case, abs_lineshape is allowed to have only one element.)";
1586 throw runtime_error(os.str());
1592 out3 <<
" Calculating line spectra.\n";
1627 for (
Index ii=0; ii<abs_species_active.
nelem(); ++ii )
1629 const Index i = abs_species_active[ii];
1640 if (1==abs_lineshape.
nelem())
1641 ls = abs_lineshape[0];
1643 ls = abs_lineshape[i];
1655 if (ll[0].Species() != tgs[i][0].Species() )
1658 os <<
"The species in the line list does not match the species\n" 1659 <<
"for which you want to calculate absorption:\n" 1661 <<
"abs_lines_per_species: " << ll[0].Name();
1662 throw runtime_error(os.str());
1691 if (
"O2" == species_name )
1695 if ( 0 != ll[0].Naux() )
1699 if (
"Rosenkranz_Voigt_Drayson" != lineshape_name &&
1700 "Rosenkranz_Voigt_Kuntz6" != lineshape_name )
1704 <<
"You are using a line catalogue that contains auxiliary parameters to\n" 1705 <<
"take care of overlap for oxygen lines. But you are not using a\n" 1706 <<
"lineshape that uses these parameters. Use Rosenkranz_Voigt_Drayson or\n" 1707 <<
"Rosenkranz_Voigt_Kuntz6.";
1708 throw runtime_error(os.str());
1715 if (
"Rosenkranz_Voigt_Drayson" == lineshape_name ||
1716 "Rosenkranz_Voigt_Kuntz6" == lineshape_name )
1719 if (
"O2" != species_name )
1723 <<
"You are trying to use one of the special Rosenkranz lineshapes with\n" 1724 <<
"overlap correction for a species other than oxygen. Your species is\n" 1725 << species_name <<
".\n" 1726 <<
"Select another lineshape for this species.";
1727 throw runtime_error(os.str());
1733 if ( 0 == ll[0].Naux() )
1737 <<
"You are trying to use one of the special Rosenkranz lineshapes with\n" 1738 <<
"overlap correction. But your line file does not contain aux\n" 1739 <<
"parameters. (I've checked only the first LineRecord). Use a line file\n" 1740 <<
"with overlap parameters.";
1741 throw runtime_error(os.str());
1747 Matrix dummy_phase(abs_xsec_per_species[i].nrows(),
1748 abs_xsec_per_species[i].ncols(),
1762 isotopologue_ratios,
1767 Matrix dummy_phase(abs_xsec_per_species[i].nrows(),
1768 abs_xsec_per_species[i].ncols(),
1773 line_mixing_data_lut,
1784 isotopologue_ratios,
1793 if (out3.sufficient_priority())
1796 os <<
" Tag group " << i
1798 << ll.
nelem() <<
" transitions\n";
1823 Vector abs_h2o, abs_n2, abs_o2;
1829 const Index n_xsec = abs_xsec_per_species.
nelem();
1832 if ( n_tgs != n_xsec || n_tgs != n_vmrs )
1835 os <<
"The following variables must all have the same dimension:\n" 1836 <<
"tgs: " << tgs.
nelem() <<
"\n" 1837 <<
"abs_xsec_per_species: " << abs_xsec_per_species.
nelem() <<
"\n" 1838 <<
"abs_vmrs.nrows(): " << abs_vmrs.
nrows();
1839 throw runtime_error(os.str());
1845 if ( abs_cont_names.
nelem() !=
1846 abs_cont_parameters.
nelem() )
1850 for (
Index i=0; i < abs_cont_names.
nelem(); ++i)
1851 os <<
"abs_xsec_per_speciesAddConts: " << i <<
" name : " << abs_cont_names[i] <<
"\n";
1853 for (
Index i=0; i < abs_cont_parameters.
nelem(); ++i)
1854 os <<
"abs_xsec_per_speciesAddConts: " << i <<
" param: " << abs_cont_parameters[i] <<
"\n";
1856 for (
Index i=0; i < abs_cont_models.
nelem(); ++i)
1857 os <<
"abs_xsec_per_speciesAddConts: " << i <<
" option: " << abs_cont_models[i] <<
"\n";
1859 os <<
"The following variables must have the same dimension:\n" 1860 <<
"abs_cont_names: " << abs_cont_names.
nelem() <<
"\n" 1861 <<
"abs_cont_parameters: " << abs_cont_parameters.
nelem();
1863 throw runtime_error(os.str());
1873 os <<
"Variable abs_t must have the same dimension as abs_p.\n" 1874 <<
"abs_t.nelem() = " << abs_t.
nelem() <<
'\n' 1875 <<
"abs_p.nelem() = " << abs_p.
nelem();
1876 throw runtime_error(os.str());
1882 os <<
"Variable dimension abs_vmrs.ncols() must\n" 1883 <<
"be the same as abs_p.nelem().\n" 1884 <<
"abs_vmrs.ncols() = " << abs_vmrs.
ncols() <<
'\n' 1885 <<
"abs_p.nelem() = " << abs_p.
nelem();
1886 throw runtime_error(os.str());
1893 out3 <<
" Calculating continuum spectra.\n";
1896 for (
Index ii=0; ii<abs_species_active.
nelem(); ++ii )
1898 const Index i = abs_species_active[ii];
1916 +
species_data[tgs[i][s].Species()].Isotopologue()[tgs[i][s].Isotopologue()].Name();
1922 find( abs_cont_names.begin(),
1923 abs_cont_names.end(),
1924 name ) - abs_cont_names.begin();
1928 if ( n==abs_cont_names.
nelem() )
1931 os <<
"Cannot find model " << name
1932 <<
" in abs_cont_names.";
1933 throw runtime_error(os.str());
1939 if (out3.sufficient_priority())
1942 os <<
" Adding " << name
1943 <<
" to tag group " << i <<
".\n";
1949 const String ContOption = abs_cont_models[n];
1952 abs_h2oSet(abs_h2o, tgs, abs_vmrs, verbosity);
1953 abs_n2Set(abs_n2, tgs, abs_vmrs, verbosity);
1954 abs_o2Set(abs_o2, tgs, abs_vmrs, verbosity);
1977 abs_cont_parameters[n],
2011 abs_cont_names.resize(0);
2012 abs_cont_options.resize(0);
2013 abs_cont_parameters.resize(0);
2014 out2 <<
" Initialized abs_cont_names \n" 2015 " abs_cont_models\n" 2016 " abs_cont_parameters.\n";
2028 const Vector& userparameters,
2039 abs_cont_names.push_back(tagname);
2040 abs_cont_models.push_back(model);
2041 abs_cont_parameters.push_back(userparameters);
2060 Index nr, nc, stokes_dim;
2064 nr = propmat_clearsky.
nrows();
2065 nc = propmat_clearsky.
ncols();
2069 os <<
"The last two dimensions of propmat_clearsky must be equal (stokes_dim).\n" 2070 <<
"But here they are " << nr <<
" and " << nc <<
".";
2071 throw runtime_error( os.str() );
2076 Index n_species = abs_coef_per_species.
nelem();
2081 os <<
"Must have at least one species.";
2082 throw runtime_error(os.str());
2085 Index n_f = abs_coef_per_species[0].nrows();
2088 if (1!=abs_coef_per_species[0].ncols())
2091 os <<
"Must have exactly one pressure.";
2092 throw runtime_error(os.str());
2096 if ( propmat_clearsky.
nbooks()!=n_species )
2099 os <<
"Species dimension of propmat_clearsky does not\n" 2100 <<
"match abs_coef_per_species.";
2101 throw runtime_error( os.str() );
2105 if ( propmat_clearsky.
npages()!=n_f )
2108 os <<
"Frequency dimension of propmat_clearsky does not\n" 2109 <<
"match abs_coef_per_species.";
2110 throw runtime_error( os.str() );
2114 for (
Index si=0; si<n_species; ++si )
2115 for (
Index ii=0; ii<stokes_dim; ++ii )
2116 propmat_clearsky(si,
joker,ii, ii) += abs_coef_per_species[si](
joker,0);
2127 const Index& stokes_dim,
2128 const Index& propmat_clearsky_agenda_checked,
2132 if (!propmat_clearsky_agenda_checked)
2133 throw runtime_error(
"You must call *propmat_clearsky_agenda_checkedCalc* before calling this method.");
2137 if(abs_species.
nelem() > 0 )
2143 propmat_clearsky.
resize(abs_species.
nelem(),nf, stokes_dim, stokes_dim);
2144 propmat_clearsky = 0;
2146 else throw runtime_error(
"stokes_dim = 0");
2148 else throw runtime_error(
"nf = 0");
2150 else throw runtime_error(
"abs_species.nelem() = 0");
2157 const Index& stokes_dim,
2158 const Index& atmosphere_dim,
2173 if( stokes_dim < 3 )
2174 throw runtime_error(
2175 "To include Faraday rotation, stokes_dim >= 3 is required." );
2177 if( atmosphere_dim==1 && rtp_los.
nelem() < 1 )
2180 os <<
"For applying propmat_clearskyAddFaraday, los needs to be specified\n" 2181 <<
"(at least zenith angle component for atmosphere_dim==1),\n" 2182 <<
"but it is not.\n";
2183 throw runtime_error( os.str() );
2185 else if( atmosphere_dim>1 && rtp_los.
nelem() < 2 )
2188 os <<
"For applying propmat_clearskyAddFaraday, los needs to be specified\n" 2189 <<
"(both zenith and azimuth angle components for atmosphere_dim>1),\n" 2190 <<
"but it is not.\n";
2191 throw runtime_error( os.str() );
2195 for(
Index sp = 0; sp < abs_species.
nelem() && ife < 0; sp++ )
2203 throw runtime_error(
"Free electrons not found in *abs_species* and " 2204 "Faraday rotation can not be calculated." );
2208 const Numeric ne = rtp_vmr[ife];
2210 if( ne!=0 && ( rtp_mag[0]!=0 || rtp_mag[1]!=0 || rtp_mag[2]!=0 ) )
2214 rtp_los, rtp_mag[0], rtp_mag[1], rtp_mag[2], atmosphere_dim );
2218 const Numeric r = c1 / ( f_grid[iv] * f_grid[iv] );
2219 propmat_clearsky(ife,iv,1,2) = r;
2220 propmat_clearsky(ife,iv,2,1) = -r;
2232 const Index& stokes_dim,
2233 const Index& atmosphere_dim,
2238 const Numeric& rtp_temperature,
2245 for(
Index sp = 0; sp < abs_species.
nelem(); sp++ )
2256 os <<
"For applying propmat_clearskyAddParticles, abs_species needs to" 2257 <<
"contain species 'particles', but it does not.\n";
2258 throw runtime_error( os.str() );
2264 os <<
"Number of 'particles' entries in abs_species and of elements in\n" 2265 <<
"scat_data_array needs to be identical. But you have " << np
2266 <<
" 'particles' entries\n" 2267 <<
"and " << ns <<
" scat_data_array elements.\n";
2268 throw runtime_error( os.str() );
2271 if( atmosphere_dim==1 && rtp_los.
nelem() < 1 )
2274 os <<
"For applying propmat_clearskyAddParticles, los needs to be specified\n" 2275 <<
"(at least zenith angle component for atmosphere_dim==1),\n" 2276 <<
"but it is not.\n";
2277 throw runtime_error( os.str() );
2279 else if( atmosphere_dim>1 && rtp_los.
nelem() < 2 )
2282 os <<
"For applying propmat_clearskyAddParticles, los needs to be specified\n" 2283 <<
"(both zenith and azimuth angle components for atmosphere_dim>1),\n" 2284 <<
"but it is not.\n";
2285 throw runtime_error( os.str() );
2290 mirror_los( rtp_los_back, rtp_los, atmosphere_dim );
2292 Matrix pnd_ext_mat(stokes_dim,stokes_dim);
2293 Vector pnd_abs_vec(stokes_dim);
2295 for(
Index iv=0; iv<nf; iv++ )
2307 for(
Index sp = 0; sp < abs_species.
nelem(); sp++ )
2313 if ( rtp_vmr[sp] > 0. )
2319 rtp_los_back[0], rtp_los_back[1],
2320 rtp_temperature, stokes_dim, verbosity);
2322 pnd_abs_vec *= rtp_vmr[sp];
2328 pnd_abs_vec, stokes_dim);
2345 const Numeric& rtp_temperature,
2347 const Agenda& abs_xsec_agenda,
2379 abs_species_active[i] = i;
2384 abs_xsec_per_species,
2395 abs_xsec_per_species,
2396 abs_vmrs, abs_p, abs_t, verbosity);
2401 abs_coef_per_species,
2410 const Index& stokes_dim,
2413 propmat_clearsky.
resize( 1, f_grid.
nelem(), stokes_dim, stokes_dim );
2414 propmat_clearsky = 0;
2428 #ifdef ENABLE_NETCDF 2434 const Tensor7& propmat_clearsky_field,
2435 const Index& atmosphere_dim,
2442 int nlev_dimid, nlyr_dimid, nwvl_dimid, stokes_dimid, none_dimid;
2444 int wvlmin_varid, wvlmax_varid, z_varid, wvl_varid, tau_varid;
2446 if (atmosphere_dim != 1)
2447 throw runtime_error(
"WriteMolTau can only be used for atmsophere_dim=1");
2449 #pragma omp critical(netcdf__critical_region) 2452 if ((retval = nc_create(filename.c_str(), NC_CLOBBER, &ncid)))
2456 if ((retval = nc_def_dim(ncid,
"nlev", (
int) z_field.
npages(), &nlev_dimid)))
2459 if ((retval = nc_def_dim(ncid,
"nlyr", (
int) z_field.
npages() - 1, &nlyr_dimid)))
2462 if ((retval = nc_def_dim(ncid,
"nwvl", (
int) f_grid.
nelem(), &nwvl_dimid)))
2465 if ((retval = nc_def_dim(ncid,
"none", 1, &none_dimid)))
2468 if ((retval = nc_def_dim(ncid,
"nstk", (
int) propmat_clearsky_field.
nbooks(), &stokes_dimid)))
2472 if ((retval = nc_def_var(ncid,
"wvlmin", NC_DOUBLE, 1, &none_dimid, &wvlmin_varid)))
2473 nca_error (retval,
"nc_def_var wvlmin");
2475 if ((retval = nc_def_var(ncid,
"wvlmax", NC_DOUBLE, 1, &none_dimid, &wvlmax_varid)))
2476 nca_error (retval,
"nc_def_var wvlmax");
2478 if ((retval = nc_def_var(ncid,
"z", NC_DOUBLE, 1, &nlev_dimid, &z_varid)))
2481 if ((retval = nc_def_var(ncid,
"wvl", NC_DOUBLE, 1, &nwvl_dimid, &wvl_varid)))
2484 dimids[0]=nlyr_dimid;
2485 dimids[1]=nwvl_dimid;
2486 dimids[2]=stokes_dimid;
2487 dimids[3]=stokes_dimid;
2489 if ((retval = nc_def_var(ncid,
"tau", NC_DOUBLE, 4, &dimids[0], &tau_varid)))
2493 if ((retval = nc_put_att_text(ncid, wvlmin_varid,
"units", 2,
"nm")))
2496 if ((retval = nc_put_att_text(ncid, wvlmax_varid,
"units", 2,
"nm")))
2499 if ((retval = nc_put_att_text(ncid, z_varid,
"units", 2,
"km")))
2502 if ((retval = nc_put_att_text(ncid, wvl_varid,
"units", 2,
"nm")))
2505 if ((retval = nc_put_att_text(ncid, tau_varid,
"units", 1,
"-")))
2510 if ((retval = nc_enddef(ncid)))
2516 if ((retval = nc_put_var_double (ncid, wvlmin_varid, &wvlmin[0])))
2521 if ((retval = nc_put_var_double (ncid, wvlmax_varid, &wvlmax[0])))
2524 double z[z_field.
npages()];
2525 for (
int iz=0; iz<z_field.
npages(); iz++)
2526 z[iz]=z_field(z_field.
npages()-1-iz, 0, 0)*1e-3;
2528 if ((retval = nc_put_var_double (ncid, z_varid, &z[0])))
2531 double wvl[f_grid.
nelem()];
2532 for (
int iv=0; iv<f_grid.
nelem(); iv++)
2535 if ((retval = nc_put_var_double (ncid, wvl_varid, &wvl[0])))
2540 const Index amfnb = propmat_clearsky_field.
nbooks();
2542 Tensor4 tau(zfnp, fgne, amfnb, amfnb, 0.);
2545 for (
int is=0; is<propmat_clearsky_field.
nlibraries(); is++)
2546 for (
int iz=0; iz<zfnp; iz++)
2547 for (
int iv=0; iv<fgne; iv++)
2548 for (
int is1=0; is1<amfnb; is1++)
2549 for (
int is2=0; is2<amfnb; is2++)
2551 tau(iz, iv, is1, is2) += 0.5 * (propmat_clearsky_field(is,f_grid.
nelem()-1-iv,is1,is2,z_field.
npages()-1-iz,0,0)+
2552 propmat_clearsky_field(is,f_grid.
nelem()-1-iv,is1,is2,z_field.
npages()-2-iz,0,0))
2553 *(z_field(z_field.
npages()-1-iz,0,0)-z_field(z_field.
npages()-2-iz,0,0));
2556 if ((retval = nc_put_var_double (ncid, tau_varid, tau.
get_c_array())))
2560 if ((retval = nc_close(ncid)))
2576 throw runtime_error(
"The workspace method WriteMolTau is not available" 2577 "because ARTS was compiled without NetCDF support.");
Numeric dotprod_with_los(ConstVectorView los, const Numeric &u, const Numeric &v, const Numeric &w, const Index &atmosphere_dim)
dotprod_with_los
INDEX Index
The type to use for all integer numbers and indices.
const SpeciesRecord & SpeciesData() const
The matching SpeciesRecord from species_data.
This header file contains all the declarations of the implemented continua and full absorption (lines...
void abs_xsec_per_speciesInit(ArrayOfMatrix &abs_xsec_per_species, const ArrayOfArrayOfSpeciesTag &tgs, const ArrayOfIndex &abs_species_active, const Vector &f_grid, const Vector &abs_p, const Index &abs_xsec_agenda_checked, const Verbosity &verbosity)
WORKSPACE METHOD: abs_xsec_per_speciesInit.
void isotopologue_ratiosInitFromBuiltin(SpeciesAuxData &isotopologue_ratios, const Verbosity &)
WORKSPACE METHOD: isotopologue_ratiosInitFromBuiltin.
This file contains basic functions to handle NetCDF data files.
void abs_xsec_per_speciesAddLines(ArrayOfMatrix &abs_xsec_per_species, const ArrayOfArrayOfSpeciesTag &tgs, const ArrayOfIndex &abs_species_active, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const Matrix &abs_vmrs, const ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfLineshapeSpec &abs_lineshape, const SpeciesAuxData &isotopologue_ratios, const ArrayOfArrayOfLineMixingRecord &line_mixing_data, const ArrayOfArrayOfIndex &line_mixing_data_lut, const Verbosity &verbosity)
WORKSPACE METHOD: abs_xsec_per_speciesAddLines.
Index nelem() const
Number of elements.
Explicit construction of Arrays.
void abs_lines_per_speciesSetEmpty(ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfArrayOfSpeciesTag &tgs, const Verbosity &)
WORKSPACE METHOD: abs_lines_per_speciesSetEmpty.
Declarations having to do with the four output streams.
bool ReadFromArtscat3Stream(istream &is, const Verbosity &verbosity)
Read one line from a stream associated with an ARTSCAT-3 file.
Lineshape related specification like which lineshape to use, the normalizationfactor, and the cutoff.
void xsec_species_line_mixing_wrapper(MatrixView xsec_attenuation, MatrixView xsec_phase, const ArrayOfArrayOfLineMixingRecord &line_mixing_data, const ArrayOfArrayOfIndex &line_mixing_data_lut, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstMatrixView all_vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const Index this_species, const ArrayOfLineRecord &abs_lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff, const SpeciesAuxData &isotopologue_ratios, const Verbosity &verbosity)
This will work as a wrapper for linemixing when abs_species contain relevant data.
Index Species() const
Molecular species index.
void nca_error(const int e, const String s)
Throws a runtime error for the given NetCDF error code.
void propmat_clearskyAddFaraday(Tensor4 &propmat_clearsky, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &rtp_vmr, const Vector &rtp_los, const Vector &rtp_mag, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyAddFaraday.
const Numeric VACUUM_PERMITTIVITY
void abs_linesReadFromArts(ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax, const Verbosity &verbosity)
WORKSPACE METHOD: abs_linesReadFromArts.
Index npages() const
Returns the number of pages.
void abs_coefCalcFromXsec(Matrix &abs_coef, ArrayOfMatrix &abs_coef_per_species, const ArrayOfMatrix &abs_xsec_per_species, const Matrix &abs_vmrs, const Vector &abs_p, const Vector &abs_t, const Verbosity &verbosity)
WORKSPACE METHOD: abs_coefCalcFromXsec.
void abs_linesArtscat4FromArtscat3(ArrayOfLineRecord &abs_lines, const Verbosity &)
WORKSPACE METHOD: abs_linesArtscat4FromArtscat3.
This file contains basic functions to handle XML data files.
void propmat_clearskyAddParticles(Tensor4 &propmat_clearsky, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &rtp_vmr, const Vector &rtp_los, const Numeric &rtp_temperature, const ArrayOfSingleScatteringData &scat_data_array, const Verbosity &verbosity)
WORKSPACE METHOD: propmat_clearskyAddParticles.
This file contains basic functions to handle ASCII files.
void find_xml_file(String &filename, const Verbosity &verbosity)
Find an xml file.
void abs_lines_per_speciesReadFromCatalogues(ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfArrayOfSpeciesTag &tgs, const ArrayOfString &filenames, const ArrayOfString &formats, const Vector &fmin, const Vector &fmax, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lines_per_speciesReadFromCatalogues.
const Index & Ind_lsn() const
Return the index of the normalization factor.
void propmat_clearskyZero(Tensor4 &propmat_clearsky, const Vector &f_grid, const Index &stokes_dim, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyZero.
Numeric Uf() const
The upper line center frequency in Hz: If this is <0 it means no upper limit.
Index nrows() const
Returns the number of rows.
Numeric number_density(const Numeric &p, const Numeric &t)
number_density
Index nelem() const
Returns the number of elements.
const Array< LineshapeRecord > lineshape_data
The lookup data for the different lineshapes.
const Array< SpeciesRecord > species_data
Species Data.
const Numeric ELECTRON_CHARGE
const Numeric SPEED_OF_LIGHT
This file contains the definition of Array.
const Array< IsotopologueRecord > & Isotopologue() const
The implementation for String, the ARTS string class.
Index ncols() const
Returns the number of columns.
The global header file for ARTS.
void opt_propExtract(MatrixView ext_mat_mono_spt, VectorView abs_vec_mono_spt, const SingleScatteringData &scat_data, const Numeric za, const Numeric aa, const Numeric rtp_temperature, const Index stokes_dim, const Verbosity &verbosity)
void xml_read_arts_catalogue_from_file(const String &filename, ArrayOfLineRecord &type, const Numeric &fmin, const Numeric &fmax, const Verbosity &verbosity)
void abs_lineshape_per_tgDefine(ArrayOfLineshapeSpec &abs_lineshape, const ArrayOfArrayOfSpeciesTag &tgs, const ArrayOfString &shape, const ArrayOfString &normalizationfactor, const Vector &cutoff, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lineshape_per_tgDefine.
Index Version() const
Return the version number.
void abs_linesReadFromSplitArtscat(ArrayOfLineRecord &abs_lines, const ArrayOfArrayOfSpeciesTag &abs_species, const String &basename, const Numeric &fmin, const Numeric &fmax, const Verbosity &verbosity)
WORKSPACE METHOD: abs_linesReadFromSplitArtscat.
void scat_data_array_monoCalc(ArrayOfSingleScatteringData &scat_data_array_mono, const ArrayOfSingleScatteringData &scat_data_array, const Vector &f_grid, const Index &f_index, const Verbosity &)
WORKSPACE METHOD: scat_data_array_monoCalc.
void AbsInputFromRteScalars(Vector &abs_p, Vector &abs_t, Matrix &abs_vmrs, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const Verbosity &)
WORKSPACE METHOD: AbsInputFromRteScalars.
void propmat_clearskyAddFromAbsCoefPerSpecies(Tensor4 &propmat_clearsky, const ArrayOfMatrix &abs_coef_per_species, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyAddFromAbsCoefPerSpecies.
void abs_lines_per_speciesWriteToSplitArtscat(const String &output_file_format, const ArrayOfArrayOfLineRecord &abs_lines_per_species, const String &basename, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lines_per_speciesWriteToSplitArtscat.
void abs_cont_descriptionInit(ArrayOfString &abs_cont_names, ArrayOfString &abs_cont_options, ArrayOfVector &abs_cont_parameters, const Verbosity &verbosity)
WORKSPACE METHOD: abs_cont_descriptionInit.
void abs_lines_per_speciesCreateFromLines(ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfLineRecord &abs_lines, const ArrayOfArrayOfSpeciesTag &tgs, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lines_per_speciesCreateFromLines.
void tolower()
Convert to lower case.
Numeric Lf() const
The lower line center frequency in Hz.
A tag group can consist of the sum of several of these.
void propmat_clearskyInit(Tensor4 &propmat_clearsky, const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &f_grid, const Index &stokes_dim, const Index &propmat_clearsky_agenda_checked, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyInit.
Index Isotopologue() const
The index of the isotopologue species that this line belongs to.
void AbsInputFromAtmFields(Vector &abs_p, Vector &abs_t, Matrix &abs_vmrs, const Index &atmosphere_dim, const Vector &p_grid, const Tensor3 &t_field, const Tensor4 &vmr_field, const Verbosity &)
WORKSPACE METHOD: AbsInputFromAtmFields.
void abs_xsec_per_speciesAddConts(ArrayOfMatrix &abs_xsec_per_species, const ArrayOfArrayOfSpeciesTag &tgs, const ArrayOfIndex &abs_species_active, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const Matrix &abs_vmrs, const ArrayOfString &abs_cont_names, const ArrayOfVector &abs_cont_parameters, const ArrayOfString &abs_cont_models, const Verbosity &verbosity)
WORKSPACE METHOD: abs_xsec_per_speciesAddConts.
void WriteMolTau(const Vector &f_grid, const Tensor3 &z_field, const Tensor7 &propmat_clearsky_field, const Index &atmosphere_dim, const String &filename, const Verbosity &)
WORKSPACE METHOD: WriteMolTau.
void abs_speciesDefineAllInScenario(ArrayOfArrayOfSpeciesTag &tgs, Index &propmat_clearsky_agenda_checked, Index &abs_xsec_agenda_checked, const String &basename, const Verbosity &verbosity)
WORKSPACE METHOD: abs_speciesDefineAllInScenario.
void xsec_continuum_tag(MatrixView xsec, const String &name, ConstVectorView parameters, const String &model, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView abs_n2, ConstVectorView abs_h2o, ConstVectorView abs_o2, ConstVectorView vmr, const Verbosity &verbosity)
Calculates model absorption for one continuum or full model tag.
void abs_linesReadFromArtsObsolete(ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax, const Verbosity &verbosity)
Obsolete old ARTS catalogue reading function.
void abs_o2Set(Vector &abs_o2, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs, const Verbosity &)
abs_o2Set.
const Numeric & Cutoff() const
Return the cutoff frequency (in Hz).
String VersionString() const
Return the version String.
NUMERIC Numeric
The type to use for all floating point numbers.
Index nlibraries() const
Returns the number of libraries.
void propmat_clearskyAddOnTheFly(Workspace &ws, Tensor4 &propmat_clearsky, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const Agenda &abs_xsec_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: propmat_clearskyAddOnTheFly.
void abs_linesReadFromHitranPre2004(ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax, const Verbosity &verbosity)
WORKSPACE METHOD: abs_linesReadFromHitranPre2004.
Implements the class MakeArray, which is a derived class of Array, allowing explicit initialization...
void abs_lineshapeDefine(ArrayOfLineshapeSpec &abs_lineshape, const String &shape, const String &normalizationfactor, const Numeric &cutoff, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lineshapeDefine.
const Index & Ind_ls() const
Return the index of this lineshape.
Index nelem() const
Number of elements.
const String & Name() const
Declarations required for the calculation of absorption coefficients.
void xsec_species(MatrixView xsec_attenuation, MatrixView xsec_phase, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstMatrixView all_vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const Index this_species, const ArrayOfLineRecord &abs_lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff, const SpeciesAuxData &isotopologue_ratios, const Verbosity &verbosity)
Calculate line absorption cross sections for one tag group.
const Array< LineshapeNormRecord > lineshape_norm_data
The lookup data for the different normalization factors to the lineshapes.
bool ReadFromJplStream(istream &is, const Verbosity &verbosity)
Read one line from a stream associated with a JPL file.
Index species_index_from_species_name(String name)
Return species index for given species name.
Index npages() const
Returns the number of pages.
This can be used to make arrays out of anything.
void split(Array< my_basic_string< charT > > &aos, const my_basic_string< charT > &delim) const
Split string into substrings.
void open_input_file(ifstream &file, const String &name)
Open a file for reading.
void abs_lines_per_speciesAddMirrorLines(ArrayOfArrayOfLineRecord &abs_lines_per_species, const Numeric &max_f, const Verbosity &)
WORKSPACE METHOD: abs_lines_per_speciesAddMirrorLines.
void checkIsotopologueRatios(const ArrayOfArrayOfSpeciesTag &abs_species, const SpeciesAuxData &isoratios)
Check that isotopologue ratios for the given species are correctly defined.
void abs_linesReadFromMytran2(ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax, const Verbosity &verbosity)
WORKSPACE METHOD: abs_linesReadFromMytran2.
Array< Array< LineRecord > > ArrayOfArrayOfLineRecord
Holds a lists of spectral line data for each tag group.
The class MakeVector is a special kind of Vector that can be initialized explicitly from one or more ...
void resize(Index n)
Assignment operator from VectorView.
void abs_cont_descriptionAppend(ArrayOfString &abs_cont_names, ArrayOfString &abs_cont_models, ArrayOfVector &abs_cont_parameters, const String &tagname, const String &model, const Vector &userparameters, const Verbosity &)
WORKSPACE METHOD: abs_cont_descriptionAppend.
Workspace methods and template functions for supergeneric XML IO.
void abs_n2Set(Vector &abs_n2, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs, const Verbosity &)
abs_n2Set.
Index nbooks() const
Returns the number of books.
void abs_linesReadFromJpl(ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax, const Verbosity &verbosity)
WORKSPACE METHOD: abs_linesReadFromJpl.
const Numeric ELECTRON_MASS
void check_continuum_model(const String &name)
An auxiliary functions that checks if a given continuum model is listed in species_data.cc.
void abs_h2oSet(Vector &abs_h2o, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs, const Verbosity &)
abs_h2oSet.
void fillSpeciesAuxDataWithIsotopologueRatiosFromSpeciesData(SpeciesAuxData &sad)
Fill SpeciesAuxData with default isotopologue ratios from species data.
void mirror_los(Vector &los_mirrored, ConstVectorView los, const Index &atmosphere_dim)
mirror_los
void abs_lines_per_speciesCompact(ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfLineshapeSpec &abs_lineshape, const Vector &f_grid, const Verbosity &)
WORKSPACE METHOD: abs_lines_per_speciesCompact.
void WriteXML(Workspace &ws, const String &file_format, const Agenda &v, const String &f, const Index &no_clobber, const String &v_name, const String &f_name, const String &no_clobber_name, const Verbosity &verbosity)
void setF(Numeric new_mf)
Set the line center frequency in Hz.
Array< LineRecord > ArrayOfLineRecord
Holds a list of spectral line data.
Auxiliary data for isotopologues.
This file contains header information for the dealing with command line parameters.
Index Species() const
The index of the molecular species that this line belongs to.
Index ncols() const
Returns the number of columns.
void abs_xsec_agendaExecute(Workspace &ws, ArrayOfMatrix &abs_xsec_per_species, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfIndex &abs_species_active, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const Matrix &abs_vmrs, const Agenda &input_agenda)
bool ReadFromHitran2004Stream(istream &is, const Verbosity &verbosity, const Numeric fmin=0)
Read one line from a stream associated with a HITRAN 2004 file.
bool ReadFromHitran2001Stream(istream &is, const Verbosity &verbosity)
Read one line from a stream associated with a HITRAN 1986-2001 file.
Scattering database structure and functions.
Index Isotopologue() const
Isotopologue species index.
void ext_matFromabs_vec(MatrixView ext_mat, ConstVectorView abs_vec, const Index &stokes_dim)
Derive extinction matrix from absorption vector.
Numeric F() const
The line center frequency in Hz.
Index nrows() const
Returns the number of rows.
Index nbooks() const
Returns the number of books.
void abs_linesReadFromHitran(ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax, const Verbosity &verbosity)
WORKSPACE METHOD: abs_linesReadFromHitran.
Spectral line catalog data.
void resize(Index b, Index p, Index r, Index c)
Resize function.
bool ReadFromMytran2Stream(istream &is, const Verbosity &verbosity)
Read one line from a stream associated with a MYTRAN2 file.
Declaration of functions in rte.cc.
void resize(Index r, Index c)
Resize function.
const Numeric * get_c_array() const
Conversion to plain C-array.