gnssrefl.gnssir_input module
- gnssrefl.gnssir_input.main()
- 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)
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.
- Example of a json file that has both the old and new ways. The arrays within the json file are called azval and azval2.
Refraction
originally we had refraction as a boolean, i.e. on or off. This is stored in the 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
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 it be hand if you like. And you can certainly test out the impact by using -extension option.
Examples
- 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.
- param station:
4 character station ID.
- type station:
str
- param lat:
latitude in degrees.
- type lat:
float, optional
- param lon:
longitude in degrees.
- type lon:
float, optional
- param height:
ellipsoidal height in meters.
- type height:
float, optional
- param e1:
elevation angle lower limit in degrees. default is 5.
- type e1:
float, optional
- param e2:
elevation angle upper limit in degrees. default is 25.
- type e2:
float, optional
- param h1:
reflector height lower limit in meters. default is 0.5.
- type h1:
float, optional
- param h2:
reflector height upper limit in meters. default is 8.
- type h2:
float, optional
- param nr1:
noise region lower limit for QC in meters. default is None.
- type nr1:
float, optional
- param nr2:
noise region upper limit for QC in meters. default is None.
- type nr2:
float, optional
- param peak2noise:
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…)
- type peak2noise:
float, optional
- param ampl:
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
- type ampl:
float, optional
- param allfreq:
True requests all GNSS frequencies. default is False (defaults to use GPS frequencies).
- type allfreq:
bool, optional
- param l1:
set to True to use only GPS L1 frequency. default is False.
- type l1:
bool, optional
- param l2c:
set to use only GPS L2C frequency. default is False.
- type l2c:
bool, optional
- param xyz:
set to True if using Cartesian coordinates instead of Lat/Long/Ht. default is False.
- type xyz:
bool, optional
- param refraction:
set to False to turn off refraction correction. default is True.
- type refraction:
bool, optional
- param extension:
provide extension name so you can try different strategies. Results will then go into $REFL_CODE/YYYY/results/ssss/extension Default is ‘’
- type extension:
str, optional
- param ediff:
quality control parameter (Degrees) Allowed min/max elevation angle diff from requested min/max elev angle default is 2
- type ediff:
float, optional
- param delTmax:
maximum allowed arc length (minutes) default is 75, which can be a bit long for tides
- type delTmax:
float, optional
- param frlist:
avoids all the booleans - if you know the frequencies, enter them. e.g. 1 2 or 1 20 5 or 1 20 101 102
- type frlist:
list of integers
- param azlist2:
Default is 0 to 360. list of azimuth limits as subquadrants are no longer required.
- type azlist2:
list of floats
- param ellist:
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.
- type ellist:
list of floats
- param refr_model:
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.
- type refr_model:
int
- param Hortho:
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.
- type Hortho:
float
- gnssrefl.gnssir_input.parse_arguments()