Go to the documentation of this file.
87 const Sparse& sensor_response,
91 if( jacobian_quantities.
nelem() == 0 )
93 "No retrieval quantities has been added to *jacobian_quantities*." );
96 if( sensor_pos.
nrows() == 0 )
99 os <<
"The number of rows in *sensor_pos* is zero, i.e. no measurement\n"
100 <<
"blocks has been defined. This has to be done before calling\n"
102 throw runtime_error(os.str());
104 if( sensor_response.
nrows() == 0 )
107 os <<
"The sensor has either to be defined or turned off before calling\n"
109 throw runtime_error(os.str());
116 for(
Index it=0; it<jacobian_quantities.
nelem(); it++ )
126 { cols *= grids[jt].
nelem(); }
129 indices[1] = ncols + cols - 1;
130 jacobian_indices.push_back( indices );
136 jacobian.
resize( nrows, ncols );
139 jacobian_agenda.
check(ws, verbosity);
151 jacobian_quantities.resize(0);
152 jacobian_agenda =
Agenda();
153 jacobian_agenda.
set_name(
"jacobian_agenda" );
166 jacobianInit(jacobian_quantities, jacobian_agenda, verbosity);
168 jacobian_indices.resize(0);
184 const Index& atmosphere_dim,
189 const Vector& rq_lat_grid,
190 const Vector& rq_lon_grid,
204 jq[it].Subtag() == species )
207 os <<
"The gas species:\n" << species <<
"\nis already included in "
208 <<
"*jacobian_quantities*.";
209 throw runtime_error(os.str());
219 rq_p_grid, rq_lat_grid, rq_lon_grid,
220 "retrieval pressure grid",
221 "retrieval latitude grid",
222 "retrievallongitude_grid",
224 throw runtime_error(os.str());
229 if( method ==
"perturbation" )
231 else if( method ==
"analytical" )
236 os <<
"The method for absorption species retrieval can only be "
237 <<
"\"analytical\"\n or \"perturbation\".";
238 throw runtime_error(os.str());
242 if( mode !=
"vmr" && mode !=
"nd" && mode !=
"rel" && mode !=
"logrel" )
244 throw runtime_error(
"The retrieval mode can only be \"vmr\", \"nd\" "
245 "\"rel\" or \"logrel\"." );
257 "Retrieval of temperature and number densities can not be mixed.";
258 throw runtime_error(os.str());
278 out3 <<
" Calculations done by semi-analytical expressions.\n";
279 jacobian_agenda.
append(
"jacobianCalcAbsSpeciesAnalytical",
TokVal() );
283 out2 <<
" Adding absorption species: " << species
284 <<
" to *jacobian_quantities*\n" <<
" and *jacobian_agenda*\n";
285 out3 <<
" Calculations done by perturbation, size " <<
dx
286 <<
" " << mode <<
".\n";
288 jacobian_agenda.
append(
"jacobianCalcAbsSpeciesPerturbations", species );
312 const Index& imblock,
315 const Index& atmosphere_dim,
323 const Index& cloudbox_on,
324 const Index& stokes_dim,
328 const Vector& mblock_za_grid,
329 const Vector& mblock_aa_grid,
330 const Index& antenna_dim,
331 const Sparse& sensor_response,
332 const Agenda& iy_clearsky_agenda,
347 for(
Index n=0; n<jacobian_quantities.
nelem() && !found; n++ )
350 jacobian_quantities[n].Subtag() == species )
353 rq = jacobian_quantities[n];
354 ji = jacobian_indices[n];
360 os <<
"There is no gas species retrieval quantities defined for:\n"
362 throw runtime_error(os.str());
368 os <<
"This WSM handles only perturbation calculations.\n"
369 <<
"Are you using the method manually?";
370 throw runtime_error(os.str());
380 if( rq.
Mode()==
"rel" )
395 if( atmosphere_dim >= 2 )
397 j_lat = jg[1].
nelem();
399 if( atmosphere_dim == 3 )
401 j_lon = jg[2].
nelem();
413 if( rq.
Mode()==
"nd" )
426 for(
Index lon_it=0; lon_it<j_lon; lon_it++ )
428 for(
Index lat_it=0; lat_it<j_lat; lat_it++ )
430 for (
Index p_it=0; p_it<j_p; p_it++)
441 if( atmosphere_dim>=2 )
444 if( atmosphere_dim == 3 )
455 if( rq.
Mode() ==
"nd" )
461 switch (atmosphere_dim)
467 p_gp, jg[0].nelem()+2, p_range,
475 p_gp, lat_gp, jg[0].nelem()+2,
476 jg[1].nelem()+2, p_range, lat_range,
484 p_gp, lat_gp, lon_gp,
486 jg[1].nelem()+2, jg[2].nelem()+2,
487 p_range, lat_range, lon_range,
500 Vector iybp, dummy1, dummy3;
503 iyb_calc( ws, iybp, dummy1, dummy2, dummy3, dummy4, imblock,
504 atmosphere_dim, p_grid, lat_grid, lon_grid,
505 t_field, z_field, vmr_p, cloudbox_on, stokes_dim,
506 f_grid, sensor_pos, sensor_los, mblock_za_grid,
507 mblock_aa_grid, antenna_dim, iy_clearsky_agenda,
511 mult( dy, sensor_response, iybp );
514 for(
Index i=0; i<n1y; i++ )
518 jacobian(rowind,it) = dy;
543 const Index& do_stretch,
548 for(
Index it=0; it<jacobian_quantities.
nelem(); it++ )
554 os <<
"This type of frequency fit is already included in\n"
555 <<
"*jacobian_quantities*.";
556 throw runtime_error(os.str());
561 if( do_stretch!=0 && do_stretch!=1 )
562 throw runtime_error(
"The argument *do_stretch* must be 0 or 1." );
566 throw runtime_error(
"The argument *df* must be > 0." );
568 throw runtime_error(
"The argument *df* is not allowed to exceed 1 MHz." );
570 const Numeric maxdf = f_grid[nf-1] - f_grid[nf-2];
571 if( calcmode ==
"interp" && df > maxdf )
574 os <<
"The value of *df* is too big with respect to spacing of "
575 <<
"*f_grid*.\nWith *calcmode* set to \"interp\", the maximum "
576 <<
"value of *df* equals\nthe spacing between the two last "
577 <<
"elements of *f_grid*.\n"
578 <<
"This spacing is : " <<maxdf/1e3 <<
" kHz\n"
579 <<
"The value of df is: " << df/1e3 <<
" kHz";
580 throw runtime_error(os.str());
590 Vector grid(0,1+do_stretch,1);
595 if( calcmode ==
"interp" )
598 jacobian_agenda.
append(
"jacobianCalcFreqShiftAndStretchInterp",
"" );
601 throw runtime_error(
"Possible choices for *calcmode* are \"interp\"." );
604 jacobian_quantities.push_back( rq );
612 const Index& imblock,
615 const Index& stokes_dim,
617 const Vector& mblock_za_grid,
618 const Vector& mblock_aa_grid,
619 const Index& antenna_dim,
620 const Sparse& sensor_response,
622 const Vector& sensor_response_f_grid,
623 const Vector& sensor_response_za_grid,
635 for(
Index n=0; n<jacobian_quantities.
nelem() && !found; n++ )
642 rq = jacobian_quantities[n];
643 ji = jacobian_indices[n];
649 "There is no such frequency retrieval quantity defined.\n" );
656 "Mismatch in size between *sensor_response* and *yb*." );
659 "Mismatch in size between *sensor_response* and *iyb*." );
664 const Index nf = sensor_response_f_grid.
nelem();
665 const Index npol = sensor_response_pol_grid.
nelem();
666 const Index nza = sensor_response_za_grid.
nelem();
677 if( antenna_dim == 1 )
679 const Index niyb = nf2 * nza2 * naa2 * stokes_dim;
683 const Index porder = 3;
686 Matrix itw( nf2, porder+1) ;
687 Vector fg_new = f_grid, iyb2(niyb);
694 for(
Index iza=0; iza<nza2; iza++ )
696 for(
Index iaa=0; iaa<naa2; iaa++ )
698 const Index row0 =( iza*naa2 + iaa ) * nf2 * stokes_dim;
700 for(
Index is=0; is<stokes_dim; is++ )
703 iyb[
Range(row0+is,nf2,stokes_dim)], gp );
710 mult( dy, sensor_response, iyb2 );
712 for(
Index i=0; i<n1y; i++ )
723 jacobian(rowind,it) = dy;
737 for(
Index l=0; l<nza; l++ )
739 for(
Index f=0; f<nf; f++ )
741 const Index row1 = (l*nf + f)*npol;
742 for(
Index p=0; p<npol; p++ )
743 { jacobian(row0+row1+p,it) = w[f] * dy[row1+p]; }
763 const Vector& sensor_time,
764 const Index& poly_order,
770 if( poly_order < -1 )
772 "The polynomial order has to be positive or -1 for gitter." );
775 for(
Index it=0; it<jacobian_quantities.
nelem(); it++ )
781 os <<
"Fit of zenith angle pointing off-set is already included in\n"
782 <<
"*jacobian_quantities*.";
783 throw runtime_error(os.str());
789 throw runtime_error(
"The argument *dza* must be > 0." );
792 "The argument *dza* is not allowed to exceed 0.1 deg." );
795 if( sensor_time.
nelem() != sensor_pos.
nrows() )
798 os <<
"The WSV *sensor_time* must be defined for every "
799 <<
"measurement block.\n";
800 throw runtime_error(os.str());
804 if( poly_order > sensor_time.
nelem()-1 )
805 {
throw runtime_error(
806 "The polynomial order can not be >= length of *sensor_time*." ); }
819 Vector grid(0,poly_order+1,1);
820 if( poly_order == -1 )
828 if( calcmode ==
"recalc" )
831 jacobian_agenda.
append(
"jacobianCalcPointingZaRecalc",
"" );
833 else if( calcmode ==
"interp" )
836 jacobian_agenda.
append(
"jacobianCalcPointingZaInterp",
"" );
840 "Possible choices for *calcmode* are \"recalc\" and \"interp\"." );
843 jacobian_quantities.push_back( rq );
851 const Index& imblock,
854 const Index& stokes_dim,
857 const Vector& mblock_za_grid,
858 const Vector& mblock_aa_grid,
859 const Index& antenna_dim,
860 const Sparse& sensor_response,
861 const Vector& sensor_time,
873 for(
Index n=0; n<jacobian_quantities.
nelem() && !found; n++ )
880 rq = jacobian_quantities[n];
881 ji = jacobian_indices[n];
885 {
throw runtime_error(
886 "There is no such pointing retrieval quantity defined.\n" );
899 if( antenna_dim == 1 )
908 gridpos( gp1, mblock_za_grid, za1, 1e6 );
909 gridpos( gp2, mblock_za_grid, za2, 1e6 );
910 Matrix itw1(nza,2), itw2(nza,2);
918 for(
Index iaa=0; iaa<naa; iaa++ )
920 for(
Index iv=0; iv<nf; iv++ )
922 for(
Index is=0; is<stokes_dim; is++ )
924 const Range r( iaa*nza*nf*stokes_dim+iv*stokes_dim+is,
925 nza, nf*stokes_dim );
926 interp( iyb1[r], itw1, iyb[r], gp1 );
927 interp( iyb2[r], itw2, iyb[r], gp2 );
935 mult( y1, sensor_response, iyb1 );
936 mult( y2, sensor_response, iyb2 );
938 for(
Index i=0; i<n1y; i++ )
939 { dy[i] = ( y2[i]- y1[i] ) / ( 2* rq.
Perturbation() ); }
945 const Index it = ji[0];
950 if( rq.
Grids()[0][0] == -1 )
952 assert( lg == sensor_los.
nrows() );
953 assert( rq.
Grids()[0][imblock] == -1 );
954 jacobian(rowind,it+imblock) = dy;
961 for(
Index c=0; c<lg; c++ )
967 for(
Index i=0; i<n1y; i++ )
968 { jacobian(row0+i,it+c) = w[imblock] * dy[i]; }
979 const Index& imblock,
982 const Index& atmosphere_dim,
989 const Index& cloudbox_on,
990 const Index& stokes_dim,
994 const Vector& mblock_za_grid,
995 const Vector& mblock_aa_grid,
996 const Index& antenna_dim,
997 const Sparse& sensor_response,
998 const Vector& sensor_time,
999 const Agenda& iy_clearsky_agenda,
1012 for(
Index n=0; n<jacobian_quantities.
nelem() && !found; n++ )
1019 rq = jacobian_quantities[n];
1020 ji = jacobian_indices[n];
1024 {
throw runtime_error(
1025 "There is no such pointing retrieval quantity defined.\n" );
1035 Vector iyb2, iye, iyb_aux;
1041 iyb_calc( ws, iyb2, iye, iyet, iyb_aux, diyb_dx, imblock,
1042 atmosphere_dim, p_grid, lat_grid, lon_grid,
1043 t_field, z_field, vmr_field, cloudbox_on, stokes_dim,
1044 f_grid, sensor_pos, los, mblock_za_grid, mblock_aa_grid,
1045 antenna_dim, iy_clearsky_agenda, y_unit,
1051 mult( dy, sensor_response, iyb2 );
1053 for(
Index i=0; i<n1y; i++ )
1060 const Index it = ji[0];
1065 if( rq.
Grids()[0][0] == -1 )
1067 assert( lg == sensor_los.
nrows() );
1068 assert( rq.
Grids()[0][imblock] == -1 );
1069 jacobian(rowind,it+imblock) = dy;
1076 for(
Index c=0; c<lg; c++ )
1082 for(
Index i=0; i<n1y; i++ )
1083 { jacobian(row0+i,it+c) = w[imblock] * dy[i]; }
1102 const Vector& sensor_response_f_grid,
1103 const Vector& sensor_response_za_grid,
1104 const Matrix& sensor_pos,
1105 const Index& poly_order,
1106 const Index& no_pol_variation,
1107 const Index& no_los_variation,
1108 const Index& no_mblock_variation,
1112 if( poly_order < 0 )
1113 throw runtime_error(
1114 "The polynomial order has to be >= 0.");
1117 if( poly_order > sensor_response_f_grid.
nelem() - 1 )
1120 os <<
"The polynomial order can not exceed the length of\n"
1121 <<
"*sensor_response_f_grid* -1.";
1122 throw runtime_error(os.str());
1131 os <<
"Polynomial baseline fit is already included in\n"
1132 <<
"*jacobian_quantities*.";
1133 throw runtime_error(os.str());
1147 if( no_pol_variation )
1150 grids[1] =
Vector(0,sensor_response_pol_grid.
nelem(),1);
1151 if( no_los_variation )
1154 grids[2] =
Vector(0,sensor_response_za_grid.
nelem(),1);
1155 if( no_mblock_variation )
1169 for(
Index i=0; i<=poly_order; i++ )
1172 sstr <<
"Coefficient " << i;
1183 jacobian_agenda.
append(
"jacobianCalcPolyfit", i );
1192 const Index& imblock,
1195 const Sparse& sensor_response,
1197 const Vector& sensor_response_f_grid,
1198 const Vector& sensor_response_za_grid,
1201 const Index& poly_coeff,
1210 sstr <<
"Coefficient " << poly_coeff;
1211 for( iq=0; iq<jacobian_quantities.
nelem() && !found; iq++ )
1214 jacobian_quantities[iq].Subtag() == sstr.str() )
1222 throw runtime_error(
"There is no Polyfit jacobian defined, in general "
1223 "or for the selected polynomial coefficient.\n");
1228 const Index nf = sensor_response_f_grid.
nelem();
1229 const Index npol = sensor_response_pol_grid.
nelem();
1230 const Index nza = sensor_response_za_grid.
nelem();
1246 Index col4 = jacobian_indices[iq][0];
1249 { col4 += imblock*n2*n1; }
1251 for(
Index l=0; l<nza; l++ )
1253 const Index row3 = row4 + l*nf*npol;
1254 const Index col3 = col4 + l*n1;
1256 for(
Index f=0; f<nf; f++ )
1258 const Index row2 = row3 + f*npol;
1260 for(
Index p=0; p<npol; p++ )
1266 jacobian(row2+p,col1) = w[f];
1285 const Index& atmosphere_dim,
1290 const Vector& rq_lat_grid,
1291 const Vector& rq_lon_grid,
1306 os <<
"Temperature is already included in *jacobian_quantities*.";
1307 throw runtime_error(os.str());
1318 "Retrieval of temperature and number densities can not be mixed.";
1319 throw runtime_error(os.str());
1329 rq_p_grid, rq_lat_grid, rq_lon_grid,
1330 "retrieval pressure grid",
1331 "retrieval latitude grid",
1332 "retrievallongitude_grid",
1334 throw runtime_error(os.str());
1339 if( method ==
"perturbation" )
1341 else if( method ==
"analytical" )
1346 os <<
"The method for atmospheric temperature retrieval can only be "
1347 <<
"\"analytical\"\n or \"perturbation\".";
1348 throw runtime_error(os.str());
1354 { subtag =
"HSE on"; }
1355 else if( hse ==
"off" )
1356 { subtag =
"HSE off"; }
1360 os <<
"The keyword for hydrostatic equilibrium can only be set to\n"
1361 <<
"\"on\" or \"off\"\n";
1362 throw runtime_error(os.str());
1379 out3 <<
" Calculations done by semi-analytical expression.\n";
1380 jacobian_agenda.
append(
"jacobianCalcTemperatureAnalytical",
TokVal() );
1384 out3 <<
" Calculations done by perturbations, of size " <<
dx <<
".\n";
1386 jacobian_agenda.
append(
"jacobianCalcTemperaturePerturbations",
"" );
1411 const Index& imblock,
1414 const Index& atmosphere_dim,
1424 const Index& cloudbox_on,
1425 const Index& stokes_dim,
1427 const Matrix& sensor_pos,
1428 const Matrix& sensor_los,
1429 const Vector& mblock_za_grid,
1430 const Vector& mblock_aa_grid,
1431 const Index& antenna_dim,
1432 const Sparse& sensor_response,
1433 const Agenda& iy_clearsky_agenda,
1436 const Numeric& z_hse_accuracy,
1449 for(
Index n=0; n<jacobian_quantities.
nelem() && !found; n++ )
1454 rq = jacobian_quantities[n];
1455 ji = jacobian_indices[n];
1461 os <<
"There is no temperature retrieval quantities defined.\n";
1462 throw runtime_error(os.str());
1468 os <<
"This WSM handles only perturbation calculations.\n"
1469 <<
"Are you using the method manually?";
1470 throw runtime_error(os.str());
1478 const Index pertmode = 1;
1490 if( atmosphere_dim >= 2 )
1492 j_lat = jg[1].
nelem();
1494 if( atmosphere_dim == 3 )
1496 j_lon = jg[2].
nelem();
1510 for(
Index lon_it=0; lon_it<j_lon; lon_it++ )
1512 for(
Index lat_it=0; lat_it<j_lat; lat_it++ )
1514 for(
Index p_it=0; p_it<j_p; p_it++ )
1526 if( atmosphere_dim >= 2 )
1529 if( atmosphere_dim == 3 )
1538 switch (atmosphere_dim)
1544 p_gp, jg[0].nelem()+2, p_range,
1552 p_gp, lat_gp, jg[0].nelem()+2,
1553 jg[1].nelem()+2, p_range, lat_range,
1561 lat_gp, lon_gp, jg[0].nelem()+2,
1562 jg[1].nelem()+2, jg[2].nelem()+2,
1563 p_range, lat_range, lon_range,
1570 if( rq.
Subtag() ==
"HSE on" )
1573 lon_grid, abs_species, t_p, vmr_field,
1574 r_geoid, z_surface, 1,
1575 p_hse, z_hse_accuracy, verbosity);
1580 Vector iybp, dummy1, dummy3;
1583 iyb_calc( ws, iybp, dummy1, dummy2, dummy3, dummy4, imblock,
1584 atmosphere_dim, p_grid, lat_grid, lon_grid,
1585 t_p, z, vmr_field, cloudbox_on, stokes_dim,
1586 f_grid, sensor_pos, sensor_los, mblock_za_grid,
1587 mblock_aa_grid, antenna_dim, iy_clearsky_agenda,
1591 mult( dy, sensor_response, iybp );
1594 for(
Index i=0; i<n1y; i++ )
1598 jacobian(rowind,it) = dy;
const String POINTING_MAINTAG
void jacobianOff(Index &jacobian_do, Agenda &jacobian_agenda, ArrayOfRetrievalQuantity &jacobian_quantities, ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
WORKSPACE METHOD: jacobianOff.
const Index & Analytical() const
Boolean to make analytical calculations (if possible).
void get_perturbation_range(Range &range, const Index &index, const Index &length)
Get range for perturbation.
Index ncols() const
Returns the number of columns.
Declarations required for the calculation of absorption coefficients.
This stores arbitrary token values and remembers the type.
const ArrayOfVector & Grids() const
Grids.
void gridpos(ArrayOfGridPos &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Numeric &extpolfac)
Set up a grid position Array.
const String POLYFIT_MAINTAG
void iyb_calc(Workspace &ws, Vector &iyb, Vector &iyb_error, Index &iy_error_type, Vector &iyb_aux, ArrayOfMatrix &diyb_dx, const Index &imblock, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, const Index &cloudbox_on, const Index &stokes_dim, ConstVectorView f_grid, ConstMatrixView sensor_pos, ConstMatrixView sensor_los, ConstVectorView mblock_za_grid, ConstVectorView mblock_aa_grid, const Index &antenna_dim, const Agenda &iy_clearsky_agenda, const String &y_unit, const Index &j_analytical_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
iyb_calc
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPos &tc)
Red 1D Interpolate.
void perturbation_field_1d(VectorView field, const ArrayOfGridPos &p_gp, const Index &p_pert_n, const Range &p_range, const Numeric &size, const Index &method)
Calculate the 1D perturbation for a relative perturbation.
const String FREQUENCY_SUBTAG_A
void jacobianAddFreqShiftAndStretch(Workspace &ws, ArrayOfRetrievalQuantity &jacobian_quantities, Agenda &jacobian_agenda, const Vector &f_grid, const String &calcmode, const Numeric &df, const Index &do_stretch, const Verbosity &)
WORKSPACE METHOD: jacobianAddFreqShiftAndStretch.
void resize(Index n)
Resize function.
void perturbation_field_2d(MatrixView field, const ArrayOfGridPos &p_gp, const ArrayOfGridPos &lat_gp, const Index &p_pert_n, const Index &lat_pert_n, const Range &p_range, const Range &lat_range, const Numeric &size, const Index &method)
Calculate the 2D perturbation for a relative perturbation.
void polynomial_basis_func(Vector &b, const Vector &x, const Index &poly_coeff)
Calculates polynomial basis functions.
Index nrows() const
Returns the number of rows.
Array< RetrievalQuantity > ArrayOfRetrievalQuantity
const String TEMPERATURE_MAINTAG
void resize(Index p, Index r, Index c)
Resize function.
void calc_nd_field(Tensor3View &nd, const VectorView &p, const Tensor3View &t)
Calculate the number density field.
Range get_rowindex_for_mblock(const Sparse &sensor_response, const Index &imblock)
get_rowindex_for_mblock
Index npages() const
Returns the number of pages.
const String FREQUENCY_MAINTAG
void jacobianAddPolyfit(Workspace &ws, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Vector &sensor_response_za_grid, const Matrix &sensor_pos, const Index &poly_order, const Index &no_pol_variation, const Index &no_los_variation, const Index &no_mblock_variation, const Verbosity &)
WORKSPACE METHOD: jacobianAddPolyfit.
void jacobianCalcAbsSpeciesAnalytical(Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Verbosity &)
WORKSPACE METHOD: jacobianCalcAbsSpeciesAnalytical.
void append(const String &methodname, const TokVal &keywordvalue)
Appends methods to an agenda.
void mult(VectorView y, const ConstMatrixView &M, const ConstVectorView &x)
Matrix Vector multiplication.
Declarations having to do with the four output streams.
The implementation for String, the ARTS string class.
void jacobianCalcPointingZaRecalc(Workspace &ws, Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_pos, const Matrix &sensor_los, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const Vector &sensor_time, const Agenda &iy_clearsky_agenda, const String &y_unit, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
WORKSPACE METHOD: jacobianCalcPointingZaRecalc.
Array< ArrayOfIndex > ArrayOfArrayOfIndex
const String & MainTag() const
Main tag.
Index nelem() const
Returns the number of elements.
const String & Mode() const
Calculation mode.
const String POINTING_CALCMODE_B
Declarations required for the calculation of jacobians.
NUMERIC Numeric
The type to use for all floating point numbers.
const String POINTING_SUBTAG_A
void jacobianInit(ArrayOfRetrievalQuantity &jacobian_quantities, Agenda &jacobian_agenda, const Verbosity &)
WORKSPACE METHOD: jacobianInit.
void get_perturbation_gridpos(ArrayOfGridPos &gp, const Vector &atm_grid, const Vector &jac_grid, const bool &is_pressure)
Calculate array of GridPos for perturbation interpolation.
void jacobianAddPointingZa(Workspace &ws, ArrayOfRetrievalQuantity &jacobian_quantities, Agenda &jacobian_agenda, const Matrix &sensor_pos, const Vector &sensor_time, const Index &poly_order, const String &calcmode, const Numeric &dza, const Verbosity &)
WORKSPACE METHOD: jacobianAddPointingZa.
void resize(Index r, Index c)
Resize function.
void check(Workspace &ws, const Verbosity &verbosity)
Checks consistency of an agenda.
void jacobianAddAbsSpecies(Workspace &ws, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &species, const String &method, const String &mode, const Numeric &dx, const Verbosity &verbosity)
WORKSPACE METHOD: jacobianAddAbsSpecies.
Index nrows() const
Returns the number of rows.
Header file for interpolation_poly.cc.
void perturbation_field_3d(Tensor3View field, const ArrayOfGridPos &p_gp, const ArrayOfGridPos &lat_gp, const ArrayOfGridPos &lon_gp, const Index &p_pert_n, const Index &lat_pert_n, const Index &lon_pert_n, const Range &p_range, const Range &lat_range, const Range &lon_range, const Numeric &size, const Index &method)
Calculate the 3D perturbation for a relative perturbation.
void jacobianCalcPointingZaInterp(Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_los, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const Vector &sensor_time, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &)
WORKSPACE METHOD: jacobianCalcPointingZaInterp.
bool check_retrieval_grids(ArrayOfVector &grids, ostringstream &os, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &p_retr, const Vector &lat_retr, const Vector &lon_retr, const String &p_retr_name, const String &lat_retr_name, const String &lon_retr_name, const Index &dim)
Check that the retrieval grids are defined for each atmosphere dim.
const String FREQUENCY_CALCMODE_A
Index nrows() const
Returns the number of rows.
void z_fieldFromHSE(Tensor3 &z_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &t_field, const Tensor4 &vmr_field, const Matrix &r_geoid, const Matrix &z_surface, const Index &basics_checked, const Numeric &p_hse, const Numeric &z_hse_accuracy, const Verbosity &)
WORKSPACE METHOD: z_fieldFromHSE.
Index ncols() const
Returns the number of columns.
const String ABSSPECIES_MAINTAG
Declaration of functions in rte.cc.
void set_name(const String &nname)
Set agenda name.
void jacobianCalcPolyfit(Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Sparse &sensor_response, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Vector &sensor_response_za_grid, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Index &poly_coeff, const Verbosity &)
WORKSPACE METHOD: jacobianCalcPolyfit.
Index get_start() const
Returns the start index of the range.
void jacobianCalcAbsSpeciesPerturbations(Workspace &ws, Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_pos, const Matrix &sensor_los, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const Agenda &iy_clearsky_agenda, const String &y_unit, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const String &species, const Verbosity &verbosity)
WORKSPACE METHOD: jacobianCalcAbsSpeciesPerturbations.
INDEX Index
The type to use for all integer numbers and indices.
Contains the data for one retrieval quantity.
void jacobianCalcTemperatureAnalytical(Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Verbosity &)
WORKSPACE METHOD: jacobianCalcTemperatureAnalytical.
void gridpos_poly(ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac)
Set up grid positions for higher order interpolation.
void jacobianAddTemperature(Workspace &ws, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &hse, const String &method, const Numeric &dx, const Verbosity &verbosity)
WORKSPACE METHOD: jacobianAddTemperature.
void jacobianCalcFreqShiftAndStretchInterp(Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Index &stokes_dim, const Vector &f_grid, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Vector &sensor_response_za_grid, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &)
WORKSPACE METHOD: jacobianCalcFreqShiftAndStretchInterp.
Index nelem() const
Number of elements.
const String & Subtag() const
Subtag.
void jacobianClose(Workspace &ws, Index &jacobian_do, Matrix &jacobian, ArrayOfArrayOfIndex &jacobian_indices, Agenda &jacobian_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, const Matrix &sensor_pos, const Sparse &sensor_response, const Verbosity &verbosity)
WORKSPACE METHOD: jacobianClose.
void interpweights(VectorView itw, const GridPos &tc)
Red 1D interpolation weights.
const String POINTING_CALCMODE_A
The global header file for ARTS.
const Numeric & Perturbation() const
Size of perturbation used for perturbation calculations.
void jacobianCalcTemperaturePerturbations(Workspace &ws, Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &r_geoid, const Matrix &z_surface, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_pos, const Matrix &sensor_los, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const Agenda &iy_clearsky_agenda, const String &y_unit, const Numeric &p_hse, const Numeric &z_hse_accuracy, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
WORKSPACE METHOD: jacobianCalcTemperaturePerturbations.