870 const Index& stokes_dim,
872 const Index& atmosphere_dim,
884 const Index& cloudbox_on,
892 const Index& jacobian_do,
894 const Agenda& propmat_clearsky_agenda,
895 const Agenda& water_p_eq_agenda,
896 const Agenda& iy_main_agenda,
897 const Agenda& iy_space_agenda,
898 const Agenda& iy_surface_agenda,
899 const Agenda& iy_cloudbox_agenda,
900 const Index& iy_agenda_call1,
901 const Tensor3& iy_transmission,
905 const Tensor3& surface_props_data,
909 const Index& t_interp_order,
950 propmat_clearsky_agenda,
973 if (atmosphere_dim != 1)
975 "With cloudbox on, this method handles only 1D calculations.");
976 if (Naa < 3)
throw runtime_error(
"Naa must be > 2.");
978 if (dpnd_field_dx.
nelem() != jacobian_quantities.
nelem())
980 "*dpnd_field_dx* not properly initialized:\n" 981 "Number of elements in dpnd_field_dx must be equal number of jacobian" 982 " quantities.\n(Note: jacobians have to be defined BEFORE *pnd_field*" 983 " is calculated/set.");
985 if (rbi < 1 || rbi > 9)
987 "ppath.background is invalid. Check your " 988 "calculation of *ppath*?");
989 if (rbi == 3 || rbi == 4)
991 "The propagation path ends inside or at boundary of " 992 "the cloudbox.\nFor this method, *ppath* must be " 993 "calculated in this way:\n ppathCalc( cloudbox_on = 0 ).");
996 if (cloudbox_field.
ncols() != stokes_dim)
998 "Obtained *cloudbox_field* number of Stokes elements inconsistent with " 1000 if (cloudbox_field.
nrows() != 1)
1001 throw runtime_error(
1002 "Obtained *cloudbox_field* has wrong number of azimuth angles.");
1004 throw runtime_error(
1005 "Obtained *cloudbox_field* number of zenith angles inconsistent with " 1007 if (cloudbox_field.
nbooks() != 1)
1008 throw runtime_error(
1009 "Obtained *cloudbox_field* has wrong number of longitude points.");
1010 if (cloudbox_field.
nshelves() != 1)
1011 throw runtime_error(
1012 "Obtained *cloudbox_field* has wrong number of latitude points.");
1013 if (cloudbox_field.
nvitrines() != cloudbox_limits[1] - cloudbox_limits[0] + 1)
1014 throw runtime_error(
1015 "Obtained *cloudbox_field* number of pressure points inconsistent with " 1016 "*cloudbox_limits*.");
1018 throw runtime_error(
1019 "Obtained *cloudbox_field* number of frequency points inconsistent with " 1023 Index j_analytical_do = 0;
1028 const Index nq = j_analytical_do ? jacobian_quantities.
nelem() : 0;
1030 ArrayOfIndex jac_species_i(nq), jac_scat_i(nq), jac_is_t(nq), jac_wind_i(nq);
1033 if (j_analytical_do) {
1050 jacobian_quantities,
1056 iy_aux.resize(naux);
1059 iy_aux[
i].resize(nf, ns);
1061 if (iy_aux_vars[
i] ==
"Optical depth") {
1063 else if (iy_aux_vars[
i] ==
"Radiative background") {
1067 os <<
"The only allowed strings in *iy_aux_vars* are:\n" 1068 <<
" \"Radiative background\"\n" 1069 <<
" \"Optical depth\"\n" 1070 <<
"but you have selected: \"" << iy_aux_vars[
i] <<
"\"";
1071 throw runtime_error(os.
str());
1077 ppvar_trans_cumulat.
resize(np, nf, ns, ns);
1079 Tensor4 trans_partial(np, nf, ns, ns);
1080 Tensor5 dtrans_partial_dx_above(np, nq, nf, ns, ns);
1081 Tensor5 dtrans_partial_dx_below(np, nq, nf, ns, ns);
1082 Tensor4 dJ_dx(np, nq, nf, ns);
1085 if (np == 1 && rbi == 1)
1094 ppvar_iy.
resize(0, 0, 0);
1097 ppvar_iy.
resize(nf, ns, np);
1120 ppvar_f, ppath, f_grid, atmosphere_dim, rte_alonglos_v, ppvar_wind);
1146 if (j_analytical_do) {
1157 for (
Index ip = 0; ip < np; ip++) {
1158 bool temperature_jacobian =
1162 B, dB_dT, ppvar_f(
joker, ip), ppvar_t[ip], temperature_jacobian);
1170 propmat_clearsky_agenda,
1171 jacobian_quantities,
1173 ppvar_mag(
joker, ip),
1176 ppvar_vmr(
joker, ip),
1182 if (j_analytical_do) {
1185 jacobian_quantities,
1188 ppvar_vmr(
joker, ip),
1198 if (clear2cloudy[ip] + 1) {
1203 jacobian_quantities,
1209 ppvar_t[
Range(ip, 1)],
1215 if (j_analytical_do) {
1217 dK_this_dx[iq] += dKp_dx[iq];)
1225 jacobian_quantities,
1226 ppvar_pnd(
joker, ip),
1235 ppvar_t[
Range(ip, 1)],
1241 if (j_analytical_do) {
1249 if (j_analytical_do) {
1278 jacobian_quantities,
1281 swap(K_past, K_this);
1282 swap(dK_past_dx, dK_this_dx);
1288 if (iy_agenda_call1) {
1298 if (iy_aux_vars[
i] ==
"Optical depth") {
1299 for (
Index iv = 0; iv < nf; iv++) {
1300 iy_aux[
i](iv,
joker) = -log(ppvar_trans_cumulat(np - 1, iv, 0, 0));
1312 jacobian_quantities,
1333 for (
Index iv = 0; iv < nf; iv++) {
1334 Vector through_level(ns), from_level(ns);
1335 Vector dfrom_level_dx(ns);
1336 Matrix one_minus_transmission(ns, ns);
1338 for (
Index ip = np - 2; ip >= 0; ip--) {
1341 if (j_analytical_do) {
1342 if (stokes_dim > 1) {
1343 id_mat(one_minus_transmission);
1345 one_minus_transmission = 1.;
1347 one_minus_transmission -= T;
1350 from_level = J(ip, iv,
joker);
1351 from_level += J(ip + 1, iv,
joker);
1353 through_level = iy(iv,
joker);
1354 through_level -= from_level;
1356 if (j_analytical_do) {
1359 diy_dpath[iq](ip + 1, iv,
joker),
1360 one_minus_transmission,
1362 dtrans_partial_dx_above(ip + 1, iq, iv,
joker,
joker),
1363 dtrans_partial_dx_below(ip + 1, iq, iv,
joker,
joker),
1365 dJ_dx(ip, iq, iv,
joker),
1366 dJ_dx(ip + 1, iq, iv,
joker),
1372 iy(iv,
joker) += from_level;
1380 if (j_analytical_do) {
1395 jacobian_quantities,
1401 if (iy_agenda_call1) {
1409 jacobian_quantities,
1431 const Index& stokes_dim,
1433 const Index& atmosphere_dim,
1445 const Index& cloudbox_on,
1453 const Index& jacobian_do,
1455 const Agenda& propmat_clearsky_agenda,
1456 const Agenda& water_p_eq_agenda,
1457 const Agenda& iy_main_agenda,
1458 const Agenda& iy_space_agenda,
1459 const Agenda& iy_surface_agenda,
1460 const Agenda& iy_cloudbox_agenda,
1461 const Index& iy_agenda_call1,
1462 const Tensor3& iy_transmission,
1465 const Numeric& rte_alonglos_v,
1466 const Tensor3& surface_props_data,
1467 const Tensor7& cloudbox_field,
1470 const Index& t_interp_order,
1487 ppvar_trans_cumulat,
1508 jacobian_quantities,
1511 propmat_clearsky_agenda,
1534 if (atmosphere_dim != 1)
1535 throw runtime_error(
1536 "With cloudbox on, this method handles only 1D calculations.");
1537 if (Naa < 3)
throw runtime_error(
"Naa must be > 2.");
1539 if (dpnd_field_dx.
nelem() != jacobian_quantities.
nelem())
1540 throw runtime_error(
1541 "*dpnd_field_dx* not properly initialized:\n" 1542 "Number of elements in dpnd_field_dx must be equal number of jacobian" 1543 " quantities.\n(Note: jacobians have to be defined BEFORE *pnd_field*" 1544 " is calculated/set.");
1545 if (rbi < 1 || rbi > 9)
1546 throw runtime_error(
1547 "ppath.background is invalid. Check your " 1548 "calculation of *ppath*?");
1549 if (rbi == 3 || rbi == 4)
1550 throw runtime_error(
1551 "The propagation path ends inside or at boundary of " 1552 "the cloudbox.\nFor this method, *ppath* must be " 1553 "calculated in this way:\n ppathCalc( cloudbox_on = 0 ).");
1556 if (cloudbox_field.
ncols() != stokes_dim)
1557 throw runtime_error(
1558 "Obtained *cloudbox_field* number of Stokes elements inconsistent with " 1560 if (cloudbox_field.
nrows() != 1)
1561 throw runtime_error(
1562 "Obtained *cloudbox_field* has wrong number of azimuth angles.");
1564 throw runtime_error(
1565 "Obtained *cloudbox_field* number of zenith angles inconsistent with " 1567 if (cloudbox_field.
nbooks() != 1)
1568 throw runtime_error(
1569 "Obtained *cloudbox_field* has wrong number of longitude points.");
1570 if (cloudbox_field.
nshelves() != 1)
1571 throw runtime_error(
1572 "Obtained *cloudbox_field* has wrong number of latitude points.");
1573 if (cloudbox_field.
nvitrines() != cloudbox_limits[1] - cloudbox_limits[0] + 1)
1574 throw runtime_error(
1575 "Obtained *cloudbox_field* number of pressure points inconsistent with " 1576 "*cloudbox_limits*.");
1578 throw runtime_error(
1579 "Obtained *cloudbox_field* number of frequency points inconsistent with " 1583 Index j_analytical_do = 0;
1586 const Index nq = j_analytical_do ? jacobian_quantities.
nelem() : 0;
1588 ArrayOfIndex jac_species_i(nq), jac_scat_i(nq), jac_is_t(nq), jac_wind_i(nq);
1591 if (j_analytical_do)
1608 jacobian_quantities,
1613 iy_aux.resize(naux);
1616 iy_aux[
i].resize(nf, ns);
1618 if (iy_aux_vars[
i] ==
"Optical depth") {
1620 else if (iy_aux_vars[
i] ==
"Radiative background")
1624 os <<
"The only allowed strings in *iy_aux_vars* are:\n" 1625 <<
" \"Radiative background\"\n" 1626 <<
" \"Optical depth\"\n" 1627 <<
"but you have selected: \"" << iy_aux_vars[
i] <<
"\"";
1628 throw runtime_error(os.
str());
1633 ppvar_trans_cumulat.
resize(np, nf, ns, ns);
1634 ppvar_iy.
resize(nf, ns, np);
1651 if (np == 1 && rbi == 1) {
1658 ppvar_trans_cumulat = 1;
1681 ppvar_f, ppath, f_grid, atmosphere_dim, rte_alonglos_v, ppvar_wind);
1708 Index temperature_derivative_position = -1;
1709 bool do_hse =
false;
1711 if (j_analytical_do) {
1721 temperature_derivative_position = iq;
1722 do_hse = jacobian_quantities[iq].Subtag() ==
"HSE on";
1725 const bool temperature_jacobian =
1729 for (
Index ip = 0; ip < np; ip++) {
1731 B, dB_dT, ppvar_f(
joker, ip), ppvar_t[ip], temperature_jacobian);
1739 propmat_clearsky_agenda,
1740 jacobian_quantities,
1742 ppvar_mag(
joker, ip),
1745 ppvar_vmr(
joker, ip),
1751 if (j_analytical_do)
1754 jacobian_quantities,
1757 ppvar_vmr(
joker, ip),
1766 if (clear2cloudy[ip] + 1) {
1771 jacobian_quantities,
1777 ppvar_t[
Range(ip, 1)],
1783 if (j_analytical_do)
1785 dK_this_dx[iq] += dKp_dx[iq];)
1792 jacobian_quantities,
1793 ppvar_pnd(
joker, ip),
1802 ppvar_t[
Range(ip, 1)],
1808 if (j_analytical_do)
1812 if (j_analytical_do)
1818 do_hse ? ppath.
lstep[ip - 1] / (2.0 * ppvar_t[ip - 1]) : 0;
1820 do_hse ? ppath.
lstep[ip - 1] / (2.0 * ppvar_t[ip]) : 0;
1828 ppath.
lstep[ip - 1],
1831 temperature_derivative_position);
1844 jacobian_quantities,
1847 swap(K_past, K_this);
1848 swap(dK_past_dx, dK_this_dx);
1857 if (iy_agenda_call1)
1858 iy_trans_new = tot_tra[np - 1];
1864 if (iy_aux_vars[
i] ==
"Optical depth")
1865 for (
Index iv = 0; iv < nf; iv++)
1866 iy_aux[
i](iv,
joker) = -log(ppvar_trans_cumulat(np - 1, iv, 0, 0));
1875 jacobian_quantities,
1892 lvl_rad[np - 1] = iy;
1895 for (
Index ip = np - 2; ip >= 0; ip--) {
1896 lvl_rad[ip] = lvl_rad[ip + 1];
1906 dlyr_tra_above[ip + 1],
1907 dlyr_tra_below[ip + 1],
1913 for (
Index ip = 0; ip < lvl_rad.
nelem(); ip++) {
1916 if (j_analytical_do)
1922 if (j_analytical_do)
1937 jacobian_quantities,
1942 if (iy_agenda_call1)
1950 jacobian_quantities,
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_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.
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 iy_transmission_mult(Tensor3 &iy_trans_total, ConstTensor3View iy_trans_old, ConstTensor3View iy_trans_new)
Multiplicates iy_transmission with transmissions.
Index nelem() const
Number of elements.
void iyHybrid(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 &iy_id, 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 String &iy_unit, const ArrayOfString &iy_aux_vars, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, 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 Tensor3 &iy_transmission, const Ppath &ppath, const Vector &rte_pos2, const Numeric &rte_alonglos_v, const Tensor3 &surface_props_data, const Tensor7 &cloudbox_field, const Vector &za_grid, const Index &Naa, const Index &t_interp_order, const Verbosity &verbosity)
WORKSPACE METHOD: iyHybrid.
Matrix los
Line-of-sight at each ppath point.
void get_stepwise_transmission_matrix(Tensor3View cumulative_transmission, Tensor3View T, Tensor4View dT_close_dx, Tensor4View dT_far_dx, ConstTensor3View cumulative_transmission_close, const PropagationMatrix &K_close, const PropagationMatrix &K_far, const ArrayOfPropagationMatrix &dK_close_dx, const ArrayOfPropagationMatrix &dK_far_dx, const Numeric &ppath_distance, const bool &first_level, const Numeric &dppath_distance_dT_HSE_close, const Numeric &dppath_distance_dT_HSE_far, const Index &temperature_derivative_position_if_hse_is_active)
Computes layer transmission matrix and cumulative transmission.
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.
Vector lstep
The length between ppath points.
Index nrows() const
Returns the number of rows.
void iyHybrid2(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 &iy_id, 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 String &iy_unit, const ArrayOfString &iy_aux_vars, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, 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 Tensor3 &iy_transmission, const Ppath &ppath, const Vector &rte_pos2, const Numeric &rte_alonglos_v, const Tensor3 &surface_props_data, const Tensor7 &cloudbox_field, const Vector &za_grid, const Index &Naa, const Index &t_interp_order, const Verbosity &verbosity)
WORKSPACE METHOD: iyHybrid2.
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.
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...
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...
Stokes vector is as Propagation matrix but only has 4 possible values.
#define FOR_ANALYTICAL_JACOBIANS_DO(what_to_do)
Index nelem() const
Returns the number of elements.
Array< RadiationVector > ArrayOfRadiationVector
Index ppath_what_background(const Ppath &ppath)
Returns the case number for the radiative background.
void swap(ComplexVector &v1, ComplexVector &v2)
Swaps two objects.
The global header file for ARTS.
_CS_string_type str() const
ArrayOfTransmissionMatrix cumulative_transmission(const ArrayOfTransmissionMatrix &T, const CumulativeTransmission type)
Accumulate the transmission matrix over all layers.
Array< TransmissionMatrix > ArrayOfTransmissionMatrix
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.
void nlinspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlinspace
void get_stepwise_effective_source(MatrixView J, Tensor3View dJ_dx, const PropagationMatrix &K, const StokesVector &a, const StokesVector &S, const ArrayOfPropagationMatrix &dK_dx, const ArrayOfStokesVector &da_dx, const ArrayOfStokesVector &dS_dx, ConstVectorView B, ConstVectorView dB_dT, const ArrayOfRetrievalQuantity &jacobian_quantities, const bool &jacobian_do)
Gets the effective source at propagation path point.
void rtmethods_unit_conversion(Matrix &iy, ArrayOfTensor3 &diy_dx, Tensor3 &ppvar_iy, const Index &ns, const Index &np, const Vector &f_grid, const Ppath &ppath, const ArrayOfRetrievalQuantity &jacobian_quantities, const Index &j_analytical_do, const String &iy_unit)
This function handles the unit conversion to be done at the end of some radiative transfer WSMs...
void iyEmissionStandard(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_f, Tensor3 &ppvar_iy, Tensor4 &ppvar_trans_cumulat, Tensor4 &ppvar_trans_partial, const Index &iy_id, 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 String &iy_unit, const ArrayOfString &iy_aux_vars, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const Ppath &ppath, const Vector &rte_pos2, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, 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 Tensor3 &iy_transmission, const Numeric &rte_alonglos_v, const Tensor3 &surface_props_data, const Verbosity &verbosity)
WORKSPACE METHOD: iyEmissionStandard.
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.
NUMERIC Numeric
The type to use for all floating point numbers.
Index nlibraries() const
Returns the number of libraries.
void get_diydx(VectorView diy1, VectorView diy2, ConstMatrixView ImT, ConstMatrixView cumulative_transmission, ConstMatrixView dT1, ConstMatrixView dT2, ConstVectorView iYmJ, ConstVectorView dJ1, ConstVectorView dJ2, const Index stokes_dim, const bool transmission_only)
Radiation Vector for Stokes dimension 1-4.
bool do_temperature_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants the temperature derivative.
void resize(Index p, Index r, Index c)
Resize function.
void mult(ComplexVectorView y, const ConstComplexMatrixView &M, const ConstComplexVectorView &x)
Matrix-Vector Multiplication.
Radiative transfer in cloudbox.
This can be used to make arrays out of anything.
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 resize(Index n)
Resize function.
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...
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.
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.
Index np
Number of points describing the ppath.
Index nshelves() const
Returns the number of shelves.
Workspace methods and template functions for supergeneric XML IO.
A constant view of a Matrix.
Index npages() const
Returns the number of pages.
void get_stepwise_scattersky_source(StokesVector &Sp, ArrayOfStokesVector &dSp_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, ConstVectorView ppath_1p_pnd, const ArrayOfMatrix &ppath_dpnd_dx, const Index ppath_1p_id, const ArrayOfArrayOfSingleScatteringData &scat_data, ConstTensor7View cloudbox_field, ConstVectorView za_grid, ConstVectorView aa_grid, ConstMatrixView ppath_line_of_sight, const GridPos &ppath_pressure, const Vector &temperature, const Index &atmosphere_dim, const bool &jacobian_do, const Index &t_interp_order)
Calculates the stepwise scattering source terms.
void id_mat(MatrixView I)
Identity Matrix.
Index nvitrines() const
Returns the number of vitrines.
The structure to describe a propagation path and releated quantities.
Header file for helper functions for OpenMP.
Index ncols() const
Returns the number of columns.
Index nbooks() const
Returns the number of books.
ArrayOfGridPos gp_p
Index position with respect to the pressure grid.
void resize(Index b, Index p, Index r, Index c)
Resize function.
Declaration of functions in rte.cc.
void resize(Index r, Index c)
Resize function.