ARTS  2.2.66
refraction.cc File Reference

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

#include <cmath>
#include "auto_md.h"
#include "complex.h"
#include "interpolation.h"
#include "geodetic.h"
#include "refraction.h"
#include "special_interp.h"
Include dependency graph for refraction.cc:

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 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 More...
 
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 More...
 
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)
 
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_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 More...
 
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 More...
 

Variables

const Numeric DEG2RAD
 
const Numeric RAD2DEG
 
const Numeric TEMP_0_C
 

Detailed Description

Functions releated to calculation of refractive index.

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

Definition in file refraction.cc.

Function Documentation

◆ 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 78 of file refraction.cc.

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

Referenced by complex_refr_indexWaterLiebe93(), and iyCloudRadar().

◆ 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 141 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 221 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 315 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 412 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 477 of file refraction.cc.

References DEG2RAD, and 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 557 of file refraction.cc.

References DEG2RAD, and get_refr_index_3d().

Referenced by raytrace_3d_linear_basic().

Variable Documentation

◆ DEG2RAD

const Numeric DEG2RAD

◆ RAD2DEG

const Numeric RAD2DEG

◆ TEMP_0_C

const Numeric TEMP_0_C

Referenced by complex_n_water_liebe93().