gnssrefl.gnssir_input module

gnssrefl.gnssir_input.make_gnssir_input(station: str, lat: float = 0, lon: float = 0, height: float = 0, e1: float = 5.0, e2: float = 25.0, h1: float = 0.5, h2: float = 8.0, nr1: float = None, nr2: float = None, peak2noise: float = 2.8, ampl: float = 5.0, allfreq: bool = False, l1: bool = False, l2c: bool = False, xyz: bool = False, refraction: bool = True, extension: str = '', ediff: float = 2.0, delTmax: float = 75.0, frlist: list = [], azlist2: list = [0, 360], ellist: list = [], refr_model: int = 1, Hortho: float = None, pele: list = [5, 30], daily_avg_reqtracks: int = None, daily_avg_medfilter: float = None, subdaily_alt_sigma: bool = None, subdaily_ampl: float = None, subdaily_delta_out: float = None, subdaily_knots: int = None, subdaily_sigma: float = None, subdaily_subdir: str = None, subdaily_spline_outlier1: float = None, subdaily_spline_outlier2: float = None)

This new script sets the Lomb Scargle analysis strategy you will use in gnssir. It saves your inputs to a json file which by default is saved in REFL_CODE/<station>.json. This code replaces make_json_input.

This version no longer requires you to have azimuth regions of 90-100 degrees. You can set a single set of azimuths in the command line variable azlist2, i.e. -azlist2 0 270 would accommodate all rising and setting arcs between 0 and 270 degrees. If you have multiple distinct regions, that is also acceptable, i.e. -azlist2 0 150 180 360 would use all azimuths between 0 and 360 except for 150 to 180

Your first azimuth constraint can be negative, i.e. -azlist2 -90 90, is allowed.

Note: you can keep using your old json files - you just need to add this new -azlist2 setting manually.

Latitude, longitude, and height are assumed to be stored in the UNR database. If they are not, you should set them manually.

Originally we had refraction as a boolean, i.e. on or off. This was stored in the gnssir analysis json. The code however, uses an integer 1 (for a simple non-time-varying Bennett correction) and integer 0 for no correction. From version 1.8.4 we begin to implement more refraction models. 1 (and Bennett) will continue to be the default. The “1” is written to the LSP results file so that people can keep track easily of whether they are inadvertently mixing files with different strategies. And that is why it is an integer, because all results in the LSP results files are numbers. Going forward, we are adding a time-varying capability.

Model 1: Bennett, static Model 2: Bennett and time-varying Model 3: Ulich, static Model 4: Ulich, time-varying Model 5: NITE, Feng et al. 2023 DOI: 10.1109/TGRS.2023.3332422

gnssir_input will have a new parameter for the json output, refr_model. If it is not set, i.e. you have an old json, it is assumed to be 1. You can change the refraction model by hand editting the file if you like. And you can certainly test out the impact by using -extension option.


gnssir_input p041

uses only GPS frequencies and all azimuths and the coordinates in the UNR database

gnssir_input p041 -azlist2 0 180 -fr 1 101

uses UNR coordinates, GPS L1 and Glonass L1 frequencies, and azimuths between 0 and 180.

gnssir_input p041 -lat 39.9494 -lon -105.19426 -height 1728.85 -l2c T -e1 5 -e2 15

uses only L2C GPS data between elevation angles of 5 and 15 degrees. user input lat/long/height

gnssir_input p041 -h1 0.5 -h2 10 -e1 5 -e2 25

uses UNR database, only GPS data between elevation angles of 5-25 degrees and reflector heights of 0.5-10 meters

gnssir_input p041 -ediff 1

uses UNR database, only GPS data, default station coordinates, enforces elevation angles to be within 1 degrees of default elevation angle limits (5-25)

gnssir_input sc02 -ellist 5 10 7 12

