Go to the documentation of this file.
712 "Recursive usage not possible (iy_agenda_call1 must be 1)");
714 throw runtime_error(
"*iy_transmission* must be empty");
715 if (rbi < 1 || rbi > 9)
717 "ppath.background is invalid. Check your "
718 "calculation of *ppath*?");
722 "*dpnd_field_dx* not properly initialized:\n"
723 "Number of elements in dpnd_field_dx must be equal number of jacobian"
724 " quantities.\n(Note: jacobians have to be defined BEFORE *pnd_field*"
725 " is calculated/set.");
736 if (
iy.ncols() !=
ns ||
iy.nrows() != nf) {
738 os <<
"The size of *iy* returned from *iy_transmitter_agenda* is\n"
740 <<
" expected size = [" << nf <<
"," <<
stokes_dim <<
"]\n"
741 <<
" size of iy = [" <<
iy.nrows() <<
"," <<
iy.ncols() <<
"]\n";
742 throw runtime_error(os.str());
746 Index j_analytical_do = 0;
751 ArrayOfIndex jac_species_i(nq), jac_scat_i(nq), jac_is_t(nq), jac_wind_i(nq);
754 if (j_analytical_do) {
779 Index auxOptDepth = -1;
781 for (
Index i = 0; i < naux; i++) {
791 os <<
"The only allowed strings in *iy_aux_vars* are:\n"
792 <<
" \"Radiative background\"\n"
793 <<
" \"Optical depth\"\n"
794 <<
"but you have selected: \"" <<
iy_aux_vars[i] <<
"\"";
795 throw runtime_error(os.str());
815 if (np == 1 && rbi == 1) {
865 clear2cloudy.resize(np);
866 for (
Index ip = 0; ip < np; ip++) clear2cloudy[ip] = -1;
879 Index temperature_derivative_position = -1;
882 if (j_analytical_do) {
891 temperature_derivative_position = iq;
898 for (
Index ip = 0; ip < np; ip++) {
917 if (j_analytical_do) {
933 if (clear2cloudy[ip] + 1) {
949 if (j_analytical_do) {
957 do_hse ?
ppath.lstep[ip - 1] / (2.0 *
ppvar_t[ip - 1]) : 0;
970 temperature_derivative_position);
973 swap(K_past, K_this);
974 swap(dK_past_dx, dK_this_dx);
982 if (auxOptDepth >= 0) {
983 for (
Index iv = 0; iv < nf; iv++)
984 iy_aux[auxOptDepth](iv, 0) = -std::log(tot_tra[np - 1](iv, 0, 0));
987 lvl_rad[np - 1] =
iy;
990 for (
Index ip = np - 2; ip >= 0; ip--) {
991 lvl_rad[ip] = lvl_rad[ip + 1];
1001 dlyr_tra_above[ip + 1],
1002 dlyr_tra_below[ip + 1],
1003 RadiativeTransferSolver::Transmission);
1008 for (
Index ip = 0; ip < lvl_rad.
nelem(); ip++) {
1011 if (j_analytical_do)
1017 if (j_analytical_do) {
1047 throw runtime_error(
1048 "The length of *f_grid* and the number of elements "
1049 "in *instrument_pol* must be equal.");
1053 for (
Index i = 0; i < nf; i++) {
1067 throw runtime_error(
1068 "The number of elements in *instrument_pol* must be 1.");
1074 for (
Index i = 1; i < nf; i++) {
Matrix ppvar_mag(Workspace &ws) noexcept
Index atmosphere_dim(Workspace &ws) noexcept
std::size_t pos() const noexcept
Tensor3 wind_v_field(Workspace &ws) noexcept
void adapt_stepwise_partial_derivatives(ArrayOfPropagationMatrix &dK_dx, ArrayOfStokesVector &dS_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, ConstVectorView ppath_f_grid, ConstVectorView ppath_line_of_sight, ConstVectorView ppath_vmrs, const Numeric &ppath_temperature, const Numeric &ppath_pressure, const ArrayOfIndex &jacobian_species, const ArrayOfIndex &jacobian_wind, const Index <e, const Index &atmosphere_dim, const bool &jacobian_do)
Adapts clearsky partial derivatives.
PropagationMatrix PropagationMatrix
Stokes vector is as Propagation matrix but only has 4 possible values.
ArrayOfIndex instrument_pol(Workspace &ws) noexcept
ArrayOfRetrievalQuantity jacobian_quantities(Workspace &ws) noexcept
Matrix ppvar_vmr(Workspace &ws) noexcept
Tensor3 iy_transmission(Workspace &ws) noexcept
Agenda iy_transmitter_agenda(Workspace &ws) noexcept
void get_ppath_cloudvars(ArrayOfIndex &clear2cloudy, Matrix &ppath_pnd, ArrayOfMatrix &ppath_dpnd_dx, const Ppath &ppath, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const ArrayOfTensor4 &dpnd_field_dx)
Determines the particle fields along a propagation path.
Tensor4 pnd_field(Workspace &ws) noexcept
void iy_transmitterSinglePol(Matrix &iy, const Index &stokes_dim, const Vector &f_grid, const ArrayOfIndex &instrument_pol, const Verbosity &)
WORKSPACE METHOD: iy_transmitterSinglePol.
Tensor3 ppvar_iy(Workspace &ws) noexcept
void swap(ComplexVector &v1, ComplexVector &v2)
Swaps two objects.
ArrayOfIndex cloudbox_limits(Workspace &ws) noexcept
Index jacobian_do(Workspace &ws) noexcept
Tensor3 wind_u_field(Workspace &ws) noexcept
void resize(Index n)
Resize function.
ArrayOfTensor3 diy_dx(Workspace &ws) noexcept
Matrix ppvar_f(Workspace &ws) noexcept
Tensor3 mag_w_field(Workspace &ws) noexcept
Index stokes_dim(Workspace &ws) noexcept
#define FOR_ANALYTICAL_JACOBIANS_DO(what_to_do)
Matrix iy(Workspace &ws) noexcept
The structure to describe a propagation path and releated quantities.
void rtmethods_jacobian_init(ArrayOfIndex &jac_species_i, ArrayOfIndex &jac_scat_i, ArrayOfIndex &jac_is_t, ArrayOfIndex &jac_wind_i, ArrayOfIndex &jac_mag_i, ArrayOfIndex &jac_other, ArrayOfTensor3 &diy_dx, ArrayOfTensor3 &diy_dpath, const Index &ns, const Index &nf, const Index &np, const Index &nq, const ArrayOfArrayOfSpeciesTag &abs_species, const Index &cloudbox_on, const ArrayOfString &scat_species, const ArrayOfTensor4 &dpnd_field_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const Index &iy_agenda_call1, const bool is_active)
This function fixes the initial steps around Jacobian calculations, to be done inside radiative trans...
Tensor4 ppvar_trans_cumulat(Workspace &ws) noexcept
void get_stepwise_scattersky_propmat(StokesVector &ap, PropagationMatrix &Kp, ArrayOfStokesVector &dap_dx, ArrayOfPropagationMatrix &dKp_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, ConstMatrixView ppath_1p_pnd, const ArrayOfMatrix &ppath_dpnd_dx, const Index ppath_1p_id, const ArrayOfArrayOfSingleScatteringData &scat_data, ConstVectorView ppath_line_of_sight, ConstVectorView ppath_temperature, const Index &atmosphere_dim, const bool &jacobian_do)
Computes the contribution by scattering at propagation path point.
A class implementing complex numbers for ARTS.
Numeric rte_alonglos_v(Workspace &ws) noexcept
EnergyLevelMap nlte_field(Workspace &ws) noexcept
This can be used to make arrays out of anything.
const Numeric SPEED_OF_LIGHT
Sensor modelling functions.
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.
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.
Declarations having to do with the four output streams.
Matrix ppvar_pnd(Workspace &ws) noexcept
Array< RadiationVector > ArrayOfRadiationVector
Tensor4 vmr_field(Workspace &ws) noexcept
EnergyLevelMap ppvar_nlte(Workspace &ws) noexcept
ArrayOfArrayOfSpeciesTag abs_species(Workspace &ws) noexcept
Vector ppvar_t(Workspace &ws) noexcept
void get_ppath_atmvars(Vector &ppath_p, Vector &ppath_t, EnergyLevelMap &ppath_nlte, Matrix &ppath_vmr, Matrix &ppath_wind, Matrix &ppath_mag, const Ppath &ppath, const Index &atmosphere_dim, ConstVectorView p_grid, ConstTensor3View t_field, const EnergyLevelMap &nlte_field, ConstTensor4View vmr_field, ConstTensor3View wind_u_field, ConstTensor3View wind_v_field, ConstTensor3View wind_w_field, ConstTensor3View mag_u_field, ConstTensor3View mag_v_field, ConstTensor3View mag_w_field)
Determines pressure, temperature, VMR, winds and magnetic field for each propgataion path point.
Vector p_grid(Workspace &ws) noexcept
Ppath ppath(Workspace &ws) noexcept
Routines for setting up the jacobian.
NUMERIC Numeric
The type to use for all floating point numbers.
Linear algebra functions.
Index iy_agenda_call1(Workspace &ws) noexcept
ArrayOfString iy_aux_vars(Workspace &ws) noexcept
Vector f_grid(Workspace &ws) noexcept
Matrix ppvar_wind(Workspace &ws) noexcept
ArrayOfArrayOfSingleScatteringData scat_data(Workspace &ws) noexcept
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 iy_transmitter_agendaExecute(Workspace &ws, Matrix &iy, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const Agenda &input_agenda)
ArrayOfTensor4 dpnd_field_dx(Workspace &ws) noexcept
Array< TransmissionMatrix > ArrayOfTransmissionMatrix
ArrayOfTransmissionMatrix cumulative_transmission(const ArrayOfTransmissionMatrix &T, const CumulativeTransmission type)
Accumulate the transmission matrix over all layers.
ArrayOfMatrix iy_aux(Workspace &ws) noexcept
Header file for logic.cc.
RadiationVector RadiationVector
void stokes2pol(VectorView w, const Index &stokes_dim, const Index &ipol_1based, const Numeric nv)
stokes2pol
Declaration of functions in rte.cc.
Tensor3 mag_v_field(Workspace &ws) noexcept
Tensor3 t_field(Workspace &ws) noexcept
void iyTransmissionStandard(Workspace &ws, Matrix &iy, ArrayOfMatrix &iy_aux, ArrayOfTensor3 &diy_dx, Vector &ppvar_p, Vector &ppvar_t, EnergyLevelMap &ppvar_nlte, Matrix &ppvar_vmr, Matrix &ppvar_wind, Matrix &ppvar_mag, Matrix &ppvar_pnd, Matrix &ppvar_f, Tensor3 &ppvar_iy, Tensor4 &ppvar_trans_cumulat, const Index &stokes_dim, const Vector &f_grid, const Index &atmosphere_dim, const Vector &p_grid, const Tensor3 &t_field, const EnergyLevelMap &nlte_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Tensor3 &mag_u_field, const Tensor3 &mag_v_field, const Tensor3 &mag_w_field, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const ArrayOfTensor4 &dpnd_field_dx, const ArrayOfString &scat_species, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfString &iy_aux_vars, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const Ppath &ppath, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, const Agenda &iy_transmitter_agenda, const Index &iy_agenda_call1, const Tensor3 &iy_transmission, const Numeric &rte_alonglos_v, const Verbosity &)
WORKSPACE METHOD: iyTransmissionStandard.
Tensor3 wind_w_field(Workspace &ws) noexcept
TransmissionMatrix TransmissionMatrix
Agenda propmat_clearsky_agenda(Workspace &ws) noexcept
void rtmethods_jacobian_finalisation(Workspace &ws, ArrayOfTensor3 &diy_dx, ArrayOfTensor3 &diy_dpath, const Index &ns, const Index &nf, const Index &np, const Index &atmosphere_dim, const Ppath &ppath, const Vector &ppvar_p, const Vector &ppvar_t, const Matrix &ppvar_vmr, const Index &iy_agenda_call1, const Tensor3 &iy_transmission, const Agenda &water_p_eq_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex jac_species_i, const ArrayOfIndex jac_is_t)
This function fixes the last steps to made on the Jacobian in some radiative transfer WSMs.
INDEX Index
The type to use for all integer numbers and indices.
ArrayOfString scat_species(Workspace &ws) noexcept
void iy_transmitterMultiplePol(Matrix &iy, const Index &stokes_dim, const Vector &f_grid, const ArrayOfIndex &instrument_pol, const Verbosity &)
WORKSPACE METHOD: iy_transmitterMultiplePol.
Tensor3 mag_u_field(Workspace &ws) noexcept
Index ppath_what_background(const Ppath &ppath)
Returns the case number for the radiative background.
Vector ppvar_p(Workspace &ws) noexcept
Agenda water_p_eq_agenda(Workspace &ws) noexcept
Index nelem() const
Number of elements.
StokesVector StokesVector
void get_ppath_f(Matrix &ppath_f, const Ppath &ppath, ConstVectorView f_grid, const Index &atmosphere_dim, const Numeric &rte_alonglos_v, ConstMatrixView ppath_wind)
Determines the Doppler shifted frequencies along the propagation path.
The global header file for ARTS.
Index cloudbox_on(Workspace &ws) noexcept