85 abs_t = rtp_temperature;
100 abs_lines_per_species.resize(tgs.
nelem());
104 for (
auto &tg : abs_lines_per_species)
111 if (lines.NumLines() == 0)
continue;
114 for (
Index i=0; i<tgs.
nelem() and lines.NumLines(); i++) {
115 for (
auto& this_tag: tgs[i]) {
117 if (not
same_or_joker(this_tag.Isotopologue(), lines.Isotopologue()))
121 if (this_tag.lower_freq >= 0 or this_tag.upper_freq >= 0) {
122 const Numeric low = (this_tag.lower_freq >= 0) ? this_tag.lower_freq : std::numeric_limits<Numeric>::lowest();
127 these_lines.
lines.resize(0);
128 for (
Index k=lines.NumLines()-1; k>=0; k--)
129 if (low <= lines.lines[k].F0 and upp >= lines.lines[k].F0)
135 abs_lines_per_species[i].push_back(these_lines);
139 if (lines.NumLines() == 0)
140 goto leave_inner_loop;
143 abs_lines_per_species[i].push_back(lines);
144 goto leave_inner_loop;
155 Index& propmat_clearsky_agenda_checked,
156 Index& abs_xsec_agenda_checked,
163 propmat_clearsky_agenda_checked =
false;
164 abs_xsec_agenda_checked =
false;
171 for (
Index i = 0; i <
Index(Species::Species::FINAL); ++i) {
172 const String specname = Species::toShortName(Species::Species(i));
174 String filename = basename;
175 if (basename.length() && basename[basename.length() - 1] !=
'/')
177 filename += specname;
182 included.push_back(specname);
186 }
catch (
const std::runtime_error& e) {
188 excluded.push_back(specname);
193 out2 <<
" Included Species (" << included.
nelem() <<
"):\n";
194 for (
Index i = 0; i < included.nelem(); ++i)
195 out2 <<
" " << included[i] <<
"\n";
197 out2 <<
" Excluded Species (" << excluded.
nelem() <<
"):\n";
199 out2 <<
" " << excluded[i] <<
"\n";
205 Index& propmat_clearsky_agenda_checked,
206 Index& abs_xsec_agenda_checked,
213 for (
Index i = 0; i <
Index(Species::Species::FINAL); ++i) {
214 if (Species::Species(i) not_eq Species::Species::Bath) {
215 specs.emplace_back(Species::toShortName(Species::Species(i)));
220 abs_speciesSet(abs_species, abs_xsec_agenda_checked, propmat_clearsky_agenda_checked, specs, verbosity);
229 const Index& atmosphere_dim,
236 "Atmospheric dimension must be 1D, but atmosphere_dim is ",
240 abs_t = t_field(
joker, 0, 0);
263 "Variable abs_vmrs must have compatible dimension to abs_xsec_per_species.\n"
264 "abs_vmrs.nrows() = ", abs_vmrs.
nrows(),
"\n"
265 "abs_xsec_per_species.nelem() = ", abs_xsec_per_species.
nelem())
271 "Variable abs_vmrs must have same numbers of altitudes as abs_xsec_per_species.\n"
272 "abs_vmrs.ncols() = ", abs_vmrs.
ncols(),
"\n"
273 "abs_xsec_per_species[0].ncols() = ", abs_xsec_per_species[0].ncols());
283 abs_coef.
resize(abs_xsec_per_species[0].nrows(),
284 abs_xsec_per_species[0].ncols());
287 dabs_coef_dx.resize(jacobian_quantities.
nelem());
289 for (
Index ii = 0; ii < jacobian_quantities.
nelem(); ii++) {
290 const auto& deriv = jacobian_quantities[ii];
292 if (not deriv.propmattype())
continue;
294 dabs_coef_dx[ii].resize(abs_xsec_per_species[0].nrows(),
295 abs_xsec_per_species[0].ncols());
296 dabs_coef_dx[ii] = 0.0;
299 abs_coef_per_species.resize(abs_xsec_per_species.
nelem());
302 <<
" Computing abs_coef and abs_coef_per_species from abs_xsec_per_species.\n";
304 for (
Index i = 0; i < abs_xsec_per_species.
nelem(); ++i) {
305 out3 <<
" Tag group " << i <<
"\n";
308 abs_coef_per_species[i].resize(abs_xsec_per_species[i].nrows(),
309 abs_xsec_per_species[i].ncols());
310 abs_coef_per_species[i] = 0;
313 for (
Index j = 0; j < abs_xsec_per_species[i].ncols(); j++) {
321 for (
Index k = 0; k < abs_xsec_per_species[i].nrows(); k++) {
322 abs_coef_per_species[i](k, j) =
323 abs_xsec_per_species[i](k, j) * n * abs_vmrs(i, j);
325 for (
Index iq = 0; iq < jacobian_quantities.
nelem(); iq++) {
326 const auto& deriv = jacobian_quantities[iq];
328 if (not deriv.propmattype())
continue;
331 dabs_coef_dx[iq](k, j) +=
332 (dabs_xsec_per_species_dx[i][iq](k, j) * n +
333 abs_xsec_per_species[i](k, j) * dn_dT) *
335 }
else if (deriv == Jacobian::Line::VMR) {
336 bool seco =
false,
main =
false;
337 for (
const auto& s : abs_species[i]) {
339 deriv, s.cia_2nd_species) or
340 s.type not_eq Species::TagType::Cia)
348 dabs_coef_dx[iq](k, j) +=
349 (dabs_xsec_per_species_dx[i][iq](k, j) * abs_vmrs(i, j) +
350 abs_xsec_per_species[i](k, j)) *
353 dabs_coef_dx[iq](k, j) += abs_xsec_per_species[i](k, j) * n;
355 dabs_coef_dx[iq](k, j) +=
356 dabs_xsec_per_species_dx[i][iq](k, j) * abs_vmrs(i, j) * n;
359 dabs_coef_dx[iq](k, j) += abs_xsec_per_species[i](k, j) * n;
361 dabs_coef_dx[iq](k, j) +=
362 dabs_xsec_per_species_dx[i][iq](k, j) * n * abs_vmrs(i, j);
369 abs_coef += abs_coef_per_species[i];
384 const Index& abs_xsec_agenda_checked,
389 "You must call *abs_xsec_agenda_checkedCalc* before calling this method.");
403 "abs_species_active (n=", abs_species_active.
nelem(),
404 ") not allowed to have more elements than abs_species (n=",
408 if (abs_xsec_per_species.
nelem() not_eq
ns) abs_xsec_per_species.resize(
ns);
409 if (dabs_xsec_per_species_dx.
nelem() not_eq
ns) dabs_xsec_per_species_dx.resize(
ns);
414 for (
auto& i: abs_species_active) {
416 "*abs_species_active* contains an invalid species index.\n"
417 "Species index must be between 0 and ",
ns - 1)
420 if (abs_xsec_per_species[i].nrows() == nf and abs_xsec_per_species[i].ncols() == np) {
421 abs_xsec_per_species[i] = 0.0;
423 abs_xsec_per_species[i] =
Matrix(nf, np, 0.0);
427 if (dabs_xsec_per_species_dx[i].
nelem() not_eq nq) {
430 for (
Index j=0; j<nq; j++) {
431 if (dabs_xsec_per_species_dx[i][j].nrows() == nf and dabs_xsec_per_species_dx[i][j].ncols() == np) {
432 dabs_xsec_per_species_dx[i][j] = 0.0;
434 dabs_xsec_per_species_dx[i][j] =
Matrix(nf, np, 0.0);
441 os <<
" Initialized abs_xsec_per_species.\n"
442 <<
" Number of frequencies : " << nf <<
"\n"
443 <<
" Number of pressure levels : " << np <<
"\n";
451 std::ostringstream os;
453 for (
Index i = 0; i < abs_cont_names.
nelem(); ++i)
454 os <<
"abs_xsec_per_speciesAddConts: " << i
455 <<
" name : " << abs_cont_names[i] <<
"\n";
457 for (
Index i = 0; i < abs_cont_parameters.
nelem(); ++i)
458 os <<
"abs_xsec_per_speciesAddConts: " << i
459 <<
" param: " << abs_cont_parameters[i] <<
"\n";
461 for (
Index i = 0; i < abs_cont_models.
nelem(); ++i)
462 os <<
"abs_xsec_per_speciesAddConts: " << i
463 <<
" option: " << abs_cont_models[i] <<
"\n";
465 os <<
"The following variables must have the same dimension:\n"
466 <<
"abs_cont_names: " << abs_cont_names.
nelem() <<
"\n"
467 <<
"abs_cont_parameters: " << abs_cont_parameters.
nelem();
492 Vector abs_h2o, abs_n2, abs_o2;
497 "The following variables must all have the same dimension:\n"
498 "tgs: ", tgs.
nelem(),
"\n"
499 "abs_xsec_per_species: ", abs_xsec_per_species.
nelem(),
"\n"
500 "abs_vmrs.nrows(): ", abs_vmrs.
nrows())
509 jacobian_quantities);
518 for (
Index iv = 0; iv < f_grid.
nelem(); iv++) dfreq[iv] = f_grid[iv] + df;
522 for (
Index it = 0; it < abs_t.
nelem(); it++) dabs_t[it] = abs_t[it] + dt;
525 Matrix jacs_df, jacs_dt, normal;
545 "Variable abs_t must have the same dimension as abs_p.\n"
546 "abs_t.nelem() = ", abs_t.
nelem(),
'\n',
547 "abs_p.nelem() = ", abs_p.
nelem())
550 "Variable dimension abs_vmrs.ncols() must\n"
551 "be the same as abs_p.nelem().\n"
552 "abs_vmrs.ncols() = ", abs_vmrs.
ncols(),
'\n',
553 "abs_p.nelem() = ", abs_p.
nelem())
558 out3 <<
" Calculating continuum spectra.\n";
561 for (
Index ii = 0; ii < abs_species_active.
nelem(); ++ii) {
562 const Index i = abs_species_active[ii];
569 if (tgs[i][s].Type() == Species::TagType::PredefinedLegacy) {
574 const String name = tgs[i][s].Isotopologue().FullName();
580 find(abs_cont_names.begin(), abs_cont_names.end(), name) -
581 abs_cont_names.begin();
586 "Cannot find model ", name,
" in abs_cont_names.")
591 if (out3.sufficient_priority()) {
593 os <<
" Adding " << name <<
" to tag group " << i <<
".\n";
599 const String ContOption = abs_cont_models[n];
628 abs_cont_parameters[n],
641 for (
Index iv = 0; iv < f_grid.
nelem(); iv++) {
642 for (
Index ip = 0; ip < abs_p.
nelem(); ip++) {
643 if (do_freq_jac) jacs_df(iv, ip) = 0.0;
644 if (do_temp_jac) jacs_dt(iv, ip) = 0.0;
645 normal(iv, ip) = 0.0;
652 abs_cont_parameters[n],
667 abs_cont_parameters[n],
682 abs_cont_parameters[n],
692 for (
Index iv = 0; iv < f_grid.
nelem(); iv++) {
693 for (
Index ip = 0; ip < abs_p.
nelem(); ip++) {
694 abs_xsec_per_species[i](iv, ip) += normal(iv, ip);
695 for (
Index iq = 0; iq < jacobian_quantities.
nelem();
697 const auto& deriv = jacobian_quantities[iq];
699 if (not deriv.propmattype())
continue;
702 dabs_xsec_per_species_dx[i][iq](iv, ip) +=
703 (jacs_df(iv, ip) - normal(iv, ip)) * (1. / df);
705 dabs_xsec_per_species_dx[i][iq](iv, ip) +=
706 (jacs_dt(iv, ip) - normal(iv, ip)) * (1. / dt);
730 abs_cont_names.resize(0);
731 abs_cont_options.resize(0);
732 abs_cont_parameters.resize(0);
733 out2 <<
" Initialized abs_cont_names \n"
735 " abs_cont_parameters.\n";
746 const Vector& userparameters,
756 abs_cont_names.push_back(tagname);
757 abs_cont_models.push_back(model);
758 abs_cont_parameters.push_back(userparameters);
770 const Numeric& rtp_temperature,
777 Index n_species = src_coef_per_species.
nelem();
780 "Must have at least one species.")
782 Index n_f = src_coef_per_species[0].nrows();
786 "Must have exactly one pressure.")
790 "Frequency dimension of nlte_source does not\n"
791 "match abs_coef_per_species.")
796 for (
Index si = 0; si < n_species; ++si) {
797 sv.
Kjj() = src_coef_per_species[si](
joker, 0);
799 nlte_source.
Kjj() += sv.Kjj();
803 for (
Index ii = 0; ii < jacobian_quantities.
nelem(); ii++) {
804 const auto& deriv = jacobian_quantities[ii];
806 if (not deriv.propmattype())
continue;
811 for (
Index si = 0; si < n_species; ++si) {
812 sv.
Kjj() = src_coef_per_species[si](
joker, 0);
814 dnlte_source_dx[ii].Kjj() += sv.Kjj();
817 sv.
Kjj() = dsrc_coef_dx[ii](
joker, 0);
819 dnlte_source_dx[ii].Kjj() += sv.Kjj();
823 for (
Index si = 0; si < n_species; ++si) {
824 sv.
Kjj() = src_coef_per_species[si](
joker, 0);
826 dnlte_source_dx[ii].Kjj() += sv.Kjj();
829 sv.
Kjj() = dsrc_coef_dx[ii](
joker, 0);
831 dnlte_source_dx[ii].Kjj() += sv.Kjj();
833 sv.
Kjj() = dsrc_coef_dx[ii](
joker, 0);
835 dnlte_source_dx[ii].Kjj() += sv.Kjj();
852 Index n_species = abs_coef_per_species.
nelem();
856 "Must have at least one species.")
858 Index n_f = abs_coef_per_species[0].nrows();
862 "Must have exactly one pressure.")
866 "Frequency dimension of propmat_clearsky does not\n"
867 "match abs_coef_per_species.")
870 "Must have the same dimension.")
873 for (
Index si = 0; si < n_species; ++si)
874 propmat_clearsky.
Kjj() += abs_coef_per_species[si](
joker, 0);
876 for (
Index iqn = 0; iqn < n_jacs; iqn++) {
877 if (dabs_coef_dx[iqn].nrows() == n_f) {
878 ARTS_USER_ERROR_IF(dabs_coef_dx[iqn].ncols() not_eq 1,
"Must have exactly one pressure.")
879 dpropmat_clearsky_dx[iqn].Kjj() += dabs_coef_dx[iqn](
joker, 0);
893 const Index& stokes_dim,
894 const Index& propmat_clearsky_agenda_checked,
900 "You must call *propmat_clearsky_agenda_checkedCalc* before calling this method.")
904 ARTS_USER_ERROR_IF (stokes_dim < 1 or stokes_dim > 4,
"stokes_dim not in [1, 2, 3, 4]");
914 if (dpropmat_clearsky_dx.
nelem() not_eq nq) {
917 for (
auto& pm: dpropmat_clearsky_dx) {
918 if (pm.StokesDimensions() == stokes_dim and pm.NumberOfFrequencies() == nf) {
934 if (dnlte_source_dx.
nelem() not_eq nq) {
937 for (
auto& pm: dnlte_source_dx) {
938 if (pm.StokesDimensions() == stokes_dim and pm.NumberOfFrequencies() == nf) {
951 const Index& stokes_dim,
952 const Index& atmosphere_dim,
968 "To include Faraday rotation, stokes_dim >= 3 is required.")
970 "For applying propmat_clearskyAddFaraday, los needs to be specified\n"
971 "(at least zenith angle component for atmosphere_dim==1),\n"
974 "For applying propmat_clearskyAddFaraday, los needs to be specified\n"
975 "(both zenith and azimuth angle components for atmosphere_dim>1),\n"
982 for (
Index sp = 0; sp < abs_species.
nelem() && ife < 0; sp++) {
983 if (abs_species[sp].FreeElectrons()) {
989 "Free electrons not found in *abs_species* and "
990 "Faraday rotation can not be calculated.");
992 const Numeric ne = rtp_vmr[ife];
994 if (ne != 0 && (rtp_mag[0] != 0 || rtp_mag[1] != 0 || rtp_mag[2] != 0)) {
999 rtp_los, rtp_mag[0], rtp_mag[1], rtp_mag[2], atmosphere_dim);
1001 Numeric dc1_u = 0.0, dc1_v = 0.0, dc1_w = 0.0;
1003 dc1_u = (2 * FRconst *
1011 dc1_v = (2 * FRconst *
1019 dc1_w = (2 * FRconst *
1029 for (
Index iv = 0; iv < f_grid.
nelem(); iv++) {
1030 const Numeric f2 = f_grid[iv] * f_grid[iv];
1031 const Numeric r = ne * c1 / f2;
1035 for (
Index iq = 0; iq < jacobian_quantities.
nelem(); iq++) {
1037 dpropmat_clearsky_dx[iq].AddFaraday(-2.0 * ne * r / f_grid[iv], iv);
1039 dpropmat_clearsky_dx[iq].AddFaraday(ne * dc1_u / f2, iv);
1041 dpropmat_clearsky_dx[iq].AddFaraday(ne * dc1_v / f2, iv);
1043 dpropmat_clearsky_dx[iq].AddFaraday(ne * dc1_w / f2, iv);
1045 dpropmat_clearsky_dx[iq].AddFaraday(r, iv);
1046 else if (jacobian_quantities[iq] == abs_species[ife])
1047 dpropmat_clearsky_dx[iq].AddFaraday(r, iv);
1059 const Index& stokes_dim,
1060 const Index& atmosphere_dim,
1066 const Numeric& rtp_temperature,
1068 const Index& scat_data_checked,
1069 const Index& use_abs_as_ext,
1082 "The scat_data must be flagged to have "
1083 "passed a consistency check (scat_data_checked=1).")
1087 for (
Index sp = 0; sp < abs_species.
nelem(); sp++) {
1088 if (abs_species[sp].Particles()) {
1094 "For applying propmat_clearskyAddParticles, *abs_species* needs to"
1095 "contain species 'particles', but it does not.\n")
1098 "Number of 'particles' entries in abs_species and of elements in\n"
1099 "*scat_data* needs to be identical. But you have " , np,
1100 " 'particles' entries\n"
1101 "and ",
ns,
" *scat_data* elements.\n")
1104 "For applying *propmat_clearskyAddParticles*, *rtp_los* needs to be specified\n"
1105 "(at least zenith angle component for atmosphere_dim==1),\n"
1108 "For applying *propmat_clearskyAddParticles*, *rtp_los* needs to be specified\n"
1109 "(both zenith and azimuth angle components for atmosphere_dim>1),\n"
1122 mirror_los(rtp_los_back, rtp_los, atmosphere_dim);
1128 if (do_jac_frequencies) {
1129 out1 <<
"WARNING:\n"
1130 <<
"Frequency perturbation not available for absorbing particles.\n";
1141 if (do_jac_temperature) {
1143 T_array = rtp_temperature;
1147 T_array = rtp_temperature;
1150 dir_array(0,
joker) = rtp_los_back;
1163 const Index nf = abs_vec_Nse[0][0].nbooks();
1164 Tensor3 tmp(nf, stokes_dim, stokes_dim);
1172 Index i_se_flat = 0;
1173 for (
Index i_ss = 0; i_ss < scat_data.
nelem(); i_ss++) {
1174 for (
Index i_se = 0; i_se < scat_data[i_ss].
nelem(); i_se++) {
1176 while (sp < na && not abs_species[sp].Particles())
1184 "Negative absorbing particle 'vmr' (aka number density)"
1186 "scat species #", i_ss,
", scat elem #", i_se,
1187 " (vmr_field entry #", sp,
")\n")
1189 if (rtp_vmr[sp] > 0.) {
1191 "Temperature interpolation error:\n"
1192 "scat species #", i_ss,
", scat elem #", i_se,
"\n")
1193 if (use_abs_as_ext) {
1195 for (
Index iv = 0; iv < f_grid.
nelem(); iv++)
1197 abs_vec_Nse[i_ss][i_se](iv, 0, 0,
joker), iv);
1199 for (
Index iv = 0; iv < f_grid.
nelem(); iv++)
1201 abs_vec_Nse[i_ss][i_se](0, 0, 0,
joker), iv);
1204 for (
Index iv = 0; iv < f_grid.
nelem(); iv++)
1206 ext_mat_Nse[i_ss][i_se](iv, 0, 0,
joker,
joker), iv);
1208 for (
Index iv = 0; iv < f_grid.
nelem(); iv++)
1210 ext_mat_Nse[i_ss][i_se](0, 0, 0,
joker,
joker), iv);
1212 propmat_clearsky += rtp_vmr[sp] * internal_propmat;
1216 if (do_jac_temperature) {
1218 "Temperature interpolation error (in perturbation):\n"
1219 "scat species #", i_ss,
", scat elem #", i_se,
"\n")
1223 if (jacobian_quantities.
nelem()) rtp_vmr_sum += rtp_vmr[sp];
1225 for (
Index iq = 0; iq < jacobian_quantities.
nelem(); iq++) {
1226 const auto& deriv = jacobian_quantities[iq];
1228 if (not deriv.propmattype())
continue;
1231 if (use_abs_as_ext) {
1245 for (
Index iv = 0; iv < f_grid.
nelem(); iv++)
1247 dpropmat_clearsky_dx[iq].AddAbsorptionVectorAtPosition(
1248 tmp(iv,
joker, 0), iv);
1250 dpropmat_clearsky_dx[iq].AddAtPosition(tmp(iv,
joker,
joker),
1253 for (
Index iv = 0; iv < f_grid.
nelem(); iv++)
1255 dpropmat_clearsky_dx[iq].AddAbsorptionVectorAtPosition(
1256 tmp(0,
joker, 0), iv);
1258 dpropmat_clearsky_dx[iq].AddAtPosition(tmp(0,
joker,
joker),
1262 else if (deriv == Jacobian::Atm::Particulates) {
1263 for (
Index iv = 0; iv < f_grid.
nelem(); iv++)
1264 dpropmat_clearsky_dx[iq].AddAtPosition(internal_propmat, iv);
1267 else if (deriv == abs_species[sp]) {
1268 dpropmat_clearsky_dx[iq] += internal_propmat;
1280 ARTS_ASSERT(abs_species[sp][0].Type() != Species::TagType::Particles);
1284 if (rtp_vmr_sum != 0.0) {
1285 for (
Index iq = 0; iq < jacobian_quantities.
nelem(); iq++) {
1286 const auto& deriv = jacobian_quantities[iq];
1288 if (not deriv.propmattype())
continue;
1290 if (deriv == Jacobian::Atm::Particulates) {
1291 dpropmat_clearsky_dx[iq] /= rtp_vmr_sum;
1301 const String& speedup_option,
1306 if (not f_grid.
nelem()) {
1311 switch (Options::toLblSpeedupOrThrow(speedup_option)) {
1312 case Options::LblSpeedup::LinearIndependent:
1316 case Options::LblSpeedup::QuadraticIndependent:
1319 case Options::LblSpeedup::None:
1322 case Options::LblSpeedup::FINAL: { }
1328 const String& speedup_option,
1334 return sparse_f_grid;
1351 const Numeric& rtp_temperature,
1354 const Index& nlte_do,
1355 const Index& lbl_checked,
1359 const String& speedup_option,
1361 const Index& robust,
1367 const Index nq = jacobian_quantities.
nelem();
1374 "*rtp_vmr* must match *abs_species*")
1376 "*f_grid* must match *propmat_clearsky*")
1378 "*f_grid* must match *nlte_source*")
1380 "*dpropmat_clearsky_dx* must match derived form of *jacobian_quantities*")
1382 "*dpropmat_clearsky_dx* must have frequency dim same as *f_grid*")
1384 "*dnlte_source_dx* must match derived form of *jacobian_quantities* when non-LTE is on")
1386 "*dnlte_source_dx* must have frequency dim same as *f_grid* when non-LTE is on")
1394 "If sparse grids are to be used, the limit must be larger than the grid-spacing.\n"
1395 "The limit is ", sparse_lim,
" Hz and the grid_spacing is ", sparse_df,
" Hz")
1401 const Options::LblSpeedup speedup_type = f_grid_sparse.
nelem() ? Options::toLblSpeedupOrThrow(speedup_option) : Options::LblSpeedup::None;
1402 ARTS_USER_ERROR_IF(sparse_lim <= 0 and speedup_type not_eq Options::LblSpeedup::None,
1403 "Must have a sparse limit if you set speedup_option")
1409 for (
Index ispecies = 0; ispecies <
ns; ispecies++) {
1410 if (select_speciestags.
nelem() and select_speciestags not_eq abs_species[ispecies])
continue;
1413 if (not abs_species[ispecies].
nelem() or abs_species[ispecies].
Zeeman() or not abs_lines_per_species[ispecies].
nelem())
1416 for (
auto& band : abs_lines_per_species[ispecies]) {
1417 LineShape::compute(com, sparse_com, band, jacobian_quantities, rtp_nlte, band.BroadeningSpeciesVMR(rtp_vmr, abs_species), abs_species[ispecies], rtp_vmr[ispecies],
1424 switch (speedup_type) {
1425 case Options::LblSpeedup::LinearIndependent: com.
interp_add_even(sparse_com);
break;
1427 case Options::LblSpeedup::None:
break;
1428 case Options::LblSpeedup::FINAL: { }
1432 propmat_clearsky.
Kjj() += com.
F.
real();
1435 for (
Index j=0; j<nq; j++) {
1436 if (not jacobian_quantities[j].propmattype())
continue;
1437 dpropmat_clearsky_dx[j].Kjj() += com.
dF.
real()(
joker, j);
1445 for (
Index j=0; j<nq; j++) {
1446 if (not jacobian_quantities[j].propmattype())
continue;
1447 dnlte_source_dx[j].Kjj() += com.
dN.
real()(
joker, j);
1463 const Numeric& rtp_temperature,
1465 const Agenda& abs_xsec_agenda,
1493 for (
Index i = 0; i < abs_species.
nelem(); ++i) abs_species_active[i] = i;
1497 abs_xsec_per_species,
1498 dabs_xsec_per_species_dx,
1500 jacobian_quantities,
1511 abs_coef_per_species,
1512 abs_xsec_per_species,
1513 dabs_xsec_per_species_dx,
1515 jacobian_quantities,
1523 dpropmat_clearsky_dx,
1524 abs_coef_per_species,
1531 const Index& stokes_dim,
1540 if (propmat_clearsky.
Kjj()[i] < 0.0) propmat_clearsky.
SetAtPosition(0.0, i);
1561 const Tensor7& propmat_clearsky_field,
1562 const Index& atmosphere_dim,
1567 int nlev_dimid, nlyr_dimid, nwvl_dimid, stokes_dimid, none_dimid;
1569 int wvlmin_varid, wvlmax_varid, z_varid, wvl_varid, tau_varid;
1572 "WriteMolTau can only be used for atmosphere_dim=1")
1574#pragma omp critical(netcdf__critical_region)
1577 if ((retval = nc_create(filename.c_str(), NC_CLOBBER, &ncid)))
1581 if ((retval = nc_def_dim(ncid,
"nlev", (
int)z_field.
npages(), &nlev_dimid)))
1585 nc_def_dim(ncid,
"nlyr", (
int)z_field.
npages() - 1, &nlyr_dimid)))
1588 if ((retval = nc_def_dim(ncid,
"nwvl", (
int)f_grid.
nelem(), &nwvl_dimid)))
1591 if ((retval = nc_def_dim(ncid,
"none", 1, &none_dimid)))
1594 if ((retval = nc_def_dim(ncid,
1596 (
int)propmat_clearsky_field.
nbooks(),
1601 if ((retval = nc_def_var(
1602 ncid,
"wvlmin", NC_DOUBLE, 1, &none_dimid, &wvlmin_varid)))
1605 if ((retval = nc_def_var(
1606 ncid,
"wvlmax", NC_DOUBLE, 1, &none_dimid, &wvlmax_varid)))
1609 if ((retval = nc_def_var(ncid,
"z", NC_DOUBLE, 1, &nlev_dimid, &z_varid)))
1613 nc_def_var(ncid,
"wvl", NC_DOUBLE, 1, &nwvl_dimid, &wvl_varid)))
1616 dimids[0] = nlyr_dimid;
1617 dimids[1] = nwvl_dimid;
1618 dimids[2] = stokes_dimid;
1619 dimids[3] = stokes_dimid;
1622 nc_def_var(ncid,
"tau", NC_DOUBLE, 4, &dimids[0], &tau_varid)))
1626 if ((retval = nc_put_att_text(ncid, wvlmin_varid,
"units", 2,
"nm")))
1629 if ((retval = nc_put_att_text(ncid, wvlmax_varid,
"units", 2,
"nm")))
1632 if ((retval = nc_put_att_text(ncid, z_varid,
"units", 2,
"km")))
1635 if ((retval = nc_put_att_text(ncid, wvl_varid,
"units", 2,
"nm")))
1638 if ((retval = nc_put_att_text(ncid, tau_varid,
"units", 1,
"-")))
1643 if ((retval = nc_enddef(ncid)))
nca_error(retval,
"nc_enddef");
1648 if ((retval = nc_put_var_double(ncid, wvlmin_varid, &wvlmin[0])))
1653 if ((retval = nc_put_var_double(ncid, wvlmax_varid, &wvlmax[0])))
1656 double z[z_field.
npages()];
1657 for (
int iz = 0; iz < z_field.
npages(); iz++)
1658 z[iz] = z_field(z_field.
npages() - 1 - iz, 0, 0) * 1e-3;
1660 if ((retval = nc_put_var_double(ncid, z_varid, &z[0])))
1663 double wvl[f_grid.
nelem()];
1664 for (
int iv = 0; iv < f_grid.
nelem(); iv++)
1667 if ((retval = nc_put_var_double(ncid, wvl_varid, &wvl[0])))
1672 const Index amfnb = propmat_clearsky_field.
nbooks();
1674 Tensor4 tau(zfnp, fgne, amfnb, amfnb, 0.);
1677 for (
int is = 0; is < propmat_clearsky_field.
nlibraries(); is++)
1678 for (
int iz = 0; iz < zfnp; iz++)
1679 for (
int iv = 0; iv < fgne; iv++)
1680 for (
int is1 = 0; is1 < amfnb; is1++)
1681 for (
int is2 = 0; is2 < amfnb; is2++)
1683 tau(iz, iv, is1, is2) +=
1685 (propmat_clearsky_field(is,
1686 f_grid.
nelem() - 1 - iv,
1689 z_field.
npages() - 1 - iz,
1692 propmat_clearsky_field(is,
1693 f_grid.
nelem() - 1 - iv,
1696 z_field.
npages() - 2 - iz,
1699 (z_field(z_field.
npages() - 1 - iz, 0, 0) -
1700 z_field(z_field.
npages() - 2 - iz, 0, 0));
1702 if ((retval = nc_put_var_double(ncid, tau_varid, tau.
get_c_array())))
1706 if ((retval = nc_close(ncid)))
nca_error(retval,
"nc_close");
1721 "The workspace method WriteMolTau is not available"
1722 "because ARTS was compiled without NetCDF support.");
1742 const Index& lbl_checked,
1745 "abs_xsec_per_speciesAddLines",
1747 "This function is no longer up to date. It only exists to satisfy "
1748 "lookup table calculations before these are updated.\n"
1749 "Once the lookup table calculations are up-to-date, this function "
1750 "is fully replaced with propmat_clearskyAddLines, with better functionality\n")
1754 jacobian_quantities.
nelem(),
1755 "There's a hard deprecation of derivatives using old style lbl-calculations "
1756 "with derivatives, switch to propmat_clearskyAddLines")
1758 abs_species.
nelem() not_eq abs_xsec_per_species.
nelem() or
1759 abs_species.
nelem() not_eq abs_vmrs.
nrows() or
1760 abs_species.
nelem() not_eq abs_lines_per_species.
nelem(),
1761 "The following variables must all have the same dimension:\n"
1763 abs_species.
nelem(),
1765 "abs_xsec_per_species: ",
1766 abs_xsec_per_species.
nelem(),
1771 "abs_lines_per_species: ",
1772 abs_lines_per_species.
nelem(),
1776 "Temperature must be at least 0 K. But you request an absorption\n"
1786 constexpr Options::LblSpeedup speedup_type = Options::LblSpeedup::None;
1789#pragma omp parallel for if (!arts_omp_in_parallel()) collapse(2) \
1791 for (
Index ip = 0; ip < np; ip++) {
1792 for (
Index is = 0; is <
ns; is++) {
1794 if (not abs_species[abs_species_active[is]].
nelem() or
1795 abs_species[abs_species_active[is]].
Zeeman() or
1796 not abs_lines_per_species[abs_species_active[is]].
nelem())
1801 f_grid, jacobian_quantities,
false);
1803 Vector(0), jacobian_quantities,
false);
1805 for (
auto& band : abs_lines_per_species[abs_species_active[is]]) {
1810 jacobian_quantities,
1812 band.BroadeningSpeciesVMR(abs_vmrs(
joker, ip), abs_species),
1813 abs_species[abs_species_active[is]],
1814 abs_vmrs(abs_species_active[is], ip),
1827 abs_vmrs(abs_species_active[is], ip);
1828 abs_xsec_per_species[abs_species_active[is]](
joker, ip) += com.
F.
real();
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.
Declarations required for the calculation of absorption coefficients.
This file contains the definition of Array.
Array< Matrix > ArrayOfMatrix
An array of matrices.
Index TotalNumberOfElements(const Array< Array< base > > &aa)
Determine total number of elements in an ArrayOfArray.
The global header file for ARTS.
int main(int argc, char **argv)
void abs_xsec_agendaExecute(Workspace &ws, ArrayOfMatrix &abs_xsec_per_species, ArrayOfArrayOfMatrix &dabs_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 Matrix &abs_vmrs, const Agenda &input_agenda)
This can be used to make arrays out of anything.
Index nelem() const ARTS_NOEXCEPT
Number of elements.
MatrixView real()
Get a view of the real part of the matrix.
VectorView real()
Get a view of the real part of the vector.
Index nrows() const noexcept
Index ncols() const noexcept
Index npages() const
Returns the number of pages.
Index nlibraries() const noexcept
Index nbooks() const noexcept
Index nelem() const noexcept
Returns the number of elements.
void resize(Index r, Index c)
Resize function.
void AddAbsorptionVectorAtPosition(const ConstVectorView &x, const Index iv=0, const Index iz=0, const Index ia=0)
Adds as a Stokes vector at position.
Index NumberOfFrequencies() const
The number of frequencies of the propagation matrix.
VectorView Kjj(const Index iz=0, const Index ia=0)
Vector view to diagonal elements.
void SetZero()
Sets all data to zero.
Index StokesDimensions() const
The stokes dimension of the propagation matrix.
void AddFaraday(const Numeric &rot, const Index iv=0, const Index iz=0, const Index ia=0)
Adds the Faraday rotation to the PropagationMatrix at required position.
void SetAtPosition(const PropagationMatrix &x, const Index iv=0, const Index iz=0, const Index ia=0)
Set the At Position object.
Stokes vector is as Propagation matrix but only has 4 possible values.
const Numeric * get_c_array() const ARTS_NOEXCEPT
Conversion to plain C-array.
void resize(Index n)
Resize function.
#define ARTS_ASSERT(condition,...)
#define ARTS_USER_ERROR_IF(condition,...)
#define DEPRECATED_FUNCTION(FUNCTION_NAME, DATE_STRING_OR_SILLY_REASON,...)
void find_xml_file(String &filename, const Verbosity &verbosity)
Find an xml file.
This file contains basic functions to handle ASCII files.
bool species_iso_match(const RetrievalQuantity &rq, const Species::IsotopeRecord &ir)
Returns if the Retrieval quantity is VMR derivative for all the species in the species tags.
bool do_frequency_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants a frequency derivative.
bool supports_continuum(const ArrayOfRetrievalQuantity &js)
Returns if the array supports continuum derivatives.
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.
bool do_magnetic_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants a magnetic derivative.
bool do_temperature_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants the temperature derivative.
Numeric magnetic_field_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the magnetic field perturbation if it exists.
bool is_frequency_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a frequency parameter in propagation matrix calculations.
Numeric temperature_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the temperature perturbation if it exists.
Numeric frequency_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the frequency perturbation if it exists.
Routines for setting up the jacobian.
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 check_continuum_model(const String &name)
An auxiliary functions that checks if a given continuum model is listed in Species::Isotopologues.
bool is_increasing(ConstVectorView x)
Checks if a vector is sorted and strictly increasing.
const Numeric ELECTRON_CHARGE
void sparse_f_gridFromFrequencyGrid(Vector &sparse_f_grid, const Vector &f_grid, const Numeric &sparse_df, const String &speedup_option, const Verbosity &)
WORKSPACE METHOD: sparse_f_gridFromFrequencyGrid.
void isotopologue_ratiosInitFromHitran(SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &)
WORKSPACE METHOD: isotopologue_ratiosInitFromHitran.
void abs_xsec_per_speciesInit(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 Index &abs_xsec_agenda_checked, const Verbosity &verbosity)
WORKSPACE METHOD: abs_xsec_per_speciesInit.
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.
void abs_speciesDefineAll(ArrayOfArrayOfSpeciesTag &abs_species, Index &propmat_clearsky_agenda_checked, Index &abs_xsec_agenda_checked, const Verbosity &verbosity)
WORKSPACE METHOD: abs_speciesDefineAll.
Vector create_sparse_f_grid_internal(const Vector &f_grid, const Numeric &sparse_df, const String &speedup_option, const Verbosity &verbosity)
void propmat_clearskyInit(PropagationMatrix &propmat_clearsky, StokesVector &nlte_source, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, ArrayOfStokesVector &dnlte_source_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &f_grid, const Index &stokes_dim, const Index &propmat_clearsky_agenda_checked, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyInit.
void nlte_sourceFromTemperatureAndSrcCoefPerSpecies(StokesVector &nlte_source, ArrayOfStokesVector &dnlte_source_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 &)
void propmat_clearskyAddXsecAgenda(Workspace &ws, PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const Agenda &abs_xsec_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: propmat_clearskyAddXsecAgenda.
void abs_coefCalcFromXsec(Matrix &abs_coef, ArrayOfMatrix &dabs_coef_dx, ArrayOfMatrix &abs_coef_per_species, const ArrayOfMatrix &abs_xsec_per_species, const ArrayOfArrayOfMatrix &dabs_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)
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.
String continua_model_error_message(const ArrayOfString &abs_cont_names, const ArrayOfVector &abs_cont_parameters, const ArrayOfString &abs_cont_models)
void abs_cont_descriptionInit(ArrayOfString &abs_cont_names, ArrayOfString &abs_cont_options, ArrayOfVector &abs_cont_parameters, const Verbosity &verbosity)
WORKSPACE METHOD: abs_cont_descriptionInit.
const Numeric VACUUM_PERMITTIVITY
void propmat_clearskyAddFromAbsCoefPerSpecies(PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const ArrayOfMatrix &abs_coef_per_species, const ArrayOfMatrix &dabs_coef_dx)
const Numeric ELECTRON_MASS
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 &)
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.
void abs_xsec_per_speciesAddLines(ArrayOfMatrix &abs_xsec_per_species, ArrayOfArrayOfMatrix &, 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 Matrix &abs_vmrs, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const SpeciesIsotopologueRatios &isotopologue_ratios, const Index &lbl_checked, const Verbosity &)
WORKSPACE METHOD: abs_xsec_per_speciesAddLines.
void propmat_clearskyForceNegativeToZero(PropagationMatrix &propmat_clearsky, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyForceNegativeToZero.
void propmat_clearskyAddLines(PropagationMatrix &propmat_clearsky, StokesVector &nlte_source, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, ArrayOfStokesVector &dnlte_source_dx, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const SpeciesIsotopologueRatios &isotopologue_ratios, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const EnergyLevelMap &rtp_nlte, const Vector &rtp_vmr, const Index &nlte_do, const Index &lbl_checked, const Numeric &sparse_df, const Numeric &sparse_lim, const String &speedup_option, const ArrayOfSpeciesTag &select_speciestags, const Index &robust, const Verbosity &verbosity)
WORKSPACE METHOD: propmat_clearskyAddLines.
void propmat_clearskyAddParticles(PropagationMatrix &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.
void propmat_clearskyZero(PropagationMatrix &propmat_clearsky, const Vector &f_grid, const Index &stokes_dim, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyZero.
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 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 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 isotopologue_ratiosInitFromBuiltin(SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &)
WORKSPACE METHOD: isotopologue_ratiosInitFromBuiltin.
void propmat_clearskyAddFaraday(PropagationMatrix &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.
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.
Workspace methods and template functions for supergeneric XML IO.
constexpr bool any_negative(const MatpackType &var) noexcept
Checks for negative values.
Implementation of Matrix, Vector, and such stuff.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
Declarations having to do with the four output streams.
Index nelem(const Lines &l)
Number of lines.
SpeciesIsotopologueRatios isotopologue_ratios()
Particulates ENUMCLASS(Line, char, VMR, Strength, Center, ShapeG0X0, ShapeG0X1, ShapeG0X2, ShapeG0X3, ShapeD0X0, ShapeD0X1, ShapeD0X2, ShapeD0X3, ShapeG2X0, ShapeG2X1, ShapeG2X2, ShapeG2X3, ShapeD2X0, ShapeD2X1, ShapeD2X2, ShapeD2X3, ShapeFVCX0, ShapeFVCX1, ShapeFVCX2, ShapeFVCX3, ShapeETAX0, ShapeETAX1, ShapeETAX2, ShapeETAX3, ShapeYX0, ShapeYX1, ShapeYX2, ShapeYX3, ShapeGX0, ShapeGX1, ShapeGX2, ShapeGX3, ShapeDVX0, ShapeDVX1, ShapeDVX2, ShapeDVX3, ECS_SCALINGX0, ECS_SCALINGX1, ECS_SCALINGX2, ECS_SCALINGX3, ECS_BETAX0, ECS_BETAX1, ECS_BETAX2, ECS_BETAX3, ECS_LAMBDAX0, ECS_LAMBDAX1, ECS_LAMBDAX2, ECS_LAMBDAX3, ECS_DCX0, ECS_DCX1, ECS_DCX2, ECS_DCX3, NLTE) static_assert(Index(Line ArrayOfSpeciesTagVMR
void compute(ComputeData &com, ComputeData &sparse_com, const AbsorptionLines &band, const ArrayOfRetrievalQuantity &jacobian_quantities, const EnergyLevelMap &nlte, const Vector &vmrs, const ArrayOfSpeciesTag &self_tag, const Numeric &self_vmr, const Numeric &isot_ratio, const Numeric &P, const Numeric &T, const Numeric &H, const Numeric &sparse_lim, const Zeeman::Polarization zeeman_polarization, const Options::LblSpeedup speedup_type, const bool robust) ARTS_NOEXCEPT
Compute the absorption of an absorption band.
bool good_linear_sparse_f_grid(const Vector &f_grid_dense, const Vector &f_grid_sparse) noexcept
Vector triple_sparse_f_grid(const Vector &f_grid, const Numeric &sparse_df) noexcept
Vector linear_sparse_f_grid(const Vector &f_grid, const Numeric &sparse_df) ARTS_NOEXCEPT
constexpr bool same_or_joker(const IsotopeRecord &ir1, const IsotopeRecord &ir2) noexcept
constexpr IsotopologueRatios isotopologue_ratiosInitFromBuiltin()
Implements Zeeman modeling.
invlib::Matrix< ArtsMatrix > Matrix
invlib wrapper type for ARTS matrices.
invlib::Vector< ArtsVector > Vector
invlib wrapper type for ARTS vectors.
void nca_error(const int e, const String s)
Throws a runtime error for the given NetCDF error code.
This file contains basic functions to handle NetCDF data files.
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.
Scattering database structure and functions.
This file contains header information for the dealing with command line parameters.
Numeric dplanck_df(const Numeric &f, const Numeric &t)
dplanck_df
Numeric planck(const Numeric &f, const Numeric &t)
planck
Numeric dplanck_dt(const Numeric &f, const Numeric &t)
dplanck_dt
This file contains declerations of functions of physical character.
constexpr Numeric dnumber_density_dt(Numeric p, Numeric t) noexcept
dnumber_density_dT
constexpr Numeric number_density(Numeric p, Numeric t) noexcept
number_density
Array< StokesVector > ArrayOfStokesVector
Array< PropagationMatrix > ArrayOfPropagationMatrix
bool bad_propmat(const Array< T > &main, const Vector &f_grid, const Index sd=1) noexcept
Checks if a Propagation Matrix or something similar has good grids.
Numeric dotprod_with_los(const 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 mirror_los(Vector &los_mirrored, const ConstVectorView &los, const Index &atmosphere_dim)
Determines the backward direction for a given line-of-sight.
Declaration of functions in rte.cc.
Array< SingleLine > lines
A list of individual lines.
Index NumLines() const noexcept
Number of lines.
void ReverseLines() noexcept
Reverses the order of the internal lines.
void AppendSingleLine(SingleLine &&sl)
Appends a single line to the absorption lines.
Main computational data for the line shape and strength calculations.
void interp_add_even(const ComputeData &sparse) ARTS_NOEXCEPT
Add a sparse grid to this grid via linear interpolation.
void interp_add_triplequad(const ComputeData &sparse) ARTS_NOEXCEPT
Add a sparse grid to this grid via square interpolation.
This file contains basic functions to handle XML data files.