let’s say you want to compute smaller arcs than just a single set of elevation angles. you can use this to set this up, so instead of 5 and 12, you could set it up to do two arcs, one for 5-10 degrees and the other for 7-12. WARNING: you need to pay attention to QC metrics (amplitude and peak2noise). You likely need to lower them since your periodogram for fewer data will be less robust than with the longer elevation angle region.

  • station (str) – 4 character station ID.

  • lat (float, optional) – latitude in degrees.

  • lon (float, optional) – longitude in degrees.

  • height (float, optional) – ellipsoidal height in meters.

  • e1 (float, optional) – elevation angle lower limit in degrees. default is 5.

  • e2 (float, optional) – elevation angle upper limit in degrees. default is 25.

  • h1 (float, optional) – reflector height lower limit in meters. default is 0.5.

  • h2 (float, optional) – reflector height upper limit in meters. default is 8.

  • nr1 (float, optional) – noise region lower limit for QC in meters. default is None.

  • nr2 (float, optional) – noise region upper limit for QC in meters. default is None.

  • peak2noise (float, optional) – peak to noise ratio used for QC. default is 2.7 (just a starting point for water - should be 3 or 3.5 for snow or soil…)

  • ampl (float, optional) – spectral peak amplitude for QC. default is 6.0 this is receiver and elevation angle region dependent - so you need to change it based on your site

  • allfreq (bool, optional) – True requests all GNSS frequencies. default is False (defaults to use GPS frequencies).

  • l1 (bool, optional) – set to True to use only GPS L1 frequency. default is False.

  • l2c (bool, optional) – set to use only GPS L2C frequency. default is False.

  • xyz (bool, optional) – set to True if using Cartesian coordinates instead of Lat/Long/Ht. default is False.

  • refraction (bool, optional) – set to False to turn off refraction correction. default is True.

  • extension (str, optional) – provide extension name so you can try different strategies. Results will then go into $REFL_CODE/YYYY/results/ssss/extension Default is ‘’

  • ediff (float, optional) – quality control parameter (Degrees) Allowed min/max elevation angle diff from requested min/max elev angle default is 2

  • delTmax (float, optional) – maximum allowed arc length (minutes) default is 75, which can be a bit long for tides

  • frlist (list of integers) – avoids all the booleans - if you know the frequencies, enter them. e.g. 1 2 or 1 20 5 or 1 20 101 102

  • azlist2 (list of floats) – Default is 0 to 360. list of azimuth limits as subquadrants are no longer required.

  • ellist (list of floats) – min and max elevation angles to be used with the azimuth regions you listed, i.e. [5 10 6 11 7 12 8 13] would allow overlapping regions - all five degrees long Default is empty list.

  • refr_model (int) – refraction model. we are keeping this as integer as it is written to a file withonly numbers in it. 1 is the default simple refraction (just correct elevation angles using standard bending models). 0 is no refraction correction. As we add more models, they will receiver their own number.

  • Hortho (float) – station orthometric height, in meters. Currently only used in subdaily. If not provided on the command line, it will use ellipsoidal height and EGM96 to compute.

  • pele (float) – min and max elevation angles in direct signal removal, i.e. 3 40. Default is 5 30.

  • daily_avg_reqtracks (int, optional) – number of tracks required for daily_avg code

  • daily_avg_medfilter (float, optional) – median filter value required for daily_avg code (meters)

  • subdaily_alt_sigma (bool, optional) – use Nievinski sigma definition

  • subdaily_ampl (float, optional) – override the required LSP amplitude

  • subdaily_delta_out (int, optional) – spacing for final subdaily spline output

  • subdaily_knots (int, optional) – number of knots per day for subdaily spline fits

  • subdaily_sigma (float, optional) – how many standard deviations for outliers in subdaily code setting

  • subdaily_subdir (str, optional) – non-standard location for subdaily outputs

  • subdaily_spline_outlier1 (float, optional) – alternate setting for outlier detection in part1

  • subdaily_spline_outlier2 (float, optional) – alternate setting for outlier detection in part2