48 "The variable *", x_name,
"* must be a boolean (0 or 1).\n"
49 "The present value of *", x_name,
"* is ", x,
".")
70 const Index& x_high) {
72 "The variable *", x_name,
"* must fulfill:\n"
73 ,
" ", x_low,
" <= ", x_name,
" <= ", x_high,
"\n"
74 ,
"The present value of *", x_name,
"* is ", x,
".")
94 "The ArrayOfIndex *", x_name,
"* must have strictly\n"
95 "increasing values, but this is not the case.\n"
117 "The variable *", x_name,
"* must be >= 0.\n"
118 "The present value of *", x_name,
"* is ", x,
".")
138 const Numeric& x_low,
139 const Numeric& x_high) {
141 "The variable *", x_name,
"* must fulfill:\n"
142 " ", x_low,
" <= ", x_name,
" <= ", x_high,
"\n"
143 "The present value of *", x_name,
"* is ", x,
".")
163 const Numeric& x_low,
164 const Numeric& x_high) {
166 "The variable *", x_name,
"* must fulfill:\n"
167 " ", x_low,
" < ", x_name,
" <= ", x_high,
"\n"
168 "The present value of *", x_name,
"* is ", x,
".")
188 const Numeric& x_low,
189 const Numeric& x_high) {
191 "The variable *", x_name,
"* must fulfill:\n"
192 " ", x_low,
" <= ", x_name,
" < ", x_high,
"\n"
193 "The present value of *", x_name,
"* is ", x,
".")
213 const Numeric& x_low,
214 const Numeric& x_high) {
216 "The variable *", x_name,
"* must fulfill:\n"
217 " ", x_low,
" < ", x_name,
" < ", x_high,
"\n"
218 "The present value of *", x_name,
"* is ", x,
".")
242 "The vector *", x_name,
"* must have the length ", l,
".\n"
243 "The present length of *", x_name,
"* is ", x.
nelem(),
".")
263 ConstVectorView x2) {
265 "The vectors *", x1_name,
"* and *", x2_name,
266 "* must have the same length.\n"
267 "The length of *", x1_name,
"* is ", x1.
nelem(),
".\n"
268 "The length of *", x2_name,
"* is ", x2.
nelem(),
".")
287 "The vector *", x_name,
"* must have strictly\n"
288 "increasing values, but this is not the case.\n"
308 "The vector *", x_name,
"* must have strictly\ndecreasing "
309 "values, but this is not the case.\n")
333 for (Index i = 0; i < v1.nelem(); i++) {
335 "Vectors ", x1_name,
" and ", x2_name,
" differ.\n",
338 , x2_name,
"[", i,
"]"
340 ,
"Difference should not exceed ", margin,
"\n")
363 "The matrix *", x_name,
"* must have ", l,
" columns,\n"
364 ,
"but the number of columns is ", x.ncols(),
".")
382 "The matrix *", x_name,
"* must have ", l,
" rows,\n"
383 ,
"but the number of rows is ", x.nrows(),
".")
404 "The object *", x_name,
"* does not have the right size.\n"
405 "Dimension should be:" " ",
c,
",\nbut it is: " " ",
427 "The object *", x_name,
"* does not have the right size.\n"
428 ,
"Dimensions should be:"
429 ,
" ", r,
" ",
c,
",\nbut they are: "
430 ,
" ", x.nrows(),
" ", x.ncols(),
".")
453 "The object *", x_name,
"* does not have the right size.\n"
454 ,
"Dimensions should be:"
455 ,
" ", p,
" ", r,
" ",
c,
",\nbut they are: "
456 ,
" ", x.npages(),
" ", x.nrows(),
" ", x.ncols(),
".")
481 "The object *", x_name,
"* does not have the right size.\n"
482 ,
"Dimensions should be:"
483 ,
" ",
b,
" ", p,
" ", r,
" ",
c
484 ,
",\nbut they are: "
485 ,
" ", x.nbooks(),
" ", x.npages(),
" ", x.nrows(),
" "
513 "The object *", x_name,
"* does not have the right size.\n"
514 ,
"Dimensions should be:"
515 ,
" ", s,
" ",
b,
" ", p,
" ", r,
" ",
c
516 ,
",\nbut they are: "
517 ,
" ", x.nshelves(),
" ", x.nbooks(),
" ", x.npages(),
" "
518 , x.nrows(),
" ", x.ncols(),
".")
547 "The object *", x_name,
"* does not have the right size.\n"
548 ,
"Dimensions should be:"
549 ,
" ",
v,
" ", s,
" ",
b,
" ", p,
" ", r,
" ",
c
550 ,
",\nbut they are: "
551 ,
" ", x.nvitrines(),
" ", x.nshelves(),
" ", x.nbooks()
552 ,
" ", x.npages(),
" ", x.nrows(),
" ", x.ncols(),
".")
583 "The object *", x_name,
"* does not have the right size.\n"
584 ,
"Dimensions should be:"
585 ,
" ", l,
" ",
v,
" ", s,
" ",
b,
" ", p,
" ", r
586 ,
" ",
c,
",\nbut they are: "
587 ,
" ", x.nlibraries(),
" ", x.nvitrines(),
" ", x.nshelves()
588 ,
" ", x.nbooks(),
" ", x.npages(),
" ", x.nrows(),
" "
610 "The agenda *", x_name,
"* is empty.\nIt is not allowed \n"
611 ,
"that an empty agenda that is actually used.\n"
612 ,
"Empty agendas are only created of methods setting dummy values \n"
648 const String& which_interpolation,
649 ConstVectorView old_grid,
650 ConstVectorView new_grid,
651 ConstVectorView data,
654 ing_min, ing_max, which_interpolation, old_grid, new_grid, order);
657 ing_min, ing_max, which_interpolation, old_grid, new_grid, data);
687 const String& which_interpolation,
688 ConstVectorView old_grid,
689 ConstVectorView new_grid,
691 const Index n_old = old_grid.nelem();
694 "The new grid is not allowed to be empty.");
697 ARTS_USER_ERROR_IF (n_old < order + 1,
"There is a problem with the grids for the following interpolation:\n",
698 which_interpolation,
"\n",
699 "The original grid must have at least ", order + 1,
" elements.")
702 const bool ascending = (old_grid[0] <= old_grid[1]);
706 Numeric og_min, og_max;
709 ing_max = new_grid.nelem() - 1;
712 ARTS_USER_ERROR_IF (!is_increasing(old_grid),
"There is a problem with the grids for the following interpolation:\n",
713 which_interpolation,
"\n",
714 "The original grid must be strictly sorted\n"
715 ,
"(no duplicate values). Yours is:\n"
719 og_min = old_grid[0];
720 og_max = old_grid[n_old - 1];
723 ARTS_USER_ERROR_IF (!is_decreasing(old_grid),
"There is a problem with the grids for the following interpolation:\n",
724 which_interpolation,
"\n",
725 "The original grid must be strictly sorted\n"
726 ,
"(no duplicate values). Yours is:\n"
730 og_max = old_grid[0];
731 og_min = old_grid[n_old - 1];
735 const Numeric ng_min =
min(new_grid);
736 const Numeric ng_max =
max(new_grid);
741 const Index iog_min = 0;
742 const Index iog_max = old_grid.nelem() - 1;
745 ing_max = new_grid.nelem() - 1;
748 if (ng_max > og_max) {
749 while (ing_max > 0 && new_grid[ing_max] > old_grid[iog_max]) ing_max--;
752 if (ng_min < og_min) {
753 while (ing_min < new_grid.nelem() - 1 &&
754 new_grid[ing_min] < old_grid[iog_min])
758 if (ng_min < og_min) {
759 while (ing_max > 0 && new_grid[ing_max] < old_grid[iog_max]) ing_max--;
762 if (ng_max > og_max) {
763 while (ing_min < new_grid.nelem() - 1 &&
764 new_grid[ing_min] > old_grid[iog_min])
797 const String& which_interpolation,
798 ConstVectorView old_pgrid,
799 ConstVectorView new_pgrid,
802 Vector logold(old_pgrid.nelem());
803 Vector lognew(new_pgrid.nelem());
805 transform(logold, log, old_pgrid);
806 transform(lognew, log, new_pgrid);
809 ing_min, ing_max, which_interpolation, logold, lognew, order);
836 const String& which_interpolation,
837 ConstVectorView old_grid,
838 ConstVectorView new_grid,
839 ConstVectorView data) {
841 "The new grid is not allowed to be empty.");
844 const bool ascending = (old_grid[0] <= old_grid[1]);
849 const Index iog_min = ascending ? old_grid.nelem() - 1 : 0;
850 const Index iog_max = ascending ? 0 : old_grid.nelem() - 1;
852 ARTS_USER_ERROR_IF (ing_min > 0 && data[iog_min] != 0,
"There is a problem with the grids for the following interpolation:\n"
853 , which_interpolation,
"\n",
854 "\nThe new grid is not fully inside the original grid.\n"
855 ,
"This is allowed if the corresponding boundary value of raw data is 0.\n"
856 ,
"New grid point: ", new_grid[ing_min],
"\n"
857 ,
"Old grid point: ", old_grid[iog_min],
"\n"
858 ,
"Boundary value: ", data[iog_min])
860 ARTS_USER_ERROR_IF (ing_max < new_grid.nelem() - 1 && data[iog_max] != 0,
"There is a problem with the grids for the following interpolation:\n"
861 , which_interpolation,
"\n",
862 "\nThe the new grid is not fully inside the original grid.\n"
863 ,
"This is allowed if the corresponding boundary value of raw data is 0.\n"
864 ,
"New grid point: ", new_grid[ing_max],
"\n"
865 ,
"Old grid point: ", old_grid[iog_max],
"\n"
866 ,
"Boundary value: ", data[iog_max])
888 ConstVectorView old_grid,
889 ConstVectorView new_grid,
891 const Numeric& extpolfac,
893 const Index n_old = old_grid.nelem();
896 "The new grid is not allowed to be empty.");
899 "There is a problem with the grids for the following "
901 which_interpolation,
"\n"
902 "Interpolation order must be 0 or larger (but your's is ", order,
907 "There is a problem with the grids for the following "
909 , which_interpolation,
"\n"
910 ,
"For interpolation order ", order
911 ,
", the original grid must have at least\n"
912 , order + 1,
" elements (but your's has only ", n_old,
").")
915 const bool ascending = ((n_old > 1) ? (old_grid[0] <= old_grid[1]) :
true);
919 Numeric og_min = old_grid[0], og_max = old_grid[0];
924 "There is a problem with the grids for the "
925 ,
"following interpolation:\n"
926 , which_interpolation,
"\n"
927 ,
"The original grid must be strictly sorted\n"
928 ,
"(no duplicate values). Yours is:\n"
933 og_min = old_grid[0] - extpolfac * (old_grid[1] - old_grid[0]);
934 og_max = old_grid[n_old - 1] +
935 extpolfac * (old_grid[n_old - 1] - old_grid[n_old - 2]);
940 "There is a problem with the grids for the "
941 ,
"following interpolation:\n"
942 , which_interpolation,
"\n"
943 ,
"The original grid must be strictly sorted\n"
944 ,
"(no duplicate values). Yours is:\n"
950 og_max = old_grid[0] - extpolfac * (old_grid[1] - old_grid[0]);
951 og_min = old_grid[n_old - 1] +
952 extpolfac * (old_grid[n_old - 1] - old_grid[n_old - 2]);
957 const Numeric ng_min =
min(new_grid);
958 const Numeric ng_max =
max(new_grid);
965 "There is a problem with the grids for the "
966 ,
"following interpolation:\n"
967 , which_interpolation,
"\n"
968 ,
"The minimum of the new grid must be inside "
969 ,
"the original grid.\n(We allow a bit of extrapolation, "
970 ,
"but not so much).\n"
971 ,
"Minimum of original grid: ",
min(old_grid),
973 "\nMinimum allowed value for new grid: ", og_min,
975 "\nActual minimum of new grid: ", ng_min,
979 "There is a problem with the grids for the "
980 ,
"following interpolation:\n"
981 , which_interpolation,
"\n"
982 ,
"The maximum of the new grid must be inside\n"
983 ,
"the original grid. (We allow a bit of extrapolation,\n"
984 ,
"but not so much).\n"
985 ,
"Maximum of original grid: ",
max(old_grid),
987 "\nMaximum allowed value for new grid: ", og_max,
989 "\nActual maximum of new grid: ", ng_max,
1020 ConstVectorView old_grid,
1021 const Numeric& new_grid,
1023 const Numeric& extpolfac) {
1024 const Vector
v(1, new_grid);
1047 ConstVectorView old_pgrid,
1048 ConstVectorView new_pgrid,
1050 const Numeric& extpolfac) {
1052 Vector logold(old_pgrid.nelem());
1053 Vector lognew(new_pgrid.nelem());
1055 transform(logold, log, old_pgrid);
1056 transform(lognew, log, new_pgrid);
1059 which_interpolation, logold, lognew, order, extpolfac,
true);
1082 ConstVectorView p_grid,
1083 ConstVectorView lat_grid,
1084 ConstVectorView lon_grid) {
1087 "The length of *p_grid* must be >= 2.");
1093 "For dim=1, the length of *lat_grid* must be 0.");
1096 "For dim>1, the length of *lat_grid* must be >= 2.");
1103 "For dim<3, the length of *lon_grid* must be 0.");
1106 "For dim=3, the length of *lon_grid* must be >= 2.");
1113 "The latitude grid cannot extend below -90 degrees for 3D");
1115 "The latitude grid cannot extend above 90 degrees for 3D");
1117 "No longitude (in lon_grid) can be below -360 degrees.");
1119 "No longitude (in lon_grid) can be above 360 degrees.");
1121 "The longitude grid is not allowed to cover more than 360 degrees.");
1146 ConstVectorView p_grid,
1147 ConstVectorView lat_grid,
1148 ConstVectorView lon_grid,
1149 const bool& chk_lat90) {
1151 Index npages = p_grid.nelem(), nrows = 1, ncols = 1;
1152 if (dim > 1) nrows = lat_grid.nelem();
1153 if (dim > 2) ncols = lon_grid.nelem();
1154 ARTS_USER_ERROR_IF (x.ncols() != ncols || x.nrows() != nrows || x.npages() != npages,
1155 "The atmospheric field *", x_name,
"* has wrong size.\n"
1156 ,
"Expected size is ", npages,
" x ", nrows,
" x ", ncols
1157 ,
", while actual size is ", x.npages(),
" x ", x.nrows(),
" x "
1161 for (Index ip = 0; ip < npages; ip++) {
1162 for (Index ir = 0; ir < nrows; ir++) {
1163 for (Index ic = 0; ic < ncols; ic++) {
1165 "The variable *", x_name,
"* contains one or "
1166 ,
"several NaNs. This is not allowed!")
1174 if (is_lon_cyclic(lon_grid)) {
1175 const Index ic = ncols - 1;
1176 for (Index ip = 0; ip < npages; ip++) {
1177 for (Index ir = 0; ir < nrows; ir++) {
1179 x(ip, ir, ic), x(ip, ir, 0), 4 * DBL_EPSILON),
1180 "The variable *", x_name,
"* covers 360 "
1181 ,
"degrees in the longitude direction, but the field "
1182 ,
"seems to deviate between first and last longitude "
1183 ,
"point. The field must be \"cyclic\".\n"
1184 ,
"Difference: ", setprecision(16)
1185 , x(ip, ir, ic) - x(ip, ir, 0),
"\n"
1187 , 4 * DBL_EPSILON *
max(x(ip, ir, ic), x(ip, ir, 0)))
1195 if (lat_grid[0] == -90) {
1196 for (Index ip = 0; ip < npages; ip++) {
1197 for (Index ic = 1; ic < ncols; ic++) {
1199 x(ip, 0, ic), x(ip, 0, ic - 1), 2 * DBL_EPSILON),
1200 "The variable *", x_name,
"* covers the South\n"
1201 ,
"pole. The data corresponding to the pole can not\n"
1202 ,
"vary with longitude, but this appears to be the\n"
1213 if (lat_grid[nrows - 1] == 90) {
1214 const Index ir = nrows - 1;
1215 for (Index ip = 0; ip < npages; ip++) {
1216 for (Index ic = 1; ic < ncols; ic++) {
1218 x(ip, ir, ic), x(ip, ir, ic - 1), 2 * DBL_EPSILON),
1219 "The variable *", x_name,
"* covers the North\n"
1220 ,
"pole. The data corresponding to the pole can not\n"
1221 ,
"vary with longitude, but this appears to be the "
1257 const Index& nspecies,
1258 ConstVectorView p_grid,
1259 ConstVectorView lat_grid,
1260 ConstVectorView lon_grid,
1261 const bool& check_nan) {
1262 const Index nbooks = nspecies;
1266 "The atmospheric field *", x_name,
"* should be empty.\n")
1270 Index npages = p_grid.nelem(), nrows = 1, ncols = 1;
1271 if (dim > 1) nrows = lat_grid.nelem();
1272 if (dim > 2) ncols = lon_grid.nelem();
1274 ARTS_USER_ERROR_IF (x.ncols() != ncols || x.nrows() != nrows || x.npages() != npages ||
1275 x.nbooks() != nbooks,
1276 "The atmospheric field *", x_name,
"* has wrong size.\n"
1277 ,
"Expected size is ", nbooks,
" x ", npages,
" x ", nrows
1278 ,
" x ", ncols,
",\n"
1279 ,
"while actual size is ", x.nbooks(),
" x ", x.npages(),
" x "
1280 , x.nrows(),
" x ", x.ncols(),
".")
1285 for (Index ib = 0; ib < nbooks; ib++) {
1286 for (Index ip = 0; ip < npages; ip++) {
1287 for (Index ir = 0; ir < nrows; ir++) {
1288 for (Index ic = 0; ic < ncols; ic++) {
1290 "The variable *", x_name,
"* contains one or "
1291 ,
"several NaNs. This is not allowed!")
1301 if ((lon_grid[ncols - 1] - lon_grid[0]) == 360) {
1302 const Index ic = ncols - 1;
1303 for (Index is = 0; is < nspecies; is++) {
1304 for (Index ip = 0; ip < npages; ip++) {
1305 for (Index ir = 0; ir < nrows; ir++) {
1307 x(is, ip, ir, ic), x(is, ip, ir, 0), 2 * DBL_EPSILON),
1308 "The variable *", x_name,
"* covers 360 "
1309 ,
"degrees in the longitude direction, but at least "
1310 ,
"one field seems to deviate between first and last "
1311 ,
"longitude point. The field must be \"cyclic\". "
1312 ,
"This was found for field with index ", is
1319 if (lat_grid[0] == -90) {
1320 for (Index is = 0; is < nspecies; is++) {
1321 for (Index ip = 0; ip < npages; ip++) {
1322 for (Index ic = 1; ic < ncols; ic++) {
1324 x(is, ip, 0, ic), x(is, ip, 0, ic - 1), 2 * DBL_EPSILON),
1325 "The variable *", x_name,
"* covers the South "
1326 ,
"pole. The data corresponding to the pole can not "
1327 ,
"vary with longitude, but this appears to be the "
1328 ,
"case. This was found for field with index ", is
1335 if (lat_grid[nrows - 1] == 90) {
1336 const Index ir = nrows - 1;
1337 for (Index is = 0; is < nspecies; is++) {
1338 for (Index ip = 0; ip < npages; ip++) {
1339 for (Index ic = 1; ic < ncols; ic++) {
1341 x(is, ip, ir, ic - 1),
1343 "The variable *", x_name,
"* covers the North "
1344 ,
"pole. The data corresponding to the pole can not "
1345 ,
"vary with longitude, but this appears to be the "
1346 ,
"case. This was found for field with index ", is
1382 ConstTensor3View x1,
1384 ConstTensor3View x2,
1386 ConstVectorView lat_grid,
1387 const Numeric& threshold) {
1394 Index npages = x1.npages();
1395 Index nrows = x1.nrows();
1396 Index ncols = x1.ncols();
1399 ARTS_USER_ERROR_IF (x2.ncols() != ncols || x2.nrows() != nrows || x2.npages() != npages,
1400 "The atmospheric fields *", x1_name,
"* and *", x2_name
1401 ,
"* do not match in size.\n"
1402 ,
"*", x1_name,
"*'s size is ", npages,
" x ", nrows
1403 ,
" x ", ncols,
", while *", x1_name,
"*'s size is "
1404 , x2.npages(),
" x ", x2.nrows(),
" x ", x2.ncols(),
".")
1420 Numeric th = threshold * 2.;
1423 if (lat_grid[0] == -90) {
1425 for (Index ip = 0; ip < npages; ip++) {
1426 for (Index ic = 1; ic < ncols; ic++) {
1427 vec1 = x1(ip, 0, ic) * x1(ip, 0, ic) + x2(ip, 0, ic) * x2(ip, 0, ic);
1428 vec2 = x1(ip, 0, ic - 1) * x1(ip, 0, ic - 1) +
1429 x2(ip, 0, ic - 1) * x2(ip, 0, ic - 1);
1431 "The variables *", x1_name,
"* and *", x2_name
1433 ,
"to be two horizontal components of a vector field.\n"
1434 ,
"At the pole, the data (here: the total length of\n"
1435 ,
"the horizontal vector) can NOT vary with longitude,\n"
1436 ,
"but this appears to be the case on the South pole.\n"
1437 ,
"The threshold is ", threshold,
", but the actual\n"
1438 ,
"deviation at pressure level ", ip,
" and longitude\n"
1439 ,
"points ", ic - 1,
" and ", ic,
" is "
1440 , sqrt(vec1) / sqrt(vec2) - 1.)
1445 if (lat_grid[nrows - 1] == 90) {
1447 const Index ir = nrows - 1;
1448 for (Index ip = 0; ip < npages; ip++) {
1449 for (Index ic = 1; ic < ncols; ic++) {
1451 x1(ip, ir, ic) * x1(ip, ir, ic) + x2(ip, ir, ic) * x2(ip, ir, ic);
1452 vec2 = x1(ip, ir, ic - 1) * x1(ip, ir, ic - 1) +
1453 x2(ip, ir, ic - 1) * x2(ip, ir, ic - 1);
1455 "The variables *", x1_name,
"* and *", x2_name
1457 ,
"to be two horizontal components of a vector field.\n"
1458 ,
"At the pole, the data (here: the total length of\n"
1459 ,
"the horizontal vector) can NOT vary with longitude,\n"
1460 ,
"but this appears to be the case on the North pole.\n"
1461 ,
"The threshold is ", threshold,
", but the actual\n"
1462 ,
"deviation at pressure level ", ip,
" and longitude\n"
1463 ,
"points ", ic - 1,
" and ", ic,
" is "
1464 , sqrt(vec1) / sqrt(vec2) - 1.)
1485 ConstVectorView lat_grid,
1486 ConstVectorView lat_true,
1487 ConstVectorView lon_true) {
1488 if (atmosphere_dim == 1) {
1490 "For 1D, the method requires that *lat_true* "
1491 "and *lon_true* have length 1.");
1494 if (atmosphere_dim == 2) {
1496 lon_true.nelem() != lat_grid.nelem(),
1497 "For 2D, the method requires that *lat_true* "
1498 "and *lon_true* have the same length as *lat_grid*.");
1520 ConstVectorView lat_grid,
1521 ConstVectorView lon_grid) {
1522 Index ncols = 1, nrows = 1;
1523 if (dim > 1) nrows = lat_grid.nelem();
1524 if (dim > 2) ncols = lon_grid.nelem();
1526 "The surface variable *", x_name,
"* has wrong size.\n"
1527 ,
"Expected size is ", nrows,
" x ", ncols,
","
1528 ,
" while actual size is ", x.nrows(),
" x ", x.ncols(),
".")
1533 if ((lon_grid[ncols - 1] - lon_grid[0]) == 360) {
1534 const Index ic = ncols - 1;
1535 for (Index ir = 0; ir < nrows; ir++) {
1537 "The variable *", x_name,
"* covers 360 "
1538 ,
"degrees in the longitude direction, but the field "
1539 ,
"seems to deviate between first and last longitude "
1540 ,
"point. The field must be \"cyclic\".")
1545 if (lat_grid[0] == -90) {
1546 for (Index ic = 1; ic < ncols; ic++) {
1547 ARTS_USER_ERROR_IF (!is_same_within_epsilon(x(0, ic), x(0, ic - 1), 2 * DBL_EPSILON),
1548 "The variable *", x_name,
"* covers the South "
1549 ,
"pole. The data corresponding to the pole can not "
1550 ,
"vary with longitude, but this appears to be the "
1555 if (lat_grid[nrows - 1] == 90) {
1556 const Index ir = nrows - 1;
1557 for (Index ic = 1; ic < ncols; ic++) {
1559 x(ir, ic), x(ir, ic - 1), 2 * DBL_EPSILON),
1560 "The variable *", x_name,
"* covers the North "
1561 ,
"pole. The data corresponding to the pole can not "
1562 ,
"vary with longitude, but this appears to be the "
1587 ConstVectorView rte_pos,
1588 const bool& is_rte_pos2)
1591 String vname =
"*rte_pos*";
1593 vname =
"*rte_pos2*";
1596 if (atmosphere_dim == 1) {
1599 "For 1D, ", vname,
" must have length 1.")
1602 "For 1D, ", vname,
" must have length 2.")
1604 "For 1D, the latitude in ", vname,
" must be in the "
1605 ,
"range [-180,180].")
1607 }
else if (atmosphere_dim == 2) {
1609 "For 2D, ", vname,
" must have length 2.")
1612 "For 3D, ", vname,
" must have length 3.")
1614 "The (3D) latitude in ", vname,
" must be in the "
1615 ,
"range [-90,90].")
1617 "The longitude in ", vname,
" must be in the "
1618 ,
"range [-360,360].")
1637 if (atmosphere_dim == 1) {
1639 "For 1D, los-vectors must have length 1.");
1641 "For 1D, the zenith angle of a los-vector must "
1642 "be in the range [0,180].");
1643 }
else if (atmosphere_dim == 2) {
1645 "For 2D, los-vectors must have length 1.");
1647 "For 2D, the zenith angle of a los-vector must "
1648 "be in the range [-180,180].");
1651 "For 3D, los-vectors must have length 2.");
1653 "For 3D, the zenith angle of a los-vector must "
1654 "be in the range [0,180].");
1656 "For 3D, the azimuth angle of a los-vector must "
1657 "be in the range [-180,180].");
1676 const Index gridindex,
1677 const String& gridname) {
1679 "Grid index ", gridindex,
" exceeds dimension of GriddedField",
1685 String gridnameupper = gridname;
1689 "Name of grid ", gridindex,
" in GriddedField",
1692 ,
"The expected name is \"", gridname,
"\".")
1711 "No channels defined in *met_mm_backend*.");
1714 "*met_mm_backend* must have 4 columns.");
1716 for (Index ch = 0; ch < mmb.nrows(); ch++) {
1717 Numeric lo = mmb(ch, 0);
1718 Numeric offset1 = mmb(ch, 1);
1719 Numeric offset2 = mmb(ch, 2);
1720 Numeric bandwidth = mmb(ch, 3);
1724 "Error in channel ", ch + 1,
" at row ", ch
1725 ,
" in *met_mm_backend*.\n"
1726 ,
"Center frequency is negative: ", mmb(ch, 0),
" Hz")
1730 "Error in channel ", ch + 1,
" at row ", ch
1731 ,
" in *met_mm_backend*.\n"
1732 ,
"Offset is negative:\n"
1733 ,
"offset1: ", offset1,
" Hz\n"
1734 ,
"offset2: ", offset2,
" Hz\n")
1738 "Error in channel ", ch + 1,
" at row ", ch
1739 ,
" in *met_mm_backend*.\n"
1740 ,
"First passband offset is smaller than/equal to the second offset:\n"
1741 ,
"offset1: ", offset1,
" Hz\n"
1742 ,
"offset2: ", offset2,
" Hz\n")
1746 "Error in channel ", ch + 1,
" at row ", ch
1747 ,
" in *met_mm_backend*.\n"
1748 ,
"Band touches or overlaps with the center frequency:\n"
1749 ,
"offset1 : ", offset1,
" Hz\n"
1750 ,
"offset2 : ", offset2,
" Hz\n"
1751 ,
"bandwidth : ", bandwidth,
" Hz\n"
1752 ,
"offset1 - offset2 - bandwidth/2: "
1753 , offset1 - offset2 - bandwidth / 2.,
" Hz\n")
1757 "Error in channel ", ch + 1,
" at row ", ch
1758 ,
" in *met_mm_backend*.\n"
1759 ,
"Bands overlap or touch, offset2 > bandwidth/2:\n"
1760 ,
"offset2 : ", offset2,
" Hz\n"
1761 ,
"bandwidth/2: ", bandwidth / 2.,
" Hz\n")
1765 "Error in channel ", ch + 1,
" at row ", ch
1766 ,
" in *met_mm_backend*.\n"
1767 ,
"Band too wide, reaches/exceeds 0 Hz:\n"
1768 ,
"LO : ", lo,
" Hz\n"
1769 ,
"offset1 : ", offset1,
" Hz\n"
1770 ,
"offset2 : ", offset2,
" Hz\n"
1771 ,
"bandwidth : ", bandwidth,
" Hz\n"
1772 ,
"LO - offset1 - offset2 - bandwidth/2: "
1773 , lo - offset1 - offset2 - bandwidth / 2.,
" Hz\n")
This file contains the definition of Array.
base max(const Array< base > &x)
Max function.
base min(const Array< base > &x)
Min function.
Index nelem() const
Return the number of agenda elements.
const String & get_name() const
Get the name of this gridded field.
Index get_dim() const
Get the dimension of this gridded field.
const String & get_grid_name(Index i) const
Get grid name.
void toupper()
Convert to upper case.
std::string var_string(Args &&... args)
#define ARTS_USER_ERROR_IF(condition,...)
Implementation of gridded fields.
constexpr Index GFIELD3_LON_GRID
Global constant, Index of the longitude grid in GriddedField3.
constexpr Index GFIELD3_P_GRID
Global constant, Index of the pressure grid in GriddedField3.
constexpr Index GFIELD3_LAT_GRID
Global constant, Index of the latitude grid in GriddedField3.