ARTS  2.3.1285(git:92a29ea9-dirty)
refraction.h File Reference

Refraction functions. More...

#include "agenda_class.h"
#include "arts.h"
#include "matpackIV.h"

Go to the source code of this file.

Functions

void complex_n_water_liebe93 (Matrix &complex_n, const Vector &f_grid, const Numeric &t)
 complex_n_water_liebe93 More...
 
void complex_n_ice_matzler06 (Matrix &complex_n, const Vector &f_grid, const Numeric &t)
 complex_n_ice_matzler06 More...
 
void get_refr_index_1d (Workspace &ws, Numeric &refr_index, Numeric &refr_index_group, const Agenda &refr_index_agenda, ConstVectorView p_grid, ConstVectorView refellipsoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, const Numeric &r)
 get_refr_index_1d More...
 
void get_refr_index_2d (Workspace &ws, Numeric &refr_index, Numeric &refr_index_group, const Agenda &refr_index_agenda, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView refellipsoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, const Numeric &r, const Numeric &lat)
 get_refr_index_2d More...
 
void get_refr_index_3d (Workspace &ws, Numeric &refr_index, Numeric &refr_index_group, const Agenda &refr_index_agenda, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstVectorView refellipsoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, const Numeric &r, const Numeric &lat, const Numeric &lon)
 
void refr_gradients_1d (Workspace &ws, Numeric &refr_index_air, Numeric &refr_index_air_group, Numeric &dndr, const Agenda &refr_index_air_agenda, ConstVectorView p_grid, ConstVectorView refellipsoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, const Numeric &r)
 refr_gradients_1d More...
 
void refr_gradients_2d (Workspace &ws, Numeric &refr_index, Numeric &refr_index_group, Numeric &dndr, Numeric &dndlat, const Agenda &refr_index_agenda, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView refellipsoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, const Numeric &r, const Numeric &lat)
 refr_gradients_2d More...
 
void refr_gradients_3d (Workspace &ws, Numeric &refr_index, Numeric &refr_index_group, Numeric &dndr, Numeric &dndlat, Numeric &dndlon, const Agenda &refr_index_agenda, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstVectorView refellipsoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, const Numeric &r, const Numeric &lat, const Numeric &lon)
 refr_gradients_3d More...
 

Detailed Description

Refraction functions.

Author
Patrick Eriksson Patri.nosp@m.ck.E.nosp@m.rikss.nosp@m.on@c.nosp@m.halme.nosp@m.rs.s.nosp@m.e
Date
2003-01-17

This file contains the definition of the functions in refraction.cc.

Definition in file refraction.h.

Function Documentation

◆ complex_n_ice_matzler06()

void complex_n_ice_matzler06 ( Matrix complex_n,
const Vector f_grid,
const Numeric t 
)

complex_n_ice_matzler06

Complex refractive index of water ice according to Matzler 2006 (equivalent to Warren 2008).

The method treats pure water ice (no impurities like salt). Valid from 10 MHz up to 3 THz. Thus, not valid below 10 GHz. Follows the atmlab implementation, including some relaxation of upper temperature limit to 280K.

The output matrix has two columns, where column 0 is real part and column 1 is imaginary part; rows match f_grid.

Parameters
complex_nOut: Complex refractive index.
f_gridAs the WSV with the same name.
tTemperature
Author
Jana Mendrok
Date
2016-03-21

Definition at line 121 of file refraction.cc.

References beta, chk_if_in_range(), max, min, n, ConstVectorView::nelem(), Matrix::resize(), and sqrt().

Referenced by complex_refr_indexIceMatzler06().

◆ complex_n_water_liebe93()

void complex_n_water_liebe93 ( Matrix complex_n,
const Vector f_grid,
const Numeric t 
)

complex_n_water_liebe93

Complex refractive index of liquid water according to Liebe 1993.

The method treats liquid water without salt. Thus, not valid below 10 GHz. Upper frequency limit not known, here set to 1000 GHz. Model parameters taken from Atmlab function epswater93 (by C. Maetzler), which refer to Liebe 1993 without closer specifications.

Temperature must be between 0 and 100 degrees Celsius.

The output matrix has two columns, where column 0 is real part and column 1 is imaginary part. And rows matches f_grid.

Parameters
complex_nOut: Complex refractive index.
f_gridAs the WSV with the same name.
tTemperature
Author
Patrick Eriksson
Date
2003-08-15

Definition at line 71 of file refraction.cc.

References chk_if_in_range(), max, min, n, ConstVectorView::nelem(), Matrix::resize(), sqrt(), and TEMP_0_C.

Referenced by complex_refr_indexWaterLiebe93(), and ze_cfac().

◆ get_refr_index_1d()

