00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00036 #ifndef ppath_h
00037 #define ppath_h
00038
00039
00040 #include "agenda_class.h"
00041 #include "array.h"
00042 #include "arts.h"
00043 #include "interpolation.h"
00044 #include "matpackI.h"
00045 #include "mystring.h"
00046
00047
00048
00049
00050
00051
00052
00054
00059 struct Ppath {
00060 Index dim;
00061 Index np;
00062 Index refraction;
00063 String method;
00064 Numeric constant;
00065 Matrix pos;
00066 Vector z;
00067 Vector l_step;
00068 ArrayOfGridPos gp_p;
00069 ArrayOfGridPos gp_lat;
00070 ArrayOfGridPos gp_lon;
00071 Matrix los;
00072 String background;
00073 Vector tan_pos;
00074 Vector geom_tan_pos;
00075 Vector p;
00076 Vector t;
00077 Matrix vmr;
00078 ArrayOfIndex next_parts;
00079 };
00080
00081
00083 typedef Array<Ppath> ArrayOfPpath;
00084
00085
00086
00087
00088
00089
00090
00091 void cart2poslos(
00092 double& r,
00093 double& lat,
00094 double& lon,
00095 double& za,
00096 double& aa,
00097 const double& x,
00098 const double& y,
00099 const double& z,
00100 const double& dx,
00101 const double& dy,
00102 const double& dz );
00103
00104 double geometrical_ppc( const double& r, const double& za );
00105
00106 double geompath_za_at_r(
00107 const double& ppc,
00108 const double& a_za,
00109 const double& r );
00110
00111 double geompath_lat_at_za(
00112 const double& za0,
00113 const double& lat0,
00114 const double& za );
00115
00116 bool is_los_downwards(
00117 const double& za,
00118 const double& tilt );
00119
00120 double plevel_slope_2d(
00121 ConstVectorView lat_grid,
00122 ConstVectorView r_geoid,
00123 ConstVectorView z_surf,
00124 const GridPos& gp,
00125 const double& za );
00126
00127 double plevel_slope_3d(
00128 const double& lat1,
00129 const double& lat3,
00130 const double& lon5,
00131 const double& lon6,
00132 const double& r15,
00133 const double& r35,
00134 const double& r36,
00135 const double& r16,
00136 const double& lat,
00137 const double& lon,
00138 const double& aa );
00139
00140 double plevel_angletilt(
00141 const double& r,
00142 const double& c );
00143
00144 void poslos2cart(
00145 double& x,
00146 double& y,
00147 double& z,
00148 double& dx,
00149 double& dy,
00150 double& dz,
00151 const double& r,
00152 const double& lat,
00153 const double& lon,
00154 const double& za,
00155 const double& aa );
00156
00157 void ppath_init_structure(
00158 Ppath& ppath,
00159 const Index& atmosphere_dim,
00160 const Index& np );
00161
00162 void ppath_set_background(
00163 Ppath& ppath,
00164 const Index& case_nr );
00165
00166 Index ppath_what_background( const Ppath& ppath );
00167
00168 void ppath_copy(
00169 Ppath& ppath1,
00170 const Ppath& ppath2 );
00171
00172 void ppath_start_stepping(Ppath& ppath,
00173 const Index& atmosphere_dim,
00174 ConstVectorView p_grid,
00175 ConstVectorView lat_grid,
00176 ConstVectorView lon_grid,
00177 ConstTensor3View z_field,
00178 ConstMatrixView r_geoid,
00179 ConstMatrixView z_surface,
00180 const Index & cloudbox_on,
00181 const ArrayOfIndex & cloudbox_limits,
00182 const bool & outside_cloudbox,
00183 ConstVectorView rte_pos,
00184 ConstVectorView rte_los
00185 );
00186
00187
00188 void ppath_step_geom_1d(
00189 Ppath& ppath,
00190 ConstVectorView p_grid,
00191 ConstVectorView z_field,
00192 const double& r_geoid,
00193 const double& z_surface,
00194 const double& lmax );
00195
00196 void ppath_step_geom_2d(
00197 Ppath& ppath,
00198 ConstVectorView p_grid,
00199 ConstVectorView lat_grid,
00200 ConstMatrixView z_field,
00201 ConstVectorView r_geoid,
00202 ConstVectorView z_surface,
00203 const double& lmax );
00204
00205 void ppath_step_geom_3d(
00206 Ppath& ppath,
00207 ConstVectorView p_grid,
00208 ConstVectorView lat_grid,
00209 ConstVectorView lon_grid,
00210 ConstTensor3View z_field,
00211 ConstMatrixView r_geoid,
00212 ConstMatrixView z_surface,
00213 const double& lmax );
00214
00215 void ppath_step_refr_1d(
00216 Workspace& ws,
00217 Ppath& ppath,
00218 Numeric& rte_pressure,
00219 Numeric& rte_temperature,
00220 Vector& rte_vmr_list,
00221 Numeric& refr_index,
00222 const Agenda& refr_index_agenda,
00223 ConstVectorView p_grid,
00224 ConstVectorView z_field,
00225 ConstVectorView t_field,
00226 ConstMatrixView vmr_field,
00227 const double& r_geoid,
00228 const double& z_surface,
00229 const String& rtrace_method,
00230 const double& lraytrace,
00231 const double& lmax );
00232
00233 void ppath_step_refr_2d(
00234 Workspace& ws,
00235 Ppath& ppath,
00236 Numeric& rte_pressure,
00237 Numeric& rte_temperature,
00238 Vector& rte_vmr_list,
00239 Numeric& refr_index,
00240 const Agenda& refr_index_agenda,
00241 ConstVectorView p_grid,
00242 ConstVectorView lat_grid,
00243 ConstMatrixView z_field,
00244 ConstMatrixView t_field,
00245 ConstTensor3View vmr_field,
00246 ConstVectorView r_geoid,
00247 ConstVectorView z_surface,
00248 const String& rtrace_method,
00249 const double& lraytrace,
00250 const double& lmax );
00251
00252 void ppath_step_refr_3d(
00253 Workspace& ws,
00254 Ppath& ppath,
00255 Numeric& rte_pressure,
00256 Numeric& rte_temperature,
00257 Vector& rte_vmr_list,
00258 Numeric& refr_index,
00259 const Agenda& refr_index_agenda,
00260 ConstVectorView p_grid,
00261 ConstVectorView lat_grid,
00262 ConstVectorView lon_grid,
00263 ConstTensor3View z_field,
00264 ConstTensor3View t_field,
00265 ConstTensor4View vmr_field,
00266 ConstMatrixView r_geoid,
00267 ConstMatrixView z_surface,
00268 const String& rtrace_method,
00269 const double& lraytrace,
00270 const double& lmax );
00271
00272 void ppath_calc(
00273 Workspace& ws,
00274 Ppath& ppath,
00275 const Agenda& ppath_step_agenda,
00276 const Index& atmosphere_dim,
00277 const Vector& p_grid,
00278 const Vector& lat_grid,
00279 const Vector& lon_grid,
00280 const Tensor3& z_field,
00281 const Matrix& r_geoid,
00282 const Matrix& z_surface,
00283 const Index& cloudbox_on,
00284 const ArrayOfIndex& cloudbox_limits,
00285 const Vector& rte_pos,
00286 const Vector& rte_los,
00287 const bool& outside_cloudbox );
00288
00289 #endif // ppath_h