gnssrefl.refraction module

written in python from from original TU Vienna codes for GMF

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 to use numpy so I can do arrays

currently writes out corrections to a file for testing

Parameters:
  • ele (numpy array of floats) – true elevation angle, degrees

  • N0 (float) – antenna refractivity in ppm

Returns:

De – corrected elevation angle, deg

Return type:

numpy array of floats

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.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.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

Rüeger, 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