80 os <<
"The variable *" << x_name <<
"* must be a boolean (0 or 1).\n"
81 <<
"The present value of *"<< x_name <<
"* is " << x <<
".";
82 throw runtime_error( os.str() );
105 const Index& x_high )
107 if ( (x<x_low) || (x>x_high) )
110 os <<
"The variable *" << x_name <<
"* must fulfill:\n"
111 <<
" " << x_low <<
" <= " << x_name <<
" <= " << x_high <<
"\n"
112 <<
"The present value of *"<< x_name <<
"* is " << x <<
".";
113 throw runtime_error( os.str() );
139 os <<
"The ArrayOfIndex *" << x_name <<
"* must have strictly\n"
140 <<
"increasing values, but this is not the case.\n";
141 os <<
"x = " << x <<
"\n";
142 throw runtime_error( os.str() );
173 os <<
"The variable *" << x_name <<
"* must be >= 0.\n"
174 <<
"The present value of *"<< x_name <<
"* is " << x <<
".";
175 throw runtime_error( os.str() );
202 if ( (x<x_low) || (x>x_high) )
205 os <<
"The variable *" << x_name <<
"* must fulfill:\n"
206 <<
" " << x_low <<
" <= " << x_name <<
" <= " << x_high <<
"\n"
207 <<
"The present value of *"<< x_name <<
"* is " << x <<
".";
208 throw runtime_error( os.str() );
238 if ( x.
nelem() != l )
241 os <<
"The vector *" << x_name <<
"* must have the length " << l
243 <<
"The present length of *"<< x_name <<
"* is " << x.
nelem() <<
".";
244 throw runtime_error( os.str() );
273 os <<
"The vectors *" << x1_name <<
"* and *" << x2_name
274 <<
"* must have the same length.\n"
275 <<
"The length of *"<< x1_name <<
"* is " << x1.
nelem() <<
".\n"
276 <<
"The length of *"<< x2_name <<
"* is " << x2.
nelem() <<
".";
277 throw runtime_error( os.str() );
304 os <<
"The vector *" << x_name <<
"* must have strictly\n"
305 <<
"increasing values, but this is not the case.\n";
306 os <<
"x = " << x <<
"\n";
307 throw runtime_error( os.str() );
334 os <<
"The vector *" << x_name <<
"* must have strictly\ndecreasing "
335 <<
"values, but this is not the case.\n";
336 throw runtime_error( os.str() );
368 if (
abs(v1[i] - v2[i]) > margin)
371 os <<
"Vectors " << x1_name <<
" and " << x2_name
373 << x1_name <<
"[" << i <<
"]" <<
" = " << v1[i] <<
"\n"
374 << x2_name <<
"[" << i <<
"]" <<
" = " << v2[i] <<
"\n"
375 <<
"Difference should not exceed " << margin <<
"\n";
376 throw runtime_error(os.str());
407 if ( x.
ncols() != l )
410 os <<
"The matrix *" << x_name <<
"* must have " << l <<
" columns,\n"
411 <<
"but the number of columns is " << x.
ncols() <<
".";
412 throw runtime_error( os.str() );
436 if ( x.
nrows() != l )
439 os <<
"The matrix *" << x_name <<
"* must have " << l <<
" rows,\n"
440 <<
"but the number of rows is " << x.
nrows() <<
".";
441 throw runtime_error( os.str() );
472 os <<
"The object *" << x_name
473 <<
"* does not have the right size.\n"
474 <<
"Dimension should be:"
479 throw runtime_error( os.str() );
504 os <<
"The object *" << x_name
505 <<
"* does not have the right size.\n"
506 <<
"Dimensions should be:"
509 <<
",\nbut they are: "
513 throw runtime_error( os.str() );
540 os <<
"The object *" << x_name
541 <<
"* does not have the right size.\n"
542 <<
"Dimensions should be:"
546 <<
",\nbut they are: "
551 throw runtime_error( os.str() );
580 os <<
"The object *" << x_name
581 <<
"* does not have the right size.\n"
582 <<
"Dimensions should be:"
587 <<
",\nbut they are: "
593 throw runtime_error( os.str() );
624 os <<
"The object *" << x_name
625 <<
"* does not have the right size.\n"
626 <<
"Dimensions should be:"
632 <<
",\nbut they are: "
639 throw runtime_error( os.str() );
672 os <<
"The object *" << x_name
673 <<
"* does not have the right size.\n"
674 <<
"Dimensions should be:"
681 <<
",\nbut they are: "
689 throw runtime_error( os.str() );
721 if ( !
is_size(x,l,v,s,b,p,r,c) )
724 os <<
"The object *" << x_name
725 <<
"* does not have the right size.\n"
726 <<
"Dimensions should be:"
734 <<
",\nbut they are: "
743 throw runtime_error( os.str() );
775 os <<
"The agenda *" << x_name <<
"* is empty.\nIt is not allowed \n"
776 <<
"that an empty agenda that is actually used.\n"
777 <<
"Empty agendas are only created of methods setting dummy values \n"
779 throw runtime_error( os.str() );
821 const String& which_interpolation,
828 old_grid, new_grid, order);
831 old_grid, new_grid, data);
861 const String& which_interpolation,
868 if (!new_grid.
nelem())
throw runtime_error(
"The new grid is not allowed to be empty.");
871 os <<
"There is a problem with the grids for the\n"
872 <<
"following interpolation: " << which_interpolation <<
".\n";
877 os <<
"The original grid must have at least " << order+1 <<
" elements.";
878 throw runtime_error( os.str() );
882 const bool ascending = ( old_grid[0] <= old_grid[1] );
889 ing_max = new_grid.
nelem()-1;
895 os <<
"The original grid must be strictly sorted\n"
896 <<
"(no duplicate values). Yours is:\n"
898 throw runtime_error( os.str() );
902 og_min = old_grid[0];
903 og_max = old_grid[n_old-1];
910 os <<
"The original grid must be strictly sorted\n"
911 <<
"(no duplicate values). Yours is:\n"
913 throw runtime_error( os.str() );
917 og_max = old_grid[0];
918 og_min = old_grid[n_old-1];
928 const Index iog_min = 0;
932 ing_max = new_grid.
nelem()-1;
938 while (ing_max > 0 && new_grid[ing_max] > old_grid[iog_max])
944 while (ing_min < new_grid.
nelem()-1 && new_grid[ing_min] < old_grid[iog_min])
952 while (ing_max > 0 && new_grid[ing_max] < old_grid[iog_max])
958 while (ing_min < new_grid.
nelem()-1 && new_grid[ing_min] > old_grid[iog_min])
991 const String& which_interpolation,
1004 which_interpolation,
1034 const String& which_interpolation,
1039 if (!new_grid.
nelem())
throw runtime_error(
"The new grid is not allowed to be empty.");
1042 os <<
"There is a problem with the grids for the\n"
1043 <<
"following interpolation: " << which_interpolation <<
".\n";
1046 const bool ascending = ( old_grid[0] <= old_grid[1] );
1051 const Index iog_min = ascending?old_grid.
nelem()-1:0;
1052 const Index iog_max = ascending?0:old_grid.
nelem()-1;
1054 if (ing_min > 0 && data[iog_min] != 0)
1056 os <<
"\nThe new grid is not fully inside the original grid.\n"
1057 <<
"This is allowed if the corresponding boundary value of raw data is 0.\n"
1058 <<
"New grid point: " << new_grid[ing_min] <<
"\n"
1059 <<
"Old grid point: " << old_grid[iog_min] <<
"\n"
1060 <<
"Boundary value: " << data[iog_min];
1061 throw runtime_error(os.str());
1064 if (ing_max < new_grid.
nelem()-1 && data[iog_max] != 0)
1066 os <<
"\nThe the new grid is not fully inside the original grid.\n"
1067 <<
"This is allowed if the corresponding boundary value of raw data is 0.\n"
1068 <<
"New grid point: " << new_grid[ing_max] <<
"\n"
1069 <<
"Old grid point: " << old_grid[iog_max] <<
"\n"
1070 <<
"Boundary value: " << data[iog_max];
1071 throw runtime_error(os.str());
1103 if (!new_grid.
nelem())
throw runtime_error(
"The new grid is not allowed to be empty.");
1107 if (n_old < order+1)
1110 os <<
"There is a problem with the grids for the\n"
1111 <<
"following interpolation: " << which_interpolation <<
".\n"
1112 <<
"The original grid must have at least " << order+1 <<
" elements.";
1113 throw runtime_error( os.str() );
1117 const bool ascending = ( old_grid[0] <= old_grid[1] );
1129 os <<
"There is a problem with the grids for the\n"
1130 <<
"following interpolation: " << which_interpolation <<
".\n"
1131 <<
"The original grid must be strictly sorted\n"
1132 <<
"(no duplicate values). Yours is:\n"
1134 throw runtime_error( os.str() );
1138 og_min = old_grid[0] -
1139 extpolfac * ( old_grid[1] - old_grid[0] );
1140 og_max = old_grid[n_old-1] +
1141 extpolfac * ( old_grid[n_old-1] - old_grid[n_old-2] );
1149 os <<
"There is a problem with the grids for the\n"
1150 <<
"following interpolation: " << which_interpolation <<
".\n"
1151 <<
"The original grid must be strictly sorted\n"
1152 <<
"(no duplicate values). Yours is:\n"
1154 throw runtime_error( os.str() );
1159 og_max = old_grid[0] -
1160 extpolfac * ( old_grid[1] - old_grid[0] );
1161 og_min = old_grid[n_old-1] +
1162 extpolfac * ( old_grid[n_old-1] - old_grid[n_old-2] );
1172 if (ng_min < og_min)
1175 os <<
"There is a problem with the grids for the\n"
1176 <<
"following interpolation: " << which_interpolation <<
".\n"
1177 <<
"The minimum of the new grid must be inside\n"
1178 <<
"the original grid. (We allow a bit of extrapolation,\n"
1179 <<
"but not so much).\n"
1180 <<
"Minimum of original grid: " <<
min(old_grid);
1181 if (islog) os <<
" (" << exp(
min(old_grid)) <<
")";
1182 os <<
"\nMinimum allowed value for new grid: " << og_min;
1183 if (islog) os <<
" (" << exp(og_min) <<
")";
1184 os <<
"\nActual minimum of new grid: " << ng_min;
1185 if (islog) os <<
" (" << exp(ng_min) <<
")";
1186 throw runtime_error( os.str() );
1189 if (ng_max > og_max)
1192 os <<
"There is a problem with the grids for the\n"
1193 <<
"following interpolation: " << which_interpolation <<
".\n"
1194 <<
"The maximum of the new grid must be inside\n"
1195 <<
"the original grid. (We allow a bit of extrapolation,\n"
1196 <<
"but not so much).\n"
1197 <<
"Maximum of original grid: " <<
max(old_grid);
1198 if (islog) os <<
" (" << exp(
max(old_grid)) <<
")";
1199 os <<
"\nMaximum allowed value for new grid: " << og_max;
1200 if (islog) os <<
" (" << exp(og_max) <<
")";
1201 os <<
"\nActual maximum of new grid: " << ng_max;
1202 if (islog) os <<
" (" << exp(ng_max) <<
")";
1203 throw runtime_error( os.str() );
1239 const Vector v(1, new_grid);
1312 if( p_grid.
nelem() < 2 )
1313 throw runtime_error(
"The length of *p_grid* must be >= 2." );
1319 if( lat_grid.
nelem() > 0 )
1320 throw runtime_error(
"For dim=1, the length of *lat_grid* must be 0.");
1324 if( lat_grid.
nelem() < 2 )
1325 throw runtime_error(
1326 "For dim>1, the length of *lat_grid* must be >= 2.");
1333 if( lon_grid.
nelem() > 0 )
1334 throw runtime_error(
"For dim<3, the length of *lon_grid* must be 0.");
1338 if( lon_grid.
nelem() < 2 )
1339 throw runtime_error(
1340 "For dim=3, the length of *lon_grid* must be >= 2.");
1347 if( lat_grid[0] < -90 )
1348 throw runtime_error(
1349 "The latitude grid cannot extend below -90 degrees for 3D" );
1350 if( lat_grid[lat_grid.
nelem() - 1] > 90 )
1351 throw runtime_error(
1352 "The latitude grid cannot extend above 90 degrees for 3D" );
1353 if( lon_grid[0] < -360 )
1354 throw runtime_error(
1355 "No longitude (in lon_grid) can be below -360 degrees." );
1356 if( lon_grid[lon_grid.
nelem() - 1] > 360 )
1357 throw runtime_error(
1358 "No longitude (in lon_grid) can be above 360 degrees." );
1359 if( lon_grid[lon_grid.
nelem() - 1]-lon_grid[0] > 360 )
1360 throw runtime_error(
1361 "The longitude grid is not allowed to cover more than 360 degrees." );
1392 const bool& chk_lat90)
1395 Index npages=p_grid.
nelem(), nrows=1, ncols=1;
1397 nrows = lat_grid.
nelem();
1399 ncols = lon_grid.
nelem();
1403 os <<
"The atmospheric field *" << x_name <<
"* has wrong size.\n"
1404 <<
"Expected size is " << npages <<
" x " << nrows <<
" x "
1405 << ncols <<
", while actual size is " << x.
npages() <<
" x "
1407 throw runtime_error( os.str() );
1411 for(
Index ip=0; ip<npages; ip++ )
1412 {
for(
Index ir=0; ir<nrows; ir++ )
1413 {
for(
Index ic=0; ic<ncols; ic++ )
1415 if( isnan( x(ip,ir,ic) ) )
1418 os <<
"The variable *" << x_name <<
"* contains one or "
1419 <<
"several NaNs. This is not allowed!";
1420 throw runtime_error( os.str() );
1432 const Index ic = ncols-1;
1433 for(
Index ip=0; ip<npages; ip++ )
1435 for(
Index ir=0; ir<nrows; ir++ )
1440 os <<
"The variable *" << x_name <<
"* covers 360 "
1441 <<
"degrees in the longitude direction, but the field "
1442 <<
"seems to deviate between first and last longitude "
1443 <<
"point. The field must be \"cyclic\".\n"
1444 <<
"Difference: " << setprecision(16) << x(ip,ir,ic)- x(ip,ir,0) <<
"\n"
1445 <<
"Epsilon : " << 4*DBL_EPSILON *
max(x(ip,ir,ic),x(ip,ir,0));
1446 throw runtime_error( os.str() );
1456 if( lat_grid[0] == -90 )
1458 for(
Index ip=0; ip<npages; ip++ )
1460 for(
Index ic=1; ic<ncols; ic++ )
1465 os <<
"The variable *" << x_name <<
"* covers the South\n"
1466 <<
"pole. The data corresponding to the pole can not\n"
1467 <<
"vary with longitude, but this appears to be the\n"
1474 throw runtime_error( os.str() );
1480 if( lat_grid[nrows-1] == 90 )
1482 const Index ir = nrows-1;
1483 for(
Index ip=0; ip<npages; ip++ )
1485 for(
Index ic=1; ic<ncols; ic++ )
1490 os <<
"The variable *" << x_name <<
"* covers the North\n"
1491 <<
"pole. The data corresponding to the pole can not\n"
1492 <<
"vary with longitude, but this appears to be the "
1499 throw runtime_error( os.str() );
1533 const Index& nspecies,
1538 const Index nbooks=nspecies;
1545 os <<
"The atmospheric field *" << x_name <<
"* should be empty.\n";
1546 throw runtime_error( os.str() );
1552 Index npages=p_grid.
nelem(), nrows=1, ncols=1;
1554 nrows = lat_grid.
nelem();
1556 ncols = lon_grid.
nelem();
1562 os <<
"The atmospheric field *" << x_name <<
"* has wrong size.\n"
1563 <<
"Expected size is "
1564 << nbooks <<
" x " << npages <<
" x "
1565 << nrows <<
" x " << ncols <<
",\n"
1566 <<
"while actual size is "
1569 throw runtime_error( os.str() );
1573 for(
Index ib=0; ib<nbooks; ib++ )
1574 {
for(
Index ip=0; ip<npages; ip++ )
1575 {
for(
Index ir=0; ir<nrows; ir++ )
1576 {
for(
Index ic=0; ic<ncols; ic++ )
1578 if( isnan( x(ib,ip,ir,ic) ) )
1581 os <<
"The variable *" << x_name <<
"* contains one or "
1582 <<
"several NaNs. This is not allowed!";
1583 throw runtime_error( os.str() );
1594 if( (lon_grid[ncols-1]-lon_grid[0]) == 360 )
1596 const Index ic = ncols-1;
1597 for(
Index is=0; is<nspecies; is++ )
1599 for(
Index ip=0; ip<npages; ip++ )
1601 for(
Index ir=0; ir<nrows; ir++ )
1606 os <<
"The variable *" << x_name <<
"* covers 360 "
1607 <<
"degrees in the longitude direction, but at least "
1608 <<
"one field seems to deviate between first and last "
1609 <<
"longitude point. The field must be \"cyclic\". "
1610 <<
"This was found for field with index "
1611 << is <<
" (0-based).";
1612 throw runtime_error( os.str() );
1619 if( lat_grid[0] == -90 )
1621 for(
Index is=0; is<nspecies; is++ )
1623 for(
Index ip=0; ip<npages; ip++ )
1625 for(
Index ic=1; ic<ncols; ic++ )
1630 os <<
"The variable *" << x_name <<
"* covers the South "
1631 <<
"pole. The data corresponding to the pole can not "
1632 <<
"vary with longitude, but this appears to be the "
1633 <<
"case. This was found for field with index "
1634 << is <<
" (0-based).";
1635 throw runtime_error( os.str() );
1642 if( lat_grid[nrows-1] == 90 )
1644 const Index ir = nrows-1;
1645 for(
Index is=0; is<nspecies; is++ )
1647 for(
Index ip=0; ip<npages; ip++ )
1649 for(
Index ic=1; ic<ncols; ic++ )
1654 os <<
"The variable *" << x_name <<
"* covers the North "
1655 <<
"pole. The data corresponding to the pole can not "
1656 <<
"vary with longitude, but this appears to be the "
1657 <<
"case. This was found for field with index "
1658 << is <<
" (0-based).";
1659 throw runtime_error( os.str() );
1720 os <<
"The atmospheric fields *" << x1_name <<
"* and *"
1721 << x2_name <<
"* do not match in size.\n"
1722 <<
"*" << x1_name <<
"*'s size is " << npages <<
" x " << nrows
1723 <<
" x " << ncols <<
", while *" << x1_name <<
"*'s size is "
1725 throw runtime_error( os.str() );
1745 if( lat_grid[0] == -90 )
1748 for(
Index ip=0; ip<npages; ip++ )
1750 for(
Index ic=1; ic<ncols; ic++ )
1752 vec1 = x1(ip,0,ic)*x1(ip,0,ic) + x2(ip,0,ic)*x2(ip,0,ic);
1753 vec2 = x1(ip,0,ic-1)*x1(ip,0,ic-1) + x2(ip,0,ic-1)*x2(ip,0,ic-1);
1754 if( fabs( vec1/vec2-1. ) > th )
1757 os <<
"The variables *" << x1_name <<
"* and *" << x2_name
1758 <<
"* are assumed\n"
1759 <<
"to be two horizontal components of a vector field.\n"
1760 <<
"At the pole, the data (here: the total length of\n"
1761 <<
"the horizontal vector) can NOT vary with longitude,\n"
1762 <<
"but this appears to be the case on the South pole.\n"
1763 <<
"The threshold is " << threshold <<
", but the actual\n"
1764 <<
"deviation at pressure level " << ip <<
" and longitude\n"
1765 <<
"points " << ic-1 <<
" and " << ic <<
" is "
1766 << sqrt(vec1)/sqrt(vec2)-1.;
1767 throw runtime_error( os.str() );
1773 if( lat_grid[nrows-1] == 90 )
1776 const Index ir = nrows-1;
1777 for(
Index ip=0; ip<npages; ip++ )
1779 for(
Index ic=1; ic<ncols; ic++ )
1781 vec1 = x1(ip,ir,ic)*x1(ip,ir,ic) + x2(ip,ir,ic)*x2(ip,ir,ic);
1782 vec2 = x1(ip,ir,ic-1)*x1(ip,ir,ic-1) + x2(ip,ir,ic-1)*x2(ip,ir,ic-1);
1783 if( fabs( vec1/vec2-1. ) > th )
1786 os <<
"The variables *" << x1_name <<
"* and *" << x2_name
1787 <<
"* are assumed\n"
1788 <<
"to be two horizontal components of a vector field.\n"
1789 <<
"At the pole, the data (here: the total length of\n"
1790 <<
"the horizontal vector) can NOT vary with longitude,\n"
1791 <<
"but this appears to be the case on the North pole.\n"
1792 <<
"The threshold is " << threshold <<
", but the actual\n"
1793 <<
"deviation at pressure level " << ip <<
" and longitude\n"
1794 <<
"points " << ic-1 <<
" and " << ic <<
" is "
1795 << sqrt(vec1)/sqrt(vec2)-1.;
1796 throw runtime_error( os.str() );
1820 const Index& atmosphere_dim,
1825 if( atmosphere_dim == 1 )
1827 if( lat_true.
nelem()!=1 || lon_true.
nelem()!=1 )
1829 throw runtime_error(
"For 1D, the method requires that *lat_true* "
1830 "and *lon_true* have length 1." );
1834 else if( atmosphere_dim == 2 )
1839 throw runtime_error(
"For 2D, the method requires that *lat_true* "
1840 "and *lon_true* have the same length as *lat_grid*." );
1869 Index ncols=1, nrows=1;
1871 nrows = lat_grid.
nelem();
1873 ncols = lon_grid.
nelem();
1877 os <<
"The surface variable *" << x_name <<
"* has wrong size.\n"
1878 <<
"Expected size is " << nrows <<
" x " << ncols <<
","
1879 <<
" while actual size is " << x.
nrows() <<
" x " << x.
ncols() <<
".";
1880 throw runtime_error( os.str() );
1887 if( (lon_grid[ncols-1]-lon_grid[0]) == 360 )
1889 const Index ic = ncols-1;
1890 for(
Index ir=0; ir<nrows; ir++ )
1895 os <<
"The variable *" << x_name <<
"* covers 360 "
1896 <<
"degrees in the longitude direction, but the field "
1897 <<
"seems to deviate between first and last longitude "
1898 <<
"point. The field must be \"cyclic\".";
1899 throw runtime_error( os.str() );
1905 if( lat_grid[0] == -90 )
1907 for(
Index ic=1; ic<ncols; ic++ )
1912 os <<
"The variable *" << x_name <<
"* covers the South "
1913 <<
"pole. The data corresponding to the pole can not "
1914 <<
"vary with longitude, but this appears to be the "
1916 throw runtime_error( os.str() );
1921 if( lat_grid[nrows-1] == 90 )
1923 const Index ir = nrows-1;
1924 for(
Index ic=1; ic<ncols; ic++ )
1929 os <<
"The variable *" << x_name <<
"* covers the North "
1930 <<
"pole. The data corresponding to the pole can not "
1931 <<
"vary with longitude, but this appears to be the "
1933 throw runtime_error( os.str() );
1962 const Index& atmosphere_dim,
1964 const bool& is_rte_pos2 )
1967 String vname =
"*rte_pos*";
1969 { vname =
"*rte_pos2*"; }
1971 if( atmosphere_dim == 1 )
1975 if( rte_pos.
nelem() != 1 )
1978 os <<
"For 1D, " << vname <<
" must have length 1.";
1979 throw runtime_error(os.str());
1984 if( rte_pos.
nelem() != 2 )
1987 os <<
"For 1D, " << vname <<
" must have length 2.";
1988 throw runtime_error(os.str());
1990 if( rte_pos[1] < -180 || rte_pos[1] > 180 )
1993 os <<
"For 1D, the latitude in " << vname <<
" must be in the "
1994 <<
"range [-180,180].";
1995 throw runtime_error(os.str());
1999 else if( atmosphere_dim == 2 )
2001 if( rte_pos.
nelem() != 2 )
2004 os <<
"For 2D, " << vname <<
" must have length 2.";
2005 throw runtime_error(os.str());
2010 if( rte_pos.
nelem() != 3 )
2013 os <<
"For 3D, " << vname <<
" must have length 3.";
2014 throw runtime_error(os.str());
2016 if( rte_pos[1] < -90 || rte_pos[1] > 90 )
2019 os <<
"The (3D) latitude in " << vname <<
" must be in the "
2020 <<
"range [-90,90].";
2021 throw runtime_error(os.str());
2023 if( rte_pos[2] < -360 || rte_pos[2] > 360 )
2026 os <<
"The longitude in " << vname <<
" must be in the "
2027 <<
"range [-360,360].";
2028 throw runtime_error(os.str());
2048 const Index& atmosphere_dim,
2052 if( atmosphere_dim == 1 )
2054 if( rte_los.
nelem() != 1 )
2055 {
throw runtime_error(
"For 1D, *rte_los* must have length 1." ); }
2056 if( rte_los[0] < 0 || rte_los[0] > 180 )
2057 {
throw runtime_error(
"For 1D, the zenith angle of *rte_los* must "
2058 "be in the range [0,180]." ); }
2060 else if( atmosphere_dim == 2 )
2062 if( rte_los.
nelem() != 1 )
2063 {
throw runtime_error(
"For 2D, *rte_los* must have length 1." ); }
2064 if( rte_los[0] < -180 || rte_los[0] > 180 )
2065 {
throw runtime_error(
"For 2D, the zenith angle of *rte_los* must "
2066 "be in the range [-180,180]." ); }
2070 if( rte_los.
nelem() != 2 )
2071 {
throw runtime_error(
"For 3D, *rte_los* must have length 2." ); }
2072 if( rte_los[0] < 0 || rte_los[0] > 180 )
2073 {
throw runtime_error(
"For 3D, the zenith angle of *rte_los* must "
2074 "be in the range [0,180]." ); }
2075 if( rte_los[1] < -180 || rte_los[1] > 180 )
2076 {
throw runtime_error(
"For 3D, the azimuth angle of *rte_los* must "
2077 "be in the range [-180,180]." ); }
2097 const Index gridindex,
2100 if (gf.
get_dim()-1 < gridindex)
2103 os <<
"Grid index " << gridindex <<
" exceeds dimension of GriddedField";
2105 throw runtime_error(os.str());
2111 String gridnameupper = gridname;
2114 if (gfgridnameupper != gridnameupper)
2117 os <<
"Name of grid " << gridindex <<
" in GriddedField";
2120 <<
"The expected name is \"" << gridname <<
"\".";
2121 throw runtime_error(os.str());
2151 const Agenda& blackbody_radiation_agenda )
2155 blackbody_radiation_agenda );
2156 if(
abs( btest[0] - 9.1435e-16) > 1e-19 )