87 Index& ppath_inside_cloudbox_do,
89 Agenda& iy_cloudbox_agenda,
95 Index& scat_data_checked,
100 ppath_inside_cloudbox_do = 0;
101 cloudbox_limits.resize(0);
102 iy_cloudbox_agenda =
Agenda{ws};
103 iy_cloudbox_agenda.
set_name(
"iy_cloudbox_agenda");
104 pnd_field.
resize(0, 0, 0, 0);
106 dpnd_field_dx.resize(jacobian_quantities.
nelem());
108 scat_species.resize(0);
111 scat_data_raw.resize(0);
112 scat_data_checked = 0;
113 particle_masses.
resize(0, 0);
123 const Index& atmosphere_dim,
129 const Numeric& cloudbox_margin,
139 "cloudboxSetAutomatically not yet available for 2D and 3D cases.")
144 cloudbox_limits.resize(atmosphere_dim * 2);
147 Index p1 = np - 1, p2 = 0;
163 bool any_not_empty =
false;
165 if (!particle_field.
empty()) {
166 bool one_not_empty =
false;
170 for (
Index l = 0; l < nss; l++) {
184 any_not_empty =
true;
204 while ((p_grid[p1] < p_margin1) && (p1 > 0)) p1--;
205 cloudbox_limits[0] = p1;
209 p2 =
min(p2 + 1, np - 1);
214 out2 <<
"The cloud reaches to TOA!\n"
215 <<
"Check your *particle_field* data, if realistic!\n";
217 cloudbox_limits[1] = p2;
258 out0 <<
"Cloudbox is switched off!\n";
268 const Index& atmosphere_dim,
272 const Index& fullfull,
275 cloudbox_limits.resize(2 * atmosphere_dim);
277 cloudbox_limits[0] = 0;
278 cloudbox_limits[1] = p_grid.
nelem() - 1;
280 if (atmosphere_dim > 1) {
282 cloudbox_limits[2] = 0;
283 cloudbox_limits[3] = lat_grid.
nelem() - 1;
289 while ((i < last_lat - 1) && (lat_grid[i] - lat_grid[0] < LAT_LON_MIN)) i++;
291 "Can not define lower latitude edge of cloudbox:\n"
292 "Extend of atmosphere too small. Distance to minimum latitude\n"
293 "has to be at least ", LAT_LON_MIN,
"deg, but only ",
294 lat_grid[i - 1] - lat_grid[0],
" available here.")
295 cloudbox_limits[2] = i;
299 Index j = last_lat - 1;
300 while ((j > i) && (lat_grid[last_lat] - lat_grid[j] < LAT_LON_MIN)) j--;
302 "Can not define upper latitude edge of cloudbox:\n"
303 "Extend of atmosphere too small. Distance to maximum latitude\n"
304 "has to be at least ", LAT_LON_MIN,
"deg, but only ",
305 lat_grid[last_lat] - lat_grid[j + 1],
" available here.")
306 cloudbox_limits[3] = j;
310 if (atmosphere_dim > 2) {
312 cloudbox_limits[4] = 0;
313 cloudbox_limits[5] = lon_grid.
nelem() - 1;
315 const Numeric latmax =
max(
abs(lat_grid[cloudbox_limits[2]]),
316 abs(lat_grid[cloudbox_limits[3]]));
322 while ((i < last_lon - 1) &&
323 (lon_grid[i] - lon_grid[0] < LAT_LON_MIN / lfac))
326 "Can not define lower longitude edge of cloudbox:\n"
327 "Extend of atmosphere too small. Distance to minimum longitude\n"
328 "has to be at least ", LAT_LON_MIN / lfac,
"deg, but only ",
329 lon_grid[i - 1] - lon_grid[0],
" available here.")
330 cloudbox_limits[4] = i;
334 Index j = last_lon - 1;
335 while ((j > i) && (lon_grid[last_lon] - lon_grid[j] < LAT_LON_MIN / lfac))
338 "Can not define upper longitude edge of cloudbox:\n"
339 "Extend of atmosphere too small. Distance to maximum longitude\n"
340 "has to be at least ", LAT_LON_MIN / lfac,
"deg, but only ",
341 lon_grid[last_lon] - lon_grid[j + 1],
" available here.")
351 const Index& atmosphere_dim,
369 "The pressure in *p1* must be bigger than the "
370 "pressure in *p2*.");
372 "The pressure in *p1* must be larger than the "
373 "last value in *p_grid*.");
375 "The pressure in *p2* must be smaller than the "
376 "first value in *p_grid*.");
377 if (atmosphere_dim >= 2) {
379 "The latitude in *lat2* must be bigger than the "
380 "latitude in *lat1*.");
382 "The latitude in *lat1* must be >= the "
383 "second value in *lat_grid*.");
385 "The latitude in *lat2* must be <= the "
386 "next to last value in *lat_grid*.");
388 if (atmosphere_dim == 3) {
390 "The longitude in *lon2* must be bigger than the "
391 "longitude in *lon1*.");
393 "The longitude in *lon1* must be >= the "
394 "second value in *lon_grid*.");
396 "The longitude in *lon2* must be <= the "
397 "next to last value in *lon_grid*.");
404 cloudbox_limits.resize(atmosphere_dim * 2);
407 if (p1 > p_grid[1]) {
408 cloudbox_limits[0] = 0;
410 for (cloudbox_limits[0] = 1; p_grid[cloudbox_limits[0] + 1] >= p1;
411 cloudbox_limits[0]++) {
414 if (p2 < p_grid[p_grid.
nelem() - 2]) {
415 cloudbox_limits[1] = p_grid.
nelem() - 1;
417 for (cloudbox_limits[1] = p_grid.
nelem() - 2;
418 p_grid[cloudbox_limits[1] - 1] <= p2;
419 cloudbox_limits[1]--) {
424 if (atmosphere_dim >= 2) {
425 for (cloudbox_limits[2] = 1; lat_grid[cloudbox_limits[2] + 1] <= lat1;
426 cloudbox_limits[2]++) {
428 for (cloudbox_limits[3] = lat_grid.
nelem() - 2;
429 lat_grid[cloudbox_limits[3] - 1] >= lat2;
430 cloudbox_limits[3]--) {
435 if (atmosphere_dim == 3) {
436 for (cloudbox_limits[4] = 1; lon_grid[cloudbox_limits[4] + 1] <= lon1;
437 cloudbox_limits[4]++) {
439 for (cloudbox_limits[5] = lon_grid.
nelem() - 2;
440 lon_grid[cloudbox_limits[5] - 1] >= lon2;
441 cloudbox_limits[5]--) {
451 const Index& atmosphere_dim,
468 "The altitude in *z1* must be smaller than the "
469 "altitude in *z2*.");
478 if (atmosphere_dim == 3) {
480 "The latitude in *lat2* must be bigger than the "
481 " latitude in *lat1*.");
483 "The latitude in *lat1* must be >= the "
484 "second value in *lat_grid*.");
486 "The latitude in *lat2* must be <= the "
487 "next to last value in *lat_grid*.");
489 "The longitude in *lon2* must be bigger than the "
490 "longitude in *lon1*.");
492 "The longitude in *lon1* must be >= the "
493 "second value in *lon_grid*.");
495 "The longitude in *lon2* must be <= the "
496 "next to last value in *lon_grid*.");
503 cloudbox_limits.resize(atmosphere_dim * 2);
506 if (z1 < z_field(1, 0, 0)) {
507 cloudbox_limits[0] = 0;
509 for (cloudbox_limits[0] = 1; z_field(cloudbox_limits[0] + 1, 0, 0) <= z1;
510 cloudbox_limits[0]++) {
513 if (z2 > z_field(z_field.
npages() - 2, 0, 0)) {
514 cloudbox_limits[1] = z_field.
npages() - 1;
516 for (cloudbox_limits[1] = z_field.
npages() - 2;
517 z_field(cloudbox_limits[1] - 1, 0, 0) >= z2;
518 cloudbox_limits[1]--) {
523 if (atmosphere_dim >= 2) {
524 for (cloudbox_limits[2] = 1; lat_grid[cloudbox_limits[2] + 1] <= lat1;
525 cloudbox_limits[2]++) {
527 for (cloudbox_limits[3] = lat_grid.
nelem() - 2;
528 lat_grid[cloudbox_limits[3] - 1] >= lat2;
529 cloudbox_limits[3]--) {
534 if (atmosphere_dim == 3) {
535 for (cloudbox_limits[4] = 1; lon_grid[cloudbox_limits[4] + 1] <= lon1;
536 cloudbox_limits[4]++) {
538 for (cloudbox_limits[5] = lon_grid.
nelem() - 2;
539 lon_grid[cloudbox_limits[5] - 1] >= lon2;
540 cloudbox_limits[5]--) {
550 const Index& jacobian_do,
551 const Index& cloudbox_on,
553 const Index& atmosphere_dim,
559 const Index& stokes_dim,
564 const Index& za_interp_order,
565 const Index& za_restrict,
566 const Index& cos_za_interp,
568 const Index& aa_interp_order,
572 "The atmospheric dimensionality must be 1 or 3.");
574 "This method does not support jacobians (jacobian_do must be 0)");
576 "The cloud box is not activated and no outgoing "
577 "field can be returned.");
579 "*cloudbox_limits* is a vector which contains the upper and lower\n"
580 "limit of the cloud for all atmospheric dimensions.\n"
581 "So its length must be 2 x *atmosphere_dim*");
583 "The variable *za_grid* is empty. Are dummy "
584 "values from *cloudboxOff used?");
586 "Zenith angle interpolation order *za_interp_order*"
588 "than number of angles in *za_grid*.");
590 "Azimuth angle interpolation order *aa_interp_order*"
592 "than number of angles in *aa_grid*.");
594 "Inconsistency in size between f_grid and cloudbox_field! "
595 "(This method does not yet handle dispersion type calculations.)");
600 Tensor3 z_with_surface = z_field;
601 for (
Index ilat = 0; ilat < z_surface.
nrows(); ilat++) {
602 for (
Index ilon = 0; ilon < z_surface.
ncols(); ilon++) {
604 while (z_surface(ilat, ilon) >= z_field(ip + 1, ilat, ilon)) {
607 z_with_surface(ip, ilat, ilon) = z_surface(ilat, ilon);
635 }
else if (atmosphere_dim > 1) {
640 }
else if (atmosphere_dim > 2) {
659 if (fgp <
Numeric(cloudbox_limits[0]) ||
660 fgp >
Numeric(cloudbox_limits[1])) {
665 if (atmosphere_dim == 3 && inside) {
667 if (fgp <
Numeric(cloudbox_limits[2]) ||
668 fgp >
Numeric(cloudbox_limits[3])) {
672 if (fgp <
Numeric(cloudbox_limits[4]) ||
673 fgp >
Numeric(cloudbox_limits[5])) {
685 "Given position has been found to be outside the cloudbox.");
689 DEBUG_ONLY(
const Index np = cloudbox_limits[1] - cloudbox_limits[0] + 1);
694 iy.
resize(nf, stokes_dim);
697 Tensor4 i_field_local(nf, nza, naa, stokes_dim);
704 border_index = cloudbox_limits[border] - cloudbox_limits[border - 1];
712 "Radiation extraction for a position inside cloudbox\n"
713 "is not yet implemented for 3D cases.\n");
719 gp_p.
idx = gp_p.
idx - cloudbox_limits[0];
724 for (
Index is = 0; is < stokes_dim; is++)
725 for (
Index iv = 0; iv < nf; iv++)
726 for (
Index i_za = 0; i_za < nza; i_za++)
727 i_field_local(iv, i_za, 0, is) =
interp(
728 itw_p, cloudbox_field(iv,
joker, 0, 0, i_za, 0, is), gp_p);
734 else if (atmosphere_dim == 1) {
759 cb_gp_lat.
idx -= cloudbox_limits[2];
760 cb_gp_lon.
idx -= cloudbox_limits[4];
763 cloudbox_limits[3] - cloudbox_limits[2]);
765 cloudbox_limits[5] - cloudbox_limits[4]);
769 for (
Index is = 0; is < stokes_dim; is++)
770 for (
Index iv = 0; iv < nf; iv++)
771 for (
Index i_za = 0; i_za < nza; i_za++)
772 for (
Index i_aa = 0; i_aa < naa; i_aa++)
773 i_field_local(iv, i_za, i_aa, is) =
776 iv, border_index,
joker,
joker, i_za, i_aa, is),
782 else if (border <= 3) {
787 cb_gp_p.
idx -= cloudbox_limits[0];
788 cb_gp_lon.
idx -= cloudbox_limits[4];
792 cloudbox_limits[5] - cloudbox_limits[4]);
796 for (
Index is = 0; is < stokes_dim; is++)
797 for (
Index iv = 0; iv < nf; iv++)
798 for (
Index i_za = 0; i_za < nza; i_za++)
799 for (
Index i_aa = 0; i_aa < naa; i_aa++)
800 i_field_local(iv, i_za, i_aa, is) =
803 iv,
joker, border_index,
joker, i_za, i_aa, is),
814 cb_gp_p.
idx -= cloudbox_limits[0];
815 cb_gp_lat.
idx -= cloudbox_limits[2];
819 cloudbox_limits[3] - cloudbox_limits[2]);
823 for (
Index is = 0; is < stokes_dim; is++)
824 for (
Index iv = 0; iv < nf; iv++)
825 for (
Index i_za = 0; i_za < nza; i_za++)
826 for (
Index i_aa = 0; i_aa < naa; i_aa++)
827 i_field_local(iv, i_za, i_aa, is) =
830 iv,
joker,
joker, border_index, i_za, i_aa, is),
851 "Hemisphere-restricted zenith angle interpolation not allowed\n"
852 "for 90degree views.");
853 if (rte_los[0] > 90) {
857 while (za_start < za_grid.
nelem() && za_grid[za_start] < 90.) {
861 "No za_grid grid point found in 90-180deg hemisphere.\n"
862 "No hemispheric interpolation possible.");
863 za_extend -= za_start;
868 while (za_extend > 0 && za_grid[za_extend - 1] > 90.) {
872 "No za_grid grid point found in 0-90deg hemisphere.\n"
873 "No hemispheric interpolation possible.");
876 "Zenith angle interpolation order *za_interp_order* (",
877 za_interp_order,
") must be smaller\n"
878 "than number of angles in respective hemisphere (", za_extend,
882 const auto range =
Range(za_start, za_extend);
889 const auto lag_za = cos_za_interp ?
890 LagrangeInterpolation(0, rte_los[0], za_g, za_interp_order,
false, Interpolation::GridType::CosDeg) :
894 const auto lag_aa = (atmosphere_dim > 1) ?
895 LagrangeInterpolation(0, rte_los[1], aa_grid, aa_interp_order,
false, Interpolation::GridType::Cyclic, {-180, 180}) :
901 for (
Index is = 0; is < stokes_dim; is++) {
902 for (
Index iv = 0; iv < nf; iv++) {
915 const Index& cloudbox_on,
917 const Numeric& local_los_azimuth_angle,
918 const Index& aa_interp_order,
922 "No need to use this method with cloudbox=0.");
924 "Azimuth angle interpolation order *aa_interp_order*"
926 "than number of angles in *aa_grid*.");
929 if (cloudbox_field.
nrows()>1 && aa_grid.
nelem()==cloudbox_field.
nrows()){
937 const Tensor7 cloudbox_field_in = std::move(cloudbox_field);
938 Numeric azimuth_los = local_los_azimuth_angle;
941 if (azimuth_los<0) azimuth_los+=360;
943 cloudbox_field.
resize(nf,np,1,1,nz,1,ns);
951 Interpolation::GridType::Cyclic,
957 for (
Index jf = 0; jf < nf; jf++) {
958 for (
Index jp = 0; jp < np; jp++) {
959 for (
Index jla = 0; jla < nla; jla++) {
960 for (
Index jlo = 0; jlo < nlo; jlo++) {
961 for (
Index jz = 0; jz < nz; jz++) {
962 for (
Index js = 0; js < ns; js++) {
963 cloudbox_field(jf, jp, jla, jlo, jz, 0, js) =
964 interp(cloudbox_field_in(jf, jp, jla, jlo, jz,
joker, js),
979 const Index& atmosphere_dim,
980 const Index& cloudbox_on,
981 const Index& new_limit0,
982 const Index& new_limit1,
983 const Index& new_limit2,
984 const Index& new_limit3,
985 const Index& new_limit4,
986 const Index& new_limit5,
989 "No need to use this method with cloudbox=0.");
991 "new_limits0 < cloudbox_limits[0], not allowed!");
993 "new_limits1 > cloudbox_limits[1], not allowed!");
995 Tensor7 fcopy = cloudbox_field;
997 if (atmosphere_dim == 1) {
998 cloudbox_field = fcopy(
1000 Range(new_limit0 - cloudbox_limits[0], new_limit1 - new_limit0 + 1),
1006 cloudbox_limits[0] = new_limit0;
1007 cloudbox_limits[1] = new_limit1;
1010 "new_limits2 < cloudbox_limits[2], not allowed!");
1012 "new_limits3 > cloudbox_limits[3], not allowed!");
1014 if (atmosphere_dim == 2) {
1015 cloudbox_field = fcopy(
1017 Range(new_limit0 - cloudbox_limits[0], new_limit1 - new_limit0 + 1),
1018 Range(new_limit2 - cloudbox_limits[2], new_limit3 - new_limit2 - 1),
1023 cloudbox_limits[0] = new_limit0;
1024 cloudbox_limits[1] = new_limit1;
1025 cloudbox_limits[2] = new_limit2;
1026 cloudbox_limits[3] = new_limit3;
1029 "new_limits4 < cloudbox_limits[4], not allowed!");
1031 "new_limits5 > cloudbox_limits[5], not allowed!");
1032 cloudbox_field = fcopy(
1034 Range(new_limit0 - cloudbox_limits[0], new_limit1 - new_limit0 + 1),
1035 Range(new_limit2 - cloudbox_limits[2], new_limit3 - new_limit2 + 1),
1036 Range(new_limit4 - cloudbox_limits[4], new_limit5 - new_limit4 + 1),
1040 cloudbox_limits[0] = new_limit0;
1041 cloudbox_limits[1] = new_limit1;
1042 cloudbox_limits[2] = new_limit2;
1043 cloudbox_limits[3] = new_limit3;
1044 cloudbox_limits[4] = new_limit4;
1045 cloudbox_limits[5] = new_limit5;
1054 const Tensor4& particle_field_in,
1057 if (&particle_field_out != &particle_field_in) {
1058 particle_field_out = particle_field_in;
1063 for (
Index i = 0; i < particle_field_out.
nbooks(); i++) {
1064 for (
Index j = 0; j < particle_field_out.
npages(); j++) {
1065 for (
Index k = 0; k < particle_field_out.
nrows(); k++) {
1066 for (
Index l = 0; l < particle_field_out.
ncols(); l++) {
1067 if (particle_field_out(i, j, k, l) < threshold) {
1068 particle_field_out(i, j, k, l) = 0.0;
1081 Index& scat_data_checked,
1084 scat_species.resize(0);
1085 scat_data_raw.resize(0);
1086 scat_meta.resize(0);
1087 pnd_field_raw.resize(0);
1088 scat_data_checked = 0;
1096 const Index& atmosphere_dim,
1112 "Number of elements in scat_data and pnd_field filelists is"
1115 Index last_species = scat_data_raw.
nelem() - 1;
1116 if (last_species == -1) {
1117 scat_data_raw.resize(1);
1125 for (
Index i = 0; i < scat_data_files.
nelem(); i++) {
1127 scat_data_raw[last_species].push_back(scat_data_single);
1128 pnd_field_raw.push_back(pnd_field_data);
1130 out2 <<
" Read single scattering data file " << scat_data_files[i] <<
"\n";
1133 scat_data_raw[last_species][scat_data_raw[last_species].nelem() - 1],
1136 out2 <<
" Read particle number density field\n";
1137 if (pnd_field_files[i].nelem() < 1) {
1139 out1 <<
"Warning: No pnd_field_file specified. Ignored here,\n"
1140 <<
"but user HAS TO add that later on!. \n";
1143 pnd_field_raw[pnd_field_raw.
nelem() - 1],
1159 const Index& atmosphere_dim,
1162 const String& pnd_fieldarray_file,
1174 arr_ssd.resize(scat_data_files.
nelem());
1176 for (
Index i = 0; i < scat_data_files.
nelem(); i++) {
1177 out2 <<
" Read single scattering data file " << scat_data_files[i] <<
"\n";
1182 if (scat_data_raw.
nelem() == 0) {
1183 scat_data_raw.resize(1);
1184 scat_data_raw[0] = arr_ssd;
1186 scat_data_raw.push_back(arr_ssd);
1188 out2 <<
" Read particle number density data \n";
1196 pnd_field_raw.push_back(pnd_tmp[i]);
1204 Index& propmat_clearsky_agenda_checked,
1206 const Index& atmosphere_dim,
1227 "Number of elements in scat_data and pnd_field filelists is"
1230 Index last_species = scat_data_raw.
nelem() - 1;
1231 if (last_species == -1) {
1232 scat_data_raw.resize(1);
1240 species[0] =
"particles";
1242 for (
Index i = 0; i < scat_data_files.
nelem(); i++) {
1244 scat_data_raw[last_species].push_back(scat_data_single);
1245 vmr_field_raw.push_back(pnd_field_data);
1247 out2 <<
" Read single scattering data file " << scat_data_files[i] <<
"\n";
1250 scat_data_raw[last_species][scat_data_raw[last_species].nelem() - 1],
1253 out2 <<
" Check single scattering properties\n";
1255 "scat_data_single.f_grid to f_grid",
1256 scat_data_raw[last_species][scat_data_raw[last_species].nelem() - 1]
1260 out2 <<
" Read particle number density field\n";
1261 if (pnd_field_files[i].nelem() < 1) {
1263 out1 <<
"Warning: No pnd_field_file specified. Ignored here,\n"
1264 <<
"but user HAS TO add that later on!\n";
1268 vmr_field_raw[vmr_field_raw.
nelem() - 1],
1274 if (tmp.
nelem() == 1) {
1275 vmr_field_raw[vmr_field_raw.
nelem() - 1] = tmp[0];
1278 "The file ", pnd_field_files[i],
"\n"
1279 "is neither GriddedField3 nor a 1-long ArrayOfGriddedField3.\n")
1283 "The file ", pnd_field_files[i],
" does not exist or\n"
1284 "its type is neither GriddedField3 nor a 1-long ArrayOfGriddedField3.\n")
1294 out2 <<
" Append 'particle' field to abs_species\n";
1296 propmat_clearsky_agenda_checked,
1317 arr_ssd.resize(scat_data_files.
nelem());
1318 arr_smd.resize(scat_data_files.
nelem());
1320 Index meta_naming_conv = 0;
1322 for (
Index i = 0; i < 1 && i < scat_data_files.
nelem(); i++) {
1323 out3 <<
" Read single scattering data file " << scat_data_files[i] <<
"\n";
1331 scat_data_files[i].
split(strarr,
".xml");
1332 scat_meta_file = strarr[0] +
".meta.xml";
1336 }
catch (
const runtime_error&) {
1340 out3 <<
" Read scattering meta data\n";
1344 meta_naming_conv = 1;
1347 scat_data_files[i].split(strarr,
"scat_data");
1349 "Splitting scattering data filename up at 'scat_data' also failed.");
1350 scat_meta_file = strarr[0] +
"scat_meta" + strarr[1];
1352 out3 <<
" Read scattering meta data\n";
1355 meta_naming_conv = 2;
1356 }
catch (
const std::runtime_error& e) {
1358 "No meta data file following one of the allowed naming "
1359 "conventions was found.\n"
1361 "*.meta.xml from *.xml and "
1362 "*scat_meta* from *scat_data*\n"
1363 "Scattering meta data file not found: ", scat_meta_file,
1373#pragma omp parallel for if (!arts_omp_in_parallel() && \
1374 scat_data_files.nelem() > 1) \
1375 num_threads(arts_omp_get_max_threads() > 16 ? 16 \
1376 : arts_omp_get_max_threads()) \
1377 shared(out3, scat_data_files, arr_ssd, arr_smd)
1378 for (
Index i = 1; i < scat_data_files.
nelem(); i++) {
1386 out3 <<
" Read single scattering data file " << scat_data_files[i]
1390 scat_data_files[i].split(strarr,
".xml");
1391 scat_meta_file = strarr[0] +
".meta.xml";
1393 if (meta_naming_conv == 1) {
1394 scat_data_files[i].split(strarr,
".xml");
1395 scat_meta_file = strarr[0] +
".meta.xml";
1397 out3 <<
" Read scattering meta data\n";
1400 scat_data_files[i].split(strarr,
"scat_data");
1401 scat_meta_file = strarr[0] +
"scat_meta" + strarr[1];
1403 out3 <<
" Read scattering meta data\n";
1406 }
catch (
const std::exception& e) {
1408 os <<
"Run-time error reading scattering data : \n" << e.what();
1409#pragma omp critical(ybatchCalc_push_fail_msg)
1410 fail_msg.push_back(os.str());
1416#pragma omp critical(ScatSpeciesScatAndMetaRead_assign_ssd)
1417 arr_ssd[i] = std::move(ssd);
1418#pragma omp critical(ScatSpeciesScatAndMetaRead_assign_smd)
1419 arr_smd[i] = std::move(smd);
1422 if (fail_msg.
nelem()) {
1423 std::ostringstream os;
1424 for (
auto& msg : fail_msg) os << msg <<
'\n';
1433 scat_data_raw.push_back(std::move(arr_ssd));
1434 scat_meta.push_back(std::move(arr_smd));
1453 "Number of scattering species specified by scat_species does\n"
1454 "not agree with number of scattering species in\n"
1455 "scat_data_raw or scat_meta:\n"
1456 "scat_species has ", nspecies,
1457 " entries, while scat_data_raw has ", scat_data_raw.
nelem(),
1458 " and scat_meta has ", scat_meta.
nelem(),
".")
1468 for (
Index i = 0; i < scat_species.
nelem(); i++) {
1470 if (partfield_name == species) i_ss = i;
1473 "Scattering species ", species,
" not found among scat_species.")
1476 if (sizeparam ==
"diameter_max")
1477 for (
Index i_se = 0; i_se < scat_meta[i_ss].
nelem(); i_se++) {
1482 if (scat_meta[i_ss][i_se].diameter_max > sizemin - sizemin * tolerance &&
1483 (sizemax + sizemax * tolerance > scat_meta[i_ss][i_se].diameter_max ||
1486 scat_data_raw_tmp.push_back(scat_data_raw[i_ss][i_se]);
1487 scat_meta_tmp.push_back(scat_meta[i_ss][i_se]);
1490 else if (sizeparam ==
"diameter_volume_equ")
1491 for (
Index i_se = 0; i_se < scat_meta[i_ss].
nelem(); i_se++) {
1492 if (scat_meta[i_ss][i_se].diameter_volume_equ >
1493 sizemin - sizemin * tolerance &&
1494 (sizemax + sizemax * tolerance >
1495 scat_meta[i_ss][i_se].diameter_volume_equ ||
1498 scat_data_raw_tmp.push_back(scat_data_raw[i_ss][i_se]);
1499 scat_meta_tmp.push_back(scat_meta[i_ss][i_se]);
1502 else if (sizeparam ==
"diameter_area_equ_aerodynamical")
1503 for (
Index i_se = 0; i_se < scat_meta[i_ss].
nelem(); i_se++) {
1504 if (scat_meta[i_ss][i_se].diameter_area_equ_aerodynamical >
1505 sizemin - sizemin * tolerance &&
1506 (sizemax + sizemax * tolerance >
1507 scat_meta[i_ss][i_se].diameter_area_equ_aerodynamical ||
1510 scat_data_raw_tmp.push_back(scat_data_raw[i_ss][i_se]);
1511 scat_meta_tmp.push_back(scat_meta[i_ss][i_se]);
1516 "Size parameter ", sizeparam,
"is unknown.")
1523 "For scattering species ", species,
" no scattering "
1524 "element matching the requested size range found.\n"
1525 "Check *scat_data_raw* and *scat_meta* input as well as your size limit "
1528 scat_meta[i_ss] = std::move(scat_meta_tmp);
1529 scat_data_raw[i_ss] = std::move(scat_data_raw_tmp);
1543 const String& scat_species_delim,
1547 const bool do_tl = (T_low >= 0.);
1548 const bool do_th = (T_high >= 0.);
1550 if (do_tl || do_th) {
1552 if (species ==
"") {
1553 i_ss = scat_data_raw.
nelem() - 1;
1555 "No *scat_data* available. Can not extend temperature range on "
1561 "Number of scattering species specified by scat_species does\n"
1562 "not agree with number of scattering species in *scat_data*:\n"
1563 "scat_species has ", nspecies,
1564 " entries, while *scat_data* has ", scat_data_raw.
nelem(),
1569 for (
Index i = 0; i < scat_species.
nelem(); i++) {
1571 partfield_name, scat_species[i], scat_species_delim);
1572 if (partfield_name == species) i_ss = i;
1575 "Scattering species ", species,
" not found among scat_species.")
1578 for (
Index i_se = 0; i_se < scat_data_raw[i_ss].
nelem(); i_se++) {
1582 bool do_htl, do_hth;
1584 do_htl = (do_tl && (T_low < ssdo.
T_grid[0]));
1585 do_hth = (do_th && (T_high >
last(ssdo.
T_grid)));
1591 if (do_htl || do_hth) {
1597 if (do_htl) nTn += 1;
1598 if (do_hth) nTn += 1;
1601 T_grid_new[0] = T_low;
1606 for (
Index iT = 0; iT < nTo; iT++)
1607 T_grid_new[iT + iToff] = scat_data_raw[i_ss][i_se].T_grid[iT];
1608 if (do_hth) T_grid_new[nTo + iToff] = T_high;
1609 ssdn.
T_grid = std::move(T_grid_new);
1613 ostringstream description;
1636 for (
Index iT = 0; iT < nTo; iT++) {
1655 <<
"Low temperature limit extended by"
1656 <<
" duplicating previous low temperature limit"
1657 <<
" single scattering properties.";
1668 <<
"High temperature limit extended by"
1669 <<
" duplicating previous high temperature limit"
1670 <<
" single scattering properties.";
1673 scat_data_raw[i_ss][i_se] = std::move(ssdn);
1688 const Index& atmosphere_dim,
1691 const Index& zeropadding,
1698 "No particle number density data given. Please use WSMs\n"
1699 "*ParticleTypeInit* and *ParticleTypeAdd(All)* for reading\n"
1700 "scattering element data.\n")
1731 "*cloudbox_limits* is a vector which contains the"
1732 "upper and lower limit of the cloud for all "
1733 "atmospheric dimensions. So its dimension must"
1734 "be 2 x *atmosphere_dim*");
1735 cloudbox_limits_tmp = cloudbox_limits;
1740 for (
Index d = 0;
d < atmosphere_dim;
d++) {
1741 for (
Index i = 0; i < pnd_field_raw.
nelem(); i++) {
1743 "Error in pnd_field_raw data. "
1744 "Dimension ",
d,
" (name: \"",
1745 pnd_field_raw[i].get_grid_name(
d),
1747 pnd_field_raw[i].get_grid_size(
d),
1749 ((pnd_field_raw[i].get_grid_size(
d) == 1) ?
"" :
"s"),
1750 ". Must be at least 2.")
1753 const Index Np_cloud = cloudbox_limits_tmp[1] - cloudbox_limits_tmp[0] + 1;
1756 p_grid[
Range(cloudbox_limits_tmp[0], Np_cloud)];
1764 cloudbox_limits_tmp);
1767 if (atmosphere_dim == 1) {
1771 pnd_field_tmp, p_grid_cloud, pnd_field_raw, 1, zeropadding, verbosity);
1775 pnd_field_tmp[0].get_numeric_grid(1),
1776 pnd_field_tmp[0].get_numeric_grid(2),
1779 }
else if (atmosphere_dim == 2) {
1780 const Index Nlat_cloud =
1781 cloudbox_limits_tmp[3] - cloudbox_limits_tmp[2] + 1;
1784 lat_grid[
Range(cloudbox_limits_tmp[2], Nlat_cloud)];
1789 out0 <<
"WARNING: zeropadding currently only supported for 1D.";
1793 pnd_field.
resize(pnd_field_raw.
nelem(), Np_cloud, Nlat_cloud, 1);
1801 for (
Index i = 0; i < pnd_field_raw.
nelem(); ++i) {
1804 pnd_field_raw[i].get_numeric_grid(GFIELD3_P_GRID),
1807 pnd_field_raw[i].get_numeric_grid(GFIELD3_LAT_GRID),
1811 Tensor3 itw(Np_cloud, Nlat_cloud, 4);
1822 const Index Nlat_cloud =
1823 cloudbox_limits_tmp[3] - cloudbox_limits_tmp[2] + 1;
1824 const Index Nlon_cloud =
1825 cloudbox_limits_tmp[5] - cloudbox_limits_tmp[4] + 1;
1830 out0 <<
"WARNING: zeropadding currently only supported for 1D.";
1834 lat_grid[
Range(cloudbox_limits_tmp[2], Nlat_cloud)];
1836 lon_grid[
Range(cloudbox_limits_tmp[4], Nlon_cloud)];
1839 pnd_field.
resize(pnd_field_raw.
nelem(), Np_cloud, Nlat_cloud, Nlon_cloud);
1848 for (
Index i = 0; i < pnd_field_raw.
nelem(); ++i) {
1851 pnd_field_raw[i].get_numeric_grid(GFIELD3_P_GRID),
1854 pnd_field_raw[i].get_numeric_grid(GFIELD3_LAT_GRID),
1857 pnd_field_raw[i].get_numeric_grid(GFIELD3_LON_GRID),
1861 Tensor4 itw(Np_cloud, Nlat_cloud, Nlon_cloud, 8);
1867 pnd_field_raw[i].data,
1876 dpnd_field_dx.resize(jacobian_quantities.
nelem());
1881 const Index& atmosphere_dim,
1882 const Index& cloudbox_on,
1891 "No use in calling this method for 1D.");
1893 "No use in calling this method with cloudbox off.");
1895 "The argument *nzero* must be > 0.");
1899 const Index np = cloudbox_limits[1] - cloudbox_limits[0] + 1;
1900 const Index nlat = cloudbox_limits[3] - cloudbox_limits[2] + 1;
1902 if (atmosphere_dim == 3) {
1903 nlon = cloudbox_limits[5] - cloudbox_limits[4] + 1;
1907 pnd_field.
nrows() != 1 ||
1908 pnd_field.
ncols() != 1,
1909 "The input *pnd_field* is either not 1D or does not "
1910 "match pressure size of cloudbox.");
1916 pnd_field.
resize(npart, np, nlat, nlon);
1919 for (
Index ilon = nzero; ilon < nlon - nzero; ilon++) {
1920 for (
Index ilat = nzero; ilat < nlat - nzero; ilat++) {
1921 for (
Index ip = 0; ip < np; ip++) {
1922 for (
Index is = 0; is < npart; is++) {
1923 pnd_field(is, ip, ilat, ilon) = pnd_temp(is, ip, 0, 0);
1936 const Index& atmosphere_dim,
1944 "*cloudbox_limits* is a vector which contains the"
1945 "upper and lower limit of the cloud for all "
1946 "atmospheric dimensions. So its dimension must"
1947 "be 2 x *atmosphere_dim*");
1950 Index np = cloudbox_limits[1] - cloudbox_limits[0] + 1;
1951 Index nlat = 1, nlon = 1;
1952 if (atmosphere_dim > 1) {
1953 nlat = cloudbox_limits[3] - cloudbox_limits[2] + 1;
1954 if (atmosphere_dim > 2) {
1955 nlon = cloudbox_limits[5] - cloudbox_limits[4] + 1;
1961 dpnd_field_dx.resize(jacobian_quantities.
nelem());
1969 pnd_field.
resize(N_se, np, nlat, nlon);
1971 pnd_field.
resize(1, np, nlat, nlon);
1975 scat_data.resize(1);
1976 scat_data[0].resize(1);
1978 scat_data[0][0].description =
" ";
1981 scat_data[0][0].f_grid.resize(nf);
1982 scat_data[0][0].f_grid = f_grid;
1984 scat_data[0][0].T_grid.resize(nT);
1985 scat_data[0][0].T_grid = 270.;
1987 nlinspace(scat_data[0][0].za_grid, 0, 180, nza);
1989 scat_data[0][0].pha_mat_data.resize(nf, nT, nza, 1, 1, 1, 6);
1990 scat_data[0][0].pha_mat_data = 0.;
1991 scat_data[0][0].ext_mat_data.resize(nf, nT, 1, 1, 1);
1992 scat_data[0][0].ext_mat_data = 0.;
1993 scat_data[0][0].abs_vec_data.resize(nf, nT, 1, 1, 1);
1994 scat_data[0][0].abs_vec_data = 0.;
This file contains the definition of Array.
Index TotalNumberOfElements(const Array< Array< base > > &aa)
Determine total number of elements in an ArrayOfArray.
base max(const Array< base > &x)
Max function.
base min(const Array< base > &x)
Min function.
The global header file for ARTS.
Constants of physical expressions as constexpr.
void set_name(const String &nname)
Set agenda name.
Index nelem() const ARTS_NOEXCEPT
Index nrows() const noexcept
Index ncols() const noexcept
Index npages() const
Returns the number of pages.
Index ncols() const noexcept
bool empty() const noexcept
Index nrows() const noexcept
Index nbooks() const noexcept
Index npages() const noexcept
Index ncols() const noexcept
Index ncols() const noexcept
Index npages() const noexcept
Index nrows() const noexcept
Index nlibraries() const noexcept
Index nvitrines() const noexcept
Index nshelves() const noexcept
Index nbooks() const noexcept
A constant view of a Vector.
Index nelem() const noexcept
Returns the number of elements.
bool empty() const noexcept
Returns true if variable size is zero.
void resize(Index r, Index c)
Resize function.
void resize(Index b, Index p, Index r, Index c)
Resize function.
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
void resize(Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
void split(Array< my_basic_string< charT > > &aos, const my_basic_string< charT > &delim) const
void chk_scat_species_field(bool &empty_flag, const Tensor3 &scat_species_field, const String &fieldname, const Index &dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid)
Check whether field of a specific scattering species zero everywhere.
void chk_scattering_meta_data(const ScatteringMetaData &scat_meta_single, const String &scat_meta_file, const Verbosity &verbosity)
Check scattering data meta.
void find_cloudlimits(Index &lower, Index &upper, const Tensor3 &scat_species_field, const Index &atmosphere_dim, const Numeric &cloudbox_margin)
Adjust uppermost and lowermost cloudy level for one scat_species_*_*_field.
void chk_pnd_field_raw_only_in_cloudbox(const Index &dim, const ArrayOfGriddedField3 &pnd_field_raw, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, const ArrayOfIndex &cloudbox_limits)
chk_pnd_field_raw_only_in_cloudbox
void parse_partfield_name(String &partfield_name, const String &part_string, const String &delim)
void chk_pnd_raw_data(const ArrayOfGriddedField3 &pnd_field_raw, const String &pnd_field_file, const Index &atmosphere_dim, const Verbosity &verbosity)
Check particle number density files (pnd_field_raw)
void chk_scattering_data(const ArrayOfSingleScatteringData &scat_data, const ArrayOfScatteringMetaData &scat_meta, const Verbosity &)
Check scattering data general.
void chk_pnd_data(const GriddedField3 &pnd_field_raw, const String &pnd_field_file, const Index &atmosphere_dim, const Verbosity &verbosity)
Check particle number density files.
Internal cloudbox functions.
#define ARTS_ASSERT(condition,...)
#define ARTS_USER_ERROR(...)
#define ARTS_USER_ERROR_IF(condition,...)
void find_xml_file(String &filename, const Verbosity &verbosity)
Find an xml file.
bool file_exists(const std::string_view filename)
Checks if the given file exists.
This file contains basic functions to handle ASCII files.
Implementation of gridded fields.
void gridpos(ArrayOfGridPos &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Numeric &extpolfac)
Set up a grid position Array.
void gridpos_upperend_check(GridPos &gp, const Index &ie)
gridpos_upperend_check
void interpweights(VectorView itw, const GridPos &tc)
Red 1D interpolation weights.
bool is_gridpos_at_index_i(const GridPos &gp, const Index &i, const bool &strict)
is_gridpos_at_index_i
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPos &tc)
Red 1D Interpolate.
Numeric fractional_gp(const GridPos &gp)
fractional_gp
Header file for interpolation.cc.
Interpolation::Lagrange LagrangeInterpolation
Linear algebra functions.
bool is_size(ConstVectorView x, const Index &n)
Verifies that the size of x is l.
bool is_same_within_epsilon(const Numeric &a, const Numeric &b, const Numeric &epsilon)
Check, if two numbers agree within a given epsilon.
Header file for logic.cc.
void abs_speciesAdd(ArrayOfArrayOfSpeciesTag &abs_species, Index &propmat_clearsky_agenda_checked, const ArrayOfString &names, const Verbosity &verbosity)
WORKSPACE METHOD: abs_speciesAdd.
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.
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.
void cloudbox_fieldCrop(Tensor7 &cloudbox_field, ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Index &cloudbox_on, const Index &new_limit0, const Index &new_limit1, const Index &new_limit2, const Index &new_limit3, const Index &new_limit4, const Index &new_limit5, const Verbosity &)
WORKSPACE METHOD: cloudbox_fieldCrop.
void cloudboxSetManually(Index &cloudbox_on, ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Numeric &p1, const Numeric &p2, const Numeric &lat1, const Numeric &lat2, const Numeric &lon1, const Numeric &lon2, const Verbosity &)
WORKSPACE METHOD: cloudboxSetManually.
void cloudboxOff(Workspace &ws, Index &cloudbox_on, Index &ppath_inside_cloudbox_do, ArrayOfIndex &cloudbox_limits, Agenda &iy_cloudbox_agenda, Tensor4 &pnd_field, ArrayOfTensor4 &dpnd_field_dx, ArrayOfString &scat_species, ArrayOfArrayOfSingleScatteringData &scat_data, ArrayOfArrayOfSingleScatteringData &scat_data_raw, Index &scat_data_checked, Matrix &particle_masses, const ArrayOfRetrievalQuantity &jacobian_quantities, const Verbosity &)
WORKSPACE METHOD: cloudboxOff.
void ScatSpeciesExtendTemperature(ArrayOfArrayOfSingleScatteringData &scat_data_raw, const ArrayOfString &scat_species, const String &species, const String &scat_species_delim, const Numeric &T_low, const Numeric &T_high, const Verbosity &)
WORKSPACE METHOD: ScatSpeciesExtendTemperature.
void cloudboxSetAutomatically(Index &cloudbox_on, ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor4 &particle_field, const Numeric &cloudbox_margin, const Verbosity &verbosity)
WORKSPACE METHOD: cloudboxSetAutomatically.
void ScatElementsToabs_speciesAdd(ArrayOfArrayOfSingleScatteringData &scat_data_raw, ArrayOfGriddedField3 &vmr_field_raw, ArrayOfArrayOfSpeciesTag &abs_species, Index &propmat_clearsky_agenda_checked, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfString &scat_data_files, const ArrayOfString &pnd_field_files, const Verbosity &verbosity)
WORKSPACE METHOD: ScatElementsToabs_speciesAdd.
constexpr Numeric DEG2RAD
void ScatSpeciesPndAndScatAdd(ArrayOfArrayOfSingleScatteringData &scat_data_raw, ArrayOfGriddedField3 &pnd_field_raw, const Index &atmosphere_dim, const ArrayOfString &scat_data_files, const String &pnd_fieldarray_file, const Verbosity &verbosity)
WORKSPACE METHOD: ScatSpeciesPndAndScatAdd.
void iyInterpCloudboxField(Matrix &iy, const Tensor7 &cloudbox_field, const Vector &rte_pos, const Vector &rte_los, const Index &jacobian_do, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Matrix &z_surface, const Index &stokes_dim, const Vector &za_grid, const Vector &aa_grid, const Vector &f_grid, const Index &za_interp_order, const Index &za_restrict, const Index &cos_za_interp, const Numeric &za_extpolfac, const Index &aa_interp_order, const Verbosity &)
WORKSPACE METHOD: iyInterpCloudboxField.
void ScatElementsSelect(ArrayOfArrayOfSingleScatteringData &scat_data_raw, ArrayOfArrayOfScatteringMetaData &scat_meta, const ArrayOfString &scat_species, const String &species, const String &sizeparam, const Numeric &sizemin, const Numeric &sizemax, const Numeric &tolerance, const String &delim, const Verbosity &)
WORKSPACE METHOD: ScatElementsSelect.
void ScatSpeciesScatAndMetaRead(ArrayOfArrayOfSingleScatteringData &scat_data_raw, ArrayOfArrayOfScatteringMetaData &scat_meta, const ArrayOfString &scat_data_files, const Verbosity &verbosity)
WORKSPACE METHOD: ScatSpeciesScatAndMetaRead.
void ScatElementsPndAndScatAdd(ArrayOfArrayOfSingleScatteringData &scat_data_raw, ArrayOfGriddedField3 &pnd_field_raw, const Index &atmosphere_dim, const ArrayOfString &scat_data_files, const ArrayOfString &pnd_field_files, const Verbosity &verbosity)
WORKSPACE METHOD: ScatElementsPndAndScatAdd.
constexpr Numeric DENSITY_OF_ICE
void particle_fieldCleanup(Tensor4 &particle_field_out, const Tensor4 &particle_field_in, const Numeric &threshold, const Verbosity &)
WORKSPACE METHOD: particle_fieldCleanup.
void pnd_fieldExpand1D(Tensor4 &pnd_field, const Index &atmosphere_dim, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &nzero, const Verbosity &)
WORKSPACE METHOD: pnd_fieldExpand1D.
constexpr Numeric RAD2DEG
void cloudboxSetFullAtm(Index &cloudbox_on, ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Index &fullfull, const Verbosity &)
WORKSPACE METHOD: cloudboxSetFullAtm.
void pnd_fieldZero(Tensor4 &pnd_field, ArrayOfTensor4 &dpnd_field_dx, ArrayOfArrayOfSingleScatteringData &scat_data, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfIndex &cloudbox_limits, const ArrayOfRetrievalQuantity &jacobian_quantities, const Verbosity &)
WORKSPACE METHOD: pnd_fieldZero.
void cloudboxSetManuallyAltitude(Index &cloudbox_on, ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Tensor3 &z_field, const Vector &lat_grid, const Vector &lon_grid, const Numeric &z1, const Numeric &z2, const Numeric &lat1, const Numeric &lat2, const Numeric &lon1, const Numeric &lon2, const Verbosity &)
WORKSPACE METHOD: cloudboxSetManuallyAltitude.
void pnd_fieldCalcFrompnd_field_raw(Tensor4 &pnd_field, ArrayOfTensor4 &dpnd_field_dx, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfGriddedField3 &pnd_field_raw, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const ArrayOfRetrievalQuantity &jacobian_quantities, const Index &zeropadding, const Verbosity &verbosity)
WORKSPACE METHOD: pnd_fieldCalcFrompnd_field_raw.
void cloudbox_fieldInterp2Azimuth(Tensor7 &cloudbox_field, const Index &cloudbox_on, const Vector &aa_grid, const Numeric &local_los_azimuth_angle, const Index &aa_interp_order, const Verbosity &)
WORKSPACE METHOD: cloudbox_fieldInterp2Azimuth.
void ScatSpeciesInit(ArrayOfString &scat_species, ArrayOfArrayOfSingleScatteringData &scat_data_raw, ArrayOfArrayOfScatteringMetaData &scat_meta, Index &scat_data_checked, ArrayOfGriddedField3 &pnd_field_raw, const Verbosity &)
WORKSPACE METHOD: ScatSpeciesInit.
void scat_dataCheck(const ArrayOfArrayOfSingleScatteringData &scat_data, const String &check_type, const Numeric &threshold, const Verbosity &verbosity)
WORKSPACE METHOD: scat_dataCheck.
void nlinspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlinspace
Numeric last(ConstVectorView x)
last
void abs(Sparse &A, const Sparse &B)
Absolute value of sparse matrix elements.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
Declarations having to do with the four output streams.
Internal functions for microphysics calculations (size distributions etc.)
constexpr Numeric LAT_LON_MIN
Global constant, minimum distance of cloudbox to lat/lon_grid edges.
constexpr Numeric pi
The following mathematical constants are generated in python Decimal package by the code:
constexpr Numeric density_of_ice_at_0c
Global constant, Density of water ice at 0C [kg/m3] source: http://en.wikipedia.org/wiki/Ice.
constexpr auto deg2rad(auto x) noexcept
Converts degrees to radians.
constexpr auto rad2deg(auto x) noexcept
Converts radians to degrees.
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.
void check_lagrange_interpolation(const SortedVectorType &xi, const Index polyorder=1, const std::pair< Numeric, Numeric > x={std::numeric_limits< Numeric >::infinity(), -std::numeric_limits< Numeric >::infinity()}, const Numeric extrapol=0.5, const GridType type=GridType::Standard, const std::pair< Numeric, Numeric > cycle={-180, 180})
Scattering database structure and functions.
This file contains header information for the dealing with command line parameters.
Numeric barometric_heightformula(const Numeric &p, const Numeric &dh)
barometric_heightformula
This file contains declerations of functions of physical character.
Declaration of functions in rte.cc.
Contains sorting routines.
void p2gridpos(ArrayOfGridPos &gp, ConstVectorView old_pgrid, ConstVectorView new_pgrid, const Numeric &extpolfac)
Calculates grid positions for pressure values.
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.
Header file for special_interp.cc.
Structure to store a grid position.
This file contains basic functions to handle XML data files.
void xml_read_from_file(const String &filename, T &type, const Verbosity &verbosity)
Reads data from XML file.