ARTS  2.0.49
refraction.cc File Reference

Functions releated to calculation of refractive index. More...

#include <cmath>
#include "auto_md.h"
#include "interpolation.h"
#include "refraction.h"
#include "special_interp.h"

Go to the source code of this file.

Functions

void get_refr_index_1d (Workspace &ws, Numeric &refr_index, Numeric &a_pressure, Numeric &a_temperature, Vector &a_vmr_list, const Agenda &refr_index_agenda, ConstVectorView p_grid, const Numeric &r_geoid, ConstVectorView z_field, ConstVectorView t_field, ConstMatrixView vmr_field, const Numeric &r)
 get_refr_index_1d More...
 
void get_refr_index_2d (Workspace &ws, Numeric &refr_index, Numeric &a_pressure, Numeric &a_temperature, Vector &a_vmr_list, const Agenda &refr_index_agenda, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView r_geoid, ConstMatrixView z_field, ConstMatrixView t_field, ConstTensor3View vmr_field, const Numeric &r, const Numeric &lat)
 get_refr_index_2d More...
 
void get_refr_index_3d (Workspace &ws, Numeric &refr_index, Numeric &a_pressure, Numeric &a_temperature, Vector &a_vmr_list, const Agenda &refr_index_agenda, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstMatrixView r_geoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, const Numeric &r, const Numeric &lat, const Numeric &lon)
 
void refr_gradients_1d (Workspace &ws, Numeric &refr_index, Numeric &dndr, Numeric &a_pressure, Numeric &a_temperature, Vector &a_vmr_list, const Agenda &refr_index_agenda, ConstVectorView p_grid, const Numeric &r_geoid, ConstVectorView z_field, ConstVectorView t_field, ConstMatrixView vmr_field, const Numeric &r)
 refr_gradients_1d More...
 
void refr_gradients_2d (Workspace &ws, Numeric &refr_index, Numeric &dndr, Numeric &dndlat, Numeric &a_pressure, Numeric &a_temperature, Vector &a_vmr_list, const Agenda &refr_index_agenda, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView r_geoid, ConstMatrixView z_field, ConstMatrixView t_field, ConstTensor3View vmr_field, const Numeric &r, const Numeric &lat)
 refr_gradients_2d More...
 
void refr_gradients_3d (Workspace &ws, Numeric &refr_index, Numeric &dndr, Numeric &dndlat, Numeric &dndlon, Numeric &a_pressure, Numeric &a_temperature, Vector &a_vmr_list, const Agenda &refr_index_agenda, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstMatrixView r_geoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, const Numeric &r, const Numeric &lat, const Numeric &lon)
 refr_gradients_3d More...
 
void refr_index_thayer_1974 (Numeric &refr_index, const Numeric &p, const Numeric &t, const Numeric &h2o_vmr)
 refr_index_thayer_1974 More...
 
void refr_index_ir (Numeric &refr_index, const Numeric &p, const Numeric &t)
 refr_index_ir More...
 

Variables

const Numeric DEG2RAD
 
const Numeric RAD2DEG
 

Detailed Description

Functions releated to calculation of refractive index.

Author
Patrick Eriksson Patri.nosp@m.ck.E.nosp@m.rikss.nosp@m.on@r.nosp@m.ss.ch.nosp@m.alme.nosp@m.rs.se
Date
2003-01-17

Definition in file refraction.cc.

Function Documentation

◆ get_refr_index_1d()

void get_refr_index_1d ( Workspace ws,
Numeric refr_index,
Numeric a_pressure,
Numeric a_temperature,
Vector a_vmr_list,
const Agenda refr_index_agenda,
ConstVectorView  p_grid,
const Numeric r_geoid,
ConstVectorView  z_field,
ConstVectorView  t_field,
ConstMatrixView  vmr_field,
const Numeric r 
)

get_refr_index_1d

Extracts the refractive index for 1D cases.

