39 const Index& stokes_dim,
47 const Agenda& propmat_clearsky_agenda)
56 throw std::runtime_error(
57 "Does not support Jacobian calculations at this time");
58 if (stokes_dim not_eq 1)
59 throw std::runtime_error(
"Only for stokes_dim 1 at this time.");
73 additional_source_field =
77 Agenda l_propmat_clearsky_agenda(propmat_clearsky_agenda);
79 #pragma omp parallel for if (not arts_omp_in_parallel()) schedule(guided) \ 80 firstprivate(l_ws, l_propmat_clearsky_agenda) 82 for (
Index j = 0; j < nlat; j++) {
83 for (
Index k = 0; k < nlon; k++) {
84 thread_local
Index itmp;
87 propmat_field(
i, j, k),
88 additional_source_field(
i, j, k),
92 l_propmat_clearsky_agenda,
103 absorption_field(i, j, k) = propmat_field(i, j, k);
114 for (
size_t ip = 0; ip < propmat_field.
npages(); ip++)
115 for (
size_t ir = 0; ir < propmat_field.
nrows(); ir++)
116 for (
size_t ic = 0; ic < propmat_field.
ncols(); ic++)
117 transmat_field(ip, ir, ic) =
119 return transmat_field;
135 const Agenda& iy_main_agenda,
136 const Agenda& iy_space_agenda,
137 const Agenda& iy_surface_agenda,
138 const Agenda& iy_cloudbox_agenda,
139 const Tensor3& surface_props_data,
144 const Index ns = propmat_field(0, 0, 0).StokesDimensions();
148 if (ns not_eq 1)
throw std::runtime_error(
"Only for stokes_dim 1");
149 if (ppath.
dim not_eq 1)
throw std::runtime_error(
"Only for atmosphere_dim 1");
170 for (
Index ip = 0; ip < np; ip++) {
173 K_this = propmat_field(ppath.
gp_p[ip]);
203 swap(K_past, K_this);
208 const Tensor3 iy_trans_new = tot_tra[np - 1];
234 lvl_rad[np - 1] = iy;
237 for (
Index ip = np - 2; ip >= 0; ip--)
INDEX Index
The type to use for all integer numbers and indices.
void get_iy_of_background(Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, ConstTensor3View iy_transmission, const Index &iy_id, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const Ppath &ppath, ConstVectorView rte_pos2, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, ConstVectorView f_grid, const String &iy_unit, ConstTensor3View surface_props_data, const Agenda &iy_main_agenda, const Agenda &iy_space_agenda, const Agenda &iy_surface_agenda, const Agenda &iy_cloudbox_agenda, const Index &iy_agenda_call1, const Verbosity &verbosity)
Determines iy of the "background" of a propgation path.
Class to keep track of Transmission Matrices for Stokes Dim 1-4.
void get_stepwise_clearsky_propmat(Workspace &ws, PropagationMatrix &K, StokesVector &S, Index <e, ArrayOfPropagationMatrix &dK_dx, ArrayOfStokesVector &dS_dx, const Agenda &propmat_clearsky_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, ConstVectorView ppath_f_grid, ConstVectorView ppath_magnetic_field, ConstVectorView ppath_line_of_sight, const EnergyLevelMap &ppath_nlte, ConstVectorView ppath_vmrs, const Numeric &ppath_temperature, const Numeric &ppath_pressure, const ArrayOfIndex &jacobian_species, const bool &jacobian_do)
Gets the clearsky propgation matrix and NLTE contributions.
Index nelem() const
Number of elements.
Field3D< StokesVector > FieldOfStokesVector
void interp_atmfield_by_gp(VectorView x, const Index &atmosphere_dim, ConstTensor3View x_field, const ArrayOfGridPos &gp_p, const ArrayOfGridPos &gp_lat, const ArrayOfGridPos &gp_lon)
Interpolates an atmospheric field given the grid positions.
size_t nrows() const
Number of rows.
size_t ncols() const
Number of columns.
Index dim
Atmospheric dimensionality.
void stepwise_transmission(TransmissionMatrix &T, ArrayOfTransmissionMatrix &dT1, ArrayOfTransmissionMatrix &dT2, const PropagationMatrix &K1, const PropagationMatrix &K2, const ArrayOfPropagationMatrix &dK1, const ArrayOfPropagationMatrix &dK2, const Numeric &r, const Numeric &dr_dtemp1, const Numeric &dr_dtemp2, const Index temp_deriv_pos)
Set the stepwise transmission matrix.
Implements a propagation matrix field.
Vector lstep
The length between ppath points.
Creates a 3D field of a base unit.
void emission_from_propmat_field(Workspace &ws, ArrayOfRadiationVector &lvl_rad, ArrayOfRadiationVector &src_rad, ArrayOfTransmissionMatrix &lyr_tra, ArrayOfTransmissionMatrix &tot_tra, const FieldOfPropagationMatrix &propmat_field, const FieldOfStokesVector &absorption_field, const FieldOfStokesVector &additional_source_field, const Vector &f_grid, const Tensor3 &t_field, const EnergyLevelMap &nlte_field, const Ppath &ppath, const Agenda &iy_main_agenda, const Agenda &iy_space_agenda, const Agenda &iy_surface_agenda, const Agenda &iy_cloudbox_agenda, const Tensor3 &surface_props_data, const Verbosity &verbosity)
Computes the radiation and transmission from fields of atmospheric propagation.
invlib::Vector< ArtsVector > Vector
invlib wrapper type for ARTS vectors.
Index nrows() const
Returns the number of rows.
Stokes vector is as Propagation matrix but only has 4 possible values.
Index nelem() const
Returns the number of elements.
Array< RadiationVector > ArrayOfRadiationVector
void swap(ComplexVector &v1, ComplexVector &v2)
Swaps two objects.
ArrayOfTransmissionMatrix cumulative_transmission(const ArrayOfTransmissionMatrix &T, const CumulativeTransmission type)
Accumulate the transmission matrix over all layers.
Array< TransmissionMatrix > ArrayOfTransmissionMatrix
Index ncols() const
Returns the number of columns.
void stepwise_source(RadiationVector &J, ArrayOfRadiationVector &dJ, const PropagationMatrix &K, const StokesVector &a, const StokesVector &S, const ArrayOfPropagationMatrix &dK, const ArrayOfStokesVector &da, const ArrayOfStokesVector &dS, const ConstVectorView B, const ConstVectorView dB_dT, const ArrayOfRetrievalQuantity &jacobian_quantities, const bool &jacobian_do)
Set the stepwise source.
Stuff related to the transmission matrix.
NUMERIC Numeric
The type to use for all floating point numbers.
size_t npages() const
Number of pages.
Radiation Vector for Stokes dimension 1-4.
Header file for special_interp.cc.
Index npages() const
Returns the number of pages.
This can be used to make arrays out of anything.
void field_of_propagation(Workspace &ws, FieldOfPropagationMatrix &propmat_field, FieldOfStokesVector &absorption_field, FieldOfStokesVector &additional_source_field, const Index &stokes_dim, const Vector &f_grid, const Vector &p_grid, const Tensor3 &z_field, const Tensor3 &t_field, const EnergyLevelMap &nlte_field, const Tensor4 &vmr_field, const ArrayOfRetrievalQuantity &jacobian_quantities, const Agenda &propmat_clearsky_agenda)
Creates a field of propagation matrices, absorption vectors, and source vectors.
void update_radiation_vector(RadiationVector &I, ArrayOfRadiationVector &dI1, ArrayOfRadiationVector &dI2, const RadiationVector &J1, const RadiationVector &J2, const ArrayOfRadiationVector &dJ1, const ArrayOfRadiationVector &dJ2, const TransmissionMatrix &T, const TransmissionMatrix &PiT, const ArrayOfTransmissionMatrix &dT1, const ArrayOfTransmissionMatrix &dT2, const RadiativeTransferSolver solver)
Update the Radiation Vector.
void get_stepwise_blackbody_radiation(VectorView B, VectorView dB_dT, ConstVectorView ppath_f_grid, const Numeric &ppath_temperature, const bool &do_temperature_derivative)
Get the blackbody radiation at propagation path point.
FieldOfTransmissionMatrix transmat_field_calc_from_propmat_field(const FieldOfPropagationMatrix &propmat_field, const Numeric &r)
Get a field of transmission matrices from the propagation matrix field.
Index np
Number of points describing the ppath.
The structure to describe a propagation path and releated quantities.
Field3D< PropagationMatrix > FieldOfPropagationMatrix
ArrayOfGridPos gp_p
Index position with respect to the pressure grid.
Declaration of functions in rte.cc.