ARTS  2.3.1285(git:92a29ea9-dirty)
rt4.h
Go to the documentation of this file.
1 /* Copyright (C) 2016 Jana Mendrok <jana.mendrok@gmail.com>
2 
3  This program is free software; you can redistribute it and/or modify it
4  under the terms of the GNU General Public License as published by the
5  Free Software Foundation; either version 2, or (at your option) any
6  later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16  USA.
17 */
18 
28 #ifndef rt4_h
29 #define rt4_h
30 
31 #ifdef ENABLE_RT4
32 
33 #include "messages.h"
34 
36 
61 void check_rt4_input( // Output
62  Index& nhstreams,
63  Index& nhza,
64  Index& nummu,
65  // Input
66  const Index& cloudbox_on,
67  const Index& atmfields_checked,
68  const Index& atmgeom_checked,
69  const Index& cloudbox_checked,
70  const Index& scat_data_checked,
71  const ArrayOfIndex& cloudbox_limits,
72  const ArrayOfArrayOfSingleScatteringData& scat_data,
73  const Index& atmosphere_dim,
74  const Index& stokes_dim,
75  const Index& nstreams,
76  const String& quad_type,
77  const Index& add_straight_angles,
78  const Index& pnd_ncols);
79 
81 
97 void get_quad_angles( // Output
98  VectorView mu_values,
99  VectorView quad_weights,
100  Vector& za_grid,
101  Vector& aa_grid,
102  // Input
103  const String& quad_type,
104  const Index& nhstreams,
105  const Index& nhza,
106  const Index& nummu);
107 
109 
130 void get_rt4surf_props( // Output
131  Vector& ground_albedo,
132  Tensor3& ground_reflec,
133  ComplexVector& ground_index,
134  // Input
135  ConstVectorView f_grid,
136  const String& ground_type,
137  const Numeric& surface_skin_t,
138  ConstVectorView surface_scalar_reflectivity,
139  ConstTensor3View surface_reflectivity,
140  const GriddedField3& surface_complex_refr_index,
141  const Index& stokes_dim);
142 
144 
196 void run_rt4(Workspace& ws,
197  // Output
198  Tensor7& cloudbox_field,
199  Vector& za_grid,
200  // Input
201  ConstVectorView f_grid,
202  ConstVectorView p_grid,
203  ConstVectorView z_profile,
204  ConstVectorView t_profile,
205  ConstMatrixView vmr_profiles,
206  ConstMatrixView pnd_profiles,
207  const ArrayOfArrayOfSingleScatteringData& scat_data,
208  const Agenda& propmat_clearsky_agenda,
209  const ArrayOfIndex& cloudbox_limits,
210  const Index& stokes_dim,
211  const Index& nummu,
212  const Index& nhza,
213  const String& ground_type,
214  const Numeric& surface_skin_t,
215  ConstVectorView ground_albedo,
216  ConstTensor3View ground_reflec,
217  ConstComplexVectorView ground_index,
218  ConstTensor5View surf_refl_mat,
219  ConstTensor3View surf_emis_vec,
220  const Agenda& surface_rtprop_agenda,
221  const Numeric& surf_altitude,
222  const String& quad_type,
223  Vector& mu_values,
224  ConstVectorView quad_weights,
225  const Index& auto_inc_nstreams,
226  const Index& robust,
227  const Index& za_interp_order,
228  const Index& cos_za_interp,
229  const String& pfct_method,
230  const Index& pfct_aa_grid_size,
231  const Numeric& pfct_threshold,
232  const Numeric& max_delta_tau,
233  const Verbosity& verbosity);
234 
236 
247 void za_grid_adjust( // Output
248  Vector& za_grid,
249  // Input
250  ConstVectorView mu_values,
251  const Index& nummu);
252 
254 
270 void gas_optpropCalc(Workspace& ws,
271  //Output
272  VectorView gas_extinct,
273  //Input
274  const Agenda& propmat_clearsky_agenda,
275  ConstVectorView t_field,
276  ConstMatrixView vmr_field,
277  ConstVectorView p_grid,
278  ConstVectorView f_mono);
279 
281 
300 void par_optpropCalc( //Output
301  Tensor5View emis_vector,
302  Tensor6View extinct_matrix,
303  //VectorView scatlayers,
304  //Input
305  const ArrayOfArrayOfSingleScatteringData& scat_data,
306  const Vector& za_grid,
307  const Index& f_index,
308  ConstMatrixView pnd_profiles,
309  ConstVectorView t_profile,
310  const ArrayOfIndex& cloudbox_limits,
311  const Index& stokes_dim);
312 
314 
345 void sca_optpropCalc( //Output
346  Tensor6View scatter_matrix,
347  Index& pfct_failed,
348  //Input
349  ConstTensor4View emis_vector,
350  ConstTensor5View extinct_matrix,
351  const Index& f_index,
352  const ArrayOfArrayOfSingleScatteringData& scat_data,
353  ConstMatrixView pnd_profiles,
354  const Index& stokes_dim,
355  const Vector& za_grid,
356  ConstVectorView quad_weights,
357  const String& pfct_method,
358  const Index& pfct_aa_grid_size,
359  const Numeric& pfct_threshold,
360  const Index& auto_inc_nstreams,
361  const Verbosity& verbosity);
362 
364 
385 void surf_optpropCalc(Workspace& ws,
386  //Output
387  Tensor5View surf_refl_mat,
388  Tensor3View surf_emis_vec,
389  //Input
390  const Agenda& surface_rtprop_agenda,
391  ConstVectorView f_grid,
392  ConstVectorView za_grid,
393  ConstVectorView mu_values,
394  ConstVectorView quad_weights,
395  const Index& stokes_dim,
396  const Numeric& surf_alt);
397 
399 
413 void rt4_test(Tensor4& out_rad,
414  const String& datapath,
415  const Verbosity& verbosity);
416 
417 extern "C" {
418 
419 void radtrano_(const Index& nstokes,
420  const Index& nummu,
421  const Index& nuummu,
422  const Numeric& max_delta_tau,
423  const char* quad_type,
424  const Numeric& ground_temp,
425  const char* ground_type,
426  const Numeric& ground_albedo,
427  const Complex& ground_index,
428  const Numeric* ground_reflec,
429  const Numeric* sre_data,
430  const Numeric* sem_data,
431  const Numeric& sky_temp,
432  const Numeric& wavelength,
433  const Index& num_layers,
434  const Numeric* height,
435  const Numeric* temperatures,
436  const Numeric* gas_extinct,
437  const Index& num_scatlayers,
438  const Numeric* scatlayers,
439  const Numeric* ext_data,
440  const Numeric* abs_data,
441  const Numeric* sca_data,
442  //const Index& noutlevels,
443  //const Index* outlevels,
444  Numeric* mu_values,
445  Numeric* up_rad,
446  Numeric* down_rad);
447 
448 void double_gauss_quadrature_(const Index& nummu,
449  Numeric* mu_values,
450  Numeric* quad_weights);
451 
452 void lobatto_quadrature_(const Index& nummu,
453  Numeric* mu_values,
454  Numeric* quad_weights);
455 
456 void gauss_legendre_quadrature_(const Index& nummu,
457  Numeric* mu_values,
458  Numeric* quad_weights);
459 
460 void planck_function_(const Numeric& temp,
461  const char* units,
462  const Numeric& wavelength,
463  Numeric& planck);
464 }
465 
466 #endif /* ENABLE_RT4 */
467 
468 #endif /* rt4_h */
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
The VectorView class.
Definition: matpackI.h:610
The Agenda class.
Definition: agenda_class.h:44
Declarations having to do with the four output streams.
The Vector class.
Definition: matpackI.h:860
The Tensor4 class.
Definition: matpackIV.h:421
The Tensor6View class.
Definition: matpackVI.h:621
The Tensor7 class.
Definition: matpackVII.h:2382
A constant view of a Tensor4.
Definition: matpackIV.h:133
The Tensor3 class.
Definition: matpackIII.h:339
std::complex< Numeric > Complex
Definition: complex.h:33
The Tensor3View class.
Definition: matpackIII.h:239
A constant view of a Tensor5.
Definition: matpackV.h:143
#define temp
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
The ComplexVector class.
Definition: complex.h:573
The Tensor5View class.
Definition: matpackV.h:333
This can be used to make arrays out of anything.
Definition: array.h:40
A constant view of a Tensor3.
Definition: matpackIII.h:132
A constant view of a Vector.
Definition: matpackI.h:476
A constant view of a Matrix.
Definition: matpackI.h:982
Numeric planck(const Numeric &f, const Numeric &t)
planck
Workspace class.
Definition: workspace_ng.h:40
A constant view of a ComplexVector.
Definition: complex.h:268