ARTS 2.5.10 (git: 2f1c442c)
m_disort.cc
Go to the documentation of this file.
1/* Copyright (C) 2006-2012 Claudia Emde <claudia.emde@dlr.de>
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
32/*===========================================================================
33 === External declarations
34 ===========================================================================*/
35
36#include <cmath>
37#include <stdexcept>
38#include "array.h"
39#include "auto_md.h"
40#include "disort.h"
41#include "m_general.h"
42#include "math_funcs.h"
43#include "messages.h"
44 #include "geodetic.h"
45
46/* Workspace method: Doxygen documentation will be auto-generated */
48 // WS Output:
49 Tensor7& cloudbox_field,
50 ArrayOfMatrix& disort_aux,
51 // WS Input
52 const Index& atmfields_checked,
53 const Index& atmgeom_checked,
54 const Index& scat_data_checked,
55 const Index& cloudbox_checked,
56 const Index& cloudbox_on,
57 const ArrayOfIndex& cloudbox_limits,
58 const Agenda& propmat_clearsky_agenda,
59 const Agenda& gas_scattering_agenda,
60 const Index& atmosphere_dim,
61 const Tensor4& pnd_field,
62 const Tensor3& t_field,
63 const Tensor3& z_field,
64 const Tensor4& vmr_field,
65 const Vector& p_grid,
66 const Vector& lat_true,
67 const Vector& lon_true,
68 const Vector& refellipsoid,
70 const ArrayOfSun& suns,
71 const Vector& f_grid,
72 const Vector& za_grid,
73 const Vector& aa_grid,
74 const Index& stokes_dim,
75 const Matrix& z_surface,
76 const Numeric& surface_skin_t,
77 const Vector& surface_scalar_reflectivity,
78 const Index& gas_scattering_do,
79 const Index& suns_do,
80 const ArrayOfString& disort_aux_vars,
81 const Index& nstreams,
82 const Index& Npfct,
83 const Index& only_tro,
84 const Index& cdisort_quiet,
85 const Index& emission,
86 const Index& intensity_correction,
87 const Verbosity& verbosity) {
88 // Don't do anything if there's no cloudbox defined.
89 if (!cloudbox_on) {
91 out0 << " Cloudbox is off, DISORT calculation will be skipped.\n";
92 return;
93 }
94
95 check_disort_input(cloudbox_on,
96 atmfields_checked,
97 atmgeom_checked,
98 cloudbox_checked,
99 scat_data_checked,
100 atmosphere_dim,
101 stokes_dim,
102 cloudbox_limits,
103 scat_data,
104 za_grid,
105 nstreams);
106
107 //Check for number of suns
108 ARTS_USER_ERROR_IF(suns.nelem() > 1,
109 "The simulation setup contains ",
110 suns.nelem(),
111 " suns. \n"
112 "Disort can handle only one sun.")
113
114 //Check for aa_grid
115 ARTS_USER_ERROR_IF(aa_grid.nelem() == 0,
116 "aa_grid has a size of 0.\n",
117 "aa_grid must have at least a size of one.")
118
119 //allocate Varibale for direct (sun) source
120 Vector sun_rte_los;
121 Vector sun_pos(3);
122 Vector cloudboxtop_pos(3);
123 Index sun_on = suns_do;
124 Numeric scale_factor;
125 Index N_aa=aa_grid.nelem();
126
127 if (sun_on){
128
129 Vector lon_grid{lon_true[0] - 0.1, lon_true[0] + 0.1};
130 Vector lat_grid{lat_true[0] - 0.1, lat_true[0] + 0.1};
131
132 //Position of sun
133 sun_pos = {suns[0].distance, suns[0].latitude, suns[0].longitude};
134
135 // Position of top of cloudbox
136 cloudboxtop_pos = {
137 z_field(cloudbox_limits[1], 0, 0), lat_true[0], lon_true[0]};
138
139 // calculate local position of sun at top of cloudbox
141 3,
142 lat_grid,
143 lon_grid,
144 refellipsoid,
145 cloudboxtop_pos,
146 sun_pos,
147 verbosity);
148
149 //FIXME: IF we want to be correct and include refraction, we must calculate the
150 // local position of sun via ppathFromRtePos2. The question is, is this needed,
151 // because DISORT does not handle refraction at all.
152
153 // Check if sun is above horizon, if not switch it off
154 if (sun_rte_los[0] >= 90) {
155 sun_on = 0;
156
157 //set number of azimuth angle to 1
158 N_aa = 1;
159
161 out0 << "Sun is below the horizon\n";
162 out0 << "Sun is ignored.\n";
163 out0 << "cloudbox_field will have no azimuthal dependency!\n";
164 }
165
166 //get the cloudbox top distance to earth center.
167 Numeric R_TOA = refell2r(refellipsoid,
168 lat_true[0]) +
169 cloudboxtop_pos[0];
170
171 //get the distance between sun and cloudbox top
172 Numeric R_Sun2CloudboxTop;
173 distance3D(R_Sun2CloudboxTop,
174 R_TOA,
175 lat_true[0],
176 lon_true[0],
177 sun_pos[0],
178 sun_pos[1],
179 sun_pos[2]);
180
181 // Geometric scaling factor, scales the sun spectral irradiance at the surface
182 // of the sun to the spectral irradiance of the sun at cloubbox top.
183 scale_factor=suns[0].radius*suns[0].radius/
184 (suns[0].radius*suns[0].radius+R_Sun2CloudboxTop*R_Sun2CloudboxTop);
185
186
187
188 } else {
190 out3 << "Disort calculation encountered aa_grid size larger than 1 in a case when it\n";
191 out3 << "does not use aa_grid. Calculations are performed as if there is no aa_grid.\n";
192
193 // set number of azimuth angle to 1
194 N_aa = 1;
195 }
196
197 init_ifield(cloudbox_field,
198 f_grid,
199 cloudbox_limits,
200 za_grid.nelem(),
201 N_aa,
202 stokes_dim);
203
204
205 Vector albedo(f_grid.nelem(), 0.);
206 Numeric btemp;
207
209 albedo, btemp, f_grid, surface_skin_t, surface_scalar_reflectivity);
210
211 run_cdisort(ws,
212 cloudbox_field,
213 disort_aux,
214 f_grid,
215 p_grid,
216 z_field(joker, 0, 0),
217 z_surface(0, 0),
218 t_field(joker, 0, 0),
219 vmr_field(joker, joker, 0, 0),
220 pnd_field(joker, joker, 0, 0),
221 scat_data,
222 suns,
223 propmat_clearsky_agenda,
224 gas_scattering_agenda,
225 cloudbox_limits,
226 btemp,
227 albedo,
228 za_grid,
229 aa_grid,
230 sun_rte_los,
231 gas_scattering_do,
232 sun_on,
233 disort_aux_vars,
234 scale_factor,
235 nstreams,
236 Npfct,
237 only_tro,
238 cdisort_quiet,
239 emission,
240 intensity_correction,
241 verbosity);
242}
243
244
245/* Workspace method: Doxygen documentation will be auto-generated */
247 // WS Output:
248 Tensor7& cloudbox_field,
249 ArrayOfMatrix& disort_aux,
250 // WS Input
251 const Index& atmfields_checked,
252 const Index& atmgeom_checked,
253 const Index& scat_data_checked,
254 const Index& cloudbox_checked,
255 const Index& cloudbox_on,
256 const ArrayOfIndex& cloudbox_limits,
257 const Agenda& propmat_clearsky_agenda,
258 const Agenda& surface_rtprop_agenda,
259 const Agenda& gas_scattering_agenda,
260 const Index& atmosphere_dim,
261 const Tensor4& pnd_field,
262 const Tensor3& t_field,
263 const Tensor3& z_field,
264 const Tensor4& vmr_field,
265 const Vector& p_grid,
266 const Vector& lat_true,
267 const Vector& lon_true,
268 const Vector& refellipsoid,
269 const ArrayOfArrayOfSingleScatteringData& scat_data,
270 const ArrayOfSun& suns,
271 const Vector& f_grid,
272 const Vector& za_grid,
273 const Vector& aa_grid,
274 const Index& stokes_dim,
275 const Matrix& z_surface,
276 const Index& gas_scattering_do,
277 const Index& suns_do,
278 const ArrayOfString& disort_aux_vars,
279 const Index& nstreams,
280 const Index& Npfct,
281 const Index& only_tro,
282 const Index& cdisort_quiet,
283 const Index& emission,
284 const Index& intensity_correction,
285 const Numeric& inc_angle,
286 const Verbosity& verbosity) {
287
288 // Don't do anything if there's no cloudbox defined.
289 if (!cloudbox_on) {
291 out0 << " Cloudbox is off, DISORT calculation will be skipped.\n";
292 return;
293 }
294
295 check_disort_input(cloudbox_on,
296 atmfields_checked,
297 atmgeom_checked,
298 cloudbox_checked,
299 scat_data_checked,
300 atmosphere_dim,
301 stokes_dim,
302 cloudbox_limits,
303 scat_data,
304 za_grid,
305 nstreams);
306
307 //Check for number of suns
308 ARTS_USER_ERROR_IF(suns.nelem() > 1,
309 "The simulation setup contains ",
310 suns.nelem(),
311 " suns. \n"
312 "Disort can handle only one sun.")
313
314 //Check for aa_grid
315 ARTS_USER_ERROR_IF(aa_grid.nelem() == 0,
316 "aa_grid has a size of 0.\n",
317 "aa_grid must have at least a size of one.")
318
319 //allocate Varibale for direct (sun) source
320 Vector sun_rte_los;
321 Vector sun_pos(3);
322 Vector cloudboxtop_pos(3);
323 Index sun_on = suns_do;
324 Numeric scale_factor;
325 Index N_aa=aa_grid.nelem();
326
327 if (sun_on){
328
329 Vector lon_grid{lon_true[0] - 0.1, lon_true[0] + 0.1};
330 Vector lat_grid{lat_true[0] - 0.1, lat_true[0] + 0.1};
331
332 //Position of sun
333 sun_pos = {suns[0].distance, suns[0].latitude, suns[0].longitude};
334
335 // Position of top of cloudbox
336 cloudboxtop_pos = {
337 z_field(cloudbox_limits[1], 0, 0), lat_true[0], lon_true[0]};
338
339 // calculate local position of sun at top of cloudbox
341 3,
342 lat_grid,
343 lon_grid,
344 refellipsoid,
345 cloudboxtop_pos,
346 sun_pos,
347 verbosity);
348
349 //FIXME: IF we want to be correct and include refraction, we must calculate the
350 // local position of sun via ppathFromRtePos2. The question is, is this needed,
351 // because DISORT does not handle refraction at all.
352
353 // Check if sun is above horizon, if not switch it off
354 if (sun_rte_los[0] >= 90) {
355 sun_on = 0;
356
357 // set number of azimuth angle to 1
358 N_aa = 1;
359
361 out0 << "Sun is below the horizon\n";
362 out0 << "Sun is ignored.\n";
363 out0 << "cloudbox_field will have no azimuthal dependency!\n";
364
365 }
366
367 //get the cloudbox top distance to earth center.
368 Numeric R_TOA = refell2r(refellipsoid,
369 lat_true[0]) +
370 cloudboxtop_pos[0];
371
372 //get the distance between sun and cloudbox top
373 Numeric R_Sun2CloudboxTop;
374 distance3D(R_Sun2CloudboxTop,
375 R_TOA,
376 lat_true[0],
377 lon_true[0],
378 sun_pos[0],
379 sun_pos[1],
380 sun_pos[2]);
381
382 // Geometric scaling factor, scales the sun spectral irradiance at the surface
383 // of the sun to the spectral irradiance of the sun at cloubbox top.
384 scale_factor=suns[0].radius*suns[0].radius/
385 (suns[0].radius*suns[0].radius+R_Sun2CloudboxTop*R_Sun2CloudboxTop);
386
387
388
389 } else {
391 out3 << "Disort calculation encountered aa_grid size larger than 1 in a case when it\n";
392 out3 << "does not use aa_grid. Calculations are performed as if there is no aa_grid.\n";
393
394 // set number of azimuth angle to 1
395 N_aa = 1;
396 }
397
398 init_ifield(cloudbox_field,
399 f_grid,
400 cloudbox_limits,
401 za_grid.nelem(),
402 N_aa,
403 stokes_dim);
404
405
406 Vector albedo(f_grid.nelem(), 0.);
407 Numeric btemp;
408
409 if (inc_angle<0 || inc_angle>90) {
411 albedo,
412 btemp,
413 surface_rtprop_agenda,
414 f_grid,
415 za_grid,
416 z_surface(0,0),
417 verbosity);
418 } else {
420 albedo,
421 btemp,
422 surface_rtprop_agenda,
423 f_grid,
424 z_surface(0,0),
425 inc_angle);
426 }
427
428 run_cdisort(ws,
429 cloudbox_field,
430 disort_aux,
431 f_grid,
432 p_grid,
433 z_field(joker, 0, 0),
434 z_surface(0, 0),
435 t_field(joker, 0, 0),
436 vmr_field(joker, joker, 0, 0),
437 pnd_field(joker, joker, 0, 0),
438 scat_data,
439 suns,
440 propmat_clearsky_agenda,
441 gas_scattering_agenda,
442 cloudbox_limits,
443 btemp,
444 albedo,
445 za_grid,
446 aa_grid,
447 sun_rte_los,
448 gas_scattering_do,
449 sun_on,
450 disort_aux_vars,
451 scale_factor,
452 nstreams,
453 Npfct,
454 only_tro,
455 cdisort_quiet,
456 emission,
457 intensity_correction,
458 verbosity);
459}
460
461
462/* Workspace method: Doxygen documentation will be auto-generated */
464 // WS Output:
465 Tensor7& spectral_radiance_field,
466 ArrayOfMatrix& disort_aux,
467 // WS Input
468 const Index& atmfields_checked,
469 const Index& atmgeom_checked,
470 const Agenda& propmat_clearsky_agenda,
471 const Agenda& gas_scattering_agenda,
472 const Index& atmosphere_dim,
473 const Tensor3& t_field,
474 const Tensor3& z_field,
475 const Tensor4& vmr_field,
476 const Vector& p_grid,
477 const Vector& lat_true,
478 const Vector& lon_true,
479 const Vector& refellipsoid,
480 const ArrayOfSun& suns,
481 const Vector& f_grid,
482 const Vector& za_grid,
483 const Vector& aa_grid,
484 const Index& stokes_dim,
485 const Matrix& z_surface,
486 const Numeric& surface_skin_t,
487 const Vector& surface_scalar_reflectivity,
488 const Index& gas_scattering_do,
489 const Index& suns_do,
490 const ArrayOfString& disort_aux_vars,
491 const Index& nstreams,
492 const Index& cdisort_quiet,
493 const Index& emission,
494 const Index& intensity_correction,
495 const Verbosity& verbosity) {
496
497 if (atmosphere_dim != 1)
498 throw runtime_error(
499 "For running DISORT, atmospheric dimensionality "
500 "must be 1.\n");
501
502 // Set cloudbox to cover complete atmosphere
503 Index cloudbox_on;
504 ArrayOfIndex cloudbox_limits;
505 const Index cloudbox_checked = 1;
506 //
507 cloudboxSetFullAtm(cloudbox_on,
508 cloudbox_limits,
509 atmosphere_dim,
510 p_grid,
511 Vector(0),
512 Vector(0),
513 0.,
514 verbosity);
515
516 // Create data matching no particles
517 Tensor4 pnd_field;
518 ArrayOfTensor4 dpnd_field_dx;
520 const Index scat_data_checked = 1;
521 //
522 pnd_fieldZero(pnd_field,
523 dpnd_field_dx,
524 scat_data,
525 atmosphere_dim,
526 f_grid,
527 cloudbox_limits,
529 verbosity);
530
531 Matrix optical_depth_dummy;
532
533 DisortCalc(ws,
534 // WS Output:
535 spectral_radiance_field,
536 disort_aux,
537 // WS Input
538 atmfields_checked,
539 atmgeom_checked,
540 scat_data_checked,
541 cloudbox_checked,
542 cloudbox_on,
543 cloudbox_limits,
544 propmat_clearsky_agenda,
545 gas_scattering_agenda,
546 atmosphere_dim,
547 pnd_field,
548 t_field,
549 z_field,
550 vmr_field,
551 p_grid,
552 lat_true,
553 lon_true,
554 refellipsoid,
555 scat_data,
556 suns,
557 f_grid,
558 za_grid,
559 aa_grid,
560 stokes_dim,
561 z_surface,
562 surface_skin_t,
563 surface_scalar_reflectivity,
564 gas_scattering_do,
565 suns_do,
566 disort_aux_vars,
567 nstreams,
568 181,
569 cdisort_quiet,
570 0,
571 emission,
572 intensity_correction,
573 verbosity);
574
575}
576
577/* Workspace method: Doxygen documentation will be auto-generated */
579 // WS Output:
580 Tensor5& spectral_irradiance_field,
581 ArrayOfMatrix& disort_aux,
582 // WS Input
583 const Index& atmfields_checked,
584 const Index& atmgeom_checked,
585 const Index& scat_data_checked,
586 const Agenda& propmat_clearsky_agenda,
587 const Agenda& gas_scattering_agenda,
588 const Index& atmosphere_dim,
589 const Tensor4& pnd_field,
590 const Tensor3& t_field,
591 const Tensor3& z_field,
592 const Tensor4& vmr_field,
593 const Vector& p_grid,
594 const Vector& lat_true,
595 const Vector& lon_true,
596 const Vector& refellipsoid,
597 const ArrayOfArrayOfSingleScatteringData& scat_data,
598 const ArrayOfSun& suns,
599 const Vector& f_grid,
600 const Index& stokes_dim,
601 const Matrix& z_surface,
602 const Numeric& surface_skin_t,
603 const Vector& surface_scalar_reflectivity,
604 const Index& gas_scattering_do,
605 const Index& suns_do,
606 const ArrayOfString& disort_aux_vars,
607 const Index& nstreams,
608 const Index& Npfct,
609 const Index& only_tro,
610 const Index& cdisort_quiet,
611 const Index& emission,
612 const Index& intensity_correction,
613 const Verbosity& verbosity) {
614
615 // Set cloudbox to cover complete atmosphere
616 Index cloudbox_on;
617 ArrayOfIndex cloudbox_limits;
618 cloudboxSetFullAtm(cloudbox_on,
619 cloudbox_limits,
620 atmosphere_dim,
621 p_grid,
622 Vector(0),
623 Vector(0),
624 0.,
625 verbosity);
626
627 const Index Nf = f_grid.nelem();
628 const Index Np_cloud = cloudbox_limits[1] - cloudbox_limits[0] + 1;
629
630 check_disort_irradiance_input(atmfields_checked,
631 atmgeom_checked,
632 scat_data_checked,
633 atmosphere_dim,
634 stokes_dim,
635 scat_data,
636 nstreams);
637
638 //Check for number of suns
639 ARTS_USER_ERROR_IF(suns.nelem() > 1,
640 "The simulation setup contains ",
641 suns.nelem(),
642 " suns. \n"
643 "Disort can handle only one sun.")
644
645 //allocate Varibale for direct (sun) source
646 Vector sun_rte_los;
647 Vector sun_pos(3);
648 Vector cloudboxtop_pos(3);
649 Index sun_on = suns_do;
650 Numeric scale_factor;
651
652 spectral_irradiance_field.resize(Nf, Np_cloud, 1, 1, 2);
653 spectral_irradiance_field = NAN;
654
655 if (sun_on){
656
657 Vector lon_grid{lon_true[0] - 0.1, lon_true[0] + 0.1};
658 Vector lat_grid{lat_true[0] - 0.1, lat_true[0] + 0.1};
659
660 //Position of sun
661 sun_pos = {suns[0].distance, suns[0].latitude, suns[0].longitude};
662
663 // Position of top of cloudbox
664 cloudboxtop_pos = {
665 z_field(cloudbox_limits[1], 0, 0), lat_true[0], lon_true[0]};
666
667 // calculate local position of sun at top of cloudbox
669 3,
670 lat_grid,
671 lon_grid,
672 refellipsoid,
673 cloudboxtop_pos,
674 sun_pos,
675 verbosity);
676
677 //FIXME: IF we want to be correct and include refraction, we must calculate the
678 // local position of sun via ppathFromRtePos2. The question is, is this needed,
679 // because DISORT does not handle refraction at all.
680
681 // Check if sun is above horizon, if not switch it off
682 if (sun_rte_los[0] >= 90) {
683 sun_on = 0;
684
686 out0 << "Sun is below the horizon\n";
687 out0 << "Sun is ignored.\n";
688 }
689
690 //get the cloudbox top distance to earth center.
691 Numeric R_TOA = refell2r(refellipsoid,
692 lat_true[0]) +
693 cloudboxtop_pos[0];
694
695 //get the distance between sun and cloudbox top
696 Numeric R_Sun2CloudboxTop;
697 distance3D(R_Sun2CloudboxTop,
698 R_TOA,
699 lat_true[0],
700 lon_true[0],
701 sun_pos[0],
702 sun_pos[1],
703 sun_pos[2]);
704
705 // Geometric scaling factor, scales the sun spectral irradiance at the surface
706 // of the sun to the spectral irradiance of the sun at cloubbox top.
707 scale_factor=suns[0].radius*suns[0].radius/
708 (suns[0].radius*suns[0].radius+R_Sun2CloudboxTop*R_Sun2CloudboxTop);
709
710 }
711
712 Vector albedo(f_grid.nelem(), 0.);
713 Numeric btemp;
714
716 albedo, btemp, f_grid, surface_skin_t, surface_scalar_reflectivity);
717
719 spectral_irradiance_field,
720 disort_aux,
721 f_grid,
722 p_grid,
723 z_field(joker, 0, 0),
724 z_surface(0, 0),
725 t_field(joker, 0, 0),
726 vmr_field(joker, joker, 0, 0),
727 pnd_field(joker, joker, 0, 0),
728 scat_data,
729 suns,
730 propmat_clearsky_agenda,
731 gas_scattering_agenda,
732 cloudbox_limits,
733 btemp,
734 albedo,
735 sun_rte_los,
736 gas_scattering_do,
737 sun_on,
738 disort_aux_vars,
739 scale_factor,
740 nstreams,
741 Npfct,
742 only_tro,
743 cdisort_quiet,
744 emission,
745 intensity_correction,
746 verbosity);
747}
This file contains the definition of Array.
The Agenda class.
Definition: agenda_class.h:69
This can be used to make arrays out of anything.
Definition: array.h:48
Index nelem() const ARTS_NOEXCEPT
Definition: array.h:92
Index nelem() const noexcept
Returns the number of elements.
Definition: matpackI.h:547
The Matrix class.
Definition: matpackI.h:1285
The Tensor3 class.
Definition: matpackIII.h:352
The Tensor4 class.
Definition: matpackIV.h:435
The Tensor5 class.
Definition: matpackV.h:524
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackV.cc:1741
The Tensor7 class.
Definition: matpackVII.h:2407
The Vector class.
Definition: matpackI.h:910
Workspace class.
Definition: workspace_ng.h:53
#define ARTS_USER_ERROR_IF(condition,...)
Definition: debug.h:153
void surf_albedoCalc(Workspace &ws, VectorView albedo, Numeric &btemp, const Agenda &surface_rtprop_agenda, ConstVectorView f_grid, ConstVectorView scat_za_grid, const Numeric &surf_alt, const Verbosity &verbosity)
surf_albedoCalc
Definition: disort.cc:1711
void run_cdisort(Workspace &ws, Tensor7 &cloudbox_field, ArrayOfMatrix &disort_aux, ConstVectorView f_grid, ConstVectorView p_grid, ConstVectorView z_profile, const Numeric &z_surface, ConstVectorView t_profile, ConstMatrixView vmr_profiles, ConstMatrixView pnd_profiles, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const ArrayOfIndex &cloudbox_limits, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, ConstVectorView za_grid, ConstVectorView aa_grid, ConstVectorView sun_rte_los, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Numeric &scale_factor, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
Calculate doit_i_field with Disort including a sun source.
Definition: disort.cc:934
void run_cdisort_flux(Workspace &ws, Tensor5 &spectral_irradiance_field, ArrayOfMatrix &disort_aux, ConstVectorView f_grid, ConstVectorView p_grid, ConstVectorView z_profile, const Numeric &z_surface, ConstVectorView t_profile, ConstMatrixView vmr_profiles, ConstMatrixView pnd_profiles, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const ArrayOfIndex &cloudbox_limits, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, ConstVectorView sun_rte_los, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Numeric &scale_factor, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
Calculate spectral_irradiance_field with Disort including a sun source.
Definition: disort.cc:1329
void get_disortsurf_props(Vector &albedo, Numeric &btemp, ConstVectorView f_grid, const Numeric &surface_skin_t, ConstVectorView surface_scalar_reflectivity)
get_disortsurf_props.
Definition: disort.cc:296
void surf_albedoCalcSingleAngle(Workspace &ws, VectorView albedo, Numeric &btemp, const Agenda &surface_rtprop_agenda, ConstVectorView f_grid, const Numeric &surf_alt, const Numeric &inc_angle)
surf_albedoCalcSingleAngle
Definition: disort.cc:1891
void check_disort_irradiance_input(const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Index &atmosphere_dim, const Index &stokes_dim, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &nstreams)
check_disort_input.
Definition: disort.cc:212
void check_disort_input(const Index &cloudbox_on, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &cloudbox_checked, const Index &scat_data_checked, const Index &atmosphere_dim, const Index &stokes_dim, const ArrayOfIndex &cloudbox_limits, const ArrayOfArrayOfSingleScatteringData &scat_data, ConstVectorView za_grid, const Index &nstreams)
check_disort_input.
Definition: disort.cc:86
void init_ifield(Tensor7 &cloudbox_field, const Vector &f_grid, const ArrayOfIndex &cloudbox_limits, const Index &n_za, const Index &n_aa, const Index &stokes_dim)
init_ifield.
Definition: disort.cc:279
Functions for disort interface.
void distance3D(Numeric &l, const Numeric &r1, const Numeric &lat1, const Numeric &lon1, const Numeric &r2, const Numeric &lat2, const Numeric &lon2)
distance3D
Definition: geodetic.cc:670
Numeric refell2r(ConstVectorView refellipsoid, const Numeric &lat)
refell2r
Definition: geodetic.cc:1266
Array< RetrievalQuantity > ArrayOfRetrievalQuantity
Definition: jacobian.h:544
void cloudboxSetFullAtm(Index &cloudbox_on, ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Index &fullfull, const Verbosity &)
WORKSPACE METHOD: cloudboxSetFullAtm.
Definition: m_cloudbox.cc:264
void pnd_fieldZero(Tensor4 &pnd_field, ArrayOfTensor4 &dpnd_field_dx, ArrayOfArrayOfSingleScatteringData &scat_data, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfIndex &cloudbox_limits, const ArrayOfRetrievalQuantity &jacobian_quantities, const Verbosity &)
WORKSPACE METHOD: pnd_fieldZero.
Definition: m_cloudbox.cc:1931
void DisortCalcIrradiance(Workspace &ws, Tensor5 &spectral_irradiance_field, ArrayOfMatrix &disort_aux, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const Index &atmosphere_dim, const Tensor4 &pnd_field, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Vector &f_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
WORKSPACE METHOD: DisortCalcIrradiance.
Definition: m_disort.cc:578
void DisortCalc(Workspace &ws, Tensor7 &cloudbox_field, ArrayOfMatrix &disort_aux, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Index &cloudbox_checked, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const Index &atmosphere_dim, const Tensor4 &pnd_field, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Vector &f_grid, const Vector &za_grid, const Vector &aa_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
WORKSPACE METHOD: DisortCalc.
Definition: m_disort.cc:47
void DisortCalcWithARTSSurface(Workspace &ws, Tensor7 &cloudbox_field, ArrayOfMatrix &disort_aux, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Index &cloudbox_checked, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Agenda &propmat_clearsky_agenda, const Agenda &surface_rtprop_agenda, const Agenda &gas_scattering_agenda, const Index &atmosphere_dim, const Tensor4 &pnd_field, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Vector &f_grid, const Vector &za_grid, const Vector &aa_grid, const Index &stokes_dim, const Matrix &z_surface, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Numeric &inc_angle, const Verbosity &verbosity)
WORKSPACE METHOD: DisortCalcWithARTSSurface.
Definition: m_disort.cc:246
void DisortCalcClearsky(Workspace &ws, Tensor7 &spectral_radiance_field, ArrayOfMatrix &disort_aux, const Index &atmfields_checked, const Index &atmgeom_checked, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const Index &atmosphere_dim, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfSun &suns, const Vector &f_grid, const Vector &za_grid, const Vector &aa_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
WORKSPACE METHOD: DisortCalcClearsky.
Definition: m_disort.cc:463
Template functions for general supergeneric ws methods.
void rte_losGeometricFromRtePosToRtePos2(Vector &rte_los, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &refellipsoid, const Vector &rte_pos, const Vector &rte_pos2, const Verbosity &)
WORKSPACE METHOD: rte_losGeometricFromRtePosToRtePos2.
Definition: m_ppath.cc:2071
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
const Joker joker
Declarations having to do with the four output streams.
#define CREATE_OUT3
Definition: messages.h:206
#define CREATE_OUT0
Definition: messages.h:203