Go to the documentation of this file.
108 if (lines.NumLines() == 0)
continue;
111 for (
Index i=0; i<tgs.
nelem() and lines.NumLines(); i++) {
112 for (
auto& this_tag: tgs[i]) {
114 if (this_tag.Species() not_eq lines.Species())
break;
118 this_tag.Isotopologue() not_eq lines.Isotopologue())
122 if (this_tag.Lf() >= 0 or this_tag.Uf() >= 0) {
123 const Numeric low = (this_tag.Lf() >= 0) ? this_tag.Lf() : std::numeric_limits<Numeric>::lowest();
128 for (
Index k=lines.NumLines()-1; k>=0; k--)
129 if (low <= lines.F0(k) and upp >= lines.F0(k))
139 if (lines.NumLines() == 0)
140 goto leave_inner_loop;
144 goto leave_inner_loop;
177 String filename = basename;
178 if (basename.length() && basename[basename.length() - 1] !=
'/')
180 filename += specname;
185 included.push_back(specname);
193 this_group[0] = this_tag;
196 tgs.push_back(this_group);
197 }
catch (
const std::runtime_error& e) {
199 excluded.push_back(specname);
204 out2 <<
" Included Species (" << included.
nelem() <<
"):\n";
205 for (
Index i = 0; i < included.nelem(); ++i)
206 out2 <<
" " << included[i] <<
"\n";
208 out2 <<
" Excluded Species (" << excluded.
nelem() <<
"):\n";
210 out2 <<
" " << excluded[i] <<
"\n";
226 specs.push_back(spec.Name());
247 os <<
"Atmospheric dimension must be 1D, but atmosphere_dim is "
249 throw runtime_error(os.str());
282 os <<
"Variable abs_vmrs must have compatible dimension to abs_xsec_per_species.\n"
283 <<
"abs_vmrs.nrows() = " <<
abs_vmrs.nrows() <<
"\n"
285 throw runtime_error(os.str());
293 os <<
"Variable abs_vmrs must have same numbers of altitudes as abs_xsec_per_species.\n"
294 <<
"abs_vmrs.ncols() = " <<
abs_vmrs.ncols() <<
"\n"
295 <<
"abs_xsec_per_species[0].ncols() = "
297 throw runtime_error(os.str());
326 for (
Index ii = 0; ii < jacobian_quantities_position.
nelem(); ii++) {
343 <<
" Computing abs_coef and abs_coef_per_species from abs_xsec_per_species.\n";
346 out3 <<
" Tag group " << i <<
"\n";
374 for (
Index iq = 0; iq < jacobian_quantities_position.
nelem(); iq++) {
376 JacPropMatType::Temperature) {
387 JacPropMatType::VMR) {
388 bool seco =
false,
main =
false;
423 [jacobian_quantities_position[iq]] not_eq
461 "You must call *abs_xsec_agenda_checkedCalc* before calling this method.");
471 <<
") not allowed to have more elements than abs_species (n="
472 << tgs.
nelem() <<
")!\n";
473 throw runtime_error(os.str());
496 if (i >= tgs.
nelem()) {
498 os <<
"*abs_species_active* contains an invalid species index.\n"
499 <<
"Species index must be between 0 and " << tgs.
nelem() - 1;
500 throw std::runtime_error(os.str());
524 os <<
" Initialized abs_xsec_per_species.\n"
525 <<
" Number of frequencies : " <<
f_grid.nelem() <<
"\n"
526 <<
" Number of pressure levels : " <<
abs_p.nelem() <<
"\n";
549 Vector abs_h2o, abs_n2, abs_o2;
558 if (n_tgs != n_xsec || n_tgs != n_vmrs) {
560 os <<
"The following variables must all have the same dimension:\n"
561 <<
"tgs: " << tgs.
nelem() <<
"\n"
563 <<
"abs_vmrs.nrows(): " <<
abs_vmrs.nrows();
564 throw runtime_error(os.str());
590 for (
Index it = 0; it <
abs_t.nelem(); it++) dabs_t[it] =
abs_t[it] + dt;
593 Matrix jacs_df, jacs_dt, normal;
607 os <<
"abs_xsec_per_speciesAddConts: " << i
611 os <<
"abs_xsec_per_speciesAddConts: " << i
615 os <<
"abs_xsec_per_speciesAddConts: " << i
618 os <<
"The following variables must have the same dimension:\n"
622 throw runtime_error(os.str());
631 os <<
"Variable abs_t must have the same dimension as abs_p.\n"
632 <<
"abs_t.nelem() = " <<
abs_t.nelem() <<
'\n'
633 <<
"abs_p.nelem() = " <<
abs_p.nelem();
634 throw runtime_error(os.str());
639 os <<
"Variable dimension abs_vmrs.ncols() must\n"
640 <<
"be the same as abs_p.nelem().\n"
641 <<
"abs_vmrs.ncols() = " <<
abs_vmrs.ncols() <<
'\n'
642 <<
"abs_p.nelem() = " <<
abs_p.nelem();
643 throw runtime_error(os.str());
649 out3 <<
" Calculating continuum spectra.\n";
669 .Isotopologue()[tgs[i][s].Isotopologue()]
672 if (name ==
"O2-MPM2020")
continue;
685 os <<
"Cannot find model " << name <<
" in abs_cont_names.";
686 throw runtime_error(os.str());
692 if (out3.sufficient_priority()) {
694 os <<
" Adding " << name <<
" to tag group " << i <<
".\n";
743 for (
Index ip = 0; ip <
abs_p.nelem(); ip++) {
744 if (do_freq_jac) jacs_df(iv, ip) = 0.0;
745 if (do_temp_jac) jacs_dt(iv, ip) = 0.0;
746 normal(iv, ip) = 0.0;
794 for (
Index ip = 0; ip <
abs_p.nelem(); ip++) {
796 for (
Index iq = 0; iq < jacobian_quantities_position.
nelem();
801 (jacs_df(iv, ip) - normal(iv, ip)) * (1. / df);
803 [jacobian_quantities_position[iq]] ==
804 JacPropMatType::Temperature)
806 (jacs_dt(iv, ip) - normal(iv, ip)) * (1. / dt);
831 abs_cont_options.resize(0);
833 out2 <<
" Initialized abs_cont_names \n"
835 " abs_cont_parameters.\n";
846 const Vector& userparameters,
882 os <<
"Must have at least one species.";
883 throw runtime_error(os.str());
891 os <<
"Must have exactly one pressure.";
892 throw runtime_error(os.str());
898 os <<
"Species dimension of propmat_clearsky does not\n"
899 <<
"match src_coef_per_species.";
900 throw std::runtime_error(os.str());
904 if (
nlte_source[0].NumberOfFrequencies() not_eq n_f) {
906 os <<
"Frequency dimension of propmat_clearsky does not\n"
907 <<
"match abs_coef_per_species.";
908 throw runtime_error(os.str());
915 for (
Index iv = 0; iv < n_f; iv++)
919 for (
Index si = 0; si < n_species; ++si) {
926 for (
Index ii = 0; ii < jacobian_quantities_position.
nelem(); ii++) {
928 JacPropMatType::Temperature) {
930 for (
Index iv = 0; iv < n_f; iv++)
933 for (
Index si = 0; si < n_species; ++si) {
945 for (
Index iv = 0; iv < n_f; iv++)
948 for (
Index si = 0; si < n_species; ++si) {
982 if (0 == n_species) {
984 os <<
"Must have at least one species.";
985 throw runtime_error(os.str());
993 os <<
"Must have exactly one pressure.";
994 throw runtime_error(os.str());
1000 os <<
"Species dimension of propmat_clearsky does not\n"
1001 <<
"match abs_coef_per_species.";
1002 throw runtime_error(os.str());
1008 os <<
"Frequency dimension of propmat_clearsky does not\n"
1009 <<
"match abs_coef_per_species.";
1010 throw runtime_error(os.str());
1014 for (
Index si = 0; si < n_species; ++si)
1022 throw std::runtime_error(
"Must have exactly one pressure.");
1043 throw runtime_error(
1044 "You must call *propmat_clearsky_agenda_checkedCalc* before calling this method.");
1049 throw std::runtime_error(
"abs_species.nelem() = 0");
1051 if (not nf)
throw runtime_error(
"nf = 0");
1053 if (not
stokes_dim)
throw runtime_error(
"stokes_dim = 0");
1088 static const Numeric FRconst =
1094 throw runtime_error(
1095 "To include Faraday rotation, stokes_dim >= 3 is required.");
1099 os <<
"For applying propmat_clearskyAddFaraday, los needs to be specified\n"
1100 <<
"(at least zenith angle component for atmosphere_dim==1),\n"
1101 <<
"but it is not.\n";
1102 throw runtime_error(os.str());
1105 os <<
"For applying propmat_clearskyAddFaraday, los needs to be specified\n"
1106 <<
"(both zenith and azimuth angle components for atmosphere_dim>1),\n"
1107 <<
"but it is not.\n";
1108 throw runtime_error(os.str());
1125 throw runtime_error(
1126 "Free electrons not found in *abs_species* and "
1127 "Faraday rotation can not be calculated.");
1138 Numeric dc1_u = 0.0, dc1_v = 0.0, dc1_w = 0.0;
1140 dc1_u = (2 * FRconst * ne *
1148 dc1_v = (2 * FRconst * ne *
1156 dc1_w = (2 * FRconst * ne *
1178 for (
Index iq = 0; iq < jacobian_quantities_position.
nelem(); iq++) {
1183 JacPropMatType::MagneticU)
1186 JacPropMatType::MagneticV)
1189 JacPropMatType::MagneticW)
1192 JacPropMatType::Electrons)
1217 const Index& use_abs_as_ext,
1230 throw runtime_error(
1231 "The scat_data must be flagged to have "
1232 "passed a consistency check (scat_data_checked=1).");
1244 os <<
"For applying propmat_clearskyAddParticles, *abs_species* needs to"
1245 <<
"contain species 'particles', but it does not.\n";
1246 throw runtime_error(os.str());
1251 os <<
"Number of 'particles' entries in abs_species and of elements in\n"
1252 <<
"*scat_data* needs to be identical. But you have " << np
1253 <<
" 'particles' entries\n"
1254 <<
"and " <<
ns <<
" *scat_data* elements.\n";
1255 throw runtime_error(os.str());
1260 os <<
"For applying *propmat_clearskyAddParticles*, *rtp_los* needs to be specified\n"
1261 <<
"(at least zenith angle component for atmosphere_dim==1),\n"
1262 <<
"but it is not.\n";
1263 throw runtime_error(os.str());
1266 os <<
"For applying *propmat_clearskyAddParticles*, *rtp_los* needs to be specified\n"
1267 <<
"(both zenith and azimuth angle components for atmosphere_dim>1),\n"
1268 <<
"but it is not.\n";
1269 throw runtime_error(os.str());
1291 if (do_jac_frequencies) {
1292 out1 <<
"WARNING:\n"
1293 <<
"Frequency perturbation not available for absorbing particles.\n";
1304 if (do_jac_temperature) {
1313 dir_array(0,
joker) = rtp_los_back;
1326 const Index nf = abs_vec_Nse[0][0].nbooks();
1332 Index i_se_flat = 0;
1344 os <<
"Negative absorbing particle 'vmr' (aka number density)"
1345 <<
" encountered:\n"
1346 <<
"scat species #" << i_ss <<
", scat elem #" << i_se
1347 <<
" (vmr_field entry #" << sp <<
")\n";
1348 throw runtime_error(os.str());
1349 }
else if (
rtp_vmr[sp] > 0.) {
1350 if (t_ok(i_se_flat, 0) < 0.) {
1352 os <<
"Temperature interpolation error:\n"
1353 <<
"scat species #" << i_ss <<
", scat elem #" << i_se <<
"\n";
1354 throw runtime_error(os.str());
1356 if (use_abs_as_ext) {
1360 abs_vec_Nse[i_ss][i_se](iv, 0, 0,
joker), iv);
1364 abs_vec_Nse[i_ss][i_se](0, 0, 0,
joker), iv);
1369 ext_mat_Nse[i_ss][i_se](iv, 0, 0,
joker,
joker), iv);
1373 ext_mat_Nse[i_ss][i_se](0, 0, 0,
joker,
joker), iv);
1379 if (do_jac_temperature) {
1380 if (t_ok(i_se_flat, 1) < 0.) {
1382 os <<
"Temperature interpolation error (in perturbation):\n"
1383 <<
"scat species #" << i_ss <<
", scat elem #" << i_se <<
"\n";
1384 throw runtime_error(os.str());
1389 if (do_jac) rtp_vmr_sum +=
rtp_vmr[sp];
1391 for (
Index iq = 0; iq < jacobian_quantities_position.
nelem(); iq++) {
1403 JacPropMatType::Temperature) {
1404 if (use_abs_as_ext) {
1421 tmp(iv,
joker, 0), iv);
1429 tmp(0,
joker, 0), iv);
1474 JacPropMatType::Particulates) {
1493 if (rtp_vmr_sum != 0.0) {
1494 for (
Index iq = 0; iq < jacobian_quantities_position.
nelem(); iq++) {
1496 JacPropMatType::Particulates) {
1620 for (
Index i = 0; i < pm.NumberOfFrequencies(); i++)
1621 if (pm.Kjj()[i] < 0.0) pm.SetAtPosition(0.0, i);
1636 #ifdef ENABLE_NETCDF
1648 int nlev_dimid, nlyr_dimid, nwvl_dimid, stokes_dimid, none_dimid;
1650 int wvlmin_varid, wvlmax_varid, z_varid, wvl_varid, tau_varid;
1653 throw runtime_error(
"WriteMolTau can only be used for atmosphere_dim=1");
1655 #pragma omp critical(netcdf__critical_region)
1658 if ((retval = nc_create(filename.c_str(), NC_CLOBBER, &ncid)))
1662 if ((retval = nc_def_dim(ncid,
"nlev", (
int)
z_field.npages(), &nlev_dimid)))
1666 nc_def_dim(ncid,
"nlyr", (
int)
z_field.npages() - 1, &nlyr_dimid)))
1669 if ((retval = nc_def_dim(ncid,
"nwvl", (
int)
f_grid.nelem(), &nwvl_dimid)))
1672 if ((retval = nc_def_dim(ncid,
"none", 1, &none_dimid)))
1675 if ((retval = nc_def_dim(ncid,
1682 if ((retval = nc_def_var(
1683 ncid,
"wvlmin", NC_DOUBLE, 1, &none_dimid, &wvlmin_varid)))
1686 if ((retval = nc_def_var(
1687 ncid,
"wvlmax", NC_DOUBLE, 1, &none_dimid, &wvlmax_varid)))
1690 if ((retval = nc_def_var(ncid,
"z", NC_DOUBLE, 1, &nlev_dimid, &z_varid)))
1694 nc_def_var(ncid,
"wvl", NC_DOUBLE, 1, &nwvl_dimid, &wvl_varid)))
1697 dimids[0] = nlyr_dimid;
1698 dimids[1] = nwvl_dimid;
1699 dimids[2] = stokes_dimid;
1700 dimids[3] = stokes_dimid;
1703 nc_def_var(ncid,
"tau", NC_DOUBLE, 4, &dimids[0], &tau_varid)))
1707 if ((retval = nc_put_att_text(ncid, wvlmin_varid,
"units", 2,
"nm")))
1710 if ((retval = nc_put_att_text(ncid, wvlmax_varid,
"units", 2,
"nm")))
1713 if ((retval = nc_put_att_text(ncid, z_varid,
"units", 2,
"km")))
1716 if ((retval = nc_put_att_text(ncid, wvl_varid,
"units", 2,
"nm")))
1719 if ((retval = nc_put_att_text(ncid, tau_varid,
"units", 1,
"-")))
1724 if ((retval = nc_enddef(ncid)))
nca_error(retval,
"nc_enddef");
1729 if ((retval = nc_put_var_double(ncid, wvlmin_varid, &wvlmin[0])))
1734 if ((retval = nc_put_var_double(ncid, wvlmax_varid, &wvlmax[0])))
1738 for (
int iz = 0; iz <
z_field.npages(); iz++)
1741 if ((retval = nc_put_var_double(ncid, z_varid, &z[0])))
1744 double wvl[
f_grid.nelem()];
1745 for (
int iv = 0; iv <
f_grid.nelem(); iv++)
1748 if ((retval = nc_put_var_double(ncid, wvl_varid, &wvl[0])))
1755 Tensor4 tau(zfnp, fgne, amfnb, amfnb, 0.);
1759 for (
int iz = 0; iz < zfnp; iz++)
1760 for (
int iv = 0; iv < fgne; iv++)
1761 for (
int is1 = 0; is1 < amfnb; is1++)
1762 for (
int is2 = 0; is2 < amfnb; is2++)
1764 tau(iz, iv, is1, is2) +=
1783 if ((retval = nc_put_var_double(ncid, tau_varid, tau.
get_c_array())))
1787 if ((retval = nc_close(ncid)))
nca_error(retval,
"nc_close");
1801 throw runtime_error(
1802 "The workspace method WriteMolTau is not available"
1803 "because ARTS was compiled without NetCDF support.");
1832 throw std::runtime_error(
"Please set lbl_checked true to use this function");
1836 std::ostringstream os;
1837 os <<
"Temperature must be at least 0 K. But you request an absorption\n"
1838 <<
"calculation at " <<
min(
abs_t) <<
" K!";
1839 throw std::runtime_error(os.str());
1850 if (n_tgs not_eq n_xsec or n_tgs not_eq n_vmrs or n_tgs not_eq n_lines) {
1851 std::ostringstream os;
1852 os <<
"The following variables must all have the same dimension:\n"
1855 <<
"abs_vmrs: " <<
abs_vmrs.nrows() <<
'\n'
1857 throw std::runtime_error(os.str());
1863 const bool do_lte =
abs_nlte.Data().empty();
1867 static Matrix dummy1(0, 0);
bool supports_continuum(const ArrayOfRetrievalQuantity &js)
Returns if the array supports continuum derivatives.
Index atmosphere_dim(Workspace &ws) noexcept
Tensor3 z_field(Workspace &ws) noexcept
void propmat_clearskyAddFaraday(ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &rtp_vmr, const Vector &rtp_los, const Vector &rtp_mag, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyAddFaraday.
Numeric magnetic_field_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the magnetic field perturbation if it exists.
Vector rtp_mag(Workspace &ws) noexcept
PropagationMatrix PropagationMatrix
Vector rtp_los(Workspace &ws) noexcept
void propmat_clearskyAddFromAbsCoefPerSpecies(ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const ArrayOfMatrix &abs_coef_per_species, const ArrayOfMatrix &dabs_coef_dx, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyAddFromAbsCoefPerSpecies.
Stokes vector is as Propagation matrix but only has 4 possible values.
ArrayOfRetrievalQuantity jacobian_quantities(Workspace &ws) noexcept
Declarations required for the calculation of absorption coefficients.
void AppendSingleLine(SingleLine &&sl)
Appends a single line to the absorption lines.
bool species_iso_match(const RetrievalQuantity &rq, const Index species, const Index iso)
Returns if the Retrieval quantity is VMR derivative for all the species in the species tags.
const Numeric VACUUM_PERMITTIVITY
void fillSpeciesAuxDataWithPartitionFunctionsFromSpeciesData(SpeciesAuxData &sad)
Fill SpeciesAuxData with default partition functions from species data.
void abs_speciesDefineAll(ArrayOfArrayOfSpeciesTag &abs_species, Index &propmat_clearsky_agenda_checked, Index &abs_xsec_agenda_checked, const Verbosity &verbosity)
WORKSPACE METHOD: abs_speciesDefineAll.
const SpeciesRecord & SpeciesDataOfBand(const AbsorptionLines &band)
Returns the species data.
Index NumLines() const noexcept
Number of lines.
This file contains basic functions to handle NetCDF data files.
Numeric dplanck_dt(const Numeric &f, const Numeric &t)
dplanck_dt
Verbosity verbosity(Workspace &ws) noexcept
ArrayOfStokesVector dnlte_dx_source(Workspace &ws) noexcept
ArrayOfArrayOfMatrix dsrc_xsec_per_species_dx(Workspace &ws) noexcept
Numeric temperature_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the temperature perturbation if it exists.
void check_continuum_model(const String &name)
An auxiliary functions that checks if a given continuum model is listed in species_data....
void resize(Index n)
Resize function.
ArrayOfMatrix abs_coef_per_species(Workspace &ws) noexcept
ArrayOfArrayOfAbsorptionLines abs_lines_per_species(Workspace &ws) noexcept
void propmat_clearskyForceNegativeToZero(ArrayOfPropagationMatrix &propmat_clearsky, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyForceNegativeToZero.
Vector rtp_vmr(Workspace &ws) noexcept
void propmat_clearskyAddParticles(ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &rtp_vmr, const Vector &rtp_los, const Numeric &rtp_temperature, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &scat_data_checked, const Index &use_abs_as_ext, const Verbosity &verbosity)
WORKSPACE METHOD: propmat_clearskyAddParticles.
Index stokes_dim(Workspace &ws) noexcept
bool supports_particles(const ArrayOfRetrievalQuantity &js)
Returns if the array supports particulate derivatives.
const Numeric ELECTRON_CHARGE
bool do_temperature_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants the temperature derivative.
const Array< SpeciesRecord > species_data
Species Data.
ArrayOfMatrix abs_xsec_per_species(Workspace &ws) noexcept
void ReverseLines() noexcept
Reverses the order of the internal lines.
Index TotalNumberOfElements(const Array< Array< base > > &aa)
Determine total number of elements in an ArrayOfArray.
This file contains the definition of Array.
void abs_xsec_per_speciesAddLines(ArrayOfMatrix &abs_xsec_per_species, ArrayOfMatrix &src_xsec_per_species, ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, ArrayOfArrayOfMatrix &dsrc_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex &abs_species_active, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const EnergyLevelMap &abs_nlte, const Matrix &abs_vmrs, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const SpeciesAuxData &isotopologue_ratios, const SpeciesAuxData &partition_functions, const Index &lbl_checked, const Verbosity &)
WORKSPACE METHOD: abs_xsec_per_speciesAddLines.
Auxiliary data for isotopologues.
Numeric frequency_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the frequency perturbation if it exists.
Matrix abs_vmrs(Workspace &ws) noexcept
Matrix abs_coef(Workspace &ws) noexcept
Tensor7 propmat_clearsky_field(Workspace &ws) noexcept
Implementation of Matrix, Vector, and such stuff.
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 opt_prop_NScatElems(ArrayOfArrayOfTensor5 &ext_mat, ArrayOfArrayOfTensor4 &abs_vec, ArrayOfArrayOfIndex &ptypes, Matrix &t_ok, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &stokes_dim, const Vector &T_array, const Matrix &dir_array, const Index &f_index, const Index &t_interp_order)
Extinction and absorption from all scattering elements.
This can be used to make arrays out of anything.
A tag group can consist of the sum of several of these.
Numeric number_density(const Numeric &p, const Numeric &t)
number_density
Index nelem(const Lines &l)
Number of lines.
void set_vmr_from_first_species(Vector &vmr, const String &species_name, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs)
set_abs_from_first_species.
const Numeric SPEED_OF_LIGHT
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.
Declarations having to do with the four output streams.
void propmat_clearskyAddOnTheFly(Workspace &ws, ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfStokesVector &nlte_source, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, ArrayOfStokesVector &dnlte_dx_source, ArrayOfStokesVector &nlte_dsource_dx, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const EnergyLevelMap &rtp_nlte, const Vector &rtp_vmr, const Agenda &abs_xsec_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: propmat_clearskyAddOnTheFly.
EnergyLevelMap rtp_nlte(Workspace &ws) noexcept
void abs_xsec_agendaExecute(Workspace &ws, ArrayOfMatrix &abs_xsec_per_species, ArrayOfMatrix &src_xsec_per_species, ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, ArrayOfArrayOfMatrix &dsrc_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex &abs_species_active, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const EnergyLevelMap &abs_nlte, const Matrix &abs_vmrs, const Agenda &input_agenda)
ArrayOfIndex equivalent_propmattype_indexes(const ArrayOfRetrievalQuantity &js)
Returns a list of positions for the derivatives in Propagation Matrix calculations.
ArrayOfVector abs_cont_parameters(Workspace &ws) noexcept
ArrayOfStokesVector nlte_source(Workspace &ws) noexcept
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.
Tensor4 vmr_field(Workspace &ws) noexcept
This file contains declerations of functions of physical character.
void abs_xsec_per_speciesAddConts(ArrayOfMatrix &abs_xsec_per_species, ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &tgs, const ArrayOfRetrievalQuantity &jacobian_quantities, 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.
ArrayOfArrayOfSpeciesTag abs_species(Workspace &ws) noexcept
Array< PropagationMatrix > ArrayOfPropagationMatrix
Vector p_grid(Workspace &ws) noexcept
Scattering database structure and functions.
void find_xml_file(String &filename, const Verbosity &verbosity)
Find an xml file.
Routines for setting up the jacobian.
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.
Numeric dplanck_df(const Numeric &f, const Numeric &t)
dplanck_df
NUMERIC Numeric
The type to use for all floating point numbers.
void abs_cont_descriptionInit(ArrayOfString &abs_cont_names, ArrayOfString &abs_cont_options, ArrayOfVector &abs_cont_parameters, const Verbosity &verbosity)
WORKSPACE METHOD: abs_cont_descriptionInit.
int main(int argc, char **argv)
This is the main function of ARTS.
bool do_frequency_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants a frequency derivative.
Vector f_grid(Workspace &ws) noexcept
void partition_functionsInitFromBuiltin(SpeciesAuxData &partition_functions, const Verbosity &)
WORKSPACE METHOD: partition_functionsInitFromBuiltin.
ArrayOfMatrix src_coef_per_species(Workspace &ws) noexcept
Agenda abs_xsec_agenda(Workspace &ws) noexcept
Array< Matrix > ArrayOfMatrix
An array of matrices.
void abs_speciesSet(ArrayOfArrayOfSpeciesTag &abs_species, Index &abs_xsec_agenda_checked, Index &propmat_clearsky_agenda_checked, const ArrayOfString &names, const Verbosity &verbosity)
WORKSPACE METHOD: abs_speciesSet.
ArrayOfMatrix dabs_coef_dx(Workspace &ws) noexcept
ArrayOfArrayOfSingleScatteringData scat_data(Workspace &ws) noexcept
void resize(Index r, Index c)
Resize function.
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.
Type
Type of line shape to compute.
void abs_coefCalcFromXsec(Matrix &abs_coef, Matrix &src_coef, ArrayOfMatrix &dabs_coef_dx, ArrayOfMatrix &dsrc_coef_dx, ArrayOfMatrix &abs_coef_per_species, ArrayOfMatrix &src_coef_per_species, const ArrayOfMatrix &abs_xsec_per_species, const ArrayOfMatrix &src_xsec_per_species, const ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, const ArrayOfArrayOfMatrix &dsrc_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Matrix &abs_vmrs, const Vector &abs_p, const Vector &abs_t, const Verbosity &verbosity)
WORKSPACE METHOD: abs_coefCalcFromXsec.
This file contains header information for the dealing with command line parameters.
Workspace methods and template functions for supergeneric XML IO.
ArrayOfMatrix dsrc_coef_dx(Workspace &ws) noexcept
Numeric rtp_pressure(Workspace &ws) noexcept
bool supports_faraday(const ArrayOfRetrievalQuantity &js)
Returns if the array supports Faraday derivatives.
void nlte_sourceFromTemperatureAndSrcCoefPerSpecies(ArrayOfStokesVector &nlte_source, ArrayOfStokesVector &dnlte_dx_source, ArrayOfStokesVector &nlte_dsource_dx, const ArrayOfMatrix &src_coef_per_species, const ArrayOfMatrix &dsrc_coef_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &f_grid, const Numeric &rtp_temperature, const Verbosity &)
WORKSPACE METHOD: nlte_sourceFromTemperatureAndSrcCoefPerSpecies.
Index nrows(Workspace &ws) noexcept
Vector abs_t(Workspace &ws) noexcept
Index nlte_do(Workspace &ws) noexcept
Index scat_data_checked(Workspace &ws) noexcept
Array< StokesVector > ArrayOfStokesVector
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.
QuantumIdentifier::QType Isotopologue
Numeric planck(const Numeric &f, const Numeric &t)
planck
ArrayOfIndex abs_species_active(Workspace &ws) noexcept
const Numeric ELECTRON_MASS
ArrayOfAbsorptionLines abs_lines(Workspace &ws) noexcept
Index lbl_checked(Workspace &ws) noexcept
Numeric dnumber_density_dt(const Numeric &p, const Numeric &t)
dnumber_density_dT
void fillSpeciesAuxDataWithIsotopologueRatiosFromSpeciesData(SpeciesAuxData &sad)
Fill SpeciesAuxData with default isotopologue ratios from species data.
Index propmat_clearsky_agenda_checked(Workspace &ws) noexcept
ArrayOfPropagationMatrix dpropmat_clearsky_dx(Workspace &ws) noexcept
Numeric rtp_temperature(Workspace &ws) noexcept
void abs_xsec_per_speciesInit(ArrayOfMatrix &abs_xsec_per_species, ArrayOfMatrix &src_xsec_per_species, ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, ArrayOfArrayOfMatrix &dsrc_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &tgs, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex &abs_species_active, const Vector &f_grid, const Vector &abs_p, const Index &abs_xsec_agenda_checked, const Index &nlte_do, const Verbosity &verbosity)
WORKSPACE METHOD: abs_xsec_per_speciesInit.
bool do_magnetic_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants a magnetic derivative.
ArrayOfMatrix src_xsec_per_species(Workspace &ws) noexcept
void mirror_los(Vector &los_mirrored, ConstVectorView los, const Index &atmosphere_dim)
Determines the backward direction for a given line-of-sight.
Numeric dotprod_with_los(ConstVectorView los, const Numeric &u, const Numeric &v, const Numeric &w, const Index &atmosphere_dim)
Calculates the dot product between a field and a LOS.
void propmat_clearskyInit(ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfStokesVector &nlte_source, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, ArrayOfStokesVector &dnlte_dx_source, ArrayOfStokesVector &nlte_dsource_dx, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &f_grid, const Index &stokes_dim, const Index &propmat_clearsky_agenda_checked, const Index &nlte_do, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyInit.
Declaration of functions in rte.cc.
Tensor3 t_field(Workspace &ws) noexcept
VectorView Kjj(const Index iz=0, const Index ia=0)
Vector view to diagonal elements.
Matrix src_coef(Workspace &ws) noexcept
Index abs_xsec_agenda_checked(Workspace &ws) noexcept
SpeciesAuxData partition_functions(Workspace &ws) noexcept
SpeciesAuxData isotopologue_ratios(Workspace &ws) noexcept
This file contains basic functions to handle ASCII files.
ArrayOfString abs_cont_models(Workspace &ws) noexcept
bool supports_propmat_clearsky(const ArrayOfRetrievalQuantity &js)
Returns if the array supports propagation matrix derivatives.
Lines createEmptyCopy(const Lines &al) noexcept
Creates a copy of the input lines structure.
INDEX Index
The type to use for all integer numbers and indices.
Vector abs_p(Workspace &ws) noexcept
ArrayOfArrayOfMatrix dabs_xsec_per_species_dx(Workspace &ws) noexcept
ArrayOfStokesVector nlte_dsource_dx(Workspace &ws) noexcept
Index ncols(Workspace &ws) noexcept
void xsec_species(Matrix &xsec, Matrix &source, Matrix &phase, ArrayOfMatrix &dxsec_dx, ArrayOfMatrix &dsource_dx, ArrayOfMatrix &dphase_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex &jacobian_propmat_positions, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const EnergyLevelMap &abs_nlte, const Matrix &abs_vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const AbsorptionLines &band, const Numeric &isot_ratio, const SpeciesAuxData::AuxType &partfun_type, const ArrayOfGriddedField1 &partfun_data)
Cross-section algorithm.
bool is_frequency_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a frequency parameter in propagation matrix calculations.
ArrayOfPropagationMatrix propmat_clearsky(Workspace &ws) noexcept
ArrayOfString abs_cont_names(Workspace &ws) noexcept
void abs_lines_per_speciesCreateFromLines(ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfAbsorptionLines &abs_lines, const ArrayOfArrayOfSpeciesTag &tgs, const Verbosity &)
WORKSPACE METHOD: abs_lines_per_speciesCreateFromLines.
void nca_error(const int e, const String s)
Throws a runtime error for the given NetCDF error code.
void isotopologue_ratiosInitFromBuiltin(SpeciesAuxData &isotopologue_ratios, const Verbosity &)
WORKSPACE METHOD: isotopologue_ratiosInitFromBuiltin.
const Numeric * get_c_array() const
Conversion to plain C-array.
bool species_match(const RetrievalQuantity &rq, const ArrayOfSpeciesTag &ast)
Returns if the Retrieval quantity is VMR derivative for all the species in the species tags.
Index nelem() const
Number of elements.
StokesVector StokesVector
void propmat_clearskyZero(ArrayOfPropagationMatrix &propmat_clearsky, const Vector &f_grid, const Index &stokes_dim, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyZero.
The global header file for ARTS.
This file contains basic functions to handle XML data files.
EnergyLevelMap abs_nlte(Workspace &ws) noexcept