Go to the documentation of this file.
72 const Index& demand_vmr_value,
84 for(
Index sp = 0; sp < abs_species.
nelem() && ife < 0; sp++ )
92 if( demand_vmr_value )
94 throw runtime_error(
"Free electrons not found in *abs_species* and "
95 "contribution to refractive index can not be calculated." );
100 edensity = rtp_vmr[ife];
108 if( f_grid[0] < 100e6 )
110 throw runtime_error(
"All frequencies must be >= 100 MHz, but "
111 "this is not the case." );
113 if( edensity*k/(f_grid[0]*f_grid[0]) > 0.25 )
116 os <<
"All frequencies must at least be twice the plasma frequency.\n"
117 <<
"For this particular point, the plasma frequency is: "
118 << sqrt(edensity*k)/1e6 <<
" MHz.";
119 throw runtime_error( os.str() );
122 const Numeric f = ( f_grid[0] +
last(f_grid) ) / 2.0;
123 const Numeric a = edensity*k/(f*f);
124 const Numeric n = sqrt( 1 - a );
126 refr_index_air += n - 1;
127 refr_index_air_group += 1/n - 1;
139 const Numeric& rtp_temperature,
142 static const Numeric bn0 = 1.000272620045304;
143 static const Numeric bn02 = bn0*bn0;
144 static const Numeric bk = 288.16 * (bn02-1.0) / (1013.25*(bn02+2.0));
147 const Numeric n = sqrt( (2.0*bk*rtp_pressure/100.0+rtp_temperature) /
148 ( rtp_temperature-bk*rtp_pressure/100.0) ) - 1;
151 refr_index_air_group += n;
161 const Numeric& rtp_temperature,
170 throw runtime_error(
"The number of tag groups differ between "
171 "*rtp_vmr* and *abs_species*." );
182 e = rtp_pressure * rtp_vmr[firstH2O];
186 const Numeric n = ( a * ( rtp_pressure - e ) +
187 ( b + c / rtp_temperature ) * e ) / rtp_temperature;
190 refr_index_air_group += n;
200 const Numeric& rtp_temperature,
224 ref_spec_names[0] =
"N2";
225 ref_spec_names[1] =
"O2";
226 ref_spec_names[2] =
"CO2";
227 ref_spec_names[3] =
"H2";
228 ref_spec_names[4] =
"He";
229 ref_spec_names[5] =
"H2O";
234 ref_n[0] = 293.81e-6;
235 ref_n[1] = 266.95e-6;
236 ref_n[2] = 495.16e-6;
237 ref_n[3] = 135.77e-6;
239 ref_n[5] = 5368.37e-6;
243 throw runtime_error(
"The number of tag groups differ between "
244 "*rtp_vmr* and *abs_species*." );
269 for (
Index i=0; i<nrs; ++i) {
285 const Numeric ratioT = T0/rtp_temperature;
286 const Numeric ratiop = rtp_pressure/p0;
292 for (
Index i=0; i<nrs; ++i) {
293 if ( ref_spec_locations[i] >= 0 ) {
296 ref_spec_vmr_sum += rtp_vmr[ref_spec_locations[i]];
299 n += ref_n[i] * rtp_vmr[ref_spec_locations[i]];
315 if ( ref_spec_vmr_sum != 0 )
316 n /= ref_spec_vmr_sum;
319 n *= (ratioT*ratiop);
322 refr_index_air_group += n;
336 const Numeric& refr_index_real,
337 const Numeric& refr_index_imag,
340 complex_refr_index.
resize( 1, 1, 2 );
362 if (
min(t_grid) < 250)
365 out1 <<
"WARNING! The minimum chosen temperature is " <<
min(t_grid) <<
366 ". Temperatures below 250 K may lead to incorrect values of"
367 " *complex_refr_index*.\n";
373 complex_refr_index.
resize( nf, nt, 2 );
375 complex_refr_index.
set_grid( 0, f_grid );
377 complex_refr_index.
set_grid( 1, t_grid );
382 for (
Index t = 0; t < nt; ++t)
415 complex_refr_index.
resize(nf, nt, 2);
417 complex_refr_index.
set_grid(0, f_grid);
419 complex_refr_index.
set_grid(1, t_grid);
424 #pragma omp parallel for \
425 if (!arts_omp_in_parallel() && nf > 1) \
427 for (
Index f = 0; f < nf; ++f)
428 for (
Index t = 0; t < nt; ++t)
431 complex_refr_index.
data(f, t, 0) = n.real();
432 complex_refr_index.
data(f, t, 1) = n.imag();
446 throw std::runtime_error(
"ARTS was not compiled with Fortran support.");
void refr_index_airMWgeneral(Numeric &refr_index_air, Numeric &refr_index_air_group, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const ArrayOfArrayOfSpeciesTag &abs_species, const Verbosity &)
WORKSPACE METHOD: refr_index_airMWgeneral.
void set_grid_name(Index i, const String &s)
Set grid name.
Declarations required for the calculation of absorption coefficients.
void refr_index_airFreeElectrons(Numeric &refr_index_air, Numeric &refr_index_air_group, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &rtp_vmr, const Index &demand_vmr_value, const Verbosity &)
WORKSPACE METHOD: refr_index_airFreeElectrons.
Numeric last(ConstVectorView x)
last
const Numeric VACUUM_PERMITTIVITY
void complex_refr_indexWaterLiebe93(GriddedField3 &complex_refr_index, const Vector &f_grid, const Vector &t_grid, const Verbosity &verbosity)
WORKSPACE METHOD: complex_refr_indexWaterLiebe93.
void complex_n_water_liebe93(Matrix &complex_n, const Vector &f_grid, const Numeric &t)
complex_n_water_liebe93
std::complex< Numeric > Complex
const Numeric ELECTRON_MASS
This can be used to make arrays out of anything.
Index species_index_from_species_name(String name)
Return species index for given species name.
Declarations having to do with the four output streams.
void complex_refr_indexIceWarren84(GriddedField3 &, const Vector &, const Vector &, const Verbosity &)
WORKSPACE METHOD: complex_refr_indexIceWarren84.
const Numeric ELECTRON_CHARGE
Index nelem() const
Returns the number of elements.
NUMERIC Numeric
The type to use for all floating point numbers.
void resize(const GriddedField3 &gf)
Make this GriddedField3 the same size as the given one.
void refr_index_airIR(Numeric &refr_index_air, Numeric &refr_index_air_group, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Verbosity &)
WORKSPACE METHOD: refr_index_airIR.
void refr_index_airThayer(Numeric &refr_index_air, Numeric &refr_index_air_group, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const ArrayOfArrayOfSpeciesTag &abs_species, const Numeric &a, const Numeric &b, const Numeric &c, const Verbosity &)
WORKSPACE METHOD: refr_index_airThayer.
void set_grid(Index i, const Vector &g)
Set a numeric grid.
Header file for special_interp.cc.
const Numeric SPEED_OF_LIGHT
Explicit construction of Arrays.
INDEX Index
The type to use for all integer numbers and indices.
void complex_refr_indexConstant(GriddedField3 &complex_refr_index, const Numeric &refr_index_real, const Numeric &refr_index_imag, const Verbosity &)
WORKSPACE METHOD: complex_refr_indexConstant.
Index nelem() const
Number of elements.
Complex refice_(const Numeric &wavlen, const Numeric &temp)
Calculates complex refractive index of Ice 1H.
The global header file for ARTS.