ARTS  2.0.49
m_surface.cc
Go to the documentation of this file.
1 /* Copyright (C) 2008
2  Patrick Eriksson <Patrick.Eriksson@rss.chalmers.se>
3  Stefan Buehler <sbuehler@ltu.se>
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License as published by the
7  Free Software Foundation; either version 2, or (at your option) any
8  later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18  USA. */
19 
20 
21 
22 /*===========================================================================
23  === File description
24  ===========================================================================*/
25 
40 /*===========================================================================
41  === External declarations
42  ===========================================================================*/
43 
44 #include <cmath>
45 //#include <stdexcept>
46 #include "arts.h"
47 #include "check_input.h"
48 #include "complex.h"
49 #include "physics_funcs.h"
50 #include "matpackIII.h"
51 #include "math_funcs.h"
52 #include "messages.h"
53 #include "special_interp.h"
54 #include "absorption.h"
55 #include "interpolation.h"
56 #include "fastem.h"
57 #include "gridded_fields.h"
58 
59 extern const Numeric DEG2RAD;
60 extern const Numeric RAD2DEG;
61 extern const Numeric EARTH_RADIUS;
62 
63 extern const Index GFIELD4_IA_GRID;
64 extern const Index GFIELD4_F_GRID;
65 extern const Index GFIELD4_LAT_GRID;
66 extern const Index GFIELD4_LON_GRID;
67 
68 
69 
70 
71 /*===========================================================================
72  === Help functions (not WSMs)
73  ===========================================================================*/
74 
76 
86  VectorView los,
87  const Index& atmosphere_dim )
88 {
89  assert( atmosphere_dim >= 1 && atmosphere_dim <= 3 );
90 
91  if( atmosphere_dim == 1 )
92  {
93  assert( los.nelem() == 1 );
94  assert( los[0] > 90 ); // Otherwise surface refl. not possible
95  assert( los[0] <= 180 );
96 
97  los[0] = 180 - los[0];
98  }
99 
100  else if( atmosphere_dim == 2 )
101  {
102  assert( los.nelem() == 1 );
103  assert( abs(los[0]) <= 180 );
104 
105  los[0] = sign( los[0] ) * 180 - los[0];
106  }
107 
108  else if( atmosphere_dim == 3 )
109  {
110  assert( los.nelem() == 2 );
111  assert( los[0] >= 0 );
112  assert( los[0] <= 180 );
113  assert( abs( los[1] ) <= 180 );
114 
115  // Calculate LOS neglecting any tilt of the surface
116  los[0] = 180 - los[0];
117  //los[1] = los[1];
118  }
119 }
120 
121 
122 
124 
148  MatrixView surface_rmatrix,
149  VectorView surface_emission,
150  const Complex& Rv,
151  const Complex& Rh,
152  const Numeric& f,
153  const Index& stokes_dim,
154  const Numeric& surface_skin_t )
155 {
156  assert( surface_rmatrix.nrows() == stokes_dim );
157  assert( surface_rmatrix.ncols() == stokes_dim );
158  assert( surface_emission.nelem() == stokes_dim );
159 
160  // Expressions are derived in the surface chapter in the user guide
161 
162  const Numeric rv = pow( abs(Rv), 2.0 );
163  const Numeric rh = pow( abs(Rh), 2.0 );
164  const Numeric rmean = ( rv + rh ) / 2;
165  const Numeric B = planck( f, surface_skin_t );
166 
167  surface_rmatrix = 0.0;
168  surface_emission = 0.0;
169 
170  surface_rmatrix(0,0) = rmean;
171  surface_emission[0] = B * ( 1 - rmean );
172 
173  if( stokes_dim > 1 )
174  {
175  const Numeric rdiff = ( rv - rh ) / 2;
176 
177  surface_rmatrix(1,0) = rdiff;
178  surface_rmatrix(0,1) = rdiff;
179  surface_rmatrix(1,1) = rmean;
180  surface_emission[1] = -B * rdiff;
181 
182  if( stokes_dim > 2 )
183  {
184  const Complex a = Rh * conj(Rv);
185  const Complex b = Rv * conj(Rh);
186  const Numeric c = real( a + b ) / 2.0;
187 
188  surface_rmatrix(2,2) = c;
189 
190  if( stokes_dim > 3 )
191  {
192  const Numeric d = imag( a - b ) / 2.0;
193 
194  surface_rmatrix(3,2) = d;
195  surface_rmatrix(2,3) = d;
196  surface_rmatrix(3,3) = c;
197  }
198  }
199  }
200 }
201 
202 
203 
204 
205 
206 /*===========================================================================
207  === The functions (in alphabetical order)
208  ===========================================================================*/
209 
210 /* Workspace method: Doxygen documentation will be auto-generated */
212  const Index& atmosphere_dim,
213  const GridPos& rte_gp_lat,
214  const GridPos& rte_gp_lon,
215  const Matrix& field,
216  const Verbosity& verbosity)
217 {
219 
220  // Interpolate
221  outvalue = interp_atmsurface_by_gp( atmosphere_dim, field,
222  rte_gp_lat, rte_gp_lon );
223 
224  out3 << " Result = " << outvalue << "\n";
225 }
226 
227 
228 
229 /* Workspace method: Doxygen documentation will be auto-generated */
231  const Index& atmosphere_dim,
232  const Vector& rte_pos,
233  const Vector& rte_los,
234  const GriddedField3& gfield,
235  const Verbosity& verbosity)
236 {
238 
239  // Check input
240  chk_if_in_range( "atmosphere_dim", atmosphere_dim, 1, 3 );
241  if( rte_pos.nelem() != atmosphere_dim )
242  throw runtime_error( "Length of *rte_pos* must match *atmoshere_dim*." );
243 
244  // Interpolate
245  //
246  Numeric lat = 0, lon = 0;
247  if( atmosphere_dim >= 2 )
248  lat = rte_pos[1];
249  if( atmosphere_dim == 3 )
250  lon = rte_pos[2];
251  //
252  interp_gfield3( outvalue, gfield, atmosphere_dim, 180-abs(rte_los[0]), lat,
253  lon, "Incidence angle", "Latitude", "Longitude" );
254 
255  out3 << " Result = " << outvalue << "\n";
256 }
257 
258 
259 
260 /* Workspace method: Doxygen documentation will be auto-generated */
261 void r_geoidSpherical(// WS Output:
262  Matrix& r_geoid,
263  // WS Input:
264  const Index& atmosphere_dim,
265  const Vector& lat_grid,
266  const Vector& lon_grid,
267  const Numeric& r,
268  const Verbosity& verbosity)
269 {
272 
273  // Check input (use dummy for *p_grid*).
274  chk_if_in_range( "atmosphere_dim", atmosphere_dim, 1, 3 );
275  chk_atm_grids( atmosphere_dim, Vector(2,2,-1), lat_grid, lon_grid );
276 
277  // What radius to use?
278  Numeric r_local = r;
279  if( r < 0 )
280  { r_local = EARTH_RADIUS; }
281 
282  out2 << " Sets r_geoid to a sphere with a constant radius of "
283  << r_local/1e3 << " km.\n";
284 
285  // Effective number of latitudes and longitudes
286  Index nlat=1, nlon=1;
287  if( atmosphere_dim >= 2 )
288  { nlat = lat_grid.nelem(); }
289  if( atmosphere_dim >= 3 )
290  { nlon = lon_grid.nelem(); }
291 
292  r_geoid.resize( nlat, nlon );
293 
294  r_geoid = r_local;
295 
296  out3 << " nrows : " << r_geoid.nrows() << "\n";
297  out3 << " ncols : " << r_geoid.ncols() << "\n";
298 }
299 
300 
301 
302 /* Workspace method: Doxygen documentation will be auto-generated */
303 void r_geoidWGS84(// WS Output:
304  Matrix& r_geoid,
305  // WS Input:
306  const Index& atmosphere_dim,
307  const Vector& lat_grid,
308  const Vector& lon_grid,
309  const Verbosity& verbosity)
310 {
313 
314  // Check input (use dummy for *p_grid*).
315  chk_if_in_range( "atmosphere_dim", atmosphere_dim, 1, 3 );
316  chk_atm_grids( atmosphere_dim, Vector(2,2,-1), lat_grid, lon_grid );
317 
318  // Radii of the reference ellipsiod and the values squared, where double
319  // is used to avoid numerical problems.
320  const Numeric rq = 6378.138e3, rp = 6356.752e3;
321  const double rq2 = rq*rq, rp2 = rp*rp;
322 
323  // For 1D the geoid is set to curvature radius for the point and direction
324  // given by latitude_1d and azimuth_angle_1d.
325  if( atmosphere_dim == 1 )
326  {
327  const Numeric azimuth_angle_1d = 0.0;
328 
329  if( lat_grid.nelem() != 1 )
330  throw runtime_error(
331  "This method requires, for 1D, that *lat_grid* has length 1." );
332 
333  chk_if_in_range( "element of lat_grid", lat_grid[0], -90., 90. );
334 
335  out2 << " Sets r_geoid to the curvature radius of the WGS-84 "
336  << "reference ellipsiod.\n";
337 
338  r_geoid.resize(1,1);
339 
340  // Cosine and sine of the latitude. The values are only used squared.
341  double cv = cos( lat_grid[0] * DEG2RAD );
342  cv = cv * cv;
343  double sv = sin( lat_grid[0] * DEG2RAD );
344  sv = sv * sv;
345 
346  // Calculate NS and EW radius
347  Numeric rns = rq2*rp2/pow(rq2*cv+rp2*sv,1.5);
348  Numeric rew = rq2/sqrt(rq2*cv+rp2*sv);
349 
350  // Calculate the curvature radius in the observation direction
351  cv = cos( azimuth_angle_1d * DEG2RAD );
352  sv = sin( azimuth_angle_1d * DEG2RAD );
353  r_geoid(0,0) = 1/(cv*cv/rns+sv*sv/rew);
354  }
355 
356  else
357  {
358  out2 << " Sets r_geoid to the radius of the WGS-84 "
359  << "reference ellipsiod.\n";
360 
361  // Number of latitudes
362  const Index nlat = lat_grid.nelem();
363 
364  // Effective number of longitudes
365  Index nlon;
366  if( atmosphere_dim == 2 )
367  nlon = 1;
368  else
369  nlon = lon_grid.nelem();
370 
371  r_geoid.resize( nlat, nlon );
372 
373  Numeric sv, cv, rv;
374  for( Index lat=0; lat<nlat; lat++ )
375  {
376  // Check that the latutide is inside [-90,90]
377  if( ( lat_grid[lat] < -90 ) || ( lat_grid[lat] > 90 ) )
378  {
379  ostringstream os;
380  os << "The accepted range for latitudes in this function is "
381  << "[-90,90],\nbut a value of " << lat_grid[lat]
382  << " was found.";
383  throw runtime_error( os.str() );
384  }
385 
386  // Cosine and sine of the latitude.
387  cv = cos( lat_grid[lat] * DEG2RAD );
388  sv = sin( lat_grid[lat] * DEG2RAD );
389 
390  // The radius of the ellipsiod
391  rv = sqrt( rq2*rp2 / ( rq2*sv*sv + rp2*cv*cv ) );
392 
393  // Loop longitudes and fill *r_geoid*.
394  for( Index lon=0; lon<nlon; lon++ )
395  r_geoid(lat,lon) = rv;
396  }
397  }
398  out3 << " nrows : " << r_geoid.nrows() << "\n";
399  out3 << " ncols : " << r_geoid.ncols() << "\n";
400 }
401 
402 
403 
404 /* Workspace method: Doxygen documentation will be auto-generated */
405 void surfaceBlackbody(Matrix& surface_los,
406  Tensor4& surface_rmatrix,
407  Matrix& surface_emission,
408  const Vector& f_grid,
409  const Index& stokes_dim,
410  const Numeric& surface_skin_t,
411  const Verbosity& verbosity)
412 {
414 
415  chk_if_in_range( "stokes_dim", stokes_dim, 1, 4 );
416  chk_not_negative( "surface_skin_t", surface_skin_t );
417 
418  out2 << " Sets variables to model a blackbody surface with a temperature "
419  << " of " << surface_skin_t << " K.\n";
420  surface_los.resize(0,0);
421  surface_rmatrix.resize(0,0,0,0);
422 
423  const Index nf = f_grid.nelem();
424  surface_emission.resize( nf, stokes_dim );
425  surface_emission = 0.0;
426  for( Index iv=0; iv<nf; iv++ )
427  {
428  surface_emission(iv,0) = planck( f_grid[iv], surface_skin_t );
429  }
430 }
431 
432 
433 
434 /* Workspace method: Doxygen documentation will be auto-generated */
435 void surfaceFlatReflectivity(Matrix& surface_los,
436  Tensor4& surface_rmatrix,
437  Matrix& surface_emission,
438  const Vector& f_grid,
439  const Index& stokes_dim,
440  const Index& atmosphere_dim,
441  const Vector& rte_los,
442  const Numeric& surface_skin_t,
443  const Vector& surface_scalar_reflectivity,
444  const Verbosity& verbosity)
445 {
448 
449  chk_if_in_range( "atmosphere_dim", atmosphere_dim, 1, 3 );
450  chk_if_in_range( "stokes_dim", stokes_dim, 1, 4 );
451  chk_not_negative( "surface_skin_t", surface_skin_t );
452 
453  const Index nf = f_grid.nelem();
454 
455  if( surface_scalar_reflectivity.nelem() != nf &&
456  surface_scalar_reflectivity.nelem() != 1 )
457  {
458  ostringstream os;
459  os << "The number of elements in *surface_scalar_reflectivity* should\n"
460  << "match length of *f_grid* or be 1."
461  << "\n length of *f_grid* : " << nf
462  << "\n length of *surface_scalar_reflectivity* : "
463  << surface_scalar_reflectivity.nelem()
464  << "\n";
465  throw runtime_error( os.str() );
466  }
467 
468  if( min(surface_scalar_reflectivity) < 0 ||
469  max(surface_scalar_reflectivity) > 1 )
470  {
471  throw runtime_error(
472  "All values in *surface_scalar_reflectivity* must be inside [0,1]." );
473  }
474 
475  out2 << " Sets variables to model a flat surface\n";
476  out3 << " surface temperature: " << surface_skin_t << " K.\n";
477 
478  surface_los.resize( 1, rte_los.nelem() );
479  surface_los(0,joker) = rte_los;
480  surface_specular_los( surface_los(0, joker) , atmosphere_dim );
481 
482  surface_emission.resize( nf, stokes_dim );
483  surface_rmatrix.resize(1,nf,stokes_dim,stokes_dim);
484  surface_rmatrix = 0.0;
485  surface_emission = 0.0;
486 
487  Numeric r = 0.0;
488 
489  for( Index iv=0; iv<nf; iv++ )
490  {
491  if( iv == 0 || surface_scalar_reflectivity.nelem() > 1 )
492  { r = surface_scalar_reflectivity[iv]; }
493 
494  surface_emission(iv,0) = (1.0-r) * planck( f_grid[iv], surface_skin_t );
495  for( Index is=0; is<stokes_dim; is++ )
496  { surface_rmatrix(0,iv,is,is) = r; }
497  }
498 }
499 
500 
501 
502 /* Workspace method: Doxygen documentation will be auto-generated */
504  Tensor4& surface_rmatrix,
505  Matrix& surface_emission,
506  const Vector& f_grid,
507  const Index& stokes_dim,
508  const Index& atmosphere_dim,
509  const Vector& rte_los,
510  const Numeric& surface_skin_t,
511  const Matrix& complex_n,
512  const Verbosity& verbosity)
513 {
516 
517  const Index nf = f_grid.nelem();
518 
519  chk_if_in_range( "atmosphere_dim", atmosphere_dim, 1, 3 );
520  chk_if_in_range( "stokes_dim", stokes_dim, 1, 4 );
521  chk_not_negative( "surface_skin_t", surface_skin_t );
522 
523  chk_matrix_ncols( "complex_n", complex_n, 2 );
524  //
525  if( complex_n.nrows() != nf && complex_n.nrows() != 1 )
526  {
527  ostringstream os;
528  os << "The number of rows in *complex_n* should be 1 or match the length "
529  << "of *f_grid*,"
530  << "\n length of *f_grid* : " << nf
531  << "\n rows in *complex_n* : " << complex_n.nrows() << "\n";
532  throw runtime_error( os.str() );
533  }
534 
535  out2 << " Sets variables to model a flat surface\n";
536  out3 << " surface temperature: " << surface_skin_t << " K.\n";
537 
538  surface_los.resize( 1, rte_los.nelem() );
539  surface_los(0,joker) = rte_los;
540  surface_specular_los( surface_los(0,joker), atmosphere_dim );
541 
542  surface_emission.resize( nf, stokes_dim );
543  surface_rmatrix.resize( 1, nf, stokes_dim, stokes_dim );
544 
545  // Complex (amplitude) reflection coefficients
546  Complex Rv, Rh;
547 
548  for( Index iv=0; iv<nf; iv++ )
549  {
550  if( iv == 0 || complex_n.nrows() > 1 )
551  {
552  // Set n2 (refractive index of surface medium)
553  Complex n2( complex_n(iv,0), complex_n(iv,1) );
554 
555  // Amplitude reflection coefficients
556  fresnel( Rv, Rh, Numeric(1.0), n2, 180.0-abs(rte_los[0]) );
557  }
558 
559  // Fill reflection matrix and emission vector
560  surface_specular_R_and_b( surface_rmatrix(0,iv,joker,joker),
561  surface_emission(iv,joker), Rv, Rh,
562  f_grid[iv], stokes_dim, surface_skin_t );
563  }
564 }
565 
566 
567 
568 /* Workspace method: Doxygen documentation will be auto-generated */
570  Tensor4& surface_rmatrix,
571  Matrix& surface_emission,
572  const Vector& f_grid,
573  const Index& stokes_dim,
574  const Index& atmosphere_dim,
575  const Vector& rte_los,
576  const Numeric& surface_skin_t,
577  const Vector& surface_emissivity,
578  const Verbosity& verbosity)
579 {
582 
583  chk_if_in_range( "atmosphere_dim", atmosphere_dim, 1, 3 );
584  chk_if_in_range( "stokes_dim", stokes_dim, 1, 4 );
585  chk_not_negative( "surface_skin_t", surface_skin_t );
586 
587  const Index nf = f_grid.nelem();
588 
589  if( surface_emissivity.nelem() != nf )
590  {
591  ostringstream os;
592  os << "The number of elements in *surface_emissivity* should match\n"
593  << "length of *f_grid*."
594  << "\n length of *f_grid* : " << nf
595  << "\n length of *surface_emissivity* : " << surface_emissivity.nelem()
596  << "\n";
597  throw runtime_error( os.str() );
598  }
599 
600  if( min(surface_emissivity) < 0 || max(surface_emissivity) > 1 )
601  {
602  throw runtime_error(
603  "All values in *surface_emissivity* must be inside [0,1]." );
604  }
605 
606  out2 << " Sets variables to model a flat surface\n";
607  out3 << " surface temperature: " << surface_skin_t << " K.\n";
608 
609  surface_los.resize( 1, rte_los.nelem() );
610  surface_los(0,joker) = rte_los;
611  surface_specular_los( surface_los(0, joker) , atmosphere_dim );
612 
613  surface_emission.resize( nf, stokes_dim );
614  surface_rmatrix.resize(1,nf,stokes_dim,stokes_dim);
615  surface_rmatrix = 0.0;
616  surface_emission = 0.0;
617 
618  for( Index iv=0; iv<nf; iv++ )
619  {
620  surface_emission(iv,0) = surface_emissivity[iv] *
621  planck( f_grid[iv], surface_skin_t );
622  for( Index is=0; is<stokes_dim; is++ )
623  { surface_rmatrix(0,iv,is,is) = 1 - surface_emissivity[iv]; }
624  }
625 }
626 
627 
628 
629 /* Workspace method: Doxygen documentation will be auto-generated */
631  Tensor4& surface_rmatrix,
632  Matrix& surface_emission,
633  const Vector& f_grid,
634  const Index& stokes_dim,
635  const Index& atmosphere_dim,
636  const Vector& rte_los,
637  const Numeric& surface_skin_t,
638  const Numeric& surface_emissivity,
639  const Verbosity& verbosity)
640 {
641  chk_if_in_range( "surface_emissivity", surface_emissivity, 0., 1. );
642 
643  Vector a_vector( f_grid.nelem(), surface_emissivity );
644 
645  surfaceFlatVaryingEmissivity(surface_los, surface_rmatrix, surface_emission,
646  f_grid, stokes_dim, atmosphere_dim, rte_los,
647  surface_skin_t, a_vector, verbosity);
648 }
649 
650 
651 
652 /* Workspace method: Doxygen documentation will be auto-generated */
653 void surfaceLambertianSimple(Matrix& surface_los,
654  Tensor4& surface_rmatrix,
655  Matrix& surface_emission,
656  const Vector& f_grid,
657  const Index& stokes_dim,
658  const Index& atmosphere_dim,
659  const Vector& rte_los,
660  const Numeric& surface_skin_t,
661  const Vector& surface_scalar_reflectivity,
662  const Index& np,
663  const Numeric& za_pos,
664  const Verbosity&)
665 {
666  const Index nf = f_grid.nelem();
667 
668  chk_if_in_range( "atmosphere_dim", atmosphere_dim, 1, 3 );
669  chk_if_in_range( "stokes_dim", stokes_dim, 1, 4 );
670  chk_not_negative( "surface_skin_t", surface_skin_t );
671  chk_if_in_range( "za_pos", za_pos, 0, 1 );
672 
673  if( surface_scalar_reflectivity.nelem() != nf &&
674  surface_scalar_reflectivity.nelem() != 1 )
675  {
676  ostringstream os;
677  os << "The number of elements in *surface_scalar_reflectivity* should\n"
678  << "match length of *f_grid* or be 1."
679  << "\n length of *f_grid* : " << nf
680  << "\n length of *surface_scalar_reflectivity* : "
681  << surface_scalar_reflectivity.nelem()
682  << "\n";
683  throw runtime_error( os.str() );
684  }
685 
686  if( min(surface_scalar_reflectivity) < 0 ||
687  max(surface_scalar_reflectivity) > 1 )
688  {
689  throw runtime_error(
690  "All values in *surface_scalar_reflectivity* must be inside [0,1]." );
691  }
692 
693  // Allocate and init everything to zero
694  //
695  surface_los.resize( np, rte_los.nelem() );
696  surface_rmatrix.resize(np,nf,stokes_dim,stokes_dim);
697  surface_emission.resize( nf, stokes_dim );
698  //
699  surface_los = 0.0;
700  surface_rmatrix = 0.0;
701  surface_emission = 0.0;
702 
703  // Help variables
704  //
705  const Numeric dza = 90.0 / (Numeric)np;
706  const Vector za_lims( 0.0, np+1, dza );
707 
708  // surface_los
709  for( Index ip=0; ip<np; ip++ )
710  { surface_los(ip,0) = za_lims[ip] + za_pos * dza; }
711 
712  // Loop frequencies and set remaining values
713  //
714  Numeric r = 0.0;
715  //
716  for( Index iv=0; iv<nf; iv++ )
717  {
718  // Get reflectivity
719  if( iv == 0 || surface_scalar_reflectivity.nelem() > 1 )
720  { r = surface_scalar_reflectivity[iv]; }
721 
722  // surface_rmatrix
723  for( Index ip=0; ip<np; ip++ )
724  {
725  const Numeric w = r * 0.5 * ( cos(2*DEG2RAD*za_lims[ip]) -
726  cos(2*DEG2RAD*za_lims[ip+1]) );
727  surface_rmatrix(ip,iv,0,0) = w;
728  }
729 
730  // surface_emission
731  surface_emission(iv,0) = (1-r) * planck( f_grid[iv], surface_skin_t );
732  }
733 }
734 
Matrix
The Matrix class.
Definition: matpackI.h:767
gridded_fields.h
Implementation of gridded fields.
interp_atmsurface_by_gp
void interp_atmsurface_by_gp(VectorView x, const Index &atmosphere_dim, ConstMatrixView x_surface, const ArrayOfGridPos &gp_lat, const ArrayOfGridPos &gp_lon)
interp_atmsurface_by_gp
Definition: special_interp.cc:506
Tensor4::resize
void resize(Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackIV.cc:1404
GFIELD4_F_GRID
const Index GFIELD4_F_GRID
MatrixView
The MatrixView class.
Definition: matpackI.h:668
absorption.h
Declarations required for the calculation of absorption coefficients.
sign
Numeric sign(const Numeric &x)
sign
Definition: math_funcs.cc:473
joker
const Joker joker
interpolation.h
Header file for interpolation.cc.
surfaceFlatSingleEmissivity
void surfaceFlatSingleEmissivity(Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rte_los, const Numeric &surface_skin_t, const Numeric &surface_emissivity, const Verbosity &verbosity)
WORKSPACE METHOD: surfaceFlatSingleEmissivity.
Definition: m_surface.cc:630
surfaceFlatVaryingEmissivity
void surfaceFlatVaryingEmissivity(Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rte_los, const Numeric &surface_skin_t, const Vector &surface_emissivity, const Verbosity &verbosity)
WORKSPACE METHOD: surfaceFlatVaryingEmissivity.
Definition: m_surface.cc:569
EARTH_RADIUS
const Numeric EARTH_RADIUS
ConstMatrixView::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackI.cc:796
CREATE_OUT2
#define CREATE_OUT2
Definition: messages.h:207
Tensor4
The Tensor4 class.
Definition: matpackIV.h:375
surface_specular_los
void surface_specular_los(VectorView los, const Index &atmosphere_dim)
surface_specular_los
Definition: m_surface.cc:85
surfaceBlackbody
void surfaceBlackbody(Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Numeric &surface_skin_t, const Verbosity &verbosity)
WORKSPACE METHOD: surfaceBlackbody.
Definition: m_surface.cc:405
GriddedField3
Definition: gridded_fields.h:274
complex.h
A class implementing complex numbers for ARTS.
chk_not_negative
void chk_not_negative(const String &x_name, const Numeric &x)
chk_not_negative
Definition: check_input.cc:157
surfaceFlatRefractiveIndex
void surfaceFlatRefractiveIndex(Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rte_los, const Numeric &surface_skin_t, const Matrix &complex_n, const Verbosity &verbosity)
WORKSPACE METHOD: surfaceFlatRefractiveIndex.
Definition: m_surface.cc:503
CREATE_OUT3
#define CREATE_OUT3
Definition: messages.h:208
messages.h
Declarations having to do with the four output streams.
ConstMatrixView::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackI.cc:802
chk_matrix_ncols
void chk_matrix_ncols(const String &x_name, ConstMatrixView x, const Index &l)
chk_matrix_ncols
Definition: check_input.cc:539
abs
#define abs(x)
Definition: continua.cc:13094
GFIELD4_LAT_GRID
const Index GFIELD4_LAT_GRID
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition: matpackI.cc:175
VectorView
The VectorView class.
Definition: matpackI.h:373
physics_funcs.h
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Verbosity
Definition: messages.h:50
fastem.h
This file contains functions that are adapted from FASTEM code which is used to calculate surface emi...
matpackIII.h
math_funcs.h
Matrix::resize
void resize(Index r, Index c)
Resize function.
Definition: matpackI.cc:1549
max
#define max(a, b)
Definition: continua.cc:13097
real
float real
Definition: continua.cc:12951
planck
Numeric planck(const Numeric &f, const Numeric &t)
planck
Definition: physics_funcs.cc:219
GridPos
Structure to store a grid position.
Definition: interpolation.h:74
DEG2RAD
const Numeric DEG2RAD
surfaceFlatReflectivity
void surfaceFlatReflectivity(Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rte_los, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Verbosity &verbosity)
WORKSPACE METHOD: surfaceFlatReflectivity.
Definition: m_surface.cc:435
surfaceLambertianSimple
void surfaceLambertianSimple(Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rte_los, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &np, const Numeric &za_pos, const Verbosity &)
WORKSPACE METHOD: surfaceLambertianSimple.
Definition: m_surface.cc:653
chk_atm_grids
void chk_atm_grids(const Index &dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid)
chk_atm_grids
Definition: check_input.cc:603
min
#define min(a, b)
Definition: continua.cc:13096
surface_specular_R_and_b
void surface_specular_R_and_b(MatrixView surface_rmatrix, VectorView surface_emission, const Complex &Rv, const Complex &Rh, const Numeric &f, const Index &stokes_dim, const Numeric &surface_skin_t)
surface_specular_R_and_b
Definition: m_surface.cc:147
RAD2DEG
const Numeric RAD2DEG
GFIELD4_LON_GRID
const Index GFIELD4_LON_GRID
r_geoidSpherical
void r_geoidSpherical(Matrix &r_geoid, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Numeric &r, const Verbosity &verbosity)
WORKSPACE METHOD: r_geoidSpherical.
Definition: m_surface.cc:261
special_interp.h
Header file for special_interp.cc.
InterpSurfaceFieldToRteGps
void InterpSurfaceFieldToRteGps(Numeric &outvalue, const Index &atmosphere_dim, const GridPos &rte_gp_lat, const GridPos &rte_gp_lon, const Matrix &field, const Verbosity &verbosity)
WORKSPACE METHOD: InterpSurfaceFieldToRteGps.
Definition: m_surface.cc:211
fresnel
void fresnel(Complex &Rv, Complex &Rh, const Complex &n1, const Complex &n2, const Numeric &theta)
fresnel
Definition: physics_funcs.cc:110
InterpSurfaceEmissivityFieldIncLatLon
void InterpSurfaceEmissivityFieldIncLatLon(Numeric &outvalue, const Index &atmosphere_dim, const Vector &rte_pos, const Vector &rte_los, const GriddedField3 &gfield, const Verbosity &verbosity)
WORKSPACE METHOD: InterpSurfaceEmissivityFieldIncLatLon.
Definition: m_surface.cc:230
interp_gfield3
void interp_gfield3(Numeric &value, const GriddedField3 &gfield3, const Index &effective_dim, const Numeric &x, const Numeric &y, const Numeric &z, const String &dim0, const String &dim1, const String &dim2)
interp_gfield3
Definition: special_interp.cc:581
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
chk_if_in_range
void chk_if_in_range(const String &x_name, const Index &x, const Index &x_low, const Index &x_high)
chk_if_in_range
Definition: check_input.cc:95
check_input.h
Vector
The Vector class.
Definition: matpackI.h:555
GFIELD4_IA_GRID
const Index GFIELD4_IA_GRID
r_geoidWGS84
void r_geoidWGS84(Matrix &r_geoid, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Verbosity &verbosity)
WORKSPACE METHOD: r_geoidWGS84.
Definition: m_surface.cc:303
complex
Definition: continua.cc:12953
arts.h
The global header file for ARTS.