ARTS  2.4.0(git:4fb77825)
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,
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
136  const String& ground_type,
137  const Numeric& surface_skin_t,
141  const Index& stokes_dim);
142 
144 
196 void run_rt4(Workspace& ws,
197  // Output
199  Vector& za_grid,
200  // Input
203  ConstVectorView z_profile,
204  ConstVectorView t_profile,
205  ConstMatrixView vmr_profiles,
206  ConstMatrixView pnd_profiles,
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,
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
278  ConstVectorView f_mono);
279 
281 
300 void par_optpropCalc( //Output
301  Tensor5View emis_vector,
302  Tensor6View extinct_matrix,
303  //VectorView scatlayers,
304  //Input
306  const Vector& za_grid,
307  const Index& f_index,
308  ConstMatrixView pnd_profiles,
309  ConstVectorView t_profile,
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,
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
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 */
ARTS::Var::atmosphere_dim
Index atmosphere_dim(Workspace &ws) noexcept
Definition: autoarts.h:2510
ARTS::Var::atmgeom_checked
Index atmgeom_checked(Workspace &ws) noexcept
Definition: autoarts.h:2489
Tensor3
The Tensor3 class.
Definition: matpackIII.h:339
temp
#define temp
Definition: legacy_continua.cc:20951
ComplexVector
The ComplexVector class.
Definition: complex.h:573
ARTS::Var::verbosity
Verbosity verbosity(Workspace &ws) noexcept
Definition: autoarts.h:7112
ARTS::Var::f_index
Index f_index(Workspace &ws) noexcept
Definition: autoarts.h:3464
ARTS::Var::cloudbox_limits
ArrayOfIndex cloudbox_limits(Workspace &ws) noexcept
Definition: autoarts.h:2762
ARTS::Var::stokes_dim
Index stokes_dim(Workspace &ws) noexcept
Definition: autoarts.h:6650
Complex
std::complex< Numeric > Complex
Definition: complex.h:33
Tensor4
The Tensor4 class.
Definition: matpackIV.h:421
ARTS::Var::surface_rtprop_agenda
Agenda surface_rtprop_agenda(Workspace &ws) noexcept
Definition: autoarts.h:6807
Agenda
The Agenda class.
Definition: agenda_class.h:44
GriddedField3
Definition: gridded_fields.h:284
ConstTensor4View
A constant view of a Tensor4.
Definition: matpackIV.h:133
Tensor3View
The Tensor3View class.
Definition: matpackIII.h:239
Array
This can be used to make arrays out of anything.
Definition: array.h:108
messages.h
Declarations having to do with the four output streams.
my_basic_string< char >
VectorView
The VectorView class.
Definition: matpackI.h:610
ARTS::Var::vmr_field
Tensor4 vmr_field(Workspace &ws) noexcept
Definition: autoarts.h:7130
ARTS::Var::atmfields_checked
Index atmfields_checked(Workspace &ws) noexcept
Definition: autoarts.h:2473
ARTS::Var::p_grid
Vector p_grid(Workspace &ws) noexcept
Definition: autoarts.h:4763
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Verbosity
Definition: messages.h:49
Tensor5View
The Tensor5View class.
Definition: matpackV.h:333
ARTS::Var::surface_scalar_reflectivity
Vector surface_scalar_reflectivity(Workspace &ws) noexcept
Definition: autoarts.h:6864
ARTS::Var::f_grid
Vector f_grid(Workspace &ws) noexcept
Definition: autoarts.h:3449
ConstComplexVectorView
A constant view of a ComplexVector.
Definition: complex.h:268
ARTS::Var::scat_data
ArrayOfArrayOfSingleScatteringData scat_data(Workspace &ws) noexcept
Definition: autoarts.h:5840
ARTS::Var::za_grid
Vector za_grid(Workspace &ws) noexcept
Definition: autoarts.h:7771
ConstMatrixView
A constant view of a Matrix.
Definition: matpackI.h:982
ARTS::Var::surface_complex_refr_index
GriddedField3 surface_complex_refr_index(Workspace &ws) noexcept
Definition: autoarts.h:6688
ARTS::Var::scat_data_checked
Index scat_data_checked(Workspace &ws) noexcept
Definition: autoarts.h:5850
planck
Numeric planck(const Numeric &f, const Numeric &t)
planck
Definition: physics_funcs.cc:269
ARTS::Var::t_field
Tensor3 t_field(Workspace &ws) noexcept
Definition: autoarts.h:6947
Workspace
Workspace class.
Definition: workspace_ng.h:40
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:132
ARTS::Var::cloudbox_field
Tensor7 cloudbox_field(Workspace &ws) noexcept
Definition: autoarts.h:2676
ARTS::Var::propmat_clearsky_agenda
Agenda propmat_clearsky_agenda(Workspace &ws) noexcept
Definition: autoarts.h:5405
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
ARTS::Var::surface_skin_t
Numeric surface_skin_t(Workspace &ws) noexcept
Definition: autoarts.h:6877
Vector
The Vector class.
Definition: matpackI.h:860
ARTS::Var::aa_grid
Vector aa_grid(Workspace &ws) noexcept
Definition: autoarts.h:1717
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:476
ARTS::Var::cloudbox_checked
Index cloudbox_checked(Workspace &ws) noexcept
Definition: autoarts.h:2650
ARTS::Var::surface_reflectivity
Tensor3 surface_reflectivity(Workspace &ws) noexcept
Definition: autoarts.h:6778
ConstTensor5View
A constant view of a Tensor5.
Definition: matpackV.h:143
Tensor7
The Tensor7 class.
Definition: matpackVII.h:2382
Tensor6View
The Tensor6View class.
Definition: matpackVI.h:621
ARTS::Var::cloudbox_on
Index cloudbox_on(Workspace &ws) noexcept
Definition: autoarts.h:2782