gnssrefl.vwc_input module
- gnssrefl.vwc_input.define_track_clusters(azimuths, gap_threshold=10)
Define satellite track clusters from observed azimuths.
Groups azimuths into distinct tracks by sorting them on the circle, finding the largest gap (natural break), then splitting at any gap exceeding the threshold. Handles 0/360 wrap.
- Parameters:
azimuths (array-like) – Observed azimuth values in degrees for a single satellite
gap_threshold (float) – Minimum azimuth gap in degrees to split into separate tracks. Default 10.
- Returns:
Each array contains the azimuths belonging to one track.
- Return type:
list of numpy arrays
- gnssrefl.vwc_input.main()
- gnssrefl.vwc_input.parse_arguments()
- gnssrefl.vwc_input.vwc_input(station: str, year: int, fr: str = None, min_tracks: int = 100, minvalperday: int = 10, bin_hours: int = None, minvalperbin: int = 5, bin_offset: int = None, extension: str = '', tmin: float = 0.05, tmax: float = 0.5, warning_value: float = 5.5)
Sets inputs for the estimation of vwc (volumetric water content). Picks up reflector height (RH) results for a given station and year-year end range and computes the RH mean values and writes them to a file. These will be used to compute a consistent set of phase estimates.
Secondarily, it will add vwc input parameters into the json previously created for RH estimates. If nothing is requested here, it will put the defaults in the file. That json file is then used when you run vwc.
Examples
- vwc_input p038 2018
standard usage, station and year inputs
- vwc_input p038 2018 -min_tracks 50
allow fewer values to accept a satellite track default is 100
- Parameters:
station (str) – 4 character ID of the station
year (int) – full year
fr (int, optional) – GPS frequency: 1 (L1), 20 (L2C), 5 (L5). Only L2C is officially supported.
min_tracks (int, optional) – number of minimum daily tracks needed in order to keep that satellite track
minvalperday (int, optional) – how many unique tracks are needed to compute a valid VWC measurement for a given day
extension (str, optional) – strategy extension value (same as used in gnssir, subdaily etc)
tmin (float, optional) – minimum soil moisture value
tmax (float, optional) – maximum soil moisture value
warning_value (float, optional) – for removing low quality satellite tracks when running vwc phase units, degrees
- Returns:
File with columns
index, mean reflector_heights, satellite, average_azimuth, number of reflector heights in average, min azimuth, max azimuth
Saves to $REFL_CODE/input/<station>_phaseRH.txt
Saves four vwc specific parameters to existing $REFL_CODE/input/<station>.json file
vwc_minvalperday, vwc_min_soil_texture, vwc_max_soil_texture, vwc_min_req_pts_track, vwc_warning_value