gnssrefl.daily_avg_cl module

gnssrefl.daily_avg_cl.daily_avg(station: str, medfilter: float, ReqTracks: int, txtfile: str = None, plt: bool = True, extension: str = '', year1: int = 2005, year2: int = 2030, fr: int = 0, csv: bool = False, azim1: int = 0, azim2: int = 360, test: bool = False, subdir: str = None, plot_limits: bool = False)

The goal of this code is to consolidate individual RH results into a single file consisting of daily averaged RH without outliers. These daily average values are nominally associated with the time of 12 hours UTC.

There are two required parameters - medfilter and ReqTracks. These are quality control parameters. They are applied in two steps. The code first calculates the median value each day - and keeps only the RH that are within medfilter (meters) of this median value. If there are at least “ReqTracks” number of RH left after that step, a daily average is computed for that day.

As of version 3.1.3 users may store the required input parameters to daily_avg in the json used by gnssir. The names of these parameters are: daily_avg_reqtracks and daily_avg_medfilter. For those making a new json, the parameters will be set to None if you don’t choose a value on the command line. You can also hand edit or add it. This would be helpful in not having to rerun gnssir_input and risk losing some of your other specialized selections.

If you are unfamiliar with what a median filter does in this code, please see https://gnssrefl.readthedocs.io/en/latest/pages/README_dailyavg.html

The outputs are stored in $REFL_CODE/Files/station by default. If you want to specify a new subdirectory, I believe that is an allowed option. You can also specify specific years to analyze and apply fairly simple azimuth constraints.

In summary, three text files are created

  1. individual RH values with no QC applied

  2. individual RH values with QC applied

  3. daily average RH

Examples

daily_avg p041 0.25 10

consolidates results for p041 with median filter of 0.25 meters and at least 10 solutions per day

daily_avg p041 0.25 10 -plot_limits T

the same as above but with plot_limits to help you see where the median filter is applied

daily_avg p041 0.25 10 -year1 2015 -year2 2020

consolidates results for p041 with median filter of 0.25 meters and at least 10 solutions per day and restricts it to years between 2015 and 2020

daily_avg p041 0.25 10 -year1 2015 -year2 2020 -azim1 0 -azim2 180

consolidates results for p041 with median filter of 0.25 meters and at least 10 solutions per day and restricts it to years between 2015 and 2020 and azimuths between 0 and 180 degrees

daily_avg p041 0.25 10 -extension NV

consolidates results which were created using the extension NV when you ran gnssir.

Parameters:
  • station (str) – 4 ch station name, generally lowercase

  • medfilter (float) – Median filter for daily reflector height (m). Start with 0.25 for surfaces where you expect no significant subdaily change (snow/lakes).

  • ReqTracks (int) – Required number of daily satellite tracks to save the daily average value.

  • txtfile (str, optional) – Use this parameter to set your own output filename. default is to let the code choose.

  • plt (bool, optional) – whether to print plots to screen or not. default is True.

  • extension (str, optional) – extension for solution names. default is ‘’. (empty string)

  • year1 (int, optional) – restrict to years starting with. default is 2005.

  • year2 (int, optional) – restrict to years ending with. default is 2030.

  • fr (int, optional) –

    GNSS frequency. If none input, all are used. Value options:

    1 : GPS L1

    2 : GPS L2

    20 : GPS L2C

    5 : GPS L5

    101 : GLONASS L1

    102 : GLONASS L2

    201 : GALILEO E1

    205 : GALILEO E5a

    206 : GALILEO E6

    207 : GALILEO E5b

    208 : GALILEO E5

    302 : BEIDOU B1

    306 : BEIDOU B3

    307 : BEIDOU B2

  • csv (boolean, optional) – Whether you want csv instead of a plain text file. default is False.

  • azim1 (int, optional) – minimum azimuth, degrees note: should be modified to allow negative azimuth

  • azim2 (int, optional) – maximum azimuth, degrees

  • test (bool, optional) – not sure what this does

  • subdir (str, optional) – non-default subdirectory for Files output

  • plot_limits (bool, optional) – adds the median value and median filter limits to the plot. default is False

gnssrefl.daily_avg_cl.main()
gnssrefl.daily_avg_cl.parse_arguments()