void get_refr_index_1d ( Workspace ws,
Numeric refr_index_air,
Numeric refr_index_air_group,
const Agenda refr_index_air_agenda,
ConstVectorView  p_grid,
ConstVectorView  refellipsoid,
ConstTensor3View  z_field,
ConstTensor3View  t_field,
ConstTensor4View  vmr_field,
ConstVectorView  f_grid,
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_air_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_index_airOutput: As the WSV with the same name.
refr_index_air_groupOutput: As the WSV with the same name.
refr_index_air_agendaAs the WSV with the same name.
p_gridAs the WSV with the same name.
refellipsoidAs 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.
f_gridAs the WSV with the same name.
rThe radius of the position of interest.
Author
Patrick Eriksson
Date
2003-01-16

Definition at line 184 of file refraction.cc.

References gridpos(), interp(), interpweights(), itw2p(), joker, ConstTensor4View::nbooks(), ns, refr_index_air_agendaExecute(), and Vector::resize().

Referenced by ppath_step_refr_1d(), ppath_stepRefractionBasic(), raytrace_1d_linear_basic(), refr_gradients_1d(), and VectorZtanToZaRefr1D().

◆ get_refr_index_2d()

void get_refr_index_2d ( Workspace ws,
Numeric refr_index_air,
Numeric refr_index_air_group,
const Agenda refr_index_air_agenda,
ConstVectorView  p_grid,
ConstVectorView  lat_grid,
ConstVectorView  refellipsoid,
ConstTensor3View  z_field,
ConstTensor3View  t_field,
ConstTensor4View  vmr_field,
ConstVectorView  f_grid,
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_air_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_index_airOutput: As the WSV with the same name.
refr_index_air_groupOutput: As the WSV with the same name.
refr_index_air_agendaAs the WSV with the same name.
p_gridAs the WSV with the same name.
lat_gridAs the WSV with the same name.
refellipsoidAs 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.
f_gridAs the WSV with the same name.
rThe radius of the position of interest.
latThe latitude of the position of interest.
Author
Patrick Eriksson
Date
2003-01-14

Definition at line 264 of file refraction.cc.

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

Referenced by ppath_stepRefractionBasic(), raytrace_2d_linear_basic(), and refr_gradients_2d().

◆ get_refr_index_3d()

void get_refr_index_3d ( Workspace ws,
Numeric refr_index_air,
Numeric refr_index_air_group,
const Agenda refr_index_air_agenda,
ConstVectorView  p_grid,
ConstVectorView  lat_grid,
ConstVectorView  lon_grid,
ConstVectorView  refellipsoid,
ConstTensor3View  z_field,
ConstTensor3View  t_field,
ConstTensor4View  vmr_field,
ConstVectorView  f_grid,
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_air_agenda to determine the refractive index for the given point.

Parameters
wsCurrent Workspace
refr_index_airOutput: As the WSV with the same name.
refr_index_air_groupOutput: As the WSV with the same name.
refr_index_air_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.
refellipsoidAs 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.
f_gridAs 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 357 of file refraction.cc.

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

Referenced by ppath_stepRefractionBasic(), raytrace_3d_linear_basic(), and refr_gradients_3d().

◆ refr_gradients_1d()

void refr_gradients_1d ( Workspace ws,
Numeric refr_index_air,
Numeric refr_index_air_group,
Numeric dndr,
const Agenda refr_index_air_agenda,
ConstVectorView  p_grid,
ConstVectorView  refellipsoid,
ConstTensor3View  z_field,
ConstTensor3View  t_field,
ConstTensor4View  vmr_field,
ConstVectorView  f_grid,
const Numeric r 
)

refr_gradients_1d

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.

Parameters
wsCurrent Workspace
refr_index_airOutput: As the WSV with the same name.
refr_index_air_groupOutput: As the WSV with the same name.
dndrOutput: Radial gradient of refractive index.
refr_index_air_agendaAs the WSV with the same name.
p_gridAs the WSV with the same name.
refellipsoidAs 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.
f_gridAs the WSV with the same name.
rThe radius of the position of interest.
latThe latitude of the position of interest.
Author
Patrick Eriksson
Date
2003-01-14

Definition at line 454 of file refraction.cc.

References get_refr_index_1d().

Referenced by raytrace_1d_linear_basic().

◆ refr_gradients_2d()

void refr_gradients_2d ( Workspace ws,
Numeric refr_index_air,
Numeric refr_index_air_group,
Numeric dndr,
Numeric dndlat,
const Agenda refr_index_air_agenda,
ConstVectorView  p_grid,
ConstVectorView  lat_grid,
ConstVectorView  refellipsoid,
ConstTensor3View  z_field,
ConstTensor3View  t_field,
ConstTensor4View  vmr_field,
ConstVectorView  f_grid,
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.

Parameters
wsCurrent Workspace
refr_index_airOutput: As the WSV with the same name.
refr_index_air_groupOutput: As the WSV with the same name.
dndrOutput: Radial gradient of refractive index.
dndlatOutput: Latitude gradient of refractive index.
refr_index_air_agendaAs the WSV with the same name.
p_gridAs the WSV with the same name.
lat_gridAs the WSV with the same name.
refellipsoidAs 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.
f_gridAs the WSV with the same name.
rThe radius of the position of interest.
latThe latitude of the position of interest.
Author
Patrick Eriksson
Date
2003-01-14

Definition at line 531 of file refraction.cc.

References get_refr_index_2d().

Referenced by raytrace_2d_linear_basic().

◆ refr_gradients_3d()

void refr_gradients_3d ( Workspace ws,
Numeric refr_index_air,
Numeric refr_index_air_group,
Numeric dndr,
Numeric dndlat,
Numeric dndlon,
const Agenda refr_index_air_agenda,
ConstVectorView  p_grid,
ConstVectorView  lat_grid,
ConstVectorView  lon_grid,
ConstVectorView  refellipsoid,
ConstTensor3View  z_field,
ConstTensor3View  t_field,
ConstTensor4View  vmr_field,
ConstVectorView  f_grid,
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_index_airOutput: As the WSV with the same name.
refr_index_air_groupOutput: 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.
refr_index_air_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.
refellipsoidAs 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.
f_gridAs 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 637 of file refraction.cc.

References get_refr_index_3d().

Referenced by raytrace_3d_linear_basic().