gnssrefl.subdaily_cl module
- gnssrefl.subdaily_cl.main()
- gnssrefl.subdaily_cl.parse_arguments()
- gnssrefl.subdaily_cl.subdaily(station: str, year: int, txtfile_part1: str = '', txtfile_part2: str = None, csvfile: bool = False, plt: bool = True, spline_outlier1: float = None, spline_outlier2: float = None, knots: int = 8, sigma: float = 2.5, extension: str = '', rhdot: bool = True, doy1: int = 1, doy2: int = 366, testing: bool = True, ampl: float = 0, h1: float = 0.4, h2: float = 300.0, azim1: int = 0, azim2: int = 360, peak2noise: float = 0, kplt: bool = False, subdir: str = None, delta_out: int = 1800, if_corr: bool = True, knots_test: int = 0, hires_figs: bool = False, apply_rhdot: bool = True, fs: int = 10, alt_sigma: bool = False, gap_min_val: float = 6.0)
Subdaily combines multiple day gnssir solutions and applies relevant corrections. It only works for one year at a time; you can restricts time periods within a year with -doy1 and -doy2
WARNING: this code is meant to be used at sites with tidal signals. If you have a site without it, you should probably use daily_avg instead. If you insist on using this code on such sites (rivers and lakes), you should think about how this code is implemented - it is using splines with 8 knots as the default (i.e. knot every three hours). This is very unlikely to be acceptable for a lake or non-tidal river. You should change the knot setting.
WARNING: this code calculates and applies various corrections. New Reflector Height values are added to the output files as new columns. If you run the code but continue to assume the “good answers” are in column 2, you are essentially not using the code at all.
Examples
- subdaily at01 2023 -plt F
for station at01, all solutions in 2023 but no plots to the screen
- subdaily at01 2023 -doy1 15 -doy2 45
for all solutions in 2023 between days of year 15 through 45
- subdaily at01 2023 -h2 14 -if_corr F
for all solutions in 2023 but with max RH set to 14 meters and interfrequency correction not applied
The code has two sections.
I. Summarize the retrievals (how many retrievals per constellation), identify and remove gross outliers. provide plots to allow a user to evaluate Quality Control parameters. The solutions can further be edited from the command line (i.e. restrict the RH using -h1 and -h2, in meters, or azimuths using -azim1 and -azim2)
This section has the following goals:
removes more outliers based on a spline fit to the RH retrievals
calculates and applies RHdot
removes an interfrequency (IF) bias. All solutions are then relative to GPS L1.
txtfile_part1 is optional input if you want to skip part 1 and use your own file (but in the same format).
txtfile_part2 is optional input to the second part of the code.
- Parameters:
station (str) – 4 character id of the station.
year (int) – full year
txtfile_part1 (str, optional) – input File name.
txtfile_part2 (str, optional) – Input filename for rhdot/spline fitting
csvfile (boolean, optional) – Set to True if you prefer csv to plain txt. default is False.
plt (bool, optional) – To print plots to screen or not. default is TRUE.
spline_outlier1 (float, optional) – Outlier criterion used in first splinefit, before RHdot (m)
spline_outlier2 (float, optional) – Outlier criterion used in second splinefit, after IF & RHdot (meters)
knots (integer, optional) – Knots per day, spline fit only. default is 8.
sigma (float, optional) – Simple sigma outlier criterion (e.g. 1 for 1sigma, 3 for 3sigma) default is 2.5
extension (str, optional) – Solution subdirectory. default is empty string.
rhdot (bool, optional) – Set to True to turn on spline fitting for RHdot correction. default is True.
doy1 (int, optional) – Initial day of year, default is 1.
doy2 (int, optional) – End day of year. Default is 366.
testing (bool, optional) – Set to False for older code. default is now True.
ampl (float, optional) – New amplitude constraint. Default is 0.
azim1 (int, optional) – minimum azimuth. Default is 0.
azim2 (int, optional) – Max azimuth. Default is 360.
h1 (float, optional) – lowest allowed reflector height in meters. Default is 0.4
h2 (float, optional) – highest allowed reflector height in meters. Default is 300
peak2noise (float, optional) – New peak to noise constraint. Default is 0.
kplt (bool, optional) – plot for kristine
subdir (str, optional) – name for output subdirectory in REFL_CODE/Files
delta_out (int, optional) – how frequently - in seconds - you want smooth spline model output written default is 1800 seconds
if_corr (bool, option) – whether you want the inter-frequency removed default is true
hires_figs (bool, optional) – whether high resolution figures are made
apply_rhdot (bool, optional) – whether you want the RH dot correction applied for a lake or river you would not want it to be.
fs (int, optional) – fontsize for Figures. default is 10 for now.
alt_sigma (bool, optional) – whether you want to use Nievinski definition for outlier criterion. in part 1 of the code (the crude outlier detector)
gap_min_val (float, optional) – removes splinefit values from output txt and plot for gaps bigger than this value, in hours