The function interpolates the atmospheric pressure and fields, and calls refr_index_agenda to determine the refractive index for the given point.

The atmosphere is given by its 1D view. That is, the latitude and longitude dimensions are removed from the atmospheric fields. For example, the temperature is given as a vector (the vertical profile).

Parameters
wsCurrent Workspace
refr_indexOutput: As the WSV with the same name.
a_pressurePressure in hPa.
a_temperatureTemperature in K.
a_vmr_listVector with VMR values.
refr_index_agendaAs the WSV with the same name.
p_gridAs the WSV with the same name.
r_geoidAs the WSV with the same name.
z_fieldThe geometric altitude of each pressure level
t_fieldThe temperature profile.
vmr_fieldThe VMR profile for each species.
rThe radius of the position of interest.
Author
Patrick Eriksson
Date
2003-01-16

Definition at line 82 of file refraction.cc.

References gridpos(), interp(), interpweights(), itw2p(), joker, ConstMatrixView::nrows(), ns, refr_index_agendaExecute(), and Vector::resize().

Referenced by ppath_step_refr_1d(), raytrace_1d_linear_euler(), refr_gradients_1d(), and VectorZtanToZaRefr1D().

◆ get_refr_index_2d()

void get_refr_index_2d ( Workspace ws,
Numeric refr_index,
Numeric a_pressure,
Numeric a_temperature,
Vector a_vmr_list,
const Agenda refr_index_agenda,
ConstVectorView  p_grid,
ConstVectorView  lat_grid,
ConstVectorView  r_geoid,
ConstMatrixView  z_field,
ConstMatrixView  t_field,
ConstTensor3View  vmr_field,
const Numeric r,
const Numeric lat 
)

get_refr_index_2d

Extracts the refractive index for 2D cases.

The function interpolates the atmospheric pressure and fields, and calls refr_index_agenda to determine the refractive index for the given point.

The atmosphere is given by its 2D view. That is, the longitude dimension is removed from the atmospheric fields. For example, the temperature is given as a matrix.

Parameters
wsCurrent Workspace
refr_indexOutput: As the WSV with the same name.
a_pressurePressure in hPa.
a_temperatureTemperature in K.
a_vmr_listVector with VMR values.
refr_index_agendaAs the WSV with the same name.
p_gridAs the WSV with the same name.
lat_gridAs the WSV with the same name.
r_geoidAs the WSV with the same name.
z_fieldThe geometric altitude of each pressure level at each latitude.
t_fieldThe temperature 2D field.
vmr_fieldThe VMR 2D field for each species.
rThe radius of the position of interest.
latThe latitude of the position of interest.
Author
Patrick Eriksson
Date
2003-01-14

Definition at line 162 of file refraction.cc.

References gridpos(), interp(), interpweights(), itw2p(), joker, ConstVectorView::nelem(), ConstTensor3View::npages(), ns, refr_index_agendaExecute(), Vector::resize(), Matrix::resize(), and z_at_lat_2d().

Referenced by refr_gradients_2d().

◆ get_refr_index_3d()

void get_refr_index_3d ( Workspace ws,
Numeric refr_index,
Numeric a_pressure,
Numeric a_temperature,
Vector a_vmr_list,
const Agenda refr_index_agenda,
ConstVectorView  p_grid,
ConstVectorView  lat_grid,
ConstVectorView  lon_grid,
ConstMatrixView  r_geoid,
ConstTensor3View  z_field,
ConstTensor3View  t_field,
ConstTensor4View  vmr_field,
const Numeric r,
const Numeric lat,
const Numeric lon 
)

get_refr_index_3d

Extracts the refractive index for 3D cases.

The function interpolates the atmospheric pressure and fields, and calls refr_index_agenda to determine the refractive index for the given point.

