Go to the documentation of this file.
56 out2 <<
" Created an empty gas absorption lookup table.\n";
110 Matrix this_vmr(1, n_p_grid);
138 os <<
"If you have nonlinear species, at least one\n"
139 <<
"species must be a H2O species.";
140 throw runtime_error(os.str());
142 out2 <<
" You have no H2O species. Absorption continua will not work.\n"
143 <<
" You should get a runtime error if you try them anyway.\n";
148 if (0 == n_species || 0 == n_f_grid || 0 == n_p_grid) {
150 os <<
"One of the required input variables is empty:\n"
151 <<
"abs_species.nelem() = " << n_species <<
",\n"
152 <<
"f_grid.nelem() = " << n_f_grid <<
",\n"
153 <<
"abs_p.nelem() = " << n_p_grid <<
".";
154 throw runtime_error(os.str());
161 for (
Index i = 0; i < n_nls; ++i) {
163 for (s = 0; s < n_species; ++s) {
165 abs_nls_idx.push_back(s);
169 if (s == n_species) {
171 os <<
"Did not find *abs_nls* tag group \""
173 throw runtime_error(os.str());
180 os <<
"The variable *abs_nls* must not have duplicate species.\n"
181 <<
"Value of *abs_nls*: " << abs_nls_idx;
182 throw runtime_error(os.str());
192 if (((0 == n_nls) && (0 != n_nls_pert)) ||
193 ((0 != n_nls) && (0 == n_nls_pert))) {
195 os <<
"You have to set both abs_nls and abs_nls_pert, or none.";
196 throw runtime_error(os.str());
201 for (
Index s = 0; s < n_nls; ++s) {
202 non_linear[abs_nls_idx[s]] = 1;
229 b = n_species + n_nls * (n_nls_pert - 1);
243 out2 <<
" With temperature perturbations.\n";
244 these_t_pert.
resize(n_t_pert);
247 out2 <<
" No temperature perturbations.\n";
252 const Index these_t_pert_nelem = these_t_pert.
nelem();
265 for (
Index i = 0, spec = 0; i < n_species; ++i) {
278 out2 <<
" Doing species " << i + 1 <<
" of " << n_species <<
": "
292 out2 <<
" This is a species with H2O VMR perturbations.\n";
293 these_nls_pert.
resize(n_nls_pert);
301 for (
Index s = 0; s < these_nls_pert.
nelem(); ++s, ++spec) {
306 out2 <<
" Doing H2O VMR variant " << s + 1 <<
" of " << n_nls_pert
315 if (h2o_index >= 0) {
317 these_all_vmrs(h2o_index,
joker) *=
324 this_vmr(0,
joker) = these_all_vmrs(i,
joker);
335 if (h2o_index == -1) {
341 abs_h2o = these_all_vmrs(h2o_index,
joker);
356 #pragma omp parallel for if ( \
357 !arts_omp_in_parallel() && \
358 these_t_pert_nelem >= \
359 arts_omp_get_max_threads()) private(this_t, \
360 abs_xsec_per_species, \
361 src_xsec_per_species, \
362 dabs_xsec_per_species_dx, \
363 dsrc_xsec_per_species_dx) \
364 firstprivate(l_ws, l_abs_xsec_agenda)
365 for (
Index j = 0; j < these_t_pert_nelem; ++j) {
367 if (failed)
continue;
379 os <<
" Doing temperature variant " << j + 1 <<
" of " << n_t_pert
380 <<
": " << these_t_pert[j] <<
".\n";
387 this_t += these_t_pert[j];
407 for (
Index p = 0; p < n_p_grid; ++p) {
431 catch (
const std::runtime_error& e) {
432 #pragma omp critical(abs_lookupCalc_fail)
440 if (failed)
throw runtime_error(fail_msg);
491 out3 <<
" Continuum tag: " << thisname;
508 "N2-" == thisname.substr(0, 3) ||
"CO2-" == thisname.substr(0, 4) ||
509 "O2-CIA" == thisname.substr(0, 6) ||
510 "O2-v0v" == thisname.substr(0, 6) ||
511 "O2-v1v" == thisname.substr(0, 6) ||
512 "H2-CIA" == thisname.substr(0, 6) ||
513 "He-CIA" == thisname.substr(0, 6) ||
514 "CH4-CIA" == thisname.substr(0, 7) ||
515 "liquidcloud-MPM93" == thisname.substr(0, 17) ||
516 "liquidcloud-ELL07" == thisname.substr(0, 17)) {
517 out3 <<
" --> not added.\n";
522 if (
"O2-" == thisname.substr(0, 3)) {
524 out3 <<
" --> added to abs_nls.\n";
530 if (
"icecloud-" == thisname.substr(0, 9) ||
531 "rain-" == thisname.substr(0, 5)) {
533 os <<
"Tag " << thisname <<
" not allowed in absorption "
535 throw runtime_error(os.str());
541 out3 <<
" --> unknown.\n";
543 os <<
"Unknown whether tag " << thisname
544 <<
" is a nonlinear species (i.e. uses h2o_abs) or not.\n"
545 <<
"Cannot set abs_nls automatically.";
546 throw runtime_error(os.str());
587 out2 <<
" Species marked for nonlinear treatment:\n";
591 if (j != 0) out2 <<
", ";
617 const Index& p_interp_order,
618 const Index& t_interp_order,
634 for (
Index i = 0; i < the_grid.
nelem(); ++i) {
648 if (delta_min < mindev) mindev = delta_min;
649 if (delta_max > maxdev) maxdev = delta_max;
653 out3 <<
" abs_t_pert: mindev/maxdev : " << mindev <<
" / " << maxdev <<
"\n";
658 Index div = t_interp_order;
661 effective_step = (maxdev - mindev) / (
Numeric)div;
663 }
while (effective_step > step);
667 out2 <<
" abs_t_pert: " <<
abs_t_pert[0] <<
" K to "
669 << effective_step <<
" K (" <<
abs_t_pert.nelem() <<
" grid points)\n";
691 const Index& p_interp_order,
692 const Index& nls_interp_order,
711 for (
Index i = 0; i < the_grid.
nelem(); ++i) {
732 Numeric delta_min = minprof[i] / refprof[gp.
idx[j]];
733 Numeric delta_max = 2 * maxprof[i] / refprof[gp.
idx[j]];
735 if (delta_min < mindev) mindev = delta_min;
738 if (!std::isinf(delta_max) && (delta_max > maxdev)) maxdev = delta_max;
742 out3 <<
" abs_nls_pert: mindev/maxdev : " << mindev <<
" / " << maxdev
745 bool allownegative =
false;
748 <<
" Warning: I am getting a negative fractional distance to the H2O\n"
749 <<
" reference profile. Some of your H2O fields may contain negative values.\n"
750 <<
" Will allow negative values also for abs_nls_pert.\n";
751 allownegative =
true;
754 if (!allownegative) {
756 out3 <<
" Adjusted mindev : " << mindev <<
"\n";
759 if (std::isinf(maxdev)) {
761 os <<
"Perturbation upper limit is infinity (likely due to the reference\n"
762 <<
"profile being 0 at at least one pressure level). Can not work\n"
764 throw runtime_error(os.str());
770 Index div = nls_interp_order;
773 effective_step = (maxdev - mindev) / (
Numeric)div;
775 }
while (effective_step > step);
784 <<
" I am including also 0 in the abs_nls_pert, because it is a turning \n"
785 <<
" point. Consider to use a higher abs_nls_interp_order, for example 4.\n";
790 <<
" (fractional units) in steps of "
792 <<
" grid points)\n";
824 "The atmospheric fields must be flagged to have "
825 "passed a consistency check (atmfields_checked=1).");
838 os <<
"You need at least two pressure levels.";
839 throw runtime_error(os.str());
851 if (p_step10 <= 0 || t_step <= 0 || h2o_step <= 0) {
853 os <<
"The keyword arguments p_step, t_step, and h2o_step must be >0.";
854 throw runtime_error(os.str());
862 const Numeric p_step = log(
pow(10.0, p_step10));
882 log_abs_p_a.push_back(log_p_grid[0]);
884 for (
Index i = 1; i < log_p_grid.
nelem(); ++i) {
886 log_p_grid[i - 1] - log_p_grid[i];
888 const Numeric dp_by_p_step = dp / p_step;
901 for (
Index j = 1; j <= n; ++j)
902 log_abs_p_a.push_back(log_p_grid[i - 1] - (
Numeric)j * ddp);
908 for (
Index i = 0; i < log_abs_p_a.
nelem(); ++i) log_abs_p[i] = log_abs_p_a[i];
917 os <<
"Your pressure grid does not have enough levels for the desired interpolation order.";
918 throw runtime_error(os.str());
926 gridpos(gp, log_p_grid, log_abs_p);
1004 if (h2o_index < 0) {
1006 os <<
"Some of your species require nonlinear treatment,\n"
1007 <<
"but you have no H2O species.";
1008 throw runtime_error(os.str());
1048 vmrmean(h2o_index,
joker),
1083 const Index& robust,
1084 const Index& check_gridnames,
1093 const Numeric p_step = log(
pow(10.0, p_step10));
1111 const ArrayOfString field_names = batch_fields[0].get_string_grid(0);
1115 const String delim =
"-";
1127 if (h2o_index < 0) {
1128 os <<
"One of the atmospheric fields must be H2O.\n";
1133 if (field_names.
nelem() < 3) {
1134 os <<
"Atmospheric states in batch_fields must have at\n"
1135 <<
"least three fields: T, z, and at least one absorption species.";
1136 throw runtime_error(os.str());
1140 os <<
"At least one absorption species needs to be defined "
1141 <<
"in abs_species.";
1142 throw runtime_error(os.str());
1151 for (
Index fi = 0; fi < nf; ++fi) {
1153 if (species_type ==
"T") {
1155 os <<
"Only one temperature ('T') field allowed, "
1156 <<
"but found at least 2.\n";
1165 os <<
"One temperature ('T') field required, but none found.\n";
1171 for (
Index fi = 0; fi < nf; ++fi) {
1173 if (species_type ==
"z") {
1175 os <<
"Only one altitude ('z') field allowed, "
1176 <<
"but found at least 2.\n";
1185 os <<
"One altitude ('z') field required, but none found.\n";
1199 while (!found && fi < nf) {
1202 if (species_type ==
"abs_species") {
1204 if (species_name == species_names[j]) {
1206 batch_index[j] = fi;
1212 os <<
"No field for absorption species '" << species_names[j]
1218 os <<
"Your field names are:\n" << field_names;
1220 if (bail)
throw runtime_error(os.str());
1230 Numeric minp = batch_fields[0].get_numeric_grid(
1235 for (
Index i = 0; i < batch_fields.
nelem(); ++i) {
1293 }
catch (
const std::exception& e) {
1296 out1 <<
" WARNING! Skipped invalid atmfield "
1297 <<
"at batch_atmfield index " << i <<
".\n"
1298 <<
"The runtime error produced was:\n"
1299 << e.what() <<
"\n";
1305 err <<
"Invalid atmfield at batch_atmfield index " << i <<
".\n"
1306 <<
"The runtime error produced was:\n"
1307 << e.what() <<
"\n";
1308 throw std::runtime_error(err.str());
1311 valid_field_indices.push_back(i);
1324 if (batch_fields.
nelem() > valid_field_indices.
nelem()) {
1325 out1 <<
" " << batch_fields.
nelem() - valid_field_indices.
nelem()
1326 <<
" out of " << batch_fields.
nelem() <<
" atmospheres ignored.\n";
1330 if (valid_field_indices.
nelem() < 1) {
1332 err <<
"You need at least one valid profile.\n"
1333 <<
"It seems that no atmfield passed the checks!\n";
1334 throw std::runtime_error(err.str());
1339 os <<
"You need at least two pressure levels.";
1340 throw runtime_error(os.str());
1349 Index np = (
Index)ceil((log(maxp) - log(minp)) / p_step) + 1;
1356 Vector log_abs_p(log(maxp), np, -p_step);
1357 log_abs_p[np - 1] = log(minp);
1361 out2 <<
" abs_p: " <<
abs_p[0] <<
" Pa to " <<
abs_p[np - 1]
1362 <<
" Pa in log10 steps of " << p_step10 <<
" (" << np
1363 <<
" grid points)\n";
1379 Matrix datamean(n_variables, np, 0);
1392 for (
Index vi = 0; vi < valid_field_indices.
nelem(); ++vi) {
1394 Index i = valid_field_indices[vi];
1400 throw runtime_error(
1401 "All batch atmospheres must contain the same field names.");
1408 throw runtime_error(
1409 "All batch atmospheres must contain the same individual field names.");
1421 for (
Index ip = 0; ip <
data.npages(); ++ip)
1422 for (
Index ilat = 0; ilat <
data.nrows(); ++ilat)
1423 for (
Index ilon = 0; ilon <
data.ncols(); ++ilon) {
1425 if (
data(T_index, ip, ilat, ilon) < mint)
1426 mint =
data(T_index, ip, ilat, ilon);
1427 if (
data(T_index, ip, ilat, ilon) > maxt)
1428 maxt =
data(T_index, ip, ilat, ilon);
1430 if (
data(batch_index[h2o_index], ip, ilat, ilon) < minh2o) {
1431 minh2o =
data(batch_index[h2o_index], ip, ilat, ilon);
1433 if (
data(batch_index[h2o_index], ip, ilat, ilon) > maxh2o) {
1434 maxh2o =
data(batch_index[h2o_index], ip, ilat, ilon);
1451 const Numeric eps_bottom = (log_p_grid[0] - log_p_grid[1]) / 2.1;
1453 while (log_abs_p[first_p] > log_p_grid[0] + eps_bottom) ++first_p;
1455 const Numeric eps_top = (log_p_grid[log_p_grid.
nelem() - 2] -
1456 log_p_grid[log_p_grid.
nelem() - 1]) /
1459 while (log_abs_p[last_p] < log_p_grid[log_p_grid.
nelem() - 1] - eps_top)
1462 const Index extent_p = last_p - first_p + 1;
1479 gridpos(gp, log_p_grid, active_log_abs_p);
1496 n_variables, active_log_abs_p.
nelem(),
data.nrows(),
data.ncols());
1499 for (
Index la = 0; la <
data.nrows(); ++la) {
1525 for (
Index la = 0; la < data_interp.
nrows(); ++la) {
1526 for (
Index fi = 0; fi < data_interp.
nbooks(); ++fi) {
1528 for (
Index pr = 0; pr < data_interp.
npages(); ++pr) {
1530 if (0 == fi || (h2o_index + 2) == fi) {
1531 if (data_interp(fi, pr, la,
lo) < datamin(fi, first_p + pr))
1532 datamin(fi, first_p + pr) = data_interp(fi, pr, la,
lo);
1533 if (data_interp(fi, pr, la,
lo) > datamax(fi, first_p + pr))
1534 datamax(fi, first_p + pr) = data_interp(fi, pr, la,
lo);
1537 datamean(fi, first_p + pr) += data_interp(fi, pr, la,
lo);
1546 mean_norm[
Range(first_p, extent_p)] += 1;
1550 out2 <<
" Global statistics:\n"
1551 <<
" min(p) / max(p) [Pa]: " << minp <<
" / " << maxp <<
"\n"
1552 <<
" min(T) / max(T) [K]: " << mint <<
" / " << maxt <<
"\n"
1553 <<
" min(H2O) / max(H2O) [VMR]: " << minh2o <<
" / " << maxh2o <<
"\n";
1556 assert(np == mean_norm.
nelem());
1557 for (
Index fi = 0; fi < datamean.
nrows(); ++fi)
1559 for (
Index pi = 0; pi < np; ++pi) {
1563 if (0 < mean_norm[pi])
1564 datamean(fi, pi) /= mean_norm[pi];
1567 os <<
"No data at pressure level " << pi + 1 <<
" of " << np <<
" ("
1568 <<
abs_p[pi] <<
" hPa).";
1569 throw runtime_error(os.str());
1577 assert(log_abs_p.
nelem() == np);
1579 for (
Index i = 0; i < np; ++i) {
1587 for (
Index fi = 0; fi < datamean.
nrows(); ++fi)
1591 smooth_datamean(fi, i) += datamean(fi, gp.
idx[j]);
1605 for (
Index i = 0; i < np; ++i) {
1609 species_type, field_names[batch_index[h2o_index]], delim);
1610 assert(species_type ==
"abs_species");
1612 species_name, field_names[batch_index[h2o_index]], delim);
1613 assert(
"H2O" == species_name);
1614 assert(
"H2O" == species_names[h2o_index]);
1617 Numeric& mean_h2o = smooth_datamean(h2o_index + 2, i);
1618 Numeric& max_h2o = datamax(h2o_index + 2, i);
1619 if (mean_h2o <= 0) {
1622 out3 <<
" H2O profile contained zero values, adjusted to 1e-9.\n";
1666 if (0 != extremes.
nelem()) {
1668 if (4 != extremes.
nelem()) {
1670 os <<
"There must be exactly 4 elements in extremes:\n"
1671 <<
"min(abs_t_pert), max(abs_t_pert), min(abs_nls_pert), max(abs_nls_pert)";
1672 throw runtime_error(os.str());
1681 out2 <<
" Added min extreme value for abs_t_pert: " <<
abs_t_pert[0]
1691 out2 <<
" Added max extreme value for abs_t_pert: "
1701 out2 <<
" Added min extreme value for abs_nls_pert: " <<
abs_nls_pert[0]
1711 out2 <<
" Added max extreme value for abs_nls_pert: "
1743 const Numeric p_step = log(
pow(10.0, p_step10));
1755 Index np = (
Index)ceil((log(p_max) - log(p_min)) / p_step) + 1;
1762 Vector log_abs_p(log(p_max), np, -p_step);
1766 out2 <<
" abs_p: " <<
abs_p[0] <<
" Pa to " <<
abs_p[np - 1]
1767 <<
" Pa in log10 steps of " << p_step10 <<
" (" << np
1768 <<
" grid points)\n";
1775 Numeric t_ref = (t_min + t_max) / 2;
1782 Vector min_prof(np), max_prof(np);
1803 Numeric const other_ref = 1e-9;
1815 const Index o2_index =
1817 if (o2_index >= 0) {
1821 const Index n2_index =
1823 if (n2_index >= 0) {
1834 if (h2o_index < 0) {
1836 os <<
"Some of your species require nonlinear treatment,\n"
1837 <<
"but you have no H2O species.";
1838 throw runtime_error(os.str());
1862 out1 <<
" WARNING:\n"
1863 <<
" You have no species that require H2O variations.\n"
1864 <<
" This case might work, but it has never been tested.\n"
1865 <<
" Please test it, then remove this warning.\n";
1899 out3 <<
" Added tag groups:";
1901 out3 <<
"\n " << i <<
":";
1924 const Vector& rq_lat_grid,
1925 const Vector& rq_lon_grid,
1944 out3 <<
" Appended tag group:";
1947 out3 <<
" " << tags[s].Name();
2002 out3 <<
" Defined tag groups: ";
2004 out3 <<
"\n " << i <<
":";
2034 const Vector& a_vmr_list,
2041 Matrix abs_scalar_gas, dabs_scalar_gas_df, dabs_scalar_gas_dt;
2045 throw runtime_error(
2046 "Gas absorption lookup table must be adapted,\n"
2047 "use method abs_lookupAdapt.");
2063 throw std::runtime_error(
"Wind/frequency Jacobian is not possible without at least first\n"
2064 "order frequency interpolation in the lookup table. Please use\n"
2065 "abs_f_interp_order>0 or remove wind/frequency Jacobian.");
2095 const Numeric dtemp = a_temperature + dt;
2120 for (
Index iq = 0; iq < jacobian_quantities_position.
nelem(); iq++) {
2122 JacPropMatType::Temperature) {
2124 (dabs_scalar_gas_dt(isp, iv) - abs_scalar_gas(isp, iv)) / dt;
2127 [jacobian_quantities_position[iq]])) {
2129 (dabs_scalar_gas_df(isp, iv) - abs_scalar_gas(isp, iv)) / df;
2131 JacPropMatType::VMR) {
2134 .Species() not_eq
abs_lookup.GetSpeciesIndex(isp))
2139 abs_scalar_gas(isp, iv) / a_vmr_list[isp];
2165 const Agenda& abs_agenda,
2175 throw runtime_error(
2176 "The atmospheric fields must be flagged to have "
2177 "passed a consistency check (atmfields_checked=1).");
2181 nlte_partial_source;
2205 os <<
"Variable doppler must either be empty, or match the dimension of "
2207 throw runtime_error(os.str());
2213 out2 <<
" Creating propmat field with dimensions:\n"
2214 <<
" " << n_species <<
" gas species,\n"
2215 <<
" " << n_frequencies <<
" frequencies,\n"
2216 <<
" " <<
stokes_dim <<
" stokes dimension,\n"
2217 <<
" " <<
stokes_dim <<
" stokes dimension,\n"
2218 <<
" " << n_pressures <<
" pressures,\n"
2219 <<
" " << n_latitudes <<
" latitudes,\n"
2220 <<
" " << n_longitudes <<
" longitudes.\n";
2230 out2 <<
" Creating source field with dimensions:\n"
2231 <<
" " << n_species <<
" gas species,\n"
2232 <<
" " << n_frequencies <<
" frequencies,\n"
2233 <<
" " <<
stokes_dim <<
" stokes dimension,\n"
2234 <<
" " << n_pressures <<
" pressures,\n"
2235 <<
" " << n_latitudes <<
" latitudes,\n"
2236 <<
" " << n_longitudes <<
" longitudes.\n";
2244 out2 <<
" Creating source field with dimensions:\n"
2245 <<
" " << 0 <<
" gas species,\n"
2246 <<
" " << 0 <<
" frequencies,\n"
2247 <<
" " << 0 <<
" stokes dimension,\n"
2248 <<
" " << 0 <<
" pressures,\n"
2249 <<
" " << 0 <<
" latitudes,\n"
2250 <<
" " << 0 <<
" longitudes.\n";
2257 Agenda l_abs_agenda(abs_agenda);
2260 bool failed =
false;
2267 #pragma omp parallel for if (!arts_omp_in_parallel() && \
2268 n_pressures >= arts_omp_get_max_threads()) \
2269 firstprivate(l_ws, l_abs_agenda, this_f_grid) private(abs, \
2272 partial_nlte_source, \
2273 nlte_partial_source, \
2275 for (
Index ipr = 0; ipr < n_pressures; ++ipr)
2278 if (failed)
continue;
2285 if (0 != doppler.
nelem()) {
2287 this_f_grid += doppler[ipr];
2292 os <<
" p_grid[" << ipr <<
"] = " << a_pressure <<
"\n";
2296 for (
Index ila = 0; ila < n_latitudes; ++ila)
2297 for (
Index ilo = 0; ilo < n_longitudes; ++ilo)
2304 Vector this_rtp_mag(3, 0.);
2323 partial_nlte_source,
2324 nlte_partial_source,
2337 if (
abs.nelem() > 0) {
2340 os <<
"propmat_clearsky_fieldCalc was called with stokes_dim = "
2342 <<
"but the stokes_dim returned by the agenda is "
2343 <<
abs[0].StokesDimensions() <<
".";
2344 throw runtime_error(os.str());
2350 if (n_species !=
abs.nelem()) {
2352 os <<
"The number of gas species in vmr_field is " << n_species
2354 <<
"but the number of species returned by the agenda is "
2355 <<
abs.nelem() <<
".";
2356 throw runtime_error(os.str());
2361 if (
abs.nelem() > 0) {
2362 if (n_frequencies !=
abs[0].NumberOfFrequencies()) {
2364 os <<
"The number of frequencies desired is " << n_frequencies
2366 <<
"but the number of frequencies returned by the agenda is "
2367 <<
abs[0].NumberOfFrequencies() <<
".";
2368 throw runtime_error(os.str());
2377 for (
Index i = 0; i <
abs.nelem(); i++) {
2388 }
catch (
const std::runtime_error& e) {
2389 #pragma omp critical(propmat_clearsky_fieldCalc_fail)
2391 fail_msg = e.what();
2397 if (failed)
throw runtime_error(fail_msg);
2447 const bool ignore_errors,
2453 const Vector& local_vmrs,
2477 }
catch (
const std::runtime_error&
x) {
2484 throw runtime_error(
x.what());
2493 Vector abs_lbl(n_f, 0.0);
2494 Vector abs_rel_diff(n_f);
2497 for (
Index i = 0; i < n_f; ++i) abs_tab[i] = sga_tab(
joker, i).sum();
2508 Index propmat_clearsky_checked = 1,
2521 propmat_clearsky_checked,
2550 assert(abs_tab.
nelem() == n_f);
2551 assert(abs_lbl.
nelem() == n_f);
2552 assert(abs_rel_diff.
nelem() == n_f);
2553 for (
Index i = 0; i < n_f; ++i) {
2555 abs_rel_diff[i] = fabs((abs_tab[i] - abs_lbl[i]) / abs_lbl[i] * 100);
2559 Numeric max_abs_rel_diff =
max(abs_rel_diff);
2563 return max_abs_rel_diff;
2584 throw runtime_error(
2585 "Gas absorption lookup table must be adapted,\n"
2586 "use method abs_lookupAdapt.");
2596 os <<
"This function currently works only with lookup tables\n"
2597 <<
"containing nonlinear species.";
2598 throw runtime_error(os.str());
2604 Index h2o_index = -1;
2613 if (h2o_index == -1) {
2615 os <<
"With nonlinear species, at least one species must be a H2O species.";
2616 throw runtime_error(os.str());
2623 for (
Index i = 0; i < inbet_t_pert.
nelem(); ++i)
2624 inbet_t_pert[i] = (al.
t_pert[i] + al.
t_pert[i + 1]) / 2.0;
2631 #pragma omp parallel for if (!arts_omp_in_parallel())
2632 for (
Index pi = 0; pi < n_p; ++pi)
2633 for (
Index ti = 0; ti < inbet_t_pert.
nelem(); ++ti) {
2648 local_vmrs[h2o_index] *= al.
nls_pert[0];
2670 #pragma omp critical(abs_lookupTestAccuracy_piti)
2672 if (max_abs_rel_diff > err_t) err_t = max_abs_rel_diff;
2680 for (
Index i = 0; i < inbet_nls_pert.
nelem(); ++i)
2688 #pragma omp parallel for if (!arts_omp_in_parallel())
2689 for (
Index pi = 0; pi < n_p; ++pi)
2690 for (
Index ni = 0; ni < inbet_nls_pert.
nelem(); ++ni) {
2708 local_vmrs[h2o_index] *= inbet_nls_pert[ni];
2728 #pragma omp critical(abs_lookupTestAccuracy_pini)
2730 if (max_abs_rel_diff > err_nls) err_nls = max_abs_rel_diff;
2741 Vector inbet_p_grid(n_p - 1);
2742 Vector inbet_t_ref(n_p - 1);
2743 Matrix inbet_vmrs_ref(n_species, n_p - 1);
2744 for (
Index i = 0; i < inbet_p_grid.
nelem(); ++i) {
2746 inbet_t_ref[i] = (al.
t_ref[i] + al.
t_ref[i + 1]) / 2.0;
2747 for (
Index j = 0; j < n_species; ++j)
2756 #pragma omp parallel for if (!arts_omp_in_parallel())
2757 for (
Index pi = 0; pi < n_p - 1; ++pi) {
2761 Numeric local_p = inbet_p_grid[pi];
2777 local_vmrs[h2o_index] *= al.
nls_pert[0];
2796 #pragma omp critical(abs_lookupTestAccuracy_pi)
2798 if (max_abs_rel_diff > err_p) err_p = max_abs_rel_diff;
2809 #pragma omp parallel for if (!arts_omp_in_parallel())
2810 for (
Index pi = 0; pi < n_p - 1; ++pi)
2811 for (
Index ti = 0; ti < inbet_t_pert.
nelem(); ++ti)
2812 for (
Index ni = 0; ni < inbet_nls_pert.
nelem(); ++ni) {
2816 Numeric local_p = inbet_p_grid[pi];
2819 Numeric local_t = inbet_t_ref[pi] + inbet_t_pert[ti];
2825 local_vmrs[h2o_index] *= inbet_nls_pert[ni];
2845 #pragma omp critical(abs_lookupTestAccuracy_pitini)
2847 if (max_abs_rel_diff > err_tot) {
2848 err_tot = max_abs_rel_diff;
2856 out2 <<
" Max. of absolute value of relative error in percent:\n"
2857 <<
" Note: Unless you have constant reference profiles, the\n"
2858 <<
" pressure interpolation error will have other errors mixed in.\n"
2859 <<
" Temperature interpolation: " << err_t <<
"%\n"
2860 <<
" H2O (NLS) interpolation: " << err_nls <<
"%\n"
2861 <<
" Pressure interpolation: " << err_p <<
"%\n"
2862 <<
" Total error: " << err_tot <<
"%\n";
2899 throw runtime_error(
2900 "Gas absorption lookup table must be adapted,\n"
2901 "use method abs_lookupAdapt.");
2909 os <<
"This function currently works only with lookup tables\n"
2910 <<
"containing nonlinear species.";
2911 throw runtime_error(os.str());
2917 Index h2o_index = -1;
2926 if (h2o_index == -1) {
2928 os <<
"With nonlinear species, at least one species must be a H2O species.";
2929 throw runtime_error(os.str());
2935 const Index chunksize = 100;
2959 Vector rand_lp(chunksize);
2960 Vector rand_dT(chunksize);
2961 Vector rand_dh2o(chunksize);
2964 Vector max_abs_rel_diff(chunksize);
2967 bool keep_looping =
true;
2973 while (keep_looping) {
2976 for (
Index i = 0; i < chunksize; ++i) {
2979 rand_lp[i] = rng.
draw() * (lp_max - lp_min) + lp_min;
2980 rand_dT[i] = rng.
draw() * (dT_max - dT_min) + dT_min;
2981 rand_dh2o[i] = rng.
draw() * (dh2o_max - dh2o_min) + dh2o_min;
2984 for (
Index i = 0; i < chunksize; ++i) {
2986 const Numeric this_lp = rand_lp[i];
3004 Vector these_vmrs(n_species);
3005 for (
Index j = 0; j < n_species; ++j) {
3010 const Numeric this_p = exp(this_lp);
3011 const Numeric this_t = this_t_ref + rand_dT[i];
3012 these_vmrs[h2o_index] *= rand_dh2o[i];
3042 for (
Index i = 0; i < chunksize; ++i) {
3043 const Numeric x = max_abs_rel_diff[i];
3060 for (
Index i = 0; i < chunksize; ++i) {
3061 const Numeric x = max_abs_rel_diff[i];
3073 total_std =
sqrt(variance);
3075 const Numeric old_mean = total_mean;
3083 total_std = total_std * total_std;
3085 total_std *= (
Numeric)(N_chunk - 1);
3087 total_std += variance;
3089 total_std /= (
Numeric)N_chunk;
3091 total_std =
sqrt(total_std);
3095 if (
abs(total_mean - old_mean) < total_mean / 100) keep_looping =
false;
3101 out3 <<
" Chunk " << N_chunk <<
": Mean estimate = " << total_mean
3102 <<
" Std estimate = " << total_std <<
"\n";
3106 out2 <<
" Mean relative error: " << total_mean <<
"%\n"
3107 <<
" Standard deviation: " << total_std <<
"%\n";
Index atmosphere_dim(Workspace &ws) noexcept
void transform(VectorView y, double(&my_func)(double), ConstVectorView x)
A generic transform function for vectors, which can be used to implement mathematical functions opera...
Tensor3 z_field(Workspace &ws) noexcept
void abs_lookupCalc(Workspace &ws, GasAbsLookup &abs_lookup, Index &abs_lookup_is_adapted, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfArrayOfSpeciesTag &abs_nls, const Vector &f_grid, const Vector &abs_p, const Matrix &abs_vmrs, const Vector &abs_t, const Vector &abs_t_pert, const Vector &abs_nls_pert, const Agenda &abs_xsec_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lookupCalc.
void choose_abs_t_pert(Vector &abs_t_pert, ConstVectorView abs_t, ConstVectorView tmin, ConstVectorView tmax, const Numeric &step, const Index &p_interp_order, const Index &t_interp_order, const Verbosity &verbosity)
Chose the temperature perturbations abs_t_pert.
ArrayOfIndex nonlinear_species
The species tags with non-linear treatment.
const Index GFIELD4_P_GRID
Numeric lo(Workspace &ws) noexcept
ArrayOfRetrievalQuantity jacobian_quantities(Workspace &ws) noexcept
Declarations required for the calculation of absorption coefficients.
void abs_speciesAdd(ArrayOfArrayOfSpeciesTag &abs_species, Index &propmat_clearsky_agenda_checked, Index &abs_xsec_agenda_checked, const ArrayOfString &names, const Verbosity &verbosity)
WORKSPACE METHOD: abs_speciesAdd.
void gridpos(ArrayOfGridPos &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Numeric &extpolfac)
Set up a grid position Array.
GasAbsLookup GasAbsLookup
void propmat_clearsky_fieldCalc(Workspace &ws, Tensor7 &propmat_clearsky_field, Tensor6 &nlte_source_field, const Index &atmfields_checked, const Vector &f_grid, const Index &stokes_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &t_field, const Tensor4 &vmr_field, const EnergyLevelMap &nlte_field, const Tensor3 &mag_u_field, const Tensor3 &mag_v_field, const Tensor3 &mag_w_field, const Agenda &abs_agenda, const Vector &doppler, const Vector &los, const Verbosity &verbosity)
WORKSPACE METHOD: propmat_clearsky_fieldCalc.
void abs_speciesInit(ArrayOfArrayOfSpeciesTag &abs_species, const Verbosity &)
WORKSPACE METHOD: abs_speciesInit.
Vector lat_grid(Workspace &ws) noexcept
void abs_lookupInit(GasAbsLookup &x, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lookupInit.
void p_gridFromGasAbsLookup(Vector &p_grid, const GasAbsLookup &abs_lookup, const Verbosity &)
WORKSPACE METHOD: p_gridFromGasAbsLookup.
void f_gridFromGasAbsLookup(Vector &f_grid, const GasAbsLookup &abs_lookup, const Verbosity &)
WORKSPACE METHOD: f_gridFromGasAbsLookup.
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPos &tc)
Red 1D Interpolate.
Verbosity verbosity(Workspace &ws) noexcept
ArrayOfStokesVector dnlte_dx_source(Workspace &ws) noexcept
ArrayOfArrayOfMatrix dsrc_xsec_per_species_dx(Workspace &ws) noexcept
void choose_abs_nls(ArrayOfArrayOfSpeciesTag &abs_nls, const ArrayOfArrayOfSpeciesTag &abs_species, const Verbosity &verbosity)
Choose species for abs_nls.
void Extract(Matrix &sga, const Index &p_interp_order, const Index &t_interp_order, const Index &h2o_interp_order, const Index &f_interp_order, const Numeric &p, const Numeric &T, ConstVectorView abs_vmrs, ConstVectorView new_f_grid, const Numeric &extpolfac) const
Extract scalar gas absorption coefficients from the lookup table.
Numeric temperature_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the temperature perturbation if it exists.
void seed(unsigned long int n, const Verbosity &verbosity)
Seeds the Rng with the integer argument.
void resize(Index n)
Resize function.
Index abs_lookup_is_adapted(Workspace &ws) noexcept
bool supports_lookup(const ArrayOfRetrievalQuantity &js)
Returns if the array supports lookup table derivatives.
Tensor3 mag_w_field(Workspace &ws) noexcept
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
QuantumIdentifier::QType Index LowerQuantumNumbers Species
Index stokes_dim(Workspace &ws) noexcept
Index nrows() const
Returns the number of rows.
Array< RetrievalQuantity > ArrayOfRetrievalQuantity
bool do_temperature_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants the temperature derivative.
ArrayOfMatrix abs_xsec_per_species(Workspace &ws) noexcept
void abs_lookupTestAccuracy(Workspace &ws, const GasAbsLookup &abs_lookup, const Index &abs_lookup_is_adapted, const Index &abs_p_interp_order, const Index &abs_t_interp_order, const Index &abs_nls_interp_order, const Agenda &abs_xsec_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lookupTestAccuracy.
void atmfields_checkedCalc(Index &atmfields_checked, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &t_field, const Tensor4 &vmr_field, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Tensor3 &mag_u_field, const Tensor3 &mag_v_field, const Tensor3 &mag_w_field, const SpeciesAuxData &partition_functions, const Index &abs_f_interp_order, const Index &negative_vmr_ok, const Index &bad_partition_functions_ok, const Verbosity &)
WORKSPACE METHOD: atmfields_checkedCalc.
const Index GFIELD4_FIELD_NAMES
void abs_lookupTestAccMC(Workspace &ws, const GasAbsLookup &abs_lookup, const Index &abs_lookup_is_adapted, const Index &abs_p_interp_order, const Index &abs_t_interp_order, const Index &abs_nls_interp_order, const Index &mc_seed, const Agenda &abs_xsec_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lookupTestAccMC.
Auxiliary data for isotopologues.
Numeric frequency_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the frequency perturbation if it exists.
Numeric sqrt(const Rational r)
Square root.
GasAbsLookup abs_lookup(Workspace &ws) noexcept
An absorption lookup table.
Matrix abs_vmrs(Workspace &ws) noexcept
GriddedField4 atm_fields_compact(Workspace &ws) noexcept
ArrayOfString particle_bulkprop_names(Workspace &ws) noexcept
void abs_lookupSetupWide(Vector &abs_p, Vector &abs_t, Vector &abs_t_pert, Matrix &abs_vmrs, ArrayOfArrayOfSpeciesTag &abs_nls, Vector &abs_nls_pert, const ArrayOfArrayOfSpeciesTag &abs_species, const Index &abs_p_interp_order, const Index &abs_t_interp_order, const Index &abs_nls_interp_order, const Numeric &p_min, const Numeric &p_max, const Numeric &p_step10, const Numeric &t_min, const Numeric &t_max, const Numeric &h2o_min, const Numeric &h2o_max, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lookupSetupWide.
Tensor7 propmat_clearsky_field(Workspace &ws) noexcept
EnergyLevelMap nlte_field(Workspace &ws) noexcept
member functions of the Rng class and gsl_rng code
This can be used to make arrays out of anything.
Numeric pow(const Rational base, Numeric exp)
Power of.
Index nelem(const Lines &l)
Number of lines.
Index species_index_from_species_name(String name)
Return species index for given species name.
double draw()
Draws a double from the uniform distribution [0,1)
void abs_lookupSetupBatch(Vector &abs_p, Vector &abs_t, Vector &abs_t_pert, Matrix &abs_vmrs, ArrayOfArrayOfSpeciesTag &abs_nls, Vector &abs_nls_pert, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfGriddedField4 &batch_fields, const Index &abs_p_interp_order, const Index &abs_t_interp_order, const Index &abs_nls_interp_order, const Index &atmosphere_dim, const Numeric &p_step10, const Numeric &t_step, const Numeric &h2o_step, const Vector &extremes, const Index &robust, const Index &check_gridnames, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lookupSetupBatch.
Declarations for agendas.
void abs_lookupSetup(Vector &abs_p, Vector &abs_t, Vector &abs_t_pert, Matrix &abs_vmrs, ArrayOfArrayOfSpeciesTag &abs_nls, Vector &abs_nls_pert, const Index &atmosphere_dim, const Vector &p_grid, const Tensor3 &t_field, const Tensor4 &vmr_field, const Index &atmfields_checked, const ArrayOfArrayOfSpeciesTag &abs_species, const Index &abs_p_interp_order, const Index &abs_t_interp_order, const Index &abs_nls_interp_order, const Numeric &p_step10, const Numeric &t_step, const Numeric &h2o_step, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lookupSetup.
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.
Index ncols() const
Returns the number of columns.
Structure to store a grid position for higher order interpolation.
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.
ArrayOfStokesVector nlte_source(Workspace &ws) noexcept
void VectorInsertGridPoints(Vector &og, const Vector &ingrid, const Vector &points, const Verbosity &verbosity)
WORKSPACE METHOD: VectorInsertGridPoints.
void choose_abs_nls_pert(Vector &abs_nls_pert, ConstVectorView refprof, ConstVectorView minprof, ConstVectorView maxprof, const Numeric &step, const Index &p_interp_order, const Index &nls_interp_order, const Verbosity &verbosity)
Chose the H2O perturbations abs_nls_pert.
Index nelem() const
Returns the number of elements.
Vector t_ref
The reference temperature profile [K].
Tensor4 vmr_field(Workspace &ws) noexcept
This file contains declerations of functions of physical character.
void AtmFieldsAndParticleBulkPropFieldFromCompact(Vector &p_grid, Vector &lat_grid, Vector &lon_grid, Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, Tensor4 &particle_bulkprop_field, ArrayOfString &particle_bulkprop_names, const ArrayOfArrayOfSpeciesTag &abs_species, const GriddedField4 &atm_fields_compact, const Index &atmosphere_dim, const String &delim, const Numeric &p_min, const Index &check_gridnames, const Verbosity &)
WORKSPACE METHOD: AtmFieldsAndParticleBulkPropFieldFromCompact.
ArrayOfArrayOfSpeciesTag abs_species(Workspace &ws) noexcept
Numeric mean(const ConstVectorView &x)
Mean function, vector version.
Index atmfields_checked(Workspace &ws) noexcept
Vector p_grid(Workspace &ws) noexcept
Index ncols() const
Returns the number of columns.
Vector f_grid
The frequency grid [Hz].
Vector p_grid
The pressure grid for the table [Pa].
NUMERIC Numeric
The type to use for all floating point numbers.
Index npages() const
Returns the number of pages.
void propmat_clearsky_agendaExecute(Workspace &ws, ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfStokesVector &nlte_source, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, ArrayOfStokesVector &dnlte_dx_source, ArrayOfStokesVector &nlte_dsource_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &f_grid, const Vector &rtp_mag, const Vector &rtp_los, const Numeric rtp_pressure, const Numeric rtp_temperature, const EnergyLevelMap &rtp_nlte, const Vector &rtp_vmr, const Agenda &input_agenda)
Index nbooks() const
Returns the number of books.
Vector nls_pert
The vector of perturbations for the VMRs of the nonlinear species.
bool do_frequency_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants a frequency derivative.
Vector f_grid(Workspace &ws) noexcept
void find_nonlinear_continua(ArrayOfIndex &cont, const ArrayOfArrayOfSpeciesTag &abs_species, const Verbosity &verbosity)
Find continuum species in abs_species.
Agenda abs_xsec_agenda(Workspace &ws) noexcept
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.
Index abs_nls_interp_order(Workspace &ws) noexcept
Numeric calc_lookup_error(Workspace &ws, const GasAbsLookup &al, const Index &abs_p_interp_order, const Index &abs_t_interp_order, const Index &abs_nls_interp_order, const bool ignore_errors, const Agenda &abs_xsec_agenda, const Numeric &local_p, const Numeric &local_t, const Vector &local_vmrs, const Verbosity &verbosity)
Compare lookup and LBL calculation.
Type
Type of line shape to compute.
Vector abs_nls_pert(Workspace &ws) noexcept
Header file for interpolation_poly.cc.
Vector lon_grid(Workspace &ws) noexcept
void jacobianAddAbsSpecies(Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &species, const String &mode, const Index &for_species_tag, const Verbosity &verbosity)
WORKSPACE METHOD: jacobianAddAbsSpecies.
Internal cloudbox functions.
Index nrows() const
Returns the number of rows.
Vector abs_t(Workspace &ws) noexcept
Index nlte_do(Workspace &ws) noexcept
ArrayOfArrayOfSpeciesTag species
The species tags for which the table is valid.
invlib::Vector< ArtsVector > Vector
invlib wrapper type for ARTS vectors.
ArrayOfIndex abs_species_active(Workspace &ws) noexcept
void propmat_clearskyAddFromLookup(ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const GasAbsLookup &abs_lookup, const Index &abs_lookup_is_adapted, const Index &abs_p_interp_order, const Index &abs_t_interp_order, const Index &abs_nls_interp_order, const Index &abs_f_interp_order, const Vector &f_grid, const Numeric &a_pressure, const Numeric &a_temperature, const Vector &a_vmr_list, const ArrayOfRetrievalQuantity &jacobian_quantities, const Numeric &extpolfac, const Verbosity &verbosity)
WORKSPACE METHOD: propmat_clearskyAddFromLookup.
Index propmat_clearsky_agenda_checked(Workspace &ws) noexcept
ArrayOfArrayOfSpeciesTag abs_nls(Workspace &ws) noexcept
ArrayOfPropagationMatrix dpropmat_clearsky_dx(Workspace &ws) noexcept
ArrayOfMatrix src_xsec_per_species(Workspace &ws) noexcept
Tensor4 particle_bulkprop_field(Workspace &ws) noexcept
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.
Tensor3 mag_v_field(Workspace &ws) noexcept
Tensor3 t_field(Workspace &ws) noexcept
Vector log_p_grid
The natural log of the pressure grid.
Vector abs_t_pert(Workspace &ws) noexcept
Index abs_xsec_agenda_checked(Workspace &ws) noexcept
SpeciesAuxData partition_functions(Workspace &ws) noexcept
Tensor6 nlte_source_field(Workspace &ws) noexcept
void abs_lookupAdapt(GasAbsLookup &abs_lookup, Index &abs_lookup_is_adapted, const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &f_grid, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lookupAdapt.
Index abs_t_interp_order(Workspace &ws) noexcept
Vector x(Workspace &ws) noexcept
Index mc_seed(Workspace &ws) noexcept
void parse_atmcompact_speciesname(String &species_name, const String &field_name, const String &delim)
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
void parse_atmcompact_speciestype(String &species_type, const String &field_name, const String &delim)
void gridpos_poly(ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac)
The maximum difference from 1 that we allow for a sum check.
Tensor3 mag_u_field(Workspace &ws) noexcept
ArrayOfStokesVector nlte_dsource_dx(Workspace &ws) noexcept
Matrix vmrs_ref
The reference VMR profiles.
void abs_speciesAdd2(Workspace &ws, ArrayOfArrayOfSpeciesTag &abs_species, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, Index &propmat_clearsky_agenda_checked, Index &abs_xsec_agenda_checked, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &species, const String &mode, const Verbosity &verbosity)
WORKSPACE METHOD: abs_speciesAdd2.
bool is_unique(const ArrayOfIndex &x)
Checks if an ArrayOfIndex is unique, i.e., has no duplicate values.
Index abs_p_interp_order(Workspace &ws) noexcept
Vector t_pert
The vector of temperature perturbations [K].
bool is_frequency_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a frequency parameter in propagation matrix calculations.
Header file for helper functions for OpenMP.
Agenda jacobian_agenda(Workspace &ws) noexcept
ArrayOfPropagationMatrix propmat_clearsky(Workspace &ws) noexcept
A constant view of a Vector.
Index nelem() const
Number of elements.
void interpweights(VectorView itw, const GridPos &tc)
Red 1D interpolation weights.
Declarations for the gas absorption lookup table.
The global header file for ARTS.
Index abs_f_interp_order(Workspace &ws) noexcept