gnssrefl.vwc_cl module
- gnssrefl.vwc_cl.main()
- gnssrefl.vwc_cl.parse_arguments()
- gnssrefl.vwc_cl.vwc(station: str, year: int, year_end: int | None = None, fr: str | None = None, plt: bool = True, screenstats: bool = False, min_req_pts_track: int | None = None, polyorder: int = -99, minvalperday: int | None = None, bin_hours: int | None = None, minvalperbin: int | None = None, bin_offset: int | None = None, snow_filter: bool = False, subdir: str | None = None, tmin: float | None = None, tmax: float | None = None, warning_value: float | None = None, auto_removal: bool = False, hires_figs: bool = False, advanced: bool = False, vegetation_model: int | None = None, save_tracks: bool = False, extension: str | None = None, level_doys: list = [], skip_leveling: bool = False)
The goal of this code is to compute volumetric water content (VWC) from GNSS-IR phase estimates. It concatenates previously computed phase results, makes plots for the four geographic quadrants, bins the data (into daily or subdaily time bins), applies vegetation correction, and converts to volumetric water content.
The code supports two vegetation correction models: Model 1 (simple, default) uses amplitude-based correction suitable for sites with bare soil or sparse vegetation. Model 2 (advanced) uses the Chew et al. (2016) GPS Solutions (DOI: 10.1007/s10291-015-0462-4) algorithm, and should be used for sites with dense or tall vegetation.
Code now allows inputs (minvalperday, tmin, and tmax) to be stored in the gnssir analysis json file. To avoid confusion, in the json they are called vwc_minvalperday, vwc_min_soil_texture, and vwc_max_soil_texture. These values can also be overwritten on the command line …
Code now allows doy values for level nodes to be set in the json (variable name vwc_level_doys) and it is a list, i.e. [170,230] would be the input for summer months in NOAM. This can be overriden by the command line -level_inputs 170 230. If no information is provided by the user, it has defaults based on the station being in the northern or southern hemisphere. However, this is a hack, and I have no idea if it works well for Australia, e.g. It worked well for PBO H2O in the semi-arid western U.S. Those values are defined in set_parameters in phase_functions.py if you want to take a look If you want a time period that crosses the year boundary (i.e. you want all of december and january), you can input level_doys of 335 and 31, and the code will process accordingly.
Examples
- vwc p038 2017
one year for station p038
- vwc p038 2015 -year_end 2017
three years of analysis for station p038
- vwc p038 2015 -year_end 2017 -warning_value 6
warns you about tracks with phase RMS greater than 6 degrees rms
- vwc p038 2015 -year_end 2017 -warning_value 6 -auto_removal T
makes new list of tracks based on your new warning value
- Parameters:
station (str) – 4 character ID of the station
year (int) – full Year
year_end (int, optional) – last year for analysis
fr (int, optional) – GNSS frequency. Currently only supports l2c. Default is 20 (l2c)
plt (bool, optional) – Whether to produce plots to the screen. Default is True
min_req_pts_track (int, optional) – how many points needed to keep a satellite track default is now set to 150 (was previously 50). This is an issue when a satellite has recently been launched. You don’t really have enough information to trust it for several months (and in some cases longer) this can now be set in the gnssir_input created analysis json (vwc_min_req_pts_track) As of version 3.10.9 it is set to 100.
polyorder (int) – polynomial order used for leveling. Usually the code picks it but this allows to users to override. Default is -99 which means let the code decide
minvalperday (integer) – how many phase measurements are needed for each daily measurement default is 10
snow_filter (bool) – whether you want to attempt to remove points contaminated by snow default is False
subdir (str) – DEPRECATED: use -extension instead. This parameter is ignored.
tmin (float) – minimum soil texture value, default 0.05. This can now be set in the gnssir_input json (with vwc_ added)
tmax (float) – maximum soil texture value, default 0.5. This can now be set in the gnssir_input json (with vwc_ added)
warning_value (float) – screen warning about bad tracks (phase rms, in degrees). default is 5.5
auto_removal (bool, optional) – whether to automatically remove tracks that hit your bad track threshold default value is false
hires_figs (bool, optional) – whether to make eps instead of png files default value is false
advanced (bool, optional) – shorthand for vegetation_model=2
vegetation_model (int, optional) – vegetation correction model: 1=simple (default), 2=advanced (Chew et al. 2016) can be set in gnssir analysis JSON as vwc_vegetation_model
save_tracks (bool, optional) – save individual track VWC data to files (advanced model only)
extension (str) – extension used when you made the json analysis file
level_doys (list) – pair of day of years that are used to define time period for “leveling” default is north american summer
skip_leveling (bool, optional) – internal use only - skip leveling and return percentage units for unified leveling in vwc_hourly. Default is False.
- Returns:
Daily phase results in a file at $REFL_CODE/Files/<station>/<station>_phase.txt – with columns: Year DOY Ph Phsig NormA MM DD
VWC results in a file at $$REFL_CODE/Files/<station>/<station>_vwc.txt – with columns: FracYr Year DOY VWC Month Day