Parameters
wsCurrent Workspace
refr_indexOutput: As the WSV with the same name.
a_pressurePressure in hPa.
a_temperatureTemperature in K.
a_vmr_listVector with VMR values.
refr_index_agendaAs the WSV with the same name.
p_gridAs the WSV with the same name.
lat_gridAs the WSV with the same name.
lon_gridAs the WSV with the same name.
r_geoidAs the WSV with the same name.
z_fieldAs the WSV with the same name.
t_fieldAs the WSV with the same name.
vmr_fieldAs the WSV with the same name.
rThe radius of the position of interest.
latThe latitude of the position of interest.
lonThe longitude of the position of interest.
Author
Patrick Eriksson
Date
2003-01-17

Definition at line 256 of file refraction.cc.

References gridpos(), interp(), interpweights(), itw2p(), joker, ConstTensor4View::nbooks(), ConstVectorView::nelem(), ns, refr_index_agendaExecute(), Vector::resize(), Matrix::resize(), and z_at_latlon().

Referenced by refr_gradients_3d().

◆ refr_gradients_1d()

void refr_gradients_1d ( Workspace ws,
Numeric refr_index,
Numeric dndr,
Numeric a_pressure,
Numeric a_temperature,
Vector a_vmr_list,
const Agenda refr_index_agenda,
ConstVectorView  p_grid,
const Numeric r_geoid,
ConstVectorView  z_field,
ConstVectorView  t_field,
ConstMatrixView  vmr_field,
const Numeric r 
)

refr_gradients_1d

Determines the refractive index, and the radial gradient.

The gradient is calculated in pure numerical way. That is, the refractive index is calculated for slightly shifted radius and the difference to the refractive index at the given point determines the gradient.

The atmosphere is given by its 1D view. That is, the latitude and longitude dimensions are removed from the atmospheric fields. For example, the temperature is given as a vector.

Parameters
wsCurrent Workspace
refr_indexOutput: As the WSV with the same name.
dndrOutput: Radial gradient of refractive index.
a_pressurePressure in hPa.
a_temperatureTemperature in K.
a_vmr_listVector with VMR values.
refr_index_agendaAs the WSV with the same name.
p_gridAs the WSV with the same name.
r_geoidAs the WSV with the same name.
z_fieldThe geometric altitude of each pressure level at each latitude.
t_fieldThe temperature 2D field.
vmr_fieldThe VMR 2D field for each species.
rThe radius of the position of interest.
Author
Patrick Eriksson
Date
2003-01-20

Definition at line 359 of file refraction.cc.

References get_refr_index_1d().

◆ refr_gradients_2d()

void refr_gradients_2d ( Workspace ws,
Numeric refr_index,
Numeric dndr,
Numeric dndlat,
Numeric a_pressure,
Numeric a_temperature,
Vector a_vmr_list,
const Agenda refr_index_agenda,
ConstVectorView  p_grid,
ConstVectorView  lat_grid,
ConstVectorView  r_geoid,
ConstMatrixView  z_field,
ConstMatrixView  t_field,
ConstTensor3View  vmr_field,
const Numeric r,
const Numeric lat 
)

refr_gradients_2d

Determines the refractive index, and its gradients, for the given position.

The gradients are calculated in pure numerical way. That is, the refractive index is calculated for slightly shifted radius or latitude and the difference to the refractive index at the given point determines the gradient.

The latitude gradient is scaled with the radius to obtain the same unit ([1/m]) for both gradients. That is, the returned value is the change of the refractive index for a movement of 1m in the latitude direction.

The atmosphere is given by its 2D view. That is, the longitude dimension is removed from the atmospheric fields. For example, the temperature is given as a matrix.

Parameters
wsCurrent Workspace
refr_indexOutput: As the WSV with the same name.
dndrOutput: Radial gradient of refractive index.
dndlatOutput: Latitude gradient of refractive index.
a_pressurePressure in hPa.
a_temperatureTemperature in K.
a_vmr_listVector with VMR values.
refr_index_agendaAs the WSV with the same name.
p_gridAs the WSV with the same name.
lat_gridAs the WSV with the same name.
r_geoidAs the WSV with the same name.
z_fieldThe geometric altitude of each pressure level at each latitude.
t_fieldThe temperature 2D field.
vmr_fieldThe VMR 2D field for each species.
rThe radius of the position of interest.
latThe latitude of the position of interest.
Author
Patrick Eriksson
Date
2003-01-14

