90 const Sparse& sensor_response,
94 if( jacobian_quantities.
nelem() == 0 )
96 "No retrieval quantities has been added to *jacobian_quantities*." );
99 if( sensor_pos.
nrows() == 0 )
102 os <<
"The number of rows in *sensor_pos* is zero, i.e. no measurement\n"
103 <<
"blocks has been defined. This has to be done before calling\n"
105 throw runtime_error(os.str());
107 if( sensor_response.
nrows() == 0 )
110 os <<
"The sensor has either to be defined or turned off before calling\n"
112 throw runtime_error(os.str());
118 for(
Index it=0; it<jacobian_quantities.
nelem(); it++ )
128 { cols *= grids[jt].
nelem(); }
131 indices[1] = ncols + cols - 1;
132 jacobian_indices.push_back( indices );
137 jacobian_agenda.
check(ws, verbosity);
150 jacobian_quantities.resize(0);
151 jacobian_indices.resize(0);
152 jacobian_agenda =
Agenda();
153 jacobian_agenda.
set_name(
"jacobian_agenda" );
167 jacobianInit( jacobian_quantities, jacobian_indices, jacobian_agenda,
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& mblock_index,
315 const Index& atmosphere_dim,
323 const Index& cloudbox_on,
324 const Index& stokes_dim,
328 const Matrix& transmitter_pos,
329 const Vector& mblock_za_grid,
330 const Vector& mblock_aa_grid,
331 const Index& antenna_dim,
332 const Sparse& sensor_response,
333 const Agenda& iy_main_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,
503 iyb_calc( ws, iybp, dummy3, dummy4, mblock_index,
504 atmosphere_dim, t_field, z_field, vmr_p, cloudbox_on,
505 stokes_dim, f_grid, sensor_pos, sensor_los,
506 transmitter_pos, mblock_za_grid,
507 mblock_aa_grid, antenna_dim, iy_main_agenda,
511 mult( dy, sensor_response, iybp );
514 for(
Index i=0; i<n1y; i++ )
518 jacobian(rowind,it) = dy;
542 const Vector& sensor_time,
543 const Index& poly_order,
548 if( poly_order < -1 )
550 "The polynomial order has to be positive or -1 for gitter." );
553 for(
Index it=0; it<jacobian_quantities.
nelem(); it++ )
559 os <<
"Fit of frequency shift is already included in\n"
560 <<
"*jacobian_quantities*.";
561 throw runtime_error(os.str());
567 throw runtime_error(
"The argument *df* must be > 0." );
569 throw runtime_error(
"The argument *df* is not allowed to exceed 1 MHz." );
571 const Numeric maxdf = f_grid[nf-1] - f_grid[nf-2];
575 os <<
"The value of *df* is too big with respect to spacing of "
576 <<
"*f_grid*. The maximum\nallowed value of *df* is the spacing "
577 <<
"between the two last 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());
584 if( sensor_time.
nelem() != sensor_pos.
nrows() )
587 os <<
"The WSV *sensor_time* must be defined for every "
588 <<
"measurement block.\n";
589 throw runtime_error(os.str());
593 if( poly_order > sensor_time.
nelem()-1 )
594 {
throw runtime_error(
595 "The polynomial order can not be >= length of *sensor_time*." ); }
608 Vector grid(0,poly_order+1,1);
609 if( poly_order == -1 )
618 jacobian_quantities.push_back( rq );
621 jacobian_agenda.
append(
"jacobianCalcFreqShift",
"" );
629 const Index& mblock_index,
632 const Index& stokes_dim,
635 const Vector& mblock_za_grid,
636 const Vector& mblock_aa_grid,
637 const Index& antenna_dim,
638 const Sparse& sensor_response,
639 const Vector& sensor_time,
651 for(
Index n=0; n<jacobian_quantities.
nelem() && !found; n++ )
657 rq = jacobian_quantities[n];
658 ji = jacobian_indices[n];
664 "There is no such frequency retrieval quantity defined.\n" );
671 "Mismatch in size between *sensor_response* and *yb*." );
674 "Mismatch in size between *sensor_response* and *iyb*." );
684 if( antenna_dim == 1 )
686 const Index niyb = nf2 * nza2 * naa2 * stokes_dim;
690 const Index porder = 3;
693 Matrix itw( nf2, porder+1) ;
694 Vector fg_new = f_grid, iyb2(niyb);
701 for(
Index iza=0; iza<nza2; iza++ )
703 for(
Index iaa=0; iaa<naa2; iaa++ )
705 const Index row0 =( iza*naa2 + iaa ) * nf2 * stokes_dim;
707 for(
Index is=0; is<stokes_dim; is++ )
710 iyb[
Range(row0+is,nf2,stokes_dim)], gp );
717 mult( dy, sensor_response, iyb2 );
719 for(
Index i=0; i<n1y; i++ )
726 const Index it = ji[0];
731 if( rq.
Grids()[0][0] == -1 )
733 assert( lg == sensor_los.
nrows() );
734 assert( rq.
Grids()[0][mblock_index] == -1 );
735 jacobian(rowind,it+mblock_index) = dy;
742 for(
Index c=0; c<lg; c++ )
748 for(
Index i=0; i<n1y; i++ )
749 { jacobian(row0+i,it+c) =
w[mblock_index] * dy[i]; }
768 const Vector& sensor_time,
769 const Index& poly_order,
774 if( poly_order < -1 )
776 "The polynomial order has to be positive or -1 for gitter." );
779 for(
Index it=0; it<jacobian_quantities.
nelem(); it++ )
785 os <<
"Fit of frequency stretch is already included in\n"
786 <<
"*jacobian_quantities*.";
787 throw runtime_error(os.str());
793 throw runtime_error(
"The argument *df* must be > 0." );
795 throw runtime_error(
"The argument *df* is not allowed to exceed 1 MHz." );
797 const Numeric maxdf = f_grid[nf-1] - f_grid[nf-2];
801 os <<
"The value of *df* is too big with respect to spacing of "
802 <<
"*f_grid*. The maximum\nallowed value of *df* is the spacing "
803 <<
"between the two last elements of *f_grid*.\n"
804 <<
"This spacing is : " <<maxdf/1e3 <<
" kHz\n"
805 <<
"The value of df is: " << df/1e3 <<
" kHz";
806 throw runtime_error(os.str());
810 if( sensor_time.
nelem() != sensor_pos.
nrows() )
813 os <<
"The WSV *sensor_time* must be defined for every "
814 <<
"measurement block.\n";
815 throw runtime_error(os.str());
819 if( poly_order > sensor_time.
nelem()-1 )
820 {
throw runtime_error(
821 "The polynomial order can not be >= length of *sensor_time*." ); }
834 Vector grid(0,poly_order+1,1);
835 if( poly_order == -1 )
844 jacobian_quantities.push_back( rq );
847 jacobian_agenda.
append(
"jacobianCalcFreqStretch",
"" );
855 const Index& mblock_index,
858 const Index& stokes_dim,
861 const Vector& mblock_za_grid,
862 const Vector& mblock_aa_grid,
863 const Index& antenna_dim,
864 const Sparse& sensor_response,
866 const Vector& sensor_response_f_grid,
867 const Vector& sensor_response_za_grid,
868 const Vector& sensor_time,
883 for(
Index n=0; n<jacobian_quantities.
nelem() && !found; n++ )
889 rq = jacobian_quantities[n];
890 ji = jacobian_indices[n];
896 "There is no such frequency retrieval quantity defined.\n" );
903 "Mismatch in size between *sensor_response* and *yb*." );
906 "Mismatch in size between *sensor_response* and *iyb*." );
916 if( antenna_dim == 1 )
918 const Index niyb = nf2 * nza2 * naa2 * stokes_dim;
922 const Index porder = 3;
925 Matrix itw( nf2, porder+1) ;
926 Vector fg_new = f_grid, iyb2(niyb);
933 for(
Index iza=0; iza<nza2; iza++ )
935 for(
Index iaa=0; iaa<naa2; iaa++ )
937 const Index row0 =( iza*naa2 + iaa ) * nf2 * stokes_dim;
939 for(
Index is=0; is<stokes_dim; is++ )
942 iyb[
Range(row0+is,nf2,stokes_dim)], gp );
949 mult( dy, sensor_response, iyb2 );
951 for(
Index i=0; i<n1y; i++ )
959 const Index nf = sensor_response_f_grid.
nelem();
960 const Index npol = sensor_response_pol_grid.
nelem();
961 const Index nza = sensor_response_za_grid.
nelem();
963 for(
Index l=0; l<nza; l++ )
965 for(
Index f=0; f<nf; f++ )
967 const Index row1 = (l*nf + f)*npol;
968 for(
Index p=0; p<npol; p++ )
969 { dy[row1+p] *=
w[f]; }
977 const Index it = ji[0];
982 if( rq.
Grids()[0][0] == -1 )
984 assert( lg == sensor_los.
nrows() );
985 assert( rq.
Grids()[0][mblock_index] == -1 );
986 jacobian(rowind,it+mblock_index) = dy;
993 for(
Index c=0; c<lg; c++ )
999 for(
Index i=0; i<n1y; i++ )
1000 { jacobian(row0+i,it+c) =
w[mblock_index] * dy[i]; }
1018 const Matrix& sensor_pos,
1019 const Vector& sensor_time,
1020 const Index& poly_order,
1026 if( poly_order < -1 )
1027 throw runtime_error(
1028 "The polynomial order has to be positive or -1 for gitter." );
1031 for(
Index it=0; it<jacobian_quantities.
nelem(); it++ )
1037 os <<
"Fit of zenith angle pointing off-set is already included in\n"
1038 <<
"*jacobian_quantities*.";
1039 throw runtime_error(os.str());
1045 throw runtime_error(
"The argument *dza* must be > 0." );
1047 throw runtime_error(
1048 "The argument *dza* is not allowed to exceed 0.1 deg." );
1051 if( sensor_time.
nelem() != sensor_pos.
nrows() )
1054 os <<
"The WSV *sensor_time* must be defined for every "
1055 <<
"measurement block.\n";
1056 throw runtime_error(os.str());
1060 if( poly_order > sensor_time.
nelem()-1 )
1061 {
throw runtime_error(
1062 "The polynomial order can not be >= length of *sensor_time*." ); }
1075 Vector grid(0,poly_order+1,1);
1076 if( poly_order == -1 )
1084 if( calcmode ==
"recalc" )
1087 jacobian_agenda.
append(
"jacobianCalcPointingZaRecalc",
"" );
1089 else if( calcmode ==
"interp" )
1092 jacobian_agenda.
append(
"jacobianCalcPointingZaInterp",
"" );
1095 throw runtime_error(
1096 "Possible choices for *calcmode* are \"recalc\" and \"interp\"." );
1099 jacobian_quantities.push_back( rq );
1107 const Index& mblock_index,
1110 const Index& stokes_dim,
1112 const Matrix& sensor_los,
1113 const Vector& mblock_za_grid,
1114 const Vector& mblock_aa_grid,
1115 const Index& antenna_dim,
1116 const Sparse& sensor_response,
1117 const Vector& sensor_time,
1122 if( mblock_za_grid.
nelem() < 2 )
1123 throw runtime_error(
"The method demands that *mblock_za_grid* has a "
1133 for(
Index n=0; n<jacobian_quantities.
nelem() && !found; n++ )
1140 rq = jacobian_quantities[n];
1141 ji = jacobian_indices[n];
1145 {
throw runtime_error(
1146 "There is no such pointing retrieval quantity defined.\n" );
1159 if( antenna_dim == 1 )
1168 gridpos( gp1, mblock_za_grid, za1, 1e6 );
1169 gridpos( gp2, mblock_za_grid, za2, 1e6 );
1170 Matrix itw1(nza,2), itw2(nza,2);
1178 for(
Index iaa=0; iaa<naa; iaa++ )
1180 for(
Index iv=0; iv<nf; iv++ )
1182 for(
Index is=0; is<stokes_dim; is++ )
1184 const Range r( iaa*nza*nf*stokes_dim+iv*stokes_dim+is,
1185 nza, nf*stokes_dim );
1186 interp( iyb1[r], itw1, iyb[r], gp1 );
1187 interp( iyb2[r], itw2, iyb[r], gp2 );
1195 mult( y1, sensor_response, iyb1 );
1196 mult( y2, sensor_response, iyb2 );
1198 for(
Index i=0; i<n1y; i++ )
1199 { dy[i] = ( y2[i]- y1[i] ) / ( 2* rq.
Perturbation() ); }
1205 const Index it = ji[0];
1210 if( rq.
Grids()[0][0] == -1 )
1212 assert( lg == sensor_los.
nrows() );
1213 assert( rq.
Grids()[0][mblock_index] == -1 );
1214 jacobian(rowind,it+mblock_index) = dy;
1221 for(
Index c=0; c<lg; c++ )
1227 for(
Index i=0; i<n1y; i++ )
1228 { jacobian(row0+i,it+c) =
w[mblock_index] * dy[i]; }
1239 const Index& mblock_index,
1242 const Index& atmosphere_dim,
1246 const Index& cloudbox_on,
1247 const Index& stokes_dim,
1249 const Matrix& sensor_pos,
1250 const Matrix& sensor_los,
1251 const Matrix& transmitter_pos,
1252 const Vector& mblock_za_grid,
1253 const Vector& mblock_aa_grid,
1254 const Index& antenna_dim,
1255 const Sparse& sensor_response,
1256 const Vector& sensor_time,
1257 const Agenda& iy_main_agenda,
1269 for(
Index n=0; n<jacobian_quantities.
nelem() && !found; n++ )
1276 rq = jacobian_quantities[n];
1277 ji = jacobian_indices[n];
1281 {
throw runtime_error(
1282 "There is no such pointing retrieval quantity defined.\n" );
1298 iyb_calc( ws, iyb2, iyb_aux, diyb_dx, mblock_index,
1300 t_field, z_field, vmr_field, cloudbox_on, stokes_dim,
1301 f_grid, sensor_pos, los, transmitter_pos, mblock_za_grid,
1302 mblock_aa_grid, antenna_dim, iy_main_agenda,
1308 mult( dy, sensor_response, iyb2 );
1310 for(
Index i=0; i<n1y; i++ )
1317 const Index it = ji[0];
1322 if( rq.
Grids()[0][0] == -1 )
1324 assert( lg == sensor_los.
nrows() );
1325 assert( rq.
Grids()[0][mblock_index] == -1 );
1326 jacobian(rowind,it+mblock_index) = dy;
1333 for(
Index c=0; c<lg; c++ )
1339 for(
Index i=0; i<n1y; i++ )
1340 { jacobian(row0+i,it+c) =
w[mblock_index] * dy[i]; }
1359 const Vector& sensor_response_za_grid,
1360 const Matrix& sensor_pos,
1361 const Index& poly_order,
1362 const Index& no_pol_variation,
1363 const Index& no_los_variation,
1364 const Index& no_mblock_variation,
1368 if( poly_order < 0 )
1369 throw runtime_error(
"The polynomial order has to be >= 0.");
1377 os <<
"Sinusoidal baseline fit is already included in\n"
1378 <<
"*jacobian_quantities*.";
1379 throw runtime_error(os.str());
1393 if( no_pol_variation )
1396 grids[1] =
Vector(0,sensor_response_pol_grid.
nelem(),1);
1397 if( no_los_variation )
1400 grids[2] =
Vector(0,sensor_response_za_grid.
nelem(),1);
1401 if( no_mblock_variation )
1415 for(
Index i=0; i<=poly_order; i++ )
1418 sstr <<
"Coefficient " << i;
1429 jacobian_agenda.
append(
"jacobianCalcPolyfit", i );
1438 const Index& mblock_index,
1441 const Sparse& sensor_response,
1443 const Vector& sensor_response_f_grid,
1444 const Vector& sensor_response_za_grid,
1447 const Index& poly_coeff,
1456 sstr <<
"Coefficient " << poly_coeff;
1457 for( iq=0; iq<jacobian_quantities.
nelem() && !found; iq++ )
1460 jacobian_quantities[iq].Subtag() == sstr.str() )
1468 throw runtime_error(
"There is no Polyfit jacobian defined, in general "
1469 "or for the selected polynomial coefficient.\n");
1474 const Index nf = sensor_response_f_grid.
nelem();
1475 const Index npol = sensor_response_pol_grid.
nelem();
1476 const Index nza = sensor_response_za_grid.
nelem();
1492 Index col4 = jacobian_indices[iq][0];
1495 { col4 += mblock_index*n2*n1; }
1497 for(
Index l=0; l<nza; l++ )
1499 const Index row3 = row4 + l*nf*npol;
1500 const Index col3 = col4 + l*n1;
1502 for(
Index f=0; f<nf; f++ )
1504 const Index row2 = row3 + f*npol;
1506 for(
Index p=0; p<npol; p++ )
1512 jacobian(row2+p,col1) =
w[f];
1532 const Vector& sensor_response_za_grid,
1533 const Matrix& sensor_pos,
1534 const Vector& period_lengths,
1535 const Index& no_pol_variation,
1536 const Index& no_los_variation,
1537 const Index& no_mblock_variation,
1544 throw runtime_error(
"No sinusoidal periods has benn given.");
1552 os <<
"Polynomial baseline fit is already included in\n"
1553 <<
"*jacobian_quantities*.";
1554 throw runtime_error(os.str());
1568 if( no_pol_variation )
1571 grids[1] =
Vector(0,sensor_response_pol_grid.
nelem(),1);
1572 if( no_los_variation )
1575 grids[2] =
Vector(0,sensor_response_za_grid.
nelem(),1);
1576 if( no_mblock_variation )
1590 for(
Index i=0; i<np; i++ )
1593 sstr <<
"Period " << i;
1597 grids[0] =
Vector( 2, period_lengths[i] );
1604 jacobian_agenda.
append(
"jacobianCalcSinefit", i );
1613 const Index& mblock_index,
1616 const Sparse& sensor_response,
1618 const Vector& sensor_response_f_grid,
1619 const Vector& sensor_response_za_grid,
1622 const Index& period_index,
1631 sstr <<
"Period " << period_index;
1632 for( iq=0; iq<jacobian_quantities.
nelem() && !found; iq++ )
1635 jacobian_quantities[iq].Subtag() == sstr.str() )
1643 throw runtime_error(
"There is no Sinefit jacobian defined, in general "
1644 "or for the selected period length.\n");
1649 const Index nf = sensor_response_f_grid.
nelem();
1650 const Index npol = sensor_response_pol_grid.
nelem();
1651 const Index nza = sensor_response_za_grid.
nelem();
1660 for(
Index f=0; f<nf; f++ )
1662 Numeric a = (sensor_response_f_grid[f]-sensor_response_f_grid[0]) *
1676 Index col4 = jacobian_indices[iq][0];
1679 { col4 += mblock_index*n2*n1*2; }
1681 for(
Index l=0; l<nza; l++ )
1683 const Index row3 = row4 + l*nf*npol;
1684 const Index col3 = col4 + l*n1*2;
1686 for(
Index f=0; f<nf; f++ )
1688 const Index row2 = row3 + f*npol;
1690 for(
Index p=0; p<npol; p++ )
1696 jacobian(row2+p,col1) = s[f];
1697 jacobian(row2+p,col1+1) = c[f];
1716 const Index& atmosphere_dim,
1721 const Vector& rq_lat_grid,
1722 const Vector& rq_lon_grid,
1737 os <<
"Temperature is already included in *jacobian_quantities*.";
1738 throw runtime_error(os.str());
1749 "Retrieval of temperature and number densities can not be mixed.";
1750 throw runtime_error(os.str());
1760 rq_p_grid, rq_lat_grid, rq_lon_grid,
1761 "retrieval pressure grid",
1762 "retrieval latitude grid",
1763 "retrievallongitude_grid",
1765 throw runtime_error(os.str());
1770 if( method ==
"perturbation" )
1772 else if( method ==
"analytical" )
1777 os <<
"The method for atmospheric temperature retrieval can only be "
1778 <<
"\"analytical\"\n or \"perturbation\".";
1779 throw runtime_error(os.str());
1785 { subtag =
"HSE on"; }
1786 else if( hse ==
"off" )
1787 { subtag =
"HSE off"; }
1791 os <<
"The keyword for hydrostatic equilibrium can only be set to\n"
1792 <<
"\"on\" or \"off\"\n";
1793 throw runtime_error(os.str());
1810 out3 <<
" Calculations done by semi-analytical expression.\n";
1811 jacobian_agenda.
append(
"jacobianCalcTemperatureAnalytical",
TokVal() );
1815 out3 <<
" Calculations done by perturbations, of size " <<
dx <<
".\n";
1817 jacobian_agenda.
append(
"jacobianCalcTemperaturePerturbations",
"" );
1842 const Index& mblock_index,
1845 const Index& atmosphere_dim,
1855 const Vector& refellipsoid,
1857 const Index& cloudbox_on,
1858 const Index& stokes_dim,
1860 const Matrix& sensor_pos,
1861 const Matrix& sensor_los,
1862 const Matrix& transmitter_pos,
1863 const Vector& mblock_za_grid,
1864 const Vector& mblock_aa_grid,
1865 const Index& antenna_dim,
1866 const Sparse& sensor_response,
1867 const Agenda& iy_main_agenda,
1869 const Numeric& molarmass_dry_air,
1871 const Numeric& z_hse_accuracy,
1884 for(
Index n=0; n<jacobian_quantities.
nelem() && !found; n++ )
1889 rq = jacobian_quantities[n];
1890 ji = jacobian_indices[n];
1896 os <<
"There is no temperature retrieval quantities defined.\n";
1897 throw runtime_error(os.str());
1903 os <<
"This WSM handles only perturbation calculations.\n"
1904 <<
"Are you using the method manually?";
1905 throw runtime_error(os.str());
1913 const Index pertmode = 1;
1925 if( atmosphere_dim >= 2 )
1927 j_lat = jg[1].
nelem();
1929 if( atmosphere_dim == 3 )
1931 j_lon = jg[2].
nelem();
1945 for(
Index lon_it=0; lon_it<j_lon; lon_it++ )
1947 for(
Index lat_it=0; lat_it<j_lat; lat_it++ )
1949 for(
Index p_it=0; p_it<j_p; p_it++ )
1961 if( atmosphere_dim >= 2 )
1964 if( atmosphere_dim == 3 )
1973 switch (atmosphere_dim)
1979 p_gp, jg[0].nelem()+2, p_range,
1987 p_gp, lat_gp, jg[0].nelem()+2,
1988 jg[1].nelem()+2, p_range, lat_range,
1996 lat_gp, lon_gp, jg[0].nelem()+2,
1997 jg[1].nelem()+2, jg[2].nelem()+2,
1998 p_range, lat_range, lon_range,
2005 if( rq.
Subtag() ==
"HSE on" )
2008 lon_grid, lat_true, lon_true, abs_species,
2009 t_p, vmr_field, refellipsoid, z_surface, 1,
2010 g0_agenda, molarmass_dry_air,
2011 p_hse, z_hse_accuracy, verbosity );
2019 iyb_calc( ws, iybp, dummy3, dummy4, mblock_index,
2020 atmosphere_dim, t_p, z, vmr_field, cloudbox_on,
2021 stokes_dim, f_grid, sensor_pos, sensor_los,
2022 transmitter_pos, mblock_za_grid, mblock_aa_grid,
2023 antenna_dim, iy_main_agenda,
2027 mult( dy, sensor_response, iybp );
2030 for(
Index i=0; i<n1y; i++ )
2034 jacobian(rowind,it) = dy;
2055 const Index& atmosphere_dim,
2060 const Vector& rq_lat_grid,
2061 const Vector& rq_lon_grid,
2072 jq[it].Subtag() == component )
2075 os <<
"The wind component:\n" << component <<
"\nis already included "
2076 <<
"in *jacobian_quantities*.";
2077 throw runtime_error(os.str());
2087 rq_p_grid, rq_lat_grid, rq_lon_grid,
2088 "retrieval pressure grid",
2089 "retrieval latitude grid",
2090 "retrievallongitude_grid",
2092 throw runtime_error(os.str());
2096 if( component !=
"u" && component !=
"v" && component !=
"w" )
2098 throw runtime_error(
2099 "The selection for *component* can only be \"u\", \"u\" or \"w\"." );
2113 jacobian_agenda.
append(
"jacobianCalcWindAnalytical",
TokVal() );