Go to the documentation of this file.
89 assert( n_f==B.
nrows() );
90 assert( n_t==B.
ncols() );
92 for ( i_f=0; i_f<n_f; i_f++ )
94 c = a * f[i_f]*f[i_f]*f[i_f];
96 for ( i_t=0; i_t<n_t; i_t++ )
97 B(i_f,i_t) = c / (exp(d/t[i_t]) - 1.0);
122 const double c = b/t;
128 B[i] = a * f[i]*f[i]*f[i] / ( exp( f[i]*c ) - 1.0 );
162 throw runtime_error(
"The spectrum cannot be in expected intensity unit "
163 "(impossible value detected).");
168 os <<
"The length of *y* does not match *f_mono* and *za_pencil*.\n"
169 <<
"y.nelem(): " << y.
nelem() <<
"\n"
170 <<
"Should be f_mono.nelem()*za_pencil.nelem(): "
172 <<
"f_mono.nelem(): " << f.
nelem() <<
"\n"
173 <<
"za_pencil.nelem(): " << za.
nelem();
174 throw runtime_error(os.str());
177 for (
Index i=0; i<nf; i++ )
180 d = b*f[i]*f[i]*f[i];
181 for (
Index j=0; j<nza; j++ )
184 y[i0] = c / ( log(d/y[i0]+1) );
233 os <<
"The length of *y* does not match *f_mono* and *za_pencil*.\n"
234 <<
"y.nelem(): " << y.
nelem() <<
"\n"
235 <<
"Should be f_mono.nelem()*za_pencil.nelem(): "
237 <<
"f_mono.nelem(): " << f.
nelem() <<
"\n"
238 <<
"za_pencil.nelem(): " << za.
nelem();
239 throw runtime_error(os.str());
242 for (
Index i=0; i<nf; i++ )
249 for (
Index j=0; j<nza; j++ )
252 y[i0] = b * (double)y[i0];
327 return g0 * pow( r_geoid/(r_geoid+z), 2 );
354 return 9.7803267714 * ( ( 1.0 + 0.0019318514 * sin(latG) * sin(latG) ) /
355 sqrt( 1.0 - 0.00669438 * sin(latG) * sin(latG) ) );
388 const Index start_index,
389 const Index stop_index,
398 if ( start_index >= stop_index )
404 for ( i_z=start_index; i_z!=(stop_index+i_step); i_z+=i_step )
406 for ( i_f=0; i_f<n_f; i_f++ )
407 y[i_f] = y[i_f]*tr(i_f,i_z) + s(i_f,i_z) * ( 1.0-tr(i_f,i_z) );
435 const Index start_index,
436 const Index stop_index,
455 if ( start_index > 0 )
464 rte_iterate( y, start_index-1, i_break, tr, s, n_f );
469 if ( !(stop_index==0 && ground==0) )
473 i_break = stop_index - 1;
479 for ( i_f=0; i_f<n_f; i_f++ )
480 y[i_f] = y[i_f]*(1.0-e_ground[i_f]) + y_ground[i_f]*e_ground[i_f];
484 i_start = ground - 2;
520 const Index start_index,
521 const Index stop_index,
529 if ( start_index >= stop_index )
534 for ( i_z=start_index; i_z!=(stop_index+i_step); i_z+=i_step )
536 for ( i_f=0; i_f<n_f; i_f++ )
537 y[i_f] *= tr(i_f,i_z);
562 const Index start_index,
563 const Index stop_index,
568 if ( start_index < stop_index )
569 throw runtime_error(
"The start index cannot be "
570 "smaller than the stop index." );
580 if ( stop_index > 0 )
587 if ( start_index != stop_index )
588 bl_iterate( y, stop_index, start_index-1, tr, nf );
593 for ( iy=0; iy<nf; iy++ )
594 y[iy] *= ( 1.0 - e_ground[iy] );
846 z_tan = (r_geoid+z_plat)*sin(
DEG2RAD*za) - r_geoid;
882 return interpz( p_abs, z_abs, refr_index, z );
917 Numeric n_plat =
n_for_z( z_plat, p_abs, z_abs, refr_index, atm_limit );
919 return (r_geoid + z_plat) * sin(
DEG2RAD*za) * n_plat;
958 for ( i=(n-1); (i>=0) && (r_geoid+z_abs[i])*refr_index[i]>c; i-- )
960 if ( z_abs[i] <= z_ground )
962 Numeric n_ground =
n_for_z(z_ground,p_abs,z_abs,refr_index,atm_limit);
964 return ztan_geom( 180-theta, z_ground, r_geoid );
974 cs[0] = (r_geoid+z_abs[i])*refr_index[i];
975 cs[1] = (r_geoid+z_abs[i+1])*refr_index[i+1];
1002 double a, b, c, d, e, t_cur;
1014 for ( cur_elem = 0; cur_elem < t.
nelem(); cur_elem++ )
1016 t_cur = t[cur_elem];
1017 e_eq[cur_elem] = exp( a / t_cur + b + c * t_cur + d * t_cur * t_cur + e * log( t_cur ) );
1042 double a, b, c, d, e, t_cur;
1054 for ( cur_elem = 0; cur_elem < t.
nelem(); cur_elem++ )
1056 t_cur = t[cur_elem];
1057 e_eq[cur_elem] = exp( a / t_cur + b + c * t_cur + d * t_cur * t_cur + e * log( t_cur ) );
void transform(VectorView y, double(&my_func)(double), ConstVectorView x)
A generic transform function for vectors, which can be used to implement mathematical functions opera...
const Numeric PLANCK_CONST
const Numeric EARTH_POLAR_RADIUS
Global constant, the polar radius of the Earth [m], from WGS84.
Numeric last(ConstVectorView x)
Gives the last value of a vector.
void resize(Index n)
Resize function.
void invplanck(VectorView y, ConstVectorView f, ConstVectorView za)
Converts a vector with radiances to Plack brightness temperatures.
void interpp_cloud(VectorView x, ConstVectorView p0, ConstVectorView x0, ConstVectorView p)
Index nrows() const
Returns the number of rows.
const Numeric EARTH_EQUATORIAL_RADIUS
Global constant, the equatorial radius of the Earth [m], from WGS84.
Numeric number_density(Numeric p, Numeric t)
Calculates the number density (scalar version).
void rte_iterate(VectorView y, const Index start_index, const Index stop_index, ConstMatrixView tr, ConstMatrixView s, const Index n_f)
Performs a single iteration for RTE calculations (one zenith angle).
void bl(Vector &y, const Index start_index, const Index stop_index, ConstMatrixView tr, const Index ground, ConstVectorView e_ground)
Performs the BL (transmission) calculations for one zenith angle.
const Numeric SPEED_OF_LIGHT
void bl_iterate(VectorView y, const Index start_index, const Index stop_index, ConstMatrixView tr, const Index n_f)
Performs a single iteration for BL calculations (one zenith angle).
Declarations having to do with the four output streams.
void planck(MatrixView B, ConstVectorView f, ConstVectorView t)
Calculates a blackbody radiation (the Planck function) matrix.
void invrayjean(VectorView y, ConstVectorView f, ConstVectorView za)
Converts a vector with radiances to Rayleigh-Jean brightness temperatures.
Index ncols() const
Returns the number of columns.
Numeric g_of_lat(Numeric latitude)
Calculates the gravitational accelaration for a geocentric latitude.
NUMERIC Numeric
The type to use for all floating point numbers.
Index nelem() const
Returns the number of elements.
Numeric interp_lin(ConstVectorView x, ConstVectorView y, const Numeric xi)
Single linear interpolation of a vector (return version).
void e_eq_water(VectorView e_eq, ConstVectorView t)
Calculates the equilibrium water vapor pressure over liquid water.
void e_eq_ice(VectorView e_eq, ConstVectorView t)
Calculates the equilibrium water vapor pressure over ice.
Contains declerations of basic mathematical and vector/matrix functions.
void interpz(VectorView x, ConstVectorView p0, ConstVectorView z0, ConstVectorView x0, ConstVectorView z)
Interpolates a vertical profile at a new set of vertical altitudes.
The class MakeVector is a special kind of Vector that can be initialized explicitly from one or more ...
A constant view of a Matrix.
void interp_lin_vector(VectorView yi, ConstVectorView x, ConstVectorView y, ConstVectorView xi)
Multiple linear interpolation of a vector.
Numeric g_of_z(Numeric r_geoid, Numeric g0, Numeric z)
Calculates the gravitational accelaration for a geometrical altitude.
Numeric ztan_geom(const Numeric za, const Numeric z_plat, const Numeric r_geoid)
Calculates the geometrical tangent altitude (no refraction).
INDEX Index
The type to use for all integer numbers and indices.
Numeric ztan_refr(const Numeric c, const Numeric za, const Numeric z_plat, const Numeric z_ground, ConstVectorView p_abs, ConstVectorView z_abs, ConstVectorView refr_index, const Numeric r_geoid)
Calculates the tangent altitude with refraction.
void interpp(VectorView x, ConstVectorView p0, ConstVectorView x0, ConstVectorView p)
Interpolates a vertical profile at a new set of pressures.
void interp_lin_matrix(MatrixView Yi, ConstVectorView x, ConstMatrixView Y, ConstVectorView xi)
Multiple linear interpolation of matrix rows.
const Numeric BOLTZMAN_CONST
Numeric n_for_z(const Numeric z, ConstVectorView p_abs, ConstVectorView z_abs, ConstVectorView refr_index, const Numeric atm_limit)
Returns the refractive index for a vertical altitude.
Numeric refr_constant(const Numeric r_geoid, const Numeric za, const Numeric z_plat, ConstVectorView p_abs, ConstVectorView z_abs, const Numeric atm_limit, ConstVectorView refr_index)
Determines the constant for a refractive LOS.
A constant view of a Vector.
void z2p(VectorView p, ConstVectorView z0, ConstVectorView p0, ConstVectorView z)
Converts an altitude vector to pressures.
void check_if_in_range(const Numeric &x_low, const Numeric &x_high, const Numeric &x, const String &x_name)
Checks if a numeric variable is inside a specified range.
The global header file for ARTS.
void rte(VectorView y, const Index start_index, const Index stop_index, ConstMatrixView tr, ConstMatrixView s, ConstVectorView y_space, const Index ground, ConstVectorView e_ground, ConstVectorView y_ground)
Performs the RTE calculations for one zenith angle.