gnssrefl.rinex2snr_cl module
command line tool for the rinex2snr module it translates rinex files and makes SNR files
compile the fortran first f2py -c -m gnssrefl.gpssnr gnssrefl/gpssnr.f
- gnssrefl.rinex2snr_cl.main()
- gnssrefl.rinex2snr_cl.parse_arguments()
- gnssrefl.rinex2snr_cl.rinex2snr(station: str, year: int, doy: int, snr: int = 66, orb: str = None, rate: str = 'low', dec: int = 0, fortran: bool = False, nolook: bool = False, archive: str = 'all', doy_end: int = None, year_end: int = None, overwrite: bool = False, translator: str = 'hybrid', samplerate: int = 30, stream: str = 'R', mk: bool = False, weekly: bool = False, strip: bool = False, screenstats: bool = False, gzip: bool = True)
rinex2snr translates RINEX files to a new file in SNR format. This function will also fetch orbit files for you. RINEX obs files are provided by the user or fetched from a long list of archives. Although RINEX 3 is supported, the default is RINEX 2.11 files
Default orbits are GPS only until day of year 137, 2021 when rapid GFZ orbits became available. If you still want to use the nav message, i.e. GPS only, you can request it.
bkg no longer a boolean input - must be specified with archive name, i.e. bkg-igs or bkg-euref
For the nolook option :
If you have the RINEX 2.11 file), the file was originally required to be normal RINEX (ends in o) or gzipped normal RINEX. It can be in the local directory or in the $REFL_CODE/YYYY/rinex directory for your station. It now allows RINEX 2.11 files that are Hatanaka compressed, Hatanaka compressed + unix compressed, for the local directory. It also allows Hatanaka compressed in the REFL_CODE directory. Beyond that, you can try the -mk T option which searches other places.
For RINEX 3 files, I believe it checks for crx.gz, rnx, or rnx.gz endings in the local directory. It does NOT check the $REFL_CODE/YYYY/rinex directory. If someone would like to add that capability, that would be great.
FAQ: what is rate anad srate? rate is telling the code which folder to use because archives always have files in different directories depending on sample rate. srate is for RINEX 3 files only because RINEX 3 has the sample rate on the filename itself (not just the directory).
What is the stream parameter? This is for RINEX 3 only. File types are either S or R. I believe S stands for streamed.
- RINEX3 30 second archives supported
bev, bkg-euref, bkg-igs, cddis, epn, ga, gfz, nrcan, sonel
- RINEX3 15 sec archives
bfg, unavco - you may need to specify 15 second sample rate
- RINEX3 1 sec
bkg-igs, bkg-euref, cddis, ignes (spain), maybe nrcan
Examples
- rinex2snr mchn 2018 15 -archive sopac
station mchn, year/doy 2022/15,sopac archive using GPS orbits
- rinex2snr mchn 2022 15 -archive sopac
station mchn, year/doy 2022/15,sopac archive using multi-GNSS GFZ orbits
- rinex2snr mchn 2022 15 -archive sopac -orb gps
station mchn, year/doy 2022/15,sopac archive using GPS orbits
- rinex2snr mchn 2022 15 -orb rapid -archive sopac
now explicitly using rapid multi-GNSS orbits
- rinex2snr mchn 2022 15 -orb rapid -archive sopac
now explicitly using final multi-GNSS orbits (includes Beidou)
- rinex2snr mchn 2022 15 -orb rapid -archive sopac -overwrite T
have an SNR file, but you want to make a new one
- rinex2snr p041 2022 15 -orb rapid -rate high -archive unavco
now using high-rate data from unavco and multi-GNSS orbits
- rinex2snr p041 2022 15 -nolook T
using your own data stored as p0410150.22o in the working directory your RINEX o file may also be gzipped. I believe Hatanaka compressed is also allowed.
- rinex2snr 940050 2021 31 -archive jp
GSI archive in Japan - password required. Station names are six characters
- rinex2snr mchl00aus 2022 15 -orb rapid -archive ga
30 sec RINEX3 data for mchl00aus and Geoscience Australia
- rinex2snr mchl00aus 2022 15 -orb rapid -samplerate 30 -nolook T
This should analyze a RINEX 3 file if it exists in your local working directory. it will not search anywhere else for the file. It should be a 30 sec, 1 day file for this example
- rinex2snr mchl00aus 2022 15 -orb rapid -samplerate 1 -nolook T -stream S
This should analyze a RINEX 3 file if it exists in your local working directory. it will not search anywhere else for the file. It should be a 1 sec, 1 day file for this example with S being set for streaming in the filename.
- rinex2snr warn00deu 2023 87 -dec 5 -rate high -samplerate 1 -orb rapid -archive bkg-igs -stream S
1 sec data for warn00deu, 1 sec decimated to 5 sec, multi-GNSS, bkg IGS archive, streamed
- rinex2snr tgho 2019 1 -doy_end 365 -archive nz
example for multiday SNR file creation
- Parameters:
station (str) – 4 or 9 character ID of the station, preferably lowercase
year (int) – Year
doy (int) – Day of year
snr (int, optional) –
SNR format. This tells the code what elevation angles to save data for. Will be the snr file ending. value options:
66 (default) : saves all data with elevation angles less than 30 degrees
99 : saves all data with elevation angles between 5 and 30 degrees
88 : saves all data
50 : saves all data with elevation angles less than 10 degrees
orb (str, optional) –
Which orbit files to download. Value options:
gps (default) : will use GPS broadcast orbit
gps+glos : will use JAXA orbits which have GPS and Glonass (usually available in 48 hours)
gnss : use GFZ final orbits, which is multi-GNSS (available in 3-4 days?), but from CDDIS archive
gnss-gfz : GFZ orbits downloaded from GFZ instead of CDDIS, but do they include beidou?. Same as gnss3?
nav : GPS broadcast, perfectly adequate for reflectometry. Same as gps.
igs : IGS precise, GPS only
igr : IGS rapid, GPS only
jax : JAXA, GPS + Glonass, within a few days, missing block III GPS satellites
gbm : GFZ Potsdam, multi-GNSS, not rapid, via CDDIS
grg : French group, GPS, Galileo and Glonass, not rapid
esa : ESA, multi-GNSS
gfr : GFZ rapid, GPS, Galileo and Glonass, since May 17 2021
rapid : GFZ rapid, multi-GNSS
ultra: GFZ ultra-rapid, multi-GNSS
rate (str, optional) –
The data rate. Rather than numerical value, this tells the code which folder to use value options:
low (default) : standard rate data. Usually 30 sec, but sometimes 15 sec.
high : high-rate data
dec (int, optional) – Decimation rate. 0 is default.
fortran (bool, optional) – Whether to use fortran to translate the rinex files.
nolook (bool, optional) – tells the code to retrieve RINEX files from your local machine
archive (str, optional) –
Select which archive to get the files from. Default is all value options:
bev : (Austria Federal Office of Metrology and Surveying)
bfg : (German Agency for water research, only Rinex 3, requires password)
bkg-igs : EUREF for (German Agency for Cartography and Geodesy)
bkg-euref : IGS for (German Agency for Cartography and Geodesy)
cddis : (NASA’s Archive of Space Geodesy Data)
ga : (Geoscience Australia)
gfz : (GFZ, Germany)
ignes : IGN in Spain, only RINEX 3
jp : (GSI, Japan requires password)
jeff : (My good friend Professor Freymueller!)
ngs : (National Geodetic Survey, USA)
nrcan : (Natural Resources Canada)
nz : (GNS, New Zealand)
sonel : (?)
sopac : (Scripps Orbit and Permanent Array Center)
special : (set aside files at UNAVCO for reflectometry users)
unavco : (University Navstar Consortium, now Earthscope)
all : (searches sopac, unavco, and sonel )
doy_end (int, optional) – end day of year to be downloaded.
year_end (int, optional) – end year.
overwrite (bool, optional) – Make a new SNR file even if one already exists (overwrite existing file). Default is False.
translator (str, optional) –
hybrid (default) : uses a combination of python and fortran to translate the files.
fortran : uses fortran to translate (requires the fortran translator executable)
python : uses python to translate. (Warning: This can be very slow)
srate (int, optional) – sample rate for RINEX 3 only. Default is 30.
mk (bool, optional) – Default is False. Use True for uppercase station names and for the non-standard file structure preferred by some users. Look at the function the_makan_option in rinex2snr.py for more information. The general requirement is that your RINEX 2.11 file should be normal RINEX or gzipped normal RINEX. This flag allows access to Hatanaka/compressed files stored locally and in $REFL_CODE/YYYY/snr/ssss where YYYY is the year and ssss is station name
weekly (bool, optional) – Takes 1 out of every 7 days in the doy-doy_end range (one file per week) - used to save cpu time. Default is False.
strip (bool, optional) – Reduces observables since the translator does not allow more than 25 Default is False.
screenstats (bool, optional) – if true, prints more information to the screen
gzip (bool, optional) – default is true, SNR files are gzipped after creation.