Go to the documentation of this file.
102 const Index& prepend,
110 as.insert(as.begin(), name);
156 const Index& interp_order,
160 out2 <<
" Interpolation order: " << interp_order <<
"\n";
163 ing_max = p_grid_out.
nelem() - 1;
165 "Atmospheric field to p_grid_out", p_grid_in, p_grid_out, interp_order);
167 Index nelem_in_range = ing_max - ing_min + 1;
170 if (nelem_in_range > 0) {
171 gp_p.resize(nelem_in_range);
174 p_grid_out[
Range(ing_min, nelem_in_range)],
178 itw.
resize(nelem_in_range, interp_order + 1);
187 const Tensor3& atmtensor_in_orig,
190 const Index& interp_order,
194 if (atmtensor_in_orig.
npages() != p_grid_old.
nelem()) {
196 os <<
"p_grid_old is supposed to be the p_grid associated with the "
197 <<
"atmospheric field.\n"
198 <<
"However, it is not as their sizes are inconsistent.\n";
199 throw runtime_error(os.str());
202 const Tensor3* atmtensor_in_pnt;
205 if (&atmtensor_in_orig == &atmtensor_out) {
206 atmtensor_in_copy = atmtensor_in_orig;
207 atmtensor_in_pnt = &atmtensor_in_copy;
209 atmtensor_in_pnt = &atmtensor_in_orig;
211 const Tensor3& atmtensor_in = *atmtensor_in_pnt;
220 Index ing_min, ing_max;
232 if ((ing_max - ing_min < 0) ||
233 (ing_max - ing_min + 1 != p_grid_new.
nelem())) {
235 os <<
"New grid seems not to be sufficiently covered by old grid.\n";
236 throw runtime_error(os.str());
239 for (
Index i = 0; i < atmtensor_in.
nrows(); i++)
240 for (
Index j = 0; j < atmtensor_in.
ncols(); j++)
248 const Tensor4& atmtensor_in_orig,
251 const Index& interp_order,
253 const Tensor4* atmtensor_in_pnt;
256 if (&atmtensor_in_orig == &atmtensor_out) {
257 atmtensor_in_copy = atmtensor_in_orig;
258 atmtensor_in_pnt = &atmtensor_in_copy;
260 atmtensor_in_pnt = &atmtensor_in_orig;
262 const Tensor4& atmtensor_in = *atmtensor_in_pnt;
267 atmtensor_in.
nrows(),
268 atmtensor_in.
ncols());
273 Index ing_min, ing_max;
285 if ((ing_max - ing_min < 0) ||
286 (ing_max - ing_min + 1 != p_grid_new.
nelem())) {
288 os <<
"New grid seems not to be sufficiently covered by old grid.\n";
289 throw runtime_error(os.str());
293 for (
Index i = 0; i < atmtensor_in.
nrows(); i++)
294 for (
Index j = 0; j < atmtensor_in.
ncols(); j++)
297 atmtensor_in(b,
joker, i, j),
350 field_out = gfraw_in.
data;
368 field_out = gfraw_in.
data;
386 field_out = gfraw_in.
data;
399 if (!gfraw_in.
nelem()) {
401 out1 <<
" Warning: gfraw_in is empty, proceeding anyway\n";
402 field_out.
resize(0, 0, 0, 0);
406 gfraw_in[0].data.nrows(),
407 gfraw_in[0].data.ncols());
410 for (
Index i = 0; i < gfraw_in.
nelem(); i++) {
413 "p_grid",
"gfield.p_grid",
p_grid, gfraw_in[i].get_numeric_grid(0));
431 if (&gfraw_in_orig == &gfraw_out) {
432 gfraw_in_copy = gfraw_in_orig;
433 gfraw_in_pnt = &gfraw_in_copy;
435 gfraw_in_pnt = &gfraw_in_orig;
444 "Can't expand data because number of Latitudes and Longitudes is greater than 1");
475 gfraw_out.
data = gfraw_in.
data(0, 0);
488 if (&gfraw_in_orig == &gfraw_out) {
489 gfraw_in_copy = gfraw_in_orig;
490 gfraw_in_pnt = &gfraw_in_copy;
492 gfraw_in_pnt = &gfraw_in_orig;
501 "Can't expand data because number of Latitudes and Longitudes is greater than 1");
550 if (&gfraw_in_orig == &gfraw_out) {
551 gfraw_in_copy = gfraw_in_orig;
552 gfraw_in_pnt = &gfraw_in_copy;
554 gfraw_in_pnt = &gfraw_in_orig;
563 "Can't expand data because number of Latitudes and Longitudes is greater than 1");
622 gfraw_out.resize(gfraw_in.
nelem());
653 const Index p_grid_index,
655 const Index& interp_order,
656 const Index& zeropadding,
662 out2 <<
" Interpolation order: " << interp_order <<
"\n";
674 ing_max = ing_min - 1;
678 "Raw field to p_grid",
684 ing_max =
p_grid.nelem() - 1;
686 "Raw field to p_grid", in_p_grid,
p_grid, interp_order);
688 Index nelem_in_range = ing_max - ing_min + 1;
691 if (nelem_in_range > 0) {
692 gp_p.resize(nelem_in_range);
694 gp_p, in_p_grid,
p_grid[
Range(ing_min, nelem_in_range)], interp_order);
697 itw.
resize(nelem_in_range, interp_order + 1);
709 const Index& interp_order,
710 const Index& zeropadding,
715 if (&gfraw_in_orig == &gfraw_out) {
716 gfraw_in_copy = gfraw_in_orig;
717 gfraw_in_pnt = &gfraw_in_copy;
719 gfraw_in_pnt = &gfraw_in_orig;
723 const Index p_grid_index = 0;
736 Index ing_min, ing_max;
751 if (ing_max - ing_min < 0)
753 else if (ing_max - ing_min + 1 !=
p_grid.nelem()) {
780 const Index& interp_order,
781 const Index& zeropadding,
786 if (&gfraw_in_orig == &gfraw_out) {
787 gfraw_in_copy = gfraw_in_orig;
788 gfraw_in_pnt = &gfraw_in_copy;
790 gfraw_in_pnt = &gfraw_in_orig;
794 const Index p_grid_index = 1;
811 Index ing_min, ing_max;
826 if (ing_max - ing_min < 0)
828 else if (ing_max - ing_min + 1 !=
p_grid.nelem()) {
859 const Index& interp_order,
860 const Index& zeropadding,
862 agfraw_out.resize(agfraw_in.
nelem());
864 for (
Index i = 0; i < agfraw_in.
nelem(); i++) {
896 const Index lat_grid_index,
897 const Index lon_grid_index,
900 const Index& interp_order,
905 throw runtime_error(
"The new latitude grid is not allowed to be empty.");
907 throw runtime_error(
"The new longitude grid is not allowed to be empty.");
913 throw runtime_error(
"Raw data has to be true 3D data (nlat>1 and nlon>1).");
915 out2 <<
" Interpolation order: " << interp_order <<
"\n";
929 "Raw field to lat_grid, 3D case", in_lat_grid,
lat_true, interp_order);
945 (interp_order + 1) * (interp_order + 1));
957 const Index& interp_order,
960 throw runtime_error(
"The new latitude grid is not allowed to be empty.");
962 throw runtime_error(
"The new longitude grid is not allowed to be empty.");
967 if (&gfraw_in_orig == &gfraw_out) {
968 gfraw_in_copy = gfraw_in_orig;
969 gfraw_in_pnt = &gfraw_in_copy;
971 gfraw_in_pnt = &gfraw_in_orig;
975 const Index lat_grid_index = 0;
976 const Index lon_grid_index = 1;
981 os <<
"Raw data has to be true 3D data (nlat>1 and nlon>1).\n"
982 <<
"Use GriddedFieldLatLonExpand to convert 1D or 2D data to 3D!\n";
983 throw runtime_error(os.str());
994 const Vector& in_lat_grid =
996 const Vector& in_lon_grid =
1005 os <<
"Data values at 0 and 360 degrees for a cyclic longitude grid must match: \n"
1006 <<
"Mismatch at latitude index : " <<
lat <<
" ("
1007 << in_lat_grid[
lat] <<
" degrees)\n"
1008 <<
"Value at 0 degrees longitude : " << gfraw_in.
data(
lat, 0)
1010 <<
"Value at 360 degrees longitude: "
1017 throw runtime_error(os.str());
1046 const Index& interp_order,
1049 throw runtime_error(
"The new latitude grid is not allowed to be empty.");
1051 throw runtime_error(
"The new longitude grid is not allowed to be empty.");
1056 if (&gfraw_in_orig == &gfraw_out) {
1057 gfraw_in_copy = gfraw_in_orig;
1058 gfraw_in_pnt = &gfraw_in_copy;
1060 gfraw_in_pnt = &gfraw_in_orig;
1064 const Index lat_grid_index = 1;
1065 const Index lon_grid_index = 2;
1070 os <<
"Raw data has to be true 3D data (nlat>1 and nlon>1).\n"
1071 <<
"Use GriddedFieldLatLonExpand to convert 1D or 2D data to 3D!\n";
1072 throw runtime_error(os.str());
1086 const Vector& in_lat_grid =
1088 const Vector& in_lon_grid =
1099 os <<
"Data values at 0 and 360 degrees for a cyclic longitude grid must match: \n"
1100 <<
"Mismatch at 1st grid index : " <<
g0 <<
" (" << in_grid0[
g0]
1102 <<
" at latitude index : " <<
lat <<
" ("
1103 << in_lat_grid[
lat] <<
" degrees)\n"
1104 <<
"Value at 0 degrees longitude : " << gfraw_in.
data(
g0,
lat, 0)
1106 <<
"Value at 360 degrees longitude: "
1113 throw runtime_error(os.str());
1147 const Index& interp_order,
1150 throw runtime_error(
"The new latitude grid is not allowed to be empty.");
1152 throw runtime_error(
"The new longitude grid is not allowed to be empty.");
1157 if (&gfraw_in_orig == &gfraw_out) {
1158 gfraw_in_copy = gfraw_in_orig;
1159 gfraw_in_pnt = &gfraw_in_copy;
1161 gfraw_in_pnt = &gfraw_in_orig;
1165 const Index lat_grid_index = 2;
1166 const Index lon_grid_index = 3;
1171 os <<
"Raw data has to be true 3D data (nlat>1 and nlon>1).\n"
1172 <<
"Use GriddedFieldLatLonExpand to convert 1D or 2D data to 3D!\n";
1173 throw runtime_error(os.str());
1205 const Vector& in_lat_grid =
1207 const Vector& in_lon_grid =
1212 for (
Index g1 = 0; g1 < in_grid1.
nelem(); g1++)
1219 os <<
"Data values at 0 and 360 degrees for a cyclic longitude grid must match: \n"
1220 <<
"Mismatch at 1st grid index : " <<
g0 <<
" ("
1221 << in_grid0[
g0] <<
")\n"
1222 <<
" at 2nd grid index : " << g1 <<
" ("
1223 << in_grid1[g1] <<
")\n"
1224 <<
" at latitude index : " <<
lat <<
" ("
1225 << in_lat_grid[
lat] <<
" degrees)\n"
1226 <<
"Value at 0 degrees longitude : "
1227 << gfraw_in.
data(
g0, g1,
lat, 0) <<
"\n"
1228 <<
"Value at 360 degrees longitude: "
1235 throw runtime_error(os.str());
1258 const Index& interp_order,
1260 agfraw_out.resize(agfraw_in.
nelem());
1262 for (
Index i = 0; i < agfraw_in.
nelem(); i++) {
1295 const Index z_grid_index,
1297 const Index& interp_order,
1298 const Index& zeropadding,
1304 out2 <<
" Interpolation order: " << interp_order <<
"\n";
1309 if (in_z_grid[0] > z_grid[z_grid.
nelem() - 1] ||
1310 in_z_grid[in_z_grid.
nelem() - 1] < z_grid[0]) {
1312 ing_max = ing_min - 1;
1316 "Raw field to z_grid",
1322 ing_max = z_grid.
nelem() - 1;
1324 "Raw field to p_grid", in_z_grid, z_grid, interp_order);
1327 Index nelem_in_range = ing_max - ing_min + 1;
1330 if (nelem_in_range > 0) {
1331 gp_p.resize(nelem_in_range);
1333 gp_p, in_z_grid, z_grid[
Range(ing_min, nelem_in_range)], interp_order);
1336 itw.
resize(nelem_in_range, interp_order + 1);
1351 const Index& interp_order,
1352 const Index& zeropadding,
1358 throw std::runtime_error(
1359 "*z_field* must be of the same size as *p_grid*, *lat_grid*, and *lon_grid* in *GriddedFieldZToPRegrid*.");
1369 throw std::runtime_error(
1370 "Gridding of field to regrid is bad.\n*GriddedFieldZToPRegrid* requires latitude and longitude to be on the same grid as *z_field*.");
1374 throw std::runtime_error(
1375 "Gridding of field to regrid is bad.\n*GriddedFieldZToPRegrid* requires latitude and longitude of the gridded field to be the same as for *z_field*.");
1378 throw std::runtime_error(
1379 "Gridding of field to regrid is bad.\n*GriddedFieldZToPRegrid* requires latitude and longitude of the gridded field to be the same as for *z_field*.");
1386 if (&gfraw_in_orig == &gfraw_out) {
1387 gfraw_in_copy = gfraw_in_orig;
1388 gfraw_in_pnt = &gfraw_in_copy;
1390 gfraw_in_pnt = &gfraw_in_orig;
1403 gfraw_out.
data = 0.;
1408 Index ing_min, ing_max;
1410 for (
Index lat_index = 0; lat_index <
lat_grid.nelem(); lat_index++) {
1411 for (
Index lon_index = 0; lon_index <
lon_grid.nelem(); lon_index++) {
1425 if (ing_max - ing_min >= 0) {
1428 if (ing_max - ing_min + 1 != z_out.
nelem()) {
1429 r =
Range(ing_min, ing_max - ing_min + 1);
1432 interp(gfraw_out.
data(r, lat_index, lon_index),
1434 gfraw_in.
data(
joker, lat_index, lon_index),
1454 os <<
"Atmospheric dimension must be 1.";
1455 throw runtime_error(os.str());
1464 if (field_names.
nelem() != nf) {
1466 os <<
"Cannot extract fields from Matrix.\n"
1467 <<
"*field_names* must have one element less than there are\n"
1468 <<
"matrix columns.";
1469 throw runtime_error(os.str());
1475 for (
Index f = 0; f < field_names.
nelem(); f++) {
1476 fn_upper = field_names[f];
1479 if (fn_upper !=
"IGNORE") {
1486 Index nf_1 = f_1.size();
1488 for (
Index f = 0; f < nf_1; f++) {
1489 field_names_1[f] = field_names[f_1[f]];
1503 af.
resize(nf_1, np, 1, 1);
1504 for (
Index f = 0; f < nf_1; f++)
1516 const Index& prepend,
1524 if (condensibles.
nelem()) {
1528 for (
Index c = 0; c < condensibles.
nelem(); c++) {
1529 bool species_found =
false;
1530 for (
Index i = 0; !species_found && i < species.
nelem(); i++) {
1531 if (species[i] == condensibles[c]) {
1533 species_found =
true;
1536 if (!species_found) {
1537 std::ostringstream os;
1538 os <<
"Condensible species \"" << condensibles[c] <<
"\" not found ";
1539 os <<
"in input data.";
1540 throw runtime_error(os.str());
1543 condensible_sum *= value;
1565 const Index& prepend,
1584 const Index insert_pos = (prepend) ? 0 : new_n_fields - 1;
1590 "species p_grid to atm_fields_compact p_grid", sp_p_grid, af_p_grid);
1593 p2gridpos(p_gridpos, sp_p_grid, af_p_grid);
1595 if (sp_lat_grid.
nelem() > 1) {
1601 gridpos(lat_gridpos, sp_lat_grid, af_lat_grid);
1603 if (sp_lon_grid.
nelem() > 1) {
1608 gridpos(lon_gridpos, sp_lon_grid, af_lon_grid);
1616 interp(newfield, itw, species.
data, p_gridpos, lat_gridpos, lon_gridpos);
1626 newfield, itw, species.
data(
joker,
joker, 0), p_gridpos, lat_gridpos);
1660 if (afd(i, j, k, l) < threshold) afd(i, j, k, l) = 0.0;
1676 sp_name_grid[0] = name;
1696 const Index& prepend,
1716 const Index& prepend,
1721 bool failed =
false;
1725 #pragma omp parallel for if (!arts_omp_in_parallel() && \
1726 nelem >= arts_omp_get_max_threads())
1731 }
catch (
const std::exception& e) {
1732 #pragma omp critical(batch_atm_fields_compactAddSpecies_fail)
1734 fail_msg = e.what();
1740 if (failed)
throw runtime_error(fail_msg);
1770 os <<
"No elements in atmospheric scenario batch.\n"
1771 <<
"Check, whether any batch atmosphere file has been read!";
1772 throw runtime_error(os.str());
1782 bool failed =
false;
1785 #pragma omp parallel for if (!arts_omp_in_parallel() && \
1786 amnelem >= arts_omp_get_max_threads())
1787 for (
Index i = 0; i < amnelem; ++i) {
1789 if (failed)
continue;
1804 }
catch (
const std::exception& e) {
1805 #pragma omp critical(batch_atm_fields_compactFromArrayOfMatrix_fail)
1807 fail_msg = e.what();
1813 if (failed)
throw runtime_error(fail_msg);
1834 const Index& check_gridnames,
1847 if (check_gridnames == 1) {
1859 if (nlat == 0) nlat++;
1860 if (nlon == 0) nlon++;
1869 bool search_toa =
true;
1870 while (search_toa && l > 0) {
1871 if (
p_grid[l - 1] < p_min)
1878 os <<
"At least one atmospheric level with pressure larger p_min (="
1880 <<
"is needed, but none is found.";
1881 throw runtime_error(os.str());
1883 const Index npn = l + 1;
1891 os <<
"There must be at least one absorption species.";
1892 throw runtime_error(os.str());
1908 const String as_type =
"abs_species";
1909 const String ss_type =
"scat_species";
1913 t_field.resize(npn, nlat, nlon);
1914 for (
Index i = 0; i < nf; ++i) {
1918 os <<
"Only one temperature ('T') field allowed,\n"
1919 <<
"but found at least 2.";
1920 throw runtime_error(os.str());
1929 os <<
"One temperature ('T') field required, but none found";
1930 throw runtime_error(os.str());
1935 z_field.resize(npn, nlat, nlon);
1936 for (
Index i = 0; i < nf; ++i) {
1940 os <<
"Only one altitude ('z') field allowed,\n"
1941 <<
"but found at least 2.";
1942 throw runtime_error(os.str());
1951 os <<
"One altitude ('z') field required, but none found";
1952 throw runtime_error(os.str());
1958 for (
Index j = 0; j < nsa; ++j) {
1965 while (!found && i < nf) {
1969 if (species_type == as_type) {
1972 if (species_name == as_name) {
1982 os <<
"No field for absorption species '" << as_name <<
"' found.";
1983 throw runtime_error(os.str());
1988 std::vector<Index> Idx;
1991 for (
Index i = 0; i < nf; ++i) {
1995 if (species_type == ss_type) {
2000 const Index nsp = Idx.size();
2009 for (
Index j = 0; j < nsp; ++j) {
2035 out2 <<
" Sets the atmospheric dimensionality to 1.\n";
2036 out3 <<
" atmosphere_dim = 1\n";
2037 out3 <<
" lat_grid is set to be an empty vector\n";
2038 out3 <<
" lon_grid is set to be an empty vector\n";
2053 out2 <<
" Sets the atmospheric dimensionality to 2.\n";
2054 out3 <<
" atmosphere_dim = 2\n";
2055 out3 <<
" lon_grid is set to be an empty vector\n";
2070 out2 <<
" Sets the atmospheric dimensionality to 3.\n";
2071 out3 <<
" atmosphere_dim = 3\n";
2093 const Vector& nlte_energies,
2096 const Index& interp_order,
2097 const Index& vmr_zeropadding,
2098 const Index& vmr_nonegative,
2099 const Index& nlte_when_negative,
2103 const Vector& tfr_p_grid =
2105 const Vector& tfr_lat_grid =
2107 const Vector& tfr_lon_grid =
2109 const Vector& zfr_p_grid =
2111 const Vector& zfr_lat_grid =
2113 const Vector& zfr_lon_grid =
2116 out2 <<
" Interpolation order: " << interp_order <<
"\n";
2131 if (!(tfr_lat_grid.
nelem() == 1 && tfr_lon_grid.
nelem() == 1))
2132 throw runtime_error(
2133 "Temperature data (T_field) has wrong dimension "
2136 if (!(zfr_lat_grid.
nelem() == 1 && zfr_lon_grid.
nelem() == 1))
2137 throw runtime_error(
2138 "Altitude data (z_field) has wrong dimension "
2159 }
catch (
const std::runtime_error& e) {
2161 os << e.what() <<
"\n"
2162 <<
"Note that you can explicitly set vmr_zeropadding "
2163 <<
"to 1 in the method call.";
2164 throw runtime_error(os.str());
2183 if (tfr_lat_grid.
nelem() == 1 && tfr_lon_grid.
nelem() == 1)
2184 throw runtime_error(
2185 "Raw data has wrong dimension (1D). "
2186 "You have to use \n"
2187 "AtmFieldsCalcExpand1D instead of AtmFieldsCalc.");
2209 "Raw temperature to p_grid, 2D case", tfr_p_grid,
p_grid, interp_order);
2222 (interp_order + 1) * (interp_order + 1));
2239 "Raw z to p_grid, 2D case", zfr_p_grid,
p_grid, interp_order);
2241 "Raw z to lat_grid, 2D case", zfr_lat_grid,
lat_grid, interp_order);
2266 os <<
"VMR data of the " << gas_i <<
" the species has "
2267 <<
"wrong dimension (1D or 3D). \n";
2268 throw runtime_error(os.str());
2273 os <<
"Raw VMR[" << gas_i <<
"] to p_grid, 2D case";
2280 os <<
"Raw VMR[" << gas_i <<
"] to lat_grid, 2D case";
2316 os <<
"NLTE data of the " << qi_i <<
" temperature field has "
2317 <<
"wrong dimension (1D or 3D). \n";
2318 throw std::runtime_error(os.str());
2323 os <<
"Raw NLTE[" << qi_i <<
"] to p_grid, 2D case";
2330 os <<
"Raw NLTE[" << qi_i <<
"] to lat_grid, 2D case";
2365 if (tfr_lat_grid.
nelem() == 1 && tfr_lon_grid.
nelem() == 1)
2366 throw runtime_error(
2367 "Raw data has wrong dimension. You have to use \n"
2368 "AtmFieldsCalcExpand1D instead of AtmFieldsCalc.");
2398 }
catch (
const std::runtime_error& e) {
2400 os << e.what() <<
"\n"
2401 <<
"Note that you can explicitly set vmr_zeropadding "
2402 <<
"to 1 in the method call.";
2403 throw runtime_error(os.str());
2419 }
catch (
const std::runtime_error& e) {
2421 os << e.what() <<
"\n"
2422 <<
"Note that you can explicitly set vmr_zeropadding "
2423 <<
"to 1 in the method call.";
2424 throw runtime_error(os.str());
2440 if (vmr_nonegative) {
2455 if (nlte_when_negative != -1) {
2464 nlte_when_negative == 1 ?
t_field(ip, ir, ic) : 0;
2493 const Index& interp_order,
2497 const Vector& ufr_p_grid =
2499 const Vector& ufr_lat_grid =
2501 const Vector& ufr_lon_grid =
2503 const Vector& vfr_p_grid =
2505 const Vector& vfr_lat_grid =
2507 const Vector& vfr_lon_grid =
2509 const Vector& wfr_p_grid =
2511 const Vector& wfr_lat_grid =
2513 const Vector& wfr_lon_grid =
2516 out2 <<
" Interpolation order: " << interp_order <<
"\n";
2526 if (!(ufr_lat_grid.
nelem() == 1 && ufr_lon_grid.
nelem() == 1))
2527 throw std::runtime_error(
2528 "Magnetic u field data has wrong dimension (2D or 3D).\n");
2529 if (!(vfr_lat_grid.
nelem() == 1 && vfr_lon_grid.
nelem() == 1))
2530 throw std::runtime_error(
2531 "Magnetic v field data has wrong dimension (2D or 3D).\n");
2532 if (!(wfr_lat_grid.
nelem() == 1 && wfr_lon_grid.
nelem() == 1))
2533 throw std::runtime_error(
2534 "Magnetic w field data has wrong dimension (2D or 3D).\n");
2553 if (ufr_lat_grid.
nelem() == 1 && ufr_lon_grid.
nelem() == 1)
2554 throw std::runtime_error(
2555 "Raw data has wrong dimension (1D). You have to use \n"
2556 "MagFieldsCalcExpand1D instead of MagFieldsCalc.");
2557 if (vfr_lat_grid.
nelem() == 1 && vfr_lon_grid.
nelem() == 1)
2558 throw std::runtime_error(
2559 "Raw data has wrong dimension (1D). You have to use \n"
2560 "MagFieldsCalcExpand1D instead of MagFieldsCalc.");
2561 if (wfr_lat_grid.
nelem() == 1 && wfr_lon_grid.
nelem() == 1)
2562 throw std::runtime_error(
2563 "Raw data has wrong dimension (1D). You have to use \n"
2564 "MagFieldsCalcExpand1D instead of MagFieldsCalc.");
2580 "Raw u field to p_grid, 2D case", ufr_p_grid,
p_grid, interp_order);
2593 (interp_order + 1) * (interp_order + 1));
2610 "Raw v field to p_grid, 2D case", vfr_p_grid,
p_grid, interp_order);
2623 (interp_order + 1) * (interp_order + 1));
2640 "Raw w field to p_grid, 2D case", wfr_p_grid,
p_grid, interp_order);
2653 (interp_order + 1) * (interp_order + 1));
2669 if (ufr_lat_grid.
nelem() == 1 && ufr_lon_grid.
nelem() == 1)
2670 throw std::runtime_error(
2671 "Raw data has wrong dimension. You have to use \n"
2672 "MagFieldsCalcExpand1D instead of MagFieldsCalc.");
2673 if (vfr_lat_grid.
nelem() == 1 && vfr_lon_grid.
nelem() == 1)
2674 throw std::runtime_error(
2675 "Raw data has wrong dimension. You have to use \n"
2676 "MagFieldsCalcExpand1D instead of MagFieldsCalc.");
2677 if (wfr_lat_grid.
nelem() == 1 && wfr_lon_grid.
nelem() == 1)
2678 throw std::runtime_error(
2679 "Raw data has wrong dimension. You have to use \n"
2680 "MagFieldsCalcExpand1D instead of MagFieldsCalc.");
2734 const Index& interp_order,
2735 const Numeric& extrapolation_factor,
2737 const auto nalt =
z_field.npages();
2738 const auto nlat =
z_field.nrows();
2739 const auto nlon =
z_field.ncols();
2743 if (gf3.get_grid_name(0) not_eq
"Altitude" or
2744 gf3.get_grid_name(1) not_eq
"Latitude" or
2745 gf3.get_grid_name(2) not_eq
"Longitude") {
2746 std::ostringstream os;
2747 os <<
"Grids are bad\n";
2748 os <<
"Grids must be Altitude, Latitude, Longitude, but are: "
2749 << gf3.get_grid_name(0) <<
", " << gf3.get_grid_name(1) <<
", "
2750 << gf3.get_grid_name(2) <<
'\n';
2751 throw std::runtime_error(os.str());
2768 for (
Index ilat = 0; ilat < nlat; ilat++) {
2769 for (
Index ilon = 0; ilon < nlon; ilon++) {
2777 extrapolation_factor,
2784 extrapolation_factor);
2785 itw =
Matrix(nalt, gp[0].
w.nelem());
2794 extrapolation_factor,
2801 extrapolation_factor);
2802 itw =
Matrix(nalt, gp[0].
w.nelem());
2808 w.get_numeric_grid(0),
2811 extrapolation_factor,
2815 w.get_numeric_grid(0),
2818 extrapolation_factor);
2819 itw =
Matrix(nalt, gp[0].
w.nelem());
2841 const Index& interp_order,
2845 const Vector& ufr_p_grid =
2847 const Vector& ufr_lat_grid =
2849 const Vector& ufr_lon_grid =
2851 const Vector& vfr_p_grid =
2853 const Vector& vfr_lat_grid =
2855 const Vector& vfr_lon_grid =
2857 const Vector& wfr_p_grid =
2859 const Vector& wfr_lat_grid =
2861 const Vector& wfr_lon_grid =
2864 out2 <<
" Interpolation order: " << interp_order <<
"\n";
2874 if (!(ufr_lat_grid.
nelem() == 1 && ufr_lon_grid.
nelem() == 1))
2875 throw std::runtime_error(
2876 "Wind u field data has wrong dimension (2D or 3D).\n");
2877 if (!(vfr_lat_grid.
nelem() == 1 && vfr_lon_grid.
nelem() == 1))
2878 throw std::runtime_error(
2879 "Wind v field data has wrong dimension (2D or 3D).\n");
2880 if (!(wfr_lat_grid.
nelem() == 1 && wfr_lon_grid.
nelem() == 1))
2881 throw std::runtime_error(
2882 "Wind w field data has wrong dimension (2D or 3D).\n");
2901 if (ufr_lat_grid.
nelem() == 1 && ufr_lon_grid.
nelem() == 1)
2902 throw std::runtime_error(
2903 "Raw data has wrong dimension (1D). You have to use \n"
2904 "WindFieldsCalcExpand1D instead of WindFieldsCalc.");
2905 if (vfr_lat_grid.
nelem() == 1 && vfr_lon_grid.
nelem() == 1)
2906 throw std::runtime_error(
2907 "Raw data has wrong dimension (1D). You have to use \n"
2908 "WindFieldsCalcExpand1D instead of WindFieldsCalc.");
2909 if (wfr_lat_grid.
nelem() == 1 && wfr_lon_grid.
nelem() == 1)
2910 throw std::runtime_error(
2911 "Raw data has wrong dimension (1D). You have to use \n"
2912 "WindFieldsCalcExpand1D instead of WindFieldsCalc.");
2928 "Raw u field to p_grid, 2D case", ufr_p_grid,
p_grid, interp_order);
2941 (interp_order + 1) * (interp_order + 1));
2958 "Raw v field to p_grid, 2D case", vfr_p_grid,
p_grid, interp_order);
2971 (interp_order + 1) * (interp_order + 1));
2988 "Raw w field to p_grid, 2D case", wfr_p_grid,
p_grid, interp_order);
3001 (interp_order + 1) * (interp_order + 1));
3017 if (ufr_lat_grid.
nelem() == 1 && ufr_lon_grid.
nelem() == 1)
3018 throw std::runtime_error(
3019 "Raw data has wrong dimension. You have to use \n"
3020 "WindFieldsCalcExpand1D instead of WindFieldsCalc.");
3021 if (vfr_lat_grid.
nelem() == 1 && vfr_lon_grid.
nelem() == 1)
3022 throw std::runtime_error(
3023 "Raw data has wrong dimension. You have to use \n"
3024 "WindFieldsCalcExpand1D instead of WindFieldsCalc.");
3025 if (wfr_lat_grid.
nelem() == 1 && wfr_lon_grid.
nelem() == 1)
3026 throw std::runtime_error(
3027 "Raw data has wrong dimension. You have to use \n"
3028 "WindFieldsCalcExpand1D instead of WindFieldsCalc.");
3082 const Vector& nlte_energies,
3084 const Index& interp_order,
3085 const Index& vmr_zeropadding,
3086 const Index& vmr_nonegative,
3087 const Index& nlte_when_negative,
3093 throw runtime_error(
3094 "This function is intended for 2D and 3D. For 1D, use *AtmFieldsCalc*.");
3131 assert(t_temp.
npages() == np);
3133 t_field.resize(np, nlat, nlon);
3134 z_field.resize(np, nlat, nlon);
3135 vmr_field.resize(nspecies, np, nlat, nlon);
3137 nlte_field.Type() = EnergyLevelMapType::Tensor3_t;
3145 for (
Index ilon = 0; ilon < nlon; ilon++) {
3146 for (
Index ilat = 0; ilat < nlat; ilat++) {
3147 for (
Index ip = 0; ip < np; ip++) {
3148 t_field(ip, ilat, ilon) = t_temp(ip, 0, 0);
3149 z_field(ip, ilat, ilon) = z_temp(ip, 0, 0);
3150 for (
Index is = 0; is < nspecies; is++) {
3151 vmr_field(is, ip, ilat, ilon) = vmr_temp(is, ip, 0, 0);
3154 nlte_field.Data()(is, ip, ilat, ilon) = nlte_temp.
Data()(is, ip, 0, 0);
3173 const Index& interp_order,
3179 throw std::runtime_error(
3180 "This function is intended for 2D and 3D. For 1D, use *MagFieldsCalc*.");
3184 Tensor3 mag_u_field_temp, mag_v_field_temp, mag_w_field_temp;
3206 assert(mag_u_field_temp.
npages() == np);
3207 assert(mag_v_field_temp.
npages() == np);
3208 assert(mag_w_field_temp.
npages() == np);
3214 for (
Index ilon = 0; ilon < nlon; ilon++) {
3215 for (
Index ilat = 0; ilat < nlat; ilat++) {
3216 for (
Index ip = 0; ip < np; ip++) {
3217 mag_u_field(ip, ilat, ilon) = mag_u_field_temp(ip, 0, 0);
3218 mag_v_field(ip, ilat, ilon) = mag_v_field_temp(ip, 0, 0);
3219 mag_w_field(ip, ilat, ilon) = mag_w_field_temp(ip, 0, 0);
3236 const Index& interp_order,
3242 throw std::runtime_error(
3243 "This function is intended for 2D and 3D. For 1D, use *WindFieldsCalc*.");
3247 Tensor3 wind_u_field_temp, wind_v_field_temp, wind_w_field_temp;
3269 assert(wind_u_field_temp.
npages() == np);
3270 assert(wind_v_field_temp.
npages() == np);
3271 assert(wind_w_field_temp.
npages() == np);
3277 for (
Index ilon = 0; ilon < nlon; ilon++) {
3278 for (
Index ilat = 0; ilat < nlat; ilat++) {
3279 for (
Index ip = 0; ip < np; ip++) {
3280 wind_u_field(ip, ilat, ilon) = wind_u_field_temp(ip, 0, 0);
3281 wind_v_field(ip, ilat, ilon) = wind_v_field_temp(ip, 0, 0);
3282 wind_w_field(ip, ilat, ilon) = wind_w_field_temp(ip, 0, 0);
3296 const Index& chk_vmr_nan,
3307 const bool chknan = chk_vmr_nan;
3310 throw runtime_error(
"No use in calling this method for 1D.");
3329 t_field.resize(np, nlat, nlon);
3330 z_field.resize(np, nlat, nlon);
3331 vmr_field.resize(nspecies, np, nlat, nlon);
3333 for (
Index ilon = 0; ilon < nlon; ilon++) {
3334 for (
Index ilat = 0; ilat < nlat; ilat++) {
3335 for (
Index ip = 0; ip < np; ip++) {
3336 t_field(ip, ilat, ilon) = t_temp(ip, 0, 0);
3337 z_field(ip, ilat, ilon) = z_temp(ip, 0, 0);
3338 for (
Index is = 0; is < nspecies; is++) {
3339 vmr_field(is, ip, ilat, ilon) = vmr_temp(is, ip, 0, 0);
3360 if (ilat < 0 || ilat >=
lat_grid.nelem())
3361 throw runtime_error(
3362 "Invalid of *ilat*. It must be >= 0 and less than "
3363 "length of *lat_grid*.");
3378 if (ilat < 0 || ilon >=
lon_grid.nelem())
3379 throw runtime_error(
3380 "Invalid of *ilon*. It must be >= 0 and less than "
3381 "length of *lon_grid*.");
3396 throw runtime_error(
"Invalid of *atmosphere_dim*. It must be 1-3.");
3417 const Index& interp_order,
3476 String tmp_basename = basename;
3477 if (basename.length() && basename[basename.length() - 1] !=
'/')
3478 tmp_basename +=
".";
3481 String file_name = tmp_basename +
"t.xml";
3484 out3 <<
"Temperature field read from file: " << file_name <<
"\n";
3487 file_name = tmp_basename +
"z.xml";
3490 out3 <<
"Altitude field read from file: " << file_name <<
"\n";
3501 file_name = tmp_basename +
3514 <<
" profile read from file: " << file_name <<
"\n";
3519 nlte_quantum_identifiers.resize(0);
3533 String tmp_basename = basename;
3534 if (basename.length() && basename[basename.length() - 1] !=
'/')
3535 tmp_basename +=
".";
3538 String file_name = tmp_basename +
"mag_u.xml";
3541 out3 <<
"Bu field read from file: " << file_name <<
"\n";
3544 file_name = tmp_basename +
"mag_v.xml";
3547 out3 <<
"Bv field read from file: " << file_name <<
"\n";
3550 file_name = tmp_basename +
"mag_w.xml";
3553 out3 <<
"Bw field read from file: " << file_name <<
"\n";
3566 String tmp_basename = basename;
3567 if (basename.length() && basename[basename.length() - 1] !=
'/')
3568 tmp_basename +=
".";
3571 String file_name = tmp_basename +
"wind_u.xml";
3574 out3 <<
"Wind u field read from file: " << file_name <<
"\n";
3577 file_name = tmp_basename +
"wind_v.xml";
3580 out3 <<
"Wind v field read from file: " << file_name <<
"\n";
3583 file_name = tmp_basename +
"wind_w.xml";
3586 out3 <<
"Wind w field read from file: " << file_name <<
"\n";
3601 const Index& expect_vibrational_energies,
3605 String tmp_basename = basename;
3606 if (basename.length() && basename[basename.length() - 1] !=
'/')
3607 tmp_basename +=
".";
3610 String file_name = tmp_basename +
"t.xml";
3613 out3 <<
"Temperature field read from file: " << file_name <<
"\n";
3616 file_name = tmp_basename +
"z.xml";
3619 out3 <<
"Altitude field read from file: " << file_name <<
"\n";
3630 file_name = tmp_basename +
3643 <<
" profile read from file: " << file_name <<
"\n";
3647 file_name = tmp_basename +
"nlte.xml";
3650 out3 <<
"NLTE field array read from file: " << file_name <<
"\n";
3653 file_name = tmp_basename +
"qi.xml";
3656 out3 <<
"NLTE identifier array read from file: " << file_name <<
"\n";
3658 if (expect_vibrational_energies) {
3660 file_name = tmp_basename +
"ev.xml";
3663 out3 <<
"NLTE energy levels array read from file: " << file_name <<
"\n";
3673 os <<
"The quantum identifers and the NLTE temperature fields\n"
3674 <<
"are of different lengths. This should not be the case.\n"
3675 <<
"please check the qi.xml and t_nlte.xml files under\n"
3676 << basename << std::endl
3677 <<
"to correct this error.\n";
3678 throw std::runtime_error(os.str());
3687 const Index& interp_order,
3688 const Index& set_lowest_altitude_to_zero,
3692 out3 <<
"Reading GriddedField2 surface altitude from " << filename <<
"\n";
3696 out3 <<
"Surface altitude field interpolated back to lat_grid and lon_grid\n";
3704 if (set_lowest_altitude_to_zero) {
3716 out3 <<
"Setting surface to constant altitude of " << altitude <<
" m\n";
3756 out3 <<
" Result = " << outvalue <<
"\n";
3766 const Vector& p_grid_old,
3773 if (&
p_grid == &p_grid_old) {
3775 os <<
"The old and new grids (p_grid and p_grid_old) are not allowed\n"
3776 <<
"to be identical (pointing to same memory space).\n"
3777 <<
"But they are doing in your case.";
3778 throw runtime_error(os.str());
3790 throw runtime_error(
"Argument *nfill* must be >= 0.");
3797 p_grid.resize((n0 - 1) * (1 + nfill) + 1);
3800 p_grid[0] = p_grid_old[0];
3802 for (
Index i = 1; i < n0; i++) {
3805 pnew, 2 + nfill, p_grid_old[i - 1], p_grid_old[i],
verbosity);
3806 for (
Index j = 1; j < nfill + 2; j++) {
3821 const Vector& p_grid_old,
3828 if (&
p_grid == &p_grid_old) {
3830 os <<
"The old and new grids (p_grid and p_grid_old) are not allowed\n"
3831 <<
"to be identical (pointing to same memory space).\n"
3832 <<
"But they are doing in your case.";
3833 throw runtime_error(os.str());
3844 if (p_step10 <= 0) {
3846 os <<
"The keyword argument p_step must be >0.";
3847 throw runtime_error(os.str());
3853 const Numeric p_step = log(
pow(10.0, p_step10));
3875 log_p_new.push_back(log_p_old[0]);
3877 for (
Index i = 1; i < log_p_old.
nelem(); ++i) {
3879 log_p_old[i - 1] - log_p_old[i];
3881 const Numeric dp_by_p_step = dp / p_step;
3894 for (
Index j = 1; j <= n; ++j)
3895 log_p_new.push_back(log_p_old[i - 1] - (
Numeric)j * ddp);
3900 for (
Index i = 0; i < log_p_new.
nelem(); ++i) log_p[i] = log_p_new[i];
3912 const Index& no_negZ,
3935 os <<
"z_field_raw needs to be monotonous, but this is not the case.\n";
3936 throw runtime_error(os.str());
3965 const Index& no_negZ,
4001 throw runtime_error(
"No need to use this method for 1D and 2D.");
4022 for (
Index a = 0; a < na; a++) {
4026 for (
Index o = 0; o < no; o++) {
4027 for (
Index p = 0; p < np; p++) {
4061 throw runtime_error(
4062 "The atmospheric fields must be flagged to have "
4063 "passed a consistency check (atmfields_checked=1).");
4075 os <<
"No water vapour tag group in *abs_species*.\n"
4076 <<
"Be aware that this leads to significant variations in atmospheres\n"
4077 <<
"that contain considerable amounts of water vapour (e.g. Earth)!\n";
4086 os <<
"The value of *p_hse* must be inside the range of *p_grid*:"
4087 <<
" p_hse = " <<
p_hse <<
" Pa\n"
4088 <<
" p_grid = << p_grid[np-1]"
4089 <<
" - " <<
p_grid[0] <<
" Pa\n";
4090 throw runtime_error(os.str());
4094 throw runtime_error(
"The value of *z_hse_accuracy* must be > 0.");
4117 for (
Index ilat = 0; ilat < nlat; ilat++) {
4131 for (
Index ilon = 0; ilon < nlon; ilon++) {
4158 for (
Index ip = 0; ip < np - 1; ip++) {
4166 const Numeric g = (g1 + g2) / 2.0;
4173 hm = 0.5 * (
vmr_field(firstH2O, ip, ilat, ilon) +
4174 vmr_field(firstH2O, ip + 1, ilat, ilon));
4180 (1 / (2 * (1 - hm * k))) *
4189 z_acc =
max(z_acc, fabs(znew -
z_field(ip + 1, ilat, ilon)));
4190 z_field(ip + 1, ilat, ilon) = znew;
4210 os <<
"The surface altitude (*z_surface*) cannot be outside "
4211 <<
"of the altitudes in *z_field*.";
4212 throw runtime_error(os.str());
4228 throw runtime_error(
4229 "Size of *vmr_field* and length of *abs_species* do not agree.");
4243 const Vector& vmr_values,
4249 if (vmr_values.
nelem() not_eq nspecies)
4250 throw std::runtime_error(
"Not same number of vmr_values as abs_species.");
4252 out3 <<
"Setting all " << nspecies <<
" species to constant VMR\n";
4254 for (
Index i = 0; i < nspecies; i++) {
4276 if (nn == 0)
return;
4278 Tensor4 nlte_tensor4(nn, np, nlat, nlon);
4282 for (
Index in = 0; in < nn; in++) {
4288 for (
Index k=0; k<band.NumLines(); k++) {
4290 band.Population(Absorption::PopulationType::ByNLTEPopulationDistribution);
4292 if (not checked[in]) {
4295 for (
Index ip = 0; ip < np; ip++) {
4296 for (
Index ilat = 0; ilat < nlat; ilat++) {
4297 for (
Index ilon = 0; ilon < nlon; ilon++) {
4298 lte(ip, ilat, ilon) =
4302 band.Isotopologue()),
4304 band.Isotopologue()));
4312 band.Population(Absorption::PopulationType::ByNLTEPopulationDistribution);
4314 if (not checked[in]) {
4316 for (
Index ip = 0; ip < np; ip++) {
4317 for (
Index ilat = 0; ilat < nlat; ilat++) {
4318 for (
Index ilon = 0; ilon < nlon; ilon++) {
4319 lte(ip, ilat, ilon) =
4323 band.Isotopologue()),
4325 band.Isotopologue()));
4336 for (
Index in = 0; in < nn; in++) {
4337 if (not checked[in]) {
4338 out2 <<
"Did not find match among lines for: "
4339 << nlte_quantum_identifiers[in] <<
"\n";
4359 if (nn == 0)
return;
4364 for (
Index in = 1; in < nn; in++) {
4366 for (
Index ix = 0; ix < in; ix++) {
4367 if (nlte_quantum_identifiers[in].
Species() ==
4368 nlte_quantum_identifiers[ix].
Species() and
4371 part_fun_pos[in] = part_fun_pos[ix];
4377 part_fun_pos[in] =
x;
4382 Tensor4 part_fun(
x, np, nlat, nlon, 0.0);
4383 Tensor4 nlte_tensor4(nn, np, nlat, nlon, 0);
4387 for (
Index in = 0; in < nn; in++) {
4393 for (
Index k=0; k<band.NumLines(); k++) {
4395 band.Population(Absorption::PopulationType::ByNLTEPopulationDistribution);
4397 if (not checked[in]) {
4400 for (
Index ip = 0; ip < np; ip++) {
4401 for (
Index ilat = 0; ilat < nlat; ilat++) {
4402 for (
Index ilon = 0; ilon < nlon; ilon++) {
4403 lte(ip, ilat, ilon) =
4406 part_fun(part_fun_pos[in], ip, ilat, ilon) +=
4407 lte(ip, ilat, ilon);
4415 band.Population(Absorption::PopulationType::ByNLTEPopulationDistribution);
4417 if (not checked[in]) {
4420 for (
Index ip = 0; ip < np; ip++) {
4421 for (
Index ilat = 0; ilat < nlat; ilat++) {
4422 for (
Index ilon = 0; ilon < nlon; ilon++) {
4423 lte(ip, ilat, ilon) =
4425 band.E0(k) + h * band.F0(k)) *
4427 part_fun(part_fun_pos[in], ip, ilat, ilon) +=
4428 lte(ip, ilat, ilon);
4439 for (
Index in = 0; in < nn; in++) {
4440 if (not checked[in]) {
4441 out2 <<
"Did not find match among lines for: "
4442 << nlte_quantum_identifiers[in] <<
"\n";
4446 for (
Index in = 0; in < nn; in++) {
void MagFieldsCalc(Tensor3 &mag_u_field, Tensor3 &mag_v_field, Tensor3 &mag_w_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &mag_u_field_raw, const GriddedField3 &mag_v_field_raw, const GriddedField3 &mag_w_field_raw, const Index &atmosphere_dim, const Index &interp_order, const Verbosity &verbosity)
WORKSPACE METHOD: MagFieldsCalc.
Index atmosphere_dim(Workspace &ws) noexcept
Tensor3 wind_v_field(Workspace &ws) noexcept
void p_gridDensify(Vector &p_grid, Index &atmfields_checked, Index &atmgeom_checked, Index &cloudbox_checked, const Vector &p_grid_old, const Index &nfill, const Verbosity &verbosity)
WORKSPACE METHOD: p_gridDensify.
Implementation of gridded fields.
bool is_same_within_epsilon(const Numeric &a, const Numeric &b, const Numeric &epsilon)
Check, if two numbers agree within a given epsilon.
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...
const ArrayOfString & get_string_grid(Index i) const
Get a string grid.
Tensor3 z_field(Workspace &ws) noexcept
void set_grid_name(Index i, const String &s)
Set grid name.
void resize(Index b, Index p, Index r, Index c)
Resize function.
Numeric lat(Workspace &ws) noexcept
Numeric g0(Workspace &ws) noexcept
void FieldFromGriddedFieldCheckLatLonHelper(const Vector &lat_grid, const Vector &lon_grid, const Index ilat, const Index ilon, const GriddedField &gfield)
Check for correct grid dimensions.
void toupper()
Convert to upper case.
Class to identify and match lines by their quantum numbers.
void GriddedFieldPRegridHelper(Index &ing_min, Index &ing_max, ArrayOfGridPosPoly &gp_p, Matrix &itw, GriddedField &gfraw_out, const GriddedField &gfraw_in, const Index p_grid_index, ConstVectorView p_grid, const Index &interp_order, const Index &zeropadding, const Verbosity &verbosity)
Calculate grid positions and interpolations weights for GriddedFieldPRegrid.
Index atmgeom_checked(Workspace &ws) noexcept
Declarations required for the calculation of absorption coefficients.
Complex w(Complex z) noexcept
The Faddeeva function.
void p_gridRefine(Vector &p_grid, Index &atmfields_checked, Index &atmgeom_checked, Index &cloudbox_checked, const Vector &p_grid_old, const Numeric &p_step10, const Verbosity &)
WORKSPACE METHOD: p_gridRefine.
void p_gridFromZRaw(Vector &p_grid, const GriddedField3 &z_field_raw, const Index &no_negZ, const Verbosity &)
WORKSPACE METHOD: p_gridFromZRaw.
Numeric z_hse_accuracy(Workspace &ws) noexcept
void atm_gridsFromZRaw(Vector &p_grid, Vector &lat_grid, Vector &lon_grid, const GriddedField3 &z_field_raw, const Index &no_negZ, const Verbosity &v)
WORKSPACE METHOD: atm_gridsFromZRaw.
void gridpos(ArrayOfGridPos &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Numeric &extpolfac)
Set up a grid position Array.
const Index GFIELD4_LAT_GRID
const Index GFIELD4_LON_GRID
void p2gridpos(ArrayOfGridPos &gp, ConstVectorView old_pgrid, ConstVectorView new_pgrid, const Numeric &extpolfac)
Calculates grid positions for pressure values.
Vector lat_grid(Workspace &ws) noexcept
Array< GridPosPoly > ArrayOfGridPosPoly
An Array of grid positions.
Header file for interpolation.cc.
const Tensor4 & Data() const noexcept
Energy level type.
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPos &tc)
Red 1D Interpolate.
invlib::Matrix< ArtsMatrix > Matrix
invlib wrapper type for ARTS matrices.
GriddedField3 mag_v_field_raw(Workspace &ws) noexcept
void vmr_fieldSetAllConstant(Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &vmr_values, const Verbosity &verbosity)
WORKSPACE METHOD: vmr_fieldSetAllConstant.
void parse_atmcompact_scattype(String &scat_type, const String &field_name, const String &delim)
Verbosity verbosity(Workspace &ws) noexcept
void WindRawRead(GriddedField3 &wind_u_field_raw, GriddedField3 &wind_v_field_raw, GriddedField3 &wind_w_field_raw, const String &basename, const Verbosity &verbosity)
WORKSPACE METHOD: WindRawRead.
void AtmFieldsCalcExpand1D(Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, EnergyLevelMap &nlte_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &t_field_raw, const GriddedField3 &z_field_raw, const ArrayOfGriddedField3 &vmr_field_raw, const ArrayOfGriddedField3 &nlte_field_raw, const ArrayOfQuantumIdentifier &nlte_ids, const Vector &nlte_energies, const Index &atmosphere_dim, const Index &interp_order, const Index &vmr_zeropadding, const Index &vmr_nonegative, const Index &nlte_when_negative, const Verbosity &verbosity)
WORKSPACE METHOD: AtmFieldsCalcExpand1D.
void AtmFieldsExpand1D(Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Index &atmosphere_dim, const Index &chk_vmr_nan, const Verbosity &)
WORKSPACE METHOD: AtmFieldsExpand1D.
const Index GFIELD3_LON_GRID
Numeric p_hse(Workspace &ws) noexcept
Tensor3 wind_u_field(Workspace &ws) noexcept
Numeric single_partition_function(const Numeric &T, const SpeciesAuxData::AuxType &partition_type, const ArrayOfGriddedField1 &partition_data)
Computes the partition function at one temperature.
ArrayOfArrayOfAbsorptionLines abs_lines_per_species(Workspace &ws) noexcept
Tensor3 mag_w_field(Workspace &ws) noexcept
void batch_atm_fields_compactFromArrayOfMatrix(ArrayOfGriddedField4 &batch_atm_fields_compact, const Index &atmosphere_dim, const ArrayOfMatrix &am, const ArrayOfString &field_names, const Verbosity &verbosity)
WORKSPACE METHOD: batch_atm_fields_compactFromArrayOfMatrix.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
Numeric planet_rotation_period(Workspace &ws) noexcept
void atm_fields_compactCleanup(GriddedField4 &atm_fields_compact, const Numeric &threshold, const Verbosity &)
WORKSPACE METHOD: atm_fields_compactCleanup.
QuantumIdentifier::QType Index LowerQuantumNumbers Species
bool id_in_line_lower(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier match a line's ID.
Index nrows() const
Returns the number of rows.
const Index GFIELD3_P_GRID
GriddedField3 wind_w_field_raw(Workspace &ws) noexcept
const Array< SpeciesRecord > species_data
Species Data.
void AtmosphereSet3D(Index &atmosphere_dim, Vector &lat_true, Vector &lon_true, const Verbosity &verbosity)
WORKSPACE METHOD: AtmosphereSet3D.
void batch_atm_fields_compactAddConstant(ArrayOfGriddedField4 &batch_atm_fields_compact, const String &name, const Numeric &value, const Index &prepend, const ArrayOfString &condensibles, const Verbosity &verbosity)
WORKSPACE METHOD: batch_atm_fields_compactAddConstant.
bool id_in_line_upper(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier match a line's ID.
void nlte_fieldSetLteInternalPartitionFunction(Index &nlte_do, EnergyLevelMap &nlte_field, ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfQuantumIdentifier &nlte_quantum_identifiers, const Tensor3 &t_field, const Verbosity &verbosity)
WORKSPACE METHOD: nlte_fieldSetLteInternalPartitionFunction.
void MagFieldsCalcExpand1D(Tensor3 &mag_u_field, Tensor3 &mag_v_field, Tensor3 &mag_w_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &mag_u_field_raw, const GriddedField3 &mag_v_field_raw, const GriddedField3 &mag_w_field_raw, const Index &atmosphere_dim, const Index &interp_order, const Verbosity &verbosity)
WORKSPACE METHOD: MagFieldsCalcExpand1D.
void lat_gridFromRawField(Vector &lat_grid, const GriddedField3 &field_raw, const Verbosity &)
WORKSPACE METHOD: lat_gridFromRawField.
Auxiliary data for isotopologues.
void resize(Index p, Index r, Index c)
Resize function.
Numeric lon(Workspace &ws) noexcept
void nlte_fieldSetLteExternalPartitionFunction(Index &nlte_do, EnergyLevelMap &nlte_field, ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfQuantumIdentifier &nlte_quantum_identifiers, const SpeciesAuxData &partition_functions, const Tensor3 &t_field, const Verbosity &verbosity)
WORKSPACE METHOD: nlte_fieldSetLteExternalPartitionFunction.
GriddedField4 atm_fields_compact(Workspace &ws) noexcept
Index npages() const
Returns the number of pages.
Numeric boltzman_factor(Numeric T, Numeric E0)
Computes exp(- E0/kT)
Vector lon_true(Workspace &ws) noexcept
void GriddedFieldZToPRegridHelper(Index &ing_min, Index &ing_max, ArrayOfGridPosPoly &gp_p, Matrix &itw, const GriddedField &gfraw_in, const Index z_grid_index, ConstVectorView z_grid, const Index &interp_order, const Index &zeropadding, const Verbosity &verbosity)
Calculate grid positions and interpolations weights for GriddedFieldZToPRegrid.
ArrayOfString particle_bulkprop_names(Workspace &ws) noexcept
Index get_grid_size(Index i) const
Get the size of a grid.
void GriddedFieldLatLonRegrid(GriddedField2 &gfraw_out, const Vector &lat_true, const Vector &lon_true, const GriddedField2 &gfraw_in_orig, const Index &interp_order, const Verbosity &verbosity)
WORKSPACE METHOD: GriddedFieldLatLonRegrid.
ArrayOfGriddedField3 nlte_field_raw(Workspace &ws) noexcept
EnergyLevelMap nlte_field(Workspace &ws) noexcept
Numeric pow(const Rational base, Numeric exp)
Power of.
bool is_decreasing(ConstVectorView x)
Checks if a vector is sorted in reversed order and is strictly decreasing.
Index nelem(const Lines &l)
Number of lines.
void MagFieldsFromAltitudeRawCalc(Tensor3 &mag_u_field, Tensor3 &mag_v_field, Tensor3 &mag_w_field, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const GriddedField3 &mag_u_field_raw, const GriddedField3 &mag_v_field_raw, const GriddedField3 &mag_w_field_raw, const Index &interp_order, const Numeric &extrapolation_factor, const Verbosity &verbosity)
WORKSPACE METHOD: MagFieldsFromAltitudeRawCalc.
Index species_index_from_species_name(String name)
Return species index for given species name.
void vmr_fieldSetConstant(Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const String &species, const Numeric &vmr_value, const Verbosity &)
WORKSPACE METHOD: vmr_fieldSetConstant.
void AtmFieldPRegridHelper(Index &ing_min, Index &ing_max, ArrayOfGridPosPoly &gp_p, Matrix &itw, ConstVectorView p_grid_out, ConstVectorView p_grid_in, const Index &interp_order, const Verbosity &verbosity)
Calculate grid positions and interpolations weights for AtmFieldPRegrid.
const Vector & get_numeric_grid(Index i) const
Get a numeric grid.
Declarations for agendas.
void AtmFieldPRegrid(Tensor3 &atmtensor_out, const Tensor3 &atmtensor_in_orig, const Vector &p_grid_new, const Vector &p_grid_old, const Index &interp_order, const Verbosity &verbosity)
WORKSPACE METHOD: AtmFieldPRegrid.
void xml_read_from_file(const String &filename, T &type, const Verbosity &verbosity)
Reads data from XML file.
Declarations having to do with the four output streams.
const Index GFIELD3_LAT_GRID
void gridpos_poly_longitudinal(const String &error_msg, ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac)
Set up grid positions for higher order interpolation on longitudes.
Index ncols() const
Returns the number of columns.
void atm_fields_compactAddConstant(GriddedField4 &af, const String &name, const Numeric &value, const Index &prepend, const ArrayOfString &condensibles, const Verbosity &verbosity)
WORKSPACE METHOD: atm_fields_compactAddConstant.
void g0_agendaExecute(Workspace &ws, Numeric &g0, const Numeric lat, const Numeric lon, const Agenda &input_agenda)
GriddedField3 t_field_raw(Workspace &ws) noexcept
void z_surfaceFromFileAndGrid(Matrix &z_surface, const Vector &lat_grid, const Vector &lon_grid, const String &filename, const Index &interp_order, const Index &set_lowest_altitude_to_zero, const Verbosity &verbosity)
WORKSPACE METHOD: z_surfaceFromFileAndGrid.
void MagRawRead(GriddedField3 &mag_u_field_raw, GriddedField3 &mag_v_field_raw, GriddedField3 &mag_w_field_raw, const String &basename, const Verbosity &verbosity)
WORKSPACE METHOD: MagRawRead.
void wind_u_fieldIncludePlanetRotation(Tensor3 &wind_u_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &refellipsoid, const Tensor3 &z_field, const Numeric &planet_rotation_period, const Verbosity &)
WORKSPACE METHOD: wind_u_fieldIncludePlanetRotation.
Index nelem() const
Returns the number of elements.
Tensor4 vmr_field(Workspace &ws) noexcept
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
Index atmfields_checked(Workspace &ws) noexcept
GriddedField3 wind_v_field_raw(Workspace &ws) noexcept
Vector p_grid(Workspace &ws) noexcept
Index ncols() const
Returns the number of columns.
NUMERIC Numeric
The type to use for all floating point numbers.
Index npages() const
Returns the number of pages.
Numeric molarmass_dry_air(Workspace &ws) noexcept
Index nbooks() const
Returns the number of books.
Index npages(Workspace &ws) noexcept
GriddedField3 wind_u_field_raw(Workspace &ws) noexcept
Vector refellipsoid(Workspace &ws) noexcept
void InterpAtmFieldToPosition(Numeric &outvalue, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Vector &rtp_pos, const Tensor3 &field, const Verbosity &verbosity)
WORKSPACE METHOD: InterpAtmFieldToPosition.
bool is_lon_cyclic(ConstVectorView grid, const Numeric &epsilon)
Check if the given longitude grid is cyclic.
Vector lat_true(Workspace &ws) noexcept
void z2g(Numeric &g, const Numeric &r, const Numeric &g0, const Numeric &z)
void resize(const GriddedField3 &gf)
Make this GriddedField3 the same size as the given one.
void resize(const GriddedField4 &gf)
Make this GriddedField4 the same size as the given one.
void atm_fields_compactFromMatrix(GriddedField4 &af, const Index &atmosphere_dim, const Matrix &im, const ArrayOfString &field_names, const Verbosity &)
WORKSPACE METHOD: atm_fields_compactFromMatrix.
void lon_gridFromRawField(Vector &lon_grid, const GriddedField3 &field_raw, const Verbosity &)
WORKSPACE METHOD: lon_gridFromRawField.
void resize(Index r, Index c)
Resize function.
void AtmWithNLTERawRead(GriddedField3 &t_field_raw, GriddedField3 &z_field_raw, ArrayOfGriddedField3 &vmr_field_raw, ArrayOfGriddedField3 &nlte_field_raw, ArrayOfQuantumIdentifier &nlte_quantum_identifiers, Vector &nlte_vibrational_energies, const ArrayOfArrayOfSpeciesTag &abs_species, const String &basename, const Index &expect_vibrational_energies, const Verbosity &verbosity)
WORKSPACE METHOD: AtmWithNLTERawRead.
Index nrows() const
Returns the number of rows.
Header file for interpolation_poly.cc.
Vector lon_grid(Workspace &ws) noexcept
void pos2true_latlon(Numeric &lat, Numeric &lon, const Index &atmosphere_dim, ConstVectorView lat_grid, ConstVectorView lat_true, ConstVectorView lon_true, ConstVectorView pos)
Determines the true alt and lon for an "ARTS position".
Internal cloudbox functions.
void z_fieldFromHSE(Workspace &ws, Tensor3 &z_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &lat_true, const Vector &lon_true, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &t_field, const Tensor4 &vmr_field, const Vector &refellipsoid, const Matrix &z_surface, const Index &atmfields_checked, const Agenda &g0_agenda, const Numeric &molarmass_dry_air, const Numeric &p_hse, const Numeric &z_hse_accuracy, const Verbosity &verbosity)
WORKSPACE METHOD: z_fieldFromHSE.
void AtmFieldsCalc(Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, EnergyLevelMap &nlte_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &t_field_raw, const GriddedField3 &z_field_raw, const ArrayOfGriddedField3 &vmr_field_raw, const ArrayOfGriddedField3 &nlte_field_raw, const ArrayOfQuantumIdentifier &nlte_ids, const Vector &nlte_energies, const Index &atmosphere_dim, const Index &interp_order, const Index &vmr_zeropadding, const Index &vmr_nonegative, const Index &nlte_when_negative, const Verbosity &verbosity)
WORKSPACE METHOD: AtmFieldsCalc.
Index nrows(Workspace &ws) noexcept
Index nrows() const
Returns the number of rows.
Index nlte_do(Workspace &ws) noexcept
void atm_fields_compactExpand(GriddedField4 &af, Index &nf, const String &name, const Index &prepend, const Verbosity &)
atm_fields_compactExpand
QuantumIdentifier::QType Isotopologue
invlib::Vector< ArtsVector > Vector
invlib wrapper type for ARTS vectors.
Structure to store a grid position.
void set_grid(Index i, const Vector &g)
Set a numeric grid.
ArrayOfAbsorptionLines abs_lines(Workspace &ws) noexcept
bool is_increasing(ConstVectorView x)
Checks if a vector is sorted and strictly increasing.
void GriddedFieldLatLonExpand(GriddedField2 &gfraw_out, const GriddedField2 &gfraw_in_orig, const Verbosity &)
WORKSPACE METHOD: GriddedFieldLatLonExpand.
void AtmFieldsExtract1D(Index &atmosphere_dim, Vector &lat_grid, Vector &lon_grid, Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, const Index &ilat, const Index &ilon, const Verbosity &verbosity)
WORKSPACE METHOD: AtmFieldsExtract1D.
void atm_fields_compactAddSpecies(GriddedField4 &atm_fields_compact, const String &name, const GriddedField3 &species, const Index &prepend, const Verbosity &verbosity)
WORKSPACE METHOD: atm_fields_compactAddSpecies.
void WindFieldsCalc(Tensor3 &wind_u_field, Tensor3 &wind_v_field, Tensor3 &wind_w_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &wind_u_field_raw, const GriddedField3 &wind_v_field_raw, const GriddedField3 &wind_w_field_raw, const Index &atmosphere_dim, const Index &interp_order, const Verbosity &verbosity)
WORKSPACE METHOD: WindFieldsCalc.
Array< QuantumIdentifier > ArrayOfQuantumIdentifier
void interp_atmfield_by_gp(VectorView x, const Index &atmosphere_dim, ConstTensor3View x_field, const ArrayOfGridPos &gp_p, const ArrayOfGridPos &gp_lat, const ArrayOfGridPos &gp_lon)
Interpolates an atmospheric field given the grid positions.
void GriddedFieldZToPRegrid(GriddedField3 &gfraw_out, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const GriddedField3 &gfraw_in_orig, const Index &interp_order, const Index &zeropadding, const Verbosity &verbosity)
WORKSPACE METHOD: GriddedFieldZToPRegrid.
Index ncols() const
Returns the number of columns.
Constains various line scaling functions.
void batch_atm_fields_compactCleanup(ArrayOfGriddedField4 &batch_atm_fields_compact, const Numeric &threshold, const Verbosity &verbosity)
WORKSPACE METHOD: batch_atm_fields_compactCleanup.
void GriddedFieldPRegrid(GriddedField3 &gfraw_out, const Vector &p_grid, const GriddedField3 &gfraw_in_orig, const Index &interp_order, const Index &zeropadding, const Verbosity &verbosity)
WORKSPACE METHOD: GriddedFieldPRegrid.
Tensor4 particle_bulkprop_field(Workspace &ws) noexcept
Declaration of functions in rte.cc.
Tensor3 mag_v_field(Workspace &ws) noexcept
Tensor3 t_field(Workspace &ws) noexcept
void VectorNLogSpace(Vector &x, const Index &n, const Numeric &start, const Numeric &stop, const Verbosity &verbosity)
WORKSPACE METHOD: VectorNLogSpace.
Header file for special_interp.cc.
void GriddedFieldLatLonRegridHelper(ArrayOfGridPosPoly &gp_lat, ArrayOfGridPosPoly &gp_lon, Tensor3 &itw, GriddedField &gfraw_out, const GriddedField &gfraw_in, const Index lat_grid_index, const Index lon_grid_index, ConstVectorView lat_true, ConstVectorView lon_true, const Index &interp_order, const Verbosity &verbosity)
Calculate grid positions and interpolations weights for GriddedFieldLatLonRegrid.
SpeciesAuxData partition_functions(Workspace &ws) noexcept
void AtmRawRead(GriddedField3 &t_field_raw, GriddedField3 &z_field_raw, ArrayOfGriddedField3 &vmr_field_raw, ArrayOfGriddedField3 &nlte_field_raw, ArrayOfQuantumIdentifier &nlte_quantum_identifiers, Vector &nlte_vibrational_energies, const ArrayOfArrayOfSpeciesTag &abs_species, const String &basename, const Verbosity &verbosity)
WORKSPACE METHOD: AtmRawRead.
Tensor3 wind_w_field(Workspace &ws) noexcept
bool checksize() const final
Consistency check.
const Numeric GAS_CONSTANT
void rte_pos2gridpos(GridPos &gp_p, GridPos &gp_lat, GridPos &gp_lon, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View z_field, ConstVectorView rte_pos)
Converts a geographical position (rte_pos) to grid positions for p, lat and lon.
ArrayOfGriddedField4 batch_atm_fields_compact(Workspace &ws) noexcept
const Index GFIELD4_P_GRID
void AtmFieldsRefinePgrid(Vector &p_grid, Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, Index &atmfields_checked, Index &atmgeom_checked, Index &cloudbox_checked, const Vector &lat_grid, const Vector &lon_grid, const Index &atmosphere_dim, const Numeric &p_step, const Index &interp_order, const Verbosity &verbosity)
WORKSPACE METHOD: AtmFieldsRefinePgrid.
void z_surfaceConstantAltitude(Matrix &z_surface, const Vector &lat_grid, const Vector &lon_grid, const Numeric &altitude, const Verbosity &verbosity)
WORKSPACE METHOD: z_surfaceConstantAltitude.
EnergyLevelMap EnergyLevelMap
const Index GFIELD4_FIELD_NAMES
Agenda g0_agenda(Workspace &ws) noexcept
Vector x(Workspace &ws) noexcept
void p2gridpos_poly(ArrayOfGridPosPoly &gp, ConstVectorView old_pgrid, ConstVectorView new_pgrid, const Index order, const Numeric &extpolfac)
p2gridpos_poly
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.
const String & get_grid_name(Index i) const
Get grid name.
void lon_gridFromZRaw(Vector &lon_grid, const GriddedField3 &z_field_raw, const Verbosity &)
WORKSPACE METHOD: lon_gridFromZRaw.
ArrayOfGriddedField3 vmr_field_raw(Workspace &ws) noexcept
void AtmosphereSet1D(Index &atmosphere_dim, Vector &lat_grid, Vector &lon_grid, const Verbosity &verbosity)
WORKSPACE METHOD: AtmosphereSet1D.
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
GriddedField3 mag_u_field_raw(Workspace &ws) noexcept
Index ncols(Workspace &ws) noexcept
void atm_fields_compactCreateFromField(GriddedField4 &atm_fields_compact, const String &name, const GriddedField3 &field, const Verbosity &)
WORKSPACE METHOD: atm_fields_compactCreateFromField.
GriddedField3 z_field_raw(Workspace &ws) noexcept
A constant view of a Vector.
GriddedField3 mag_w_field_raw(Workspace &ws) noexcept
Index nelem() const
Number of elements.
Index cloudbox_checked(Workspace &ws) noexcept
void batch_atm_fields_compactAddSpecies(ArrayOfGriddedField4 &batch_atm_fields_compact, const String &name, const GriddedField3 &species, const Index &prepend, const Verbosity &verbosity)
WORKSPACE METHOD: batch_atm_fields_compactAddSpecies.
Index nbooks(Workspace &ws) noexcept
void interpweights(VectorView itw, const GridPos &tc)
Red 1D interpolation weights.
Matrix z_surface(Workspace &ws) noexcept
Numeric refell2r(ConstVectorView refellipsoid, const Numeric &lat)
refell2r
Vector nlte_vibrational_energies(Workspace &ws) noexcept
Vector rtp_pos(Workspace &ws) noexcept
void WindFieldsCalcExpand1D(Tensor3 &wind_u_field, Tensor3 &wind_v_field, Tensor3 &wind_w_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &wind_u_field_raw, const GriddedField3 &wind_v_field_raw, const GriddedField3 &wind_w_field_raw, const Index &atmosphere_dim, const Index &interp_order, const Verbosity &verbosity)
WORKSPACE METHOD: WindFieldsCalcExpand1D.
void AtmosphereSet2D(Index &atmosphere_dim, Vector &lon_grid, const Verbosity &verbosity)
WORKSPACE METHOD: AtmosphereSet2D.
void resize(const GriddedField2 &gf)
Make this GriddedField2 the same size as the given one.
void lat_gridFromZRaw(Vector &lat_grid, const GriddedField3 &z_field_raw, const Verbosity &)
WORKSPACE METHOD: lat_gridFromZRaw.
The global header file for ARTS.
const Numeric EPSILON_LON_CYCLIC
Data value accuracy requirement for values at 0 and 360 deg if longitudes are cyclic.
void FieldFromGriddedField(Matrix &field_out, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField2 &gfraw_in, const Verbosity &)
WORKSPACE METHOD: FieldFromGriddedField.
This file contains basic functions to handle XML data files.
Vector vmrs(const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const QuantumIdentifier &self, const ArrayOfSpeciesTag &lineshape_species, bool self_in_list, bool bath_in_list, Type type)
Returns a VMR vector for this model's main calculations.