gnssrefl.refraction module
written in python from from original TU Vienna codes for GMF
- gnssrefl.refraction.Equivalent_Angle_Corr_NITE(Hr_apr, e_T, N_ant, ztd_ant, mpf_tot, dmpf_de_tot)
This function computes the “equvilent” angular correction to apply the NITE formula on the true elevation angle ele_eqv = e_T + dele
Equation (24) in Peng (2023), DOI: 10.1109/TGRS.2023.3332422
The variable substitude method can be found in Strandberg, J. (2020). New methods and applications for interferometric GNSS reflectometry. Chalmers Tekniska Hogskola (Sweden).
- Parameters:
Hr_apr (float) – approximate a-priori reflector height, in meters
e_T (float) – satellite true elevation angle in degree
N_ant (float) – atmospheric refractivity at the GNSS antenna, in ppm
ztd_ant (float) – zenith total delay at the antenna, in meters
mpf_tot (float) – total mapping function for this elevation angle
dmpf_de_tot (float) – derivative of the mapping function over elevation angle
- Returns:
dele – equvilent angular correction in degrees
- Return type:
float
- gnssrefl.refraction.Equivalent_Angle_Corr_mpf(ele, mpf_tot, N0, Hr_apr)
This function computes the “equvilent” angular correction to apply the tropospheric delay calculated with the mapping function.
See: Williams, S. D. P., & Nievinski, F. G. (2017). Tropospheric delays in ground‐based GNSS multipath reflectometry—Experimental evidence from coastal sites. Journal of Geophysical Research: Solid Earth, 122(3), 2310-2327.
Strandberg, J. (2020). New methods and applications for interferometric GNSS reflectometry. Chalmers Tekniska Hogskola (Sweden).
- Parameters:
ele (float) – true elevation angle in degrees
mpf_tot (float) – total mapping function, units?
N0 (float) – refractivity at GNSS antenna in part-per-million
Hr_apr (float) – approximate reflector height in meters
- Returns:
dele – equvilent angular correction in degrees
- Return type:
float
- gnssrefl.refraction.Hv_Hr_ratio(Hr, Re, e_A)
This function computes the ratio between the “vertical height difference between the antenna and the refection point” and the “reflector height”, assuming a sperical reflector (ocean)
See equation (23) in Peng (2023), DOI: 10.1109/TGRS.2023.3332422
- Parameters:
Hr (float) – approximate reflector height in meters (height difference between the antenna and the reflecting surface)
Re (float) – (Gaussian) radius of the Earth in meters
e_A (float) – apparent elevation angle at the antenna, in degree
- Returns:
the_ratio – ratio, allways bigger than 1
- Return type:
float
- gnssrefl.refraction.N_layer(N_antenna, Hr)
Computes average refractivity of the top (antenna) and bottom (reflecting surface) of this layer
See Equation (14) in Peng (2023), DOI: 10.1109/TGRS.2023.3332422
- Parameters:
N_antenna (float) – refractivity at the antenna in ppm
Hr (float) – reflector height in meters (height difference between the antenna and the reflecting surface)
- Returns:
Nl – average refractivity in ppm in this layer
- Return type:
float
- gnssrefl.refraction.Ulich_Bending_Angle(ele, N0, lsp, p, T, ttime, sat)
Ulich, B. L. “Millimeter wave radio telescopes: Gain and pointing characteristics.” (1981)
Author: 20220629, fengpeng
Modified by KL to use numpy so I can use arrays. I do not know why all these extra input parameters are here.
- Parameters:
ele (numpy array of floats) – true elevation angle, degrees
N0 (float) – antenna refractivity in ppm
lsp (dict) –
p (float) – pressure, units?
T (float) – temperature, units?
ttime –
sat –
- Returns:
De – corrected elevation angles, deg
- Return type:
numpy array of floats
- gnssrefl.refraction.Ulich_Bending_Angle_original(ele, N0)
This function computes the atmospheric bending angle with the Ulich equation.
Equation (18) in Ulich, B. L. (1981). Millimeter wave radio telescopes: Gain and pointing characteristics. International Journal of Infrared and Millimeter Waves, 2, 293-310.
- Parameters:
ele (float) – true elevation angle in degrees
N0 (float) – refractivity in part-per-million
- Returns:
dele – bending angle (angular difference between apparent and true elevation angle), in degrees
- Return type:
float
- gnssrefl.refraction.asknewet(e, Tm, lambda_val)
Determines the zenith wet delay based on the equation 22 by Askne and Nordius (1987)
Askne and Nordius, Estimation of tropospheric delay for microwaves from surface weather data, Radio Science, Vol 22(3): 379-386, 1987.
Source: Peng Feng
- Parameters:
e (float) – water vapor pressure in hPa
Tm (float) – mean temperature in Kelvin
lambda_val (float) – water vapor lapse rate (see definition in Askne and Nordius 1987)
- Returns:
zwd – zenith wet delay in meter
- Return type:
float
- gnssrefl.refraction.corr_el_angles(el_deg, press, temp)
Corrects elevation angles for refraction using simple angle bending model
- Parameters:
el_deg (numpy array of floats) – elevation angles in degrees
press (float) – pressure in hPa
temp (float) – temperature in degrees C
- Returns:
corr_el_deg – corrected elevation angles (in degrees)
- Return type:
numpy array of floats
- gnssrefl.refraction.dH_curve(Hr, Re, e_A)
Computes vertical displacement of the reflection point vs. that of a “planar reflection”
See Equation (7) in Peng (2023), DOI: 10.1109/TGRS.2023.3332422
- Parameters:
Hr (float) – reflector height in meters (height difference between the antenna and the reflecting surface)
Re (float) – (Gaussian) radius of the Earth in meters
e_A (float) – apparent elevation angle at the antenna, in degrees
- Returns:
dH – vertial displacement of the reflection point in meters
- Return type:
float
- gnssrefl.refraction.dmpf_dh(ele, dhgt)
Station height correction of the hydrostatic mapping function (Niell, 1996) This is translated from Johannes Boehm’s vmf1_ht.f Fortran code
Niell, A. E. (1996). Global mapping functions for the atmosphere delay at radio wavelengths. Journal of geophysical research: solid earth, 101(B2), 3227-3246.
Boehm, J., Werl, B., & Schuh, H. (2006). Troposphere mapping functions for GPS and very long baseline interferometry from European Centre for Medium‐Range Weather Forecasts operational analysis data. JGR: Solid Earth, 111(B2).
- Parameters:
ele (float) – true elevation angle in degree
dhgt (float) – height difference in meters. In GNSS-IR, this is reflector height; in applying mapping function grid products, this is the height difference between the antenna and the grid point height
- Returns:
ht_corr – correction to the hydrostatic mapping function (vmf1h= vmf1h + ht_corr)
- Return type:
float
- gnssrefl.refraction.gmf_deriv(dmjd, dlat, dlon, dhgt, zd)
This subroutine determines the Global Mapping Functions GMF and derivative. Translated from https://vmf.geo.tuwien.ac.at/codes/gmf_deriv.f by Peng Feng in March, 2023.
Johannes Boehm, 2005 August 30
ref 2006 Aug. 14: derivatives (U. Hugentobler) ref 2006 Aug. 14: recursions for Legendre polynomials (O. Montenbruck) ref 2011 Jul. 21: latitude -> ellipsoidal latitude
- Parameters:
dmjd (float) – modified julian date
dlat (float) – ellipsoidal latitude in radians
dlon (float) – longitude in radians
dhgt (float) – height in meters
zd (float) – zenith distance in radians ??? ( is this really what you mean?? KL: I suspect it is the zenith angle … in radians
- Returns:
gmfh(2) (float) – hydrostatic mapping function and derivative wrt z
gmfw(2) (float) – wet mapping function and derivative wrt z
- gnssrefl.refraction.gpt2_1w(station, dmjd, dlat, dlon, hell, it)
- Parameters:
station (str) – station name
dmjd (float) – modified Julian date (scalar, only one epoch per call is possible)
dlat (float) – ellipsoidal latitude in radians [-pi/2:+pi/2]
dlon (float) – longitude in radians [-pi:pi] or [0:2pi]
hell (float) – ellipsoidal height in m
it (integer) –
case 1: no time variation but static quantities
case 0: with time variation (annual and semiannual terms)
- Returns:
p (float) – pressure in hPa
T (float) – temperature in degrees Celsius
dT (float) – temperature lapse rate in degrees per km
Tm (float) – mean temperature of the water vapor in degrees Kelvin
e (float) – water vapor pressure in hPa
ah (float) – hydrostatic mapping function coefficient at zero height (VMF1)
aw (float) – wet mapping function coefficient (VMF1)
la (float) – water vapor decrease factor
undu (float) – geoid undulation in m
- gnssrefl.refraction.look_for_pickle_file()
latest attempt to solve the dilemma of the pickle file needed for the refraction correction
- Returns:
foundit (bool) – whether pickle file found
fullpname (str) – full path to the pickle file
- gnssrefl.refraction.mpf_tot(gmf_h, gmf_w, zhd, zwd)
Finds the total mapping function by weighting the hydrostatic and wet mapping function with the zenith hydrostatic and wet delay.
Author: Peng Feng
- Parameters:
gmf_h (float) – hydrostatic mapping function
gmf_w (float) – wet mapping function
zhd (float) – zenith hydrostatic delay in meters
zwd (float) – zenith wet delay in meters
- Returns:
mpf_tot1 – total mapping function
- Return type:
float
- gnssrefl.refraction.readWrite_gpt2_1w(xdir, station, site_lat, site_lon)
makes a grid for refraction correction
- Parameters:
xdir (str) – directory for output
station (str) – station name, 4 ch
lat (float) – latitude in degrees
lon (float) – longitude in degrees
- gnssrefl.refraction.read_4by5(station, dlat, dlon, hell)
reads existing grid points for a given location
- Parameters:
station (string) – name of station
dlat (float) – latitude in degrees
dlon (float) – longitude in degrees
hell (float) – ellipsoidal height in meters
- Returns:
pgrid (4 by 5 numpy array) – pressure in hPa
Tgrid (4 by 5 numpy array) – temperature in C
Qgrid (4 by 5 numpy array)
dTgrid (4 by 5 numpy array) – temperature lapse rate in degrees per km
u (4 by 1 numpy array) – geoid undulation in meters
Hs (4 by 1 numpy array)
ahgrid (4 by 5 numpy array) – hydrostatic mapping function coefficient at zero height (VMF1)
awgrid (4 by 5 numpy array) – wet mapping function coefficient (VMF1)
lagrid (4 by 5 numpy array)
Tmgrid (4 by 5 numpy array) – mean temperature of the water vapor in degrees Kelvin
requires that an environment variable exists for REFL_CODE
- gnssrefl.refraction.refrc_Rueger(drypress, vpress, temp)
Obtains refractivity index suitable for GNSS-IR
Rueger, Jean M. “Refractive index formulae for radio waves.” Proceedings of the FIG XXII International Congress, Washington, DC, USA. Vol. 113. 2002.
- Parameters:
drypress (float) – dry pressure hPa
vpress (float) – vapor pressure in hPa
temp (float) – temperature in Kelvin
- Returns:
ref – [Ntotal, Nhydro, Nwet], which are total, hydrostatic and wet refractivity in ppm
- Return type:
list of floats
- gnssrefl.refraction.saastam2(press, lat, height)
This function computes the Zenith Hydrostatic Delay using the Saastamoinen model with updated refractivity equation from Rueger (2002)
Saastamoinen, J. (1972). Atmospheric corrections for the troposphere and stratosphere in radio ranging of satellites. The Use of Artificial Satellites for Geodesy, Geophysics Monograph Service, 15, 274-251.
Feng, P., Li, F., Yan, J., Zhang, F., & Barriot, J. P. (2020). Assessment of the accuracy of the Saastamoinen model and VMF1/VMF3 mapping functions with respect to ray-tracing from radiosonde data in the framework of GNSS meteorology. Remote Sensing, 12(20), 3337.
- Parameters:
press (float) – atmospheric total pressure in hPa
lat (float) – latitude of the station, degrees
height (float) – ellipsoidal height of the station in meters
- Returns:
zhd – zenith hystostatic delay in meters
- Return type:
float
- gnssrefl.refraction.sita_Earth(Hr, e_A)
This function computes the angular separation of the antenna and the reflection point in earth surface, view from earth center
See Equation (7) in Peng (2023), DOI: 10.1109/TGRS.2023.3332422
- Parameters:
Hr (float) – reflector height in meters (height difference between the antenna and the reflecting surface)
e_A (float) – apparent elevation angle at the antenna, in degrees
- Returns:
sita_E – earth center angle in degrees
- Return type:
float
- gnssrefl.refraction.sita_Satellite(Hr, e_A)
This function computes the angle formed by the antenna-satellite line-of-sight and the reflection point-satellite LoS
Equation (8) in Peng (2023), DOI: 10.1109/TGRS.2023.3332422
- Parameters:
Hr (float) – reflector height in meters (height difference between the antenna and the reflecting surface)
e_A (float) – apparent elevation angle at the antenna, in degree
- Returns:
sita_S – satellite angle in degrees (small for MEO satellites)
- Return type:
float