52 const Index& atmfields_checked,
53 const Index& atmgeom_checked,
54 const Index& scat_data_checked,
55 const Index& cloudbox_checked,
56 const Index& cloudbox_on,
58 const Agenda& propmat_clearsky_agenda,
59 const Agenda& gas_scattering_agenda,
60 const Index& atmosphere_dim,
68 const Vector& refellipsoid,
74 const Index& stokes_dim,
77 const Vector& surface_scalar_reflectivity,
78 const Index& gas_scattering_do,
81 const Index& nstreams,
83 const Index& only_tro,
84 const Index& cdisort_quiet,
85 const Index& emission,
86 const Index& intensity_correction,
91 out0 <<
" Cloudbox is off, DISORT calculation will be skipped.\n";
109 "The simulation setup contains ",
112 "Disort can handle only one sun.")
116 "aa_grid has a size of 0.\n",
117 "aa_grid must have at least a size of one.")
122 Vector cloudboxtop_pos(3);
123 Index sun_on = suns_do;
129 Vector lon_grid{lon_true[0] - 0.1, lon_true[0] + 0.1};
130 Vector lat_grid{lat_true[0] - 0.1, lat_true[0] + 0.1};
133 sun_pos = {suns[0].distance, suns[0].latitude, suns[0].longitude};
137 z_field(cloudbox_limits[1], 0, 0), lat_true[0], lon_true[0]};
154 if (sun_rte_los[0] >= 90) {
161 out0 <<
"Sun is below the horizon\n";
162 out0 <<
"Sun is ignored.\n";
163 out0 <<
"cloudbox_field will have no azimuthal dependency!\n";
183 scale_factor=suns[0].radius*suns[0].radius/
184 (suns[0].radius*suns[0].radius+R_Sun2CloudboxTop*R_Sun2CloudboxTop);
190 out3 <<
"Disort calculation encountered aa_grid size larger than 1 in a case when it\n";
191 out3 <<
"does not use aa_grid. Calculations are performed as if there is no aa_grid.\n";
209 albedo, btemp, f_grid, surface_skin_t, surface_scalar_reflectivity);
216 z_field(
joker, 0, 0),
218 t_field(
joker, 0, 0),
223 propmat_clearsky_agenda,
224 gas_scattering_agenda,
240 intensity_correction,
251 const Index& atmfields_checked,
252 const Index& atmgeom_checked,
253 const Index& scat_data_checked,
254 const Index& cloudbox_checked,
255 const Index& cloudbox_on,
257 const Agenda& propmat_clearsky_agenda,
258 const Agenda& surface_rtprop_agenda,
259 const Agenda& gas_scattering_agenda,
260 const Index& atmosphere_dim,
268 const Vector& refellipsoid,
274 const Index& stokes_dim,
276 const Index& gas_scattering_do,
277 const Index& suns_do,
279 const Index& nstreams,
281 const Index& only_tro,
282 const Index& cdisort_quiet,
283 const Index& emission,
284 const Index& intensity_correction,
291 out0 <<
" Cloudbox is off, DISORT calculation will be skipped.\n";
309 "The simulation setup contains ",
312 "Disort can handle only one sun.")
316 "aa_grid has a size of 0.\n",
317 "aa_grid must have at least a size of one.")
322 Vector cloudboxtop_pos(3);
323 Index sun_on = suns_do;
329 Vector lon_grid{lon_true[0] - 0.1, lon_true[0] + 0.1};
330 Vector lat_grid{lat_true[0] - 0.1, lat_true[0] + 0.1};
333 sun_pos = {suns[0].distance, suns[0].latitude, suns[0].longitude};
337 z_field(cloudbox_limits[1], 0, 0), lat_true[0], lon_true[0]};
354 if (sun_rte_los[0] >= 90) {
361 out0 <<
"Sun is below the horizon\n";
362 out0 <<
"Sun is ignored.\n";
363 out0 <<
"cloudbox_field will have no azimuthal dependency!\n";
384 scale_factor=suns[0].radius*suns[0].radius/
385 (suns[0].radius*suns[0].radius+R_Sun2CloudboxTop*R_Sun2CloudboxTop);
391 out3 <<
"Disort calculation encountered aa_grid size larger than 1 in a case when it\n";
392 out3 <<
"does not use aa_grid. Calculations are performed as if there is no aa_grid.\n";
409 if (inc_angle<0 || inc_angle>90) {
413 surface_rtprop_agenda,
422 surface_rtprop_agenda,
433 z_field(
joker, 0, 0),
435 t_field(
joker, 0, 0),
440 propmat_clearsky_agenda,
441 gas_scattering_agenda,
457 intensity_correction,
465 Tensor7& spectral_radiance_field,
468 const Index& atmfields_checked,
469 const Index& atmgeom_checked,
470 const Agenda& propmat_clearsky_agenda,
471 const Agenda& gas_scattering_agenda,
472 const Index& atmosphere_dim,
479 const Vector& refellipsoid,
484 const Index& stokes_dim,
487 const Vector& surface_scalar_reflectivity,
488 const Index& gas_scattering_do,
489 const Index& suns_do,
491 const Index& nstreams,
492 const Index& cdisort_quiet,
493 const Index& emission,
494 const Index& intensity_correction,
497 if (atmosphere_dim != 1)
499 "For running DISORT, atmospheric dimensionality "
505 const Index cloudbox_checked = 1;
520 const Index scat_data_checked = 1;
531 Matrix optical_depth_dummy;
535 spectral_radiance_field,
544 propmat_clearsky_agenda,
545 gas_scattering_agenda,
563 surface_scalar_reflectivity,
572 intensity_correction,
580 Tensor5& spectral_irradiance_field,
583 const Index& atmfields_checked,
584 const Index& atmgeom_checked,
585 const Index& scat_data_checked,
586 const Agenda& propmat_clearsky_agenda,
587 const Agenda& gas_scattering_agenda,
588 const Index& atmosphere_dim,
596 const Vector& refellipsoid,
600 const Index& stokes_dim,
603 const Vector& surface_scalar_reflectivity,
604 const Index& gas_scattering_do,
605 const Index& suns_do,
607 const Index& nstreams,
609 const Index& only_tro,
610 const Index& cdisort_quiet,
611 const Index& emission,
612 const Index& intensity_correction,
628 const Index Np_cloud = cloudbox_limits[1] - cloudbox_limits[0] + 1;
640 "The simulation setup contains ",
643 "Disort can handle only one sun.")
648 Vector cloudboxtop_pos(3);
649 Index sun_on = suns_do;
652 spectral_irradiance_field.
resize(Nf, Np_cloud, 1, 1, 2);
653 spectral_irradiance_field = NAN;
657 Vector lon_grid{lon_true[0] - 0.1, lon_true[0] + 0.1};
658 Vector lat_grid{lat_true[0] - 0.1, lat_true[0] + 0.1};
661 sun_pos = {suns[0].distance, suns[0].latitude, suns[0].longitude};
665 z_field(cloudbox_limits[1], 0, 0), lat_true[0], lon_true[0]};
682 if (sun_rte_los[0] >= 90) {
686 out0 <<
"Sun is below the horizon\n";
687 out0 <<
"Sun is ignored.\n";
707 scale_factor=suns[0].radius*suns[0].radius/
708 (suns[0].radius*suns[0].radius+R_Sun2CloudboxTop*R_Sun2CloudboxTop);
716 albedo, btemp, f_grid, surface_skin_t, surface_scalar_reflectivity);
719 spectral_irradiance_field,
723 z_field(
joker, 0, 0),
725 t_field(
joker, 0, 0),
730 propmat_clearsky_agenda,
731 gas_scattering_agenda,
745 intensity_correction,
This file contains the definition of Array.
This can be used to make arrays out of anything.
Index nelem() const ARTS_NOEXCEPT
Index nelem() const noexcept
Returns the number of elements.
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
#define ARTS_USER_ERROR_IF(condition,...)
void surf_albedoCalc(Workspace &ws, VectorView albedo, Numeric &btemp, const Agenda &surface_rtprop_agenda, ConstVectorView f_grid, ConstVectorView scat_za_grid, const Numeric &surf_alt, const Verbosity &verbosity)
surf_albedoCalc
void run_cdisort(Workspace &ws, Tensor7 &cloudbox_field, ArrayOfMatrix &disort_aux, ConstVectorView f_grid, ConstVectorView p_grid, ConstVectorView z_profile, const Numeric &z_surface, ConstVectorView t_profile, ConstMatrixView vmr_profiles, ConstMatrixView pnd_profiles, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const ArrayOfIndex &cloudbox_limits, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, ConstVectorView za_grid, ConstVectorView aa_grid, ConstVectorView sun_rte_los, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Numeric &scale_factor, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
Calculate doit_i_field with Disort including a sun source.
void run_cdisort_flux(Workspace &ws, Tensor5 &spectral_irradiance_field, ArrayOfMatrix &disort_aux, ConstVectorView f_grid, ConstVectorView p_grid, ConstVectorView z_profile, const Numeric &z_surface, ConstVectorView t_profile, ConstMatrixView vmr_profiles, ConstMatrixView pnd_profiles, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const ArrayOfIndex &cloudbox_limits, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, ConstVectorView sun_rte_los, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Numeric &scale_factor, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
Calculate spectral_irradiance_field with Disort including a sun source.
void get_disortsurf_props(Vector &albedo, Numeric &btemp, ConstVectorView f_grid, const Numeric &surface_skin_t, ConstVectorView surface_scalar_reflectivity)
get_disortsurf_props.
void surf_albedoCalcSingleAngle(Workspace &ws, VectorView albedo, Numeric &btemp, const Agenda &surface_rtprop_agenda, ConstVectorView f_grid, const Numeric &surf_alt, const Numeric &inc_angle)
surf_albedoCalcSingleAngle
void check_disort_irradiance_input(const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Index &atmosphere_dim, const Index &stokes_dim, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &nstreams)
check_disort_input.
void check_disort_input(const Index &cloudbox_on, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &cloudbox_checked, const Index &scat_data_checked, const Index &atmosphere_dim, const Index &stokes_dim, const ArrayOfIndex &cloudbox_limits, const ArrayOfArrayOfSingleScatteringData &scat_data, ConstVectorView za_grid, const Index &nstreams)
check_disort_input.
void init_ifield(Tensor7 &cloudbox_field, const Vector &f_grid, const ArrayOfIndex &cloudbox_limits, const Index &n_za, const Index &n_aa, const Index &stokes_dim)
init_ifield.
Functions for disort interface.
void distance3D(Numeric &l, const Numeric &r1, const Numeric &lat1, const Numeric &lon1, const Numeric &r2, const Numeric &lat2, const Numeric &lon2)
distance3D
Numeric refell2r(ConstVectorView refellipsoid, const Numeric &lat)
refell2r
Array< RetrievalQuantity > ArrayOfRetrievalQuantity
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 DisortCalcIrradiance(Workspace &ws, Tensor5 &spectral_irradiance_field, ArrayOfMatrix &disort_aux, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const Index &atmosphere_dim, const Tensor4 &pnd_field, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Vector &f_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
WORKSPACE METHOD: DisortCalcIrradiance.
void DisortCalc(Workspace &ws, Tensor7 &cloudbox_field, ArrayOfMatrix &disort_aux, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Index &cloudbox_checked, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const Index &atmosphere_dim, const Tensor4 &pnd_field, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Vector &f_grid, const Vector &za_grid, const Vector &aa_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
WORKSPACE METHOD: DisortCalc.
void DisortCalcWithARTSSurface(Workspace &ws, Tensor7 &cloudbox_field, ArrayOfMatrix &disort_aux, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Index &cloudbox_checked, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Agenda &propmat_clearsky_agenda, const Agenda &surface_rtprop_agenda, const Agenda &gas_scattering_agenda, const Index &atmosphere_dim, const Tensor4 &pnd_field, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Vector &f_grid, const Vector &za_grid, const Vector &aa_grid, const Index &stokes_dim, const Matrix &z_surface, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Numeric &inc_angle, const Verbosity &verbosity)
WORKSPACE METHOD: DisortCalcWithARTSSurface.
void DisortCalcClearsky(Workspace &ws, Tensor7 &spectral_radiance_field, ArrayOfMatrix &disort_aux, const Index &atmfields_checked, const Index &atmgeom_checked, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const Index &atmosphere_dim, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfSun &suns, const Vector &f_grid, const Vector &za_grid, const Vector &aa_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
WORKSPACE METHOD: DisortCalcClearsky.
Template functions for general supergeneric ws methods.
void rte_losGeometricFromRtePosToRtePos2(Vector &rte_los, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &refellipsoid, const Vector &rte_pos, const Vector &rte_pos2, const Verbosity &)
WORKSPACE METHOD: rte_losGeometricFromRtePosToRtePos2.
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.