Definition at line 430 of file refraction.cc.

References DEG2RAD, and get_refr_index_2d().

Referenced by raytrace_2d_linear_euler().

◆ refr_gradients_3d()

void refr_gradients_3d ( Workspace ws,
Numeric refr_index,
Numeric dndr,
Numeric dndlat,
Numeric dndlon,
Numeric a_pressure,
Numeric a_temperature,
Vector a_vmr_list,
const Agenda refr_index_agenda,
ConstVectorView  p_grid,
ConstVectorView  lat_grid,
ConstVectorView  lon_grid,
ConstMatrixView  r_geoid,
ConstTensor3View  z_field,
ConstTensor3View  t_field,
ConstTensor4View  vmr_field,
const Numeric r,
const Numeric lat,
const Numeric lon 
)

refr_gradients_3d

Determines the refractive index, and its gradients, for the given position.

The gradients are calculated in pure numerical way. That is, the refractive index is calculated for slightly shifted radius, latitude or longitude and the difference to the refractive index at the given point determines the gradient.

The latitude and longitude gradients are scaled with the (effective) radius to obtain the same unit ([1/m]) for all gradients. That is, the returned values are the change of the refractive index for a movement of 1m in the latitude or longitude direction.

Parameters
wsCurrent Workspace
refr_indexOutput: As the WSV with the same name.
dndrOutput: Radial gradient of refractive index.
dndlatOutput: Latitude gradient of refractive index.
dndlonOutput: Longitude gradient of refractive index.
a_pressurePressure in hPa.
a_temperatureTemperature in K.
a_vmr_listVector with VMR values.
refr_index_agendaAs the WSV with the same name.
p_gridAs the WSV with the same name.
lat_gridAs the WSV with the same name.
lon_gridAs the WSV with the same name.
r_geoidAs the WSV with the same name.
z_fieldAs the WSV with the same name.
t_fieldAs the WSV with the same name.
vmr_fieldAs the WSV with the same name.
rThe radius of the position of interest.
latThe latitude of the position of interest.
lonThe longitude of the position of interest.
Author
Patrick Eriksson
Date
2003-01-17

Definition at line 511 of file refraction.cc.

References DEG2RAD, and get_refr_index_3d().

Referenced by raytrace_3d_linear_euler().

◆ refr_index_ir()

void refr_index_ir ( Numeric refr_index,
const Numeric p,
const Numeric t 
)

refr_index_ir

Calculation of refractive index for the infrared frequency band. The function uses a definition from Michael Höpfner, Forschungszentrum Karlsruhe.

Author
Mattias Ekström
Date
2003-05-15

Definition at line 602 of file refraction.cc.

Referenced by refr_indexIR().

◆ refr_index_thayer_1974()

void refr_index_thayer_1974 ( Numeric refr_index,
const Numeric p,
const Numeric t,
const Numeric h2o_vmr 
)

refr_index_thayer_1974

Calculation of microwave refractive index following Thayer 1974.

Calculates the microwave refractive index due to gases in the Earth's atmosphere. The refractivity of dry air and water vapour is summed. All other gases has a negligible contribution.

The parameterisation of Thayer (Radio Science, 9, 803-807, 1974) is used. See also Eq. 3 and 5 of Solheim et al. (JGR, 104, pp. 9664).

Author
Patrick Eriksson
Date
2002-11-13

Definition at line 581 of file refraction.cc.

Referenced by refr_indexThayer().

Variable Documentation

◆ DEG2RAD

const Numeric DEG2RAD
extern

◆ RAD2DEG

const Numeric RAD2DEG
extern