ReFRACtor
lidort_fixture.cc
Go to the documentation of this file.
1 #include "lidort_fixture.h"
3 #include "spurr_brdf_types.h"
4 
5 using namespace FullPhysics;
6 using namespace blitz;
7 
9 {
10  // Set viewing geometry
11  sza = 0.001;
12  zen = 0.0;
13  azm = 0.0;
14  pure_nadir = false;
16 
17  nstreams = 4;
18  nmoms = 2*nstreams;
19 
20  nlayer = 1;
21  heights.resize(nlayer+1);
22  od.resize(nlayer, 1);
23  ssa.resize(nlayer, 1);
24  pf.resize(nmoms, nlayer, 1);
25 
26  // Simple height grid evenly spaced
27  heights(0) = 100;
28  for(int hidx = 1; hidx < nlayer+1; hidx++) {
29  heights(hidx) = heights(hidx-1) - heights(0)/nlayer;
30  }
31 
32  // No aerosols, and depolization factor = 0
33  // so simplified phase function moments:
34  Range all = Range::all();
35  pf = 0.0;
36  pf(0, all) = 1.0;
37  pf(2, all) = 0.5;
38 
39  surface_params = 0.0;
40  surface_type = -1;
41  od = 0.0;
42  ssa = 0.0;
43 
44  taug = 0.0;
45  taur = 0.0;
46 }
47 
49 {
50  surface_params.resize(1);
52 
54 
55  // Turn off delta-m scaling
56  lidort_driver->lidort_interface()->lidort_modin().mbool().ts_do_deltam_scaling(false);
57 
58  // Plane-parallel
59  lidort_driver->set_plane_parallel();
60 }
61 
63 {
64  surface_params.resize(1);
66 
67  bool do_solar = false;
68  bool do_thermal = true;
69 
71 
72  // Turn off delta-m scaling
73  lidort_driver->lidort_interface()->lidort_modin().mbool().ts_do_deltam_scaling(false);
74 
75  // Plane-parallel
76  lidort_driver->set_plane_parallel();
77 }
78 
80 {
81  surface_params.resize(4);
83 
85 
86  // Turn off delta-m scaling
87  lidort_driver->lidort_interface()->lidort_modin().mbool().ts_do_deltam_scaling(false);
88 
89  // Plane-parallel
90  lidort_driver->set_plane_parallel();
91 }
92 
94 {
95  surface_params.resize(5);
97 
99 
100  // Turn off delta-m scaling
101  lidort_driver->lidort_interface()->lidort_modin().mbool().ts_do_deltam_scaling(false);
102 
103  // Plane-parallel
104  lidort_driver->set_plane_parallel();
105 }
106 
107 
108 
109 /********************************************************************/
110 
112 {
113  // Set viewing geometry
114  sza = 74.128288268999995;
115  zen = 1.0e-6;
116  azm = 12.504928589999992;
117  pure_nadir = false;
118 
119  wn_arr.resize(2);
120  wn_arr = 12929.94, 12930.30;
121 
122  blitz::Array<double, 2> stokes_coef_v(3, 3);
123  stokes_coef_v =
124  1,0,0,
125  1,0,0,
126  1,0,0;
127  stokes_coefs.reset(new StokesCoefficientConstant(stokes_coef_v));
128 }
129 
130 LidortLambertianFixture::LidortLambertianFixture(const std::string& Config_file) :
132 {
133  int nstreams = 4;
134  int nmoms = 2*nstreams;
135  bool do_multiple_scattering_only = false;
136 
138  nstreams, nmoms, do_multiple_scattering_only));
139 
140  pp_expected_filename = test_data_dir() + "expected/lidort_driver/lambertian_plane_parallel";
141  ps_expected_filename = test_data_dir() + "expected/lidort_driver/lambertian_pseudo_spherical";
142  pp_and_ss_expected_filename = test_data_dir() + "expected/lidort_driver/lambertian_pp_plus_sscorrection";
143 }
144 
145 LidortCoxmunkFixture::LidortCoxmunkFixture(const std::string& Config_file) :
147 {
148  int nstreams = 4;
149  int nmoms = 2*nstreams;
150  bool do_multiple_scattering_only = false;
151 
153  nstreams, nmoms, do_multiple_scattering_only));
154 
155  pp_expected_filename = test_data_dir() + "expected/lidort_driver/coxmunk_plane_parallel";
156  ps_expected_filename = test_data_dir() + "expected/lidort_driver/coxmunk_pseudo_spherical";
157  pp_and_ss_expected_filename = test_data_dir() + "expected/lidort_driver/coxmunk_pp_plus_sscorrection";
158 
159 }
160 
162 {
163  int nstreams = 4;
164  int nmoms = 2*nstreams;
165  bool do_multiple_scattering_only = false;
166 
168  nstreams, nmoms, do_multiple_scattering_only));
169 
170  pp_expected_filename = test_data_dir() + "expected/lidort_driver/coxmunk+lamb_plane_parallel";
171  ps_expected_filename = test_data_dir() + "expected/lidort_driver/coxmunk+lamb_pseudo_spherical";
172  pp_and_ss_expected_filename = test_data_dir() + "expected/lidort_driver/coxmunk+lamb_pp_plus_sscorrection";
173 
174 }
175 
176 /*******************************************************************/
177 
179 : sza(3), zen(3), azm(3)
180 {
181  // Set viewing geometry
182  sza = 74.128288268999995;
183  zen = 0;
184  azm = 12.504928589999992;
185  pure_nadir = true;
186 
187  blitz::Array<double, 2> stokes_coef_v(3, 3);
188  stokes_coef_v =
189  1,0,0,
190  1,0,0,
191  1,0,0;
192  stokes_coefs.reset(new StokesCoefficientConstant(stokes_coef_v));
193 
194  nstreams_low = 2;
196 
197  nstreams_high = 8;
199 
200 }
201 
203 {
204  bool do_multiple_scattering_only = true;
205 
207  nstreams_low, nmoms_low, do_multiple_scattering_only));
208 
210  nstreams_high, nmoms_high, do_multiple_scattering_only));
211 
212 }
213 
215 {
216  bool do_multiple_scattering_only = false;
217 
219  nstreams_low, nmoms_low, do_multiple_scattering_only));
220 
222  nstreams_high, nmoms_high, do_multiple_scattering_only));
223 }
224 
226 {
227  bool do_multiple_scattering_only = true;
228 
230  nstreams_low, nmoms_low, do_multiple_scattering_only));
231 
233  nstreams_high, nmoms_high, do_multiple_scattering_only));
234 }
235 
237 {
238  bool do_multiple_scattering_only = true;
239 
241  nstreams_low, nmoms_low, do_multiple_scattering_only));
242 
244  nstreams_high, nmoms_high, do_multiple_scattering_only));
245 }
There are a number of tests that need to use a standard set of objects, similar to what we generate w...
boost::shared_ptr< LidortRtDriver > lidort_driver
Lidort driver to use in testing.
blitz::Array< double, 1 > azm
static Lidort_Pars & instance()
boost::shared_ptr< StokesCoefficient > stokes_coefs
boost::shared_ptr< StokesCoefficient > stokes_coefs
blitz::Array< double, 1 > wn_arr
Wavenumber array used for testing.
This class maintains the stokes coefficient portion of the state.
boost::shared_ptr< RtAtmosphere > config_atmosphere
blitz::Array< double, 1 > sza
solar zenith, view zenith, and azimuth angles used in low_rt and high_rt.
LidortCoxmunkFixture(const std::string &Config_file="config_coxmunk.lua")
Apply value function to a blitz array.
LIDORT specific Radiative transfer interface implementation.
Definition: lidort_driver.h:58
Base fixture for testing LidortRt modes.
void resize(const blitz::TinyVector< int, D > &Shape, int nvar)
Definition: array_ad.h:177
blitz::Array< double, 1 > zen
Uses the Spurr interfaces to construct a radiative transfer class connecting L2 FP and LIDORT 3...
Definition: lidort_rt.h:13
blitz::Array< double, 1 > azm
blitz::Array< double, 1 > zen
blitz::Array< double, 1 > heights
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
blitz::Array< double, 1 > sza
solar zenith, view zenith, and azimuth angles used in low_rt and high_rt.
std::string test_data_dir() const
Directory where test data is.
boost::shared_ptr< LidortRt > lidort_rt
Lidort driver to use in testing.
boost::shared_ptr< LidortRt > high_rt
High stream version of lidort.
There are a number of tests that need to use a standard set of objects, similar to what we generate w...
Base fixture for testing LidortRtDriver.
LidortLambertianFixture(const std::string &Config_file="config.lua")
blitz::Array< double, 1 > sza
solar zenith, view zenith, and azimuth angles used in low_rt and high_rt.
blitz::Array< double, 1 > surface_params
boost::shared_ptr< LidortRt > low_rt
Low stream version of lidort.

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:09