gnssrefl.rinex2snr_cl module

command line tool for the rinex2snr module it translates RINEX 2.11 and 3 files (computing azimuth and elevation angle) and stores these along with time and satellite number and SNR observations into SNR files

gnssrefl.rinex2snr_cl.main()
gnssrefl.rinex2snr_cl.parse_arguments()
gnssrefl.rinex2snr_cl.process_jobs_multi(index, args, datelist, error_queue)

runs the rinex2snr queue

Parameters:
  • index (int) – which job to run

  • args (dict) – dictionary of parameters that are sent to run_rinex2snr

  • datelist (dict) – start and stop dates in MJD

  • error_queue – not sure how to describe this

gnssrefl.rinex2snr_cl.rinex2snr(station: str, year: int, doy: int, snr: str = None, orb: str = None, rate: str = 'low', dec: int = 0, 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, monthly: bool = False, par: int = None, timeout: int = 0, extension: str = '', debug: bool = False)

Note: rinex2snr means rinex TO snr. It is not a tool that is only meant for version 2 rinex files.

rinex2snr translates RINEX version 2.11 and 3+ files to a new file in the SNR format. This function will also fetch orbit files for you. RINEX obs files are provided either by the user or fetched from a long list of archives. Although RINEX 3 is supported, the default is RINEX 2.11 files. To tell the code you are using a RINEX 3 file, you should use a RINEX 3 station name, i.e. the 9 character version.

June 29, 2025 - tried to update to new folders for GFZ orbit products …

New feature as of September 2024: various parameters can be stored in the station.json (created by gnssir_input). This is really just for convenience. Parameters are dec, snr, stream, samplerate, archive, and orb. Why did I add these? because I kept forgetting to set them on the command line! Right now you can add them to the json by hand, but most people will prefer to change them by using gnssir_input. Official documentation for these new inputs is defined in the gnssir_input documentation.

Parallel processing is now available. Set -par to a number <= 10. Some archives have been set to be non-compliant with this feature. Please look in the first few lines of the rinex2snr code to see the names of these archives.

In general, you should not make RINEX 2.11 files with a huge number of observables. Especially do not put Doppler data in your file. If you have more than 25 observables (multi-GNSS) or 20 (GPS only), the code should send an error message to a log. The location of that log is printed to the screen. If you don’t want to remake your RINEX files, you can try the -strip T option, which I believe uses gfzrnx to strip out everything except for SNR data.

Real-time users should use ultra, wum2, or wum.

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 by setting orb to nav or gps.

bkg no longer a boolean input - it must be specified with archive name, i.e. bkg-igs or bkg-euref

To analyze your own data you have to use the nolook option :

If you have the RINEX 2.11 file, the file can be in the local directory which is where you are running the code or it can be in $REFL_CODE/YYYY/rinex/ssss, where ssss is the lowercase directory name for your station. nolook now allows regular RINEX 2.11 obs files (ends in o) as well as as Hatanaka compressed (ends in d). The o or d file can be gzipped. The code also allows d files to be unix compressed which is how archives used to save these files.

If you are running the Docker, it can be a bit confusing to figure out where to put the files. Please see the discussion in the Docker installation section, as this is my best effort to help you with this.

Beyond that, you can try the -mk T option which searches other places, i.e. $REFL_CODE/rinex/ etc. I do not recommend that you use this option, but it is there. In general, you should use lowercase file names for RINEX 2.11 files.

If you have a RINEX3 file, you have to use the same naming convention as used by GNSS archive facilities. This means everything is capitalized except for the ending. The station name has 9 characters and various other parameters which can be quite confusing. Please see this page for the details.

https://gnssrefl.readthedocs.io/en/latest/pages/file_structure.html

I believe the code allows crx.gz, rnx, or rnx.gz endings in the local directory. It also checks the $REFL_CODE/YYYY/rinex directory for the crx.gz and rnx versions.

FAQ: what is rate and srate and why do you have both? rate tells 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). A RINEX 2.11 filename will not tell you which sample rate it is.

What is the stream parameter? It is a naming convention that is only used by RINEX 3 people. The allowed file types are 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, gnet, nz

RINEX3 15 sec archives

bfg, unavco - You likely need to specify a 15 second sample rate. bfg requires a password.

RINEX3 1 sec

bkg-igs, bkg-euref, cddis, ignes (spain), maybe nrcan?? , gnet

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 -nolook T

works if the RINEX 3 crx.gz or rnx files are in $REFL_CODE/2022/rinex/mchl

rinex2snr mchl00aus 2022 15 -orb rapid -nolook T -strip T

Removes non-SNR data before translating.

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 -rate high

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, respectively for RINEX 2.11 and RINEX 3, preferably lowercase I believe 6 characters are allowed for GSI (Japan), but I have not tested it in a while

  • 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 < 2021) : will use GPS broadcast orbit

    rapid (default > 2021) : GFZ rapid, multi-GNSS. After 2025/168 the default is gnss.

    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 2-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

    wum : Wuhan ultra-rapid, from CDDIS

    wum2 : Wuhan ultra-rapid, from Wuhan FTP

    ultra: first tries GFZ ultra-rapid then Wuhan, 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 which means do nothing.

  • nolook (bool, optional) – tells the code to retrieve RINEX files from your local machine. default is False

  • 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 : IGS data at the BKG (German Agency for Cartography and Geodesy)

    bkg-euref : EUREF data at the BKG (German Agency for Cartography and Geodesy)

    cddis : (NASA’s Archive of Space Geodesy Data)

    epn : Belgium

    ga : (Geoscience Australia)

    gnet : Greenland Network, RINEX3 only

    gfz : (GFZ, Germany)

    ignes : IGN in Spain, only RINEX 3

    jp : (GSI, Japan requires password)

    jeff : (My good friend Professor Freymueller!)

    kadaster: (Dutch Geodetic data)

    ngs : (National Geodetic Survey, USA)

    ngs-hourly : (merged hourly files from National Geodetic Survey, USA)

    nrcan : (Natural Resources Canada)

    nz : (GNS, New Zealand)

    sonel : (GLOSS archive for GNSS data)

    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 and unavco)

  • 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 to exist)

    python : uses python to translate. (Warning: This can be very slow)

  • samplerate (int, optional) – sample rate for RINEX 3 files only. Default is 30.

  • stream (str) – RINEX 3 files only, R (default) or S

  • 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/rinex/ssss where YYYY is the year and ssss is station name

  • weekly (bool, optional, deprecated) – This originally took 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 in a RINEX 2.11 file. 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.

  • monthly (bool, optional) – default is false. snr files created every 30 days instead of every day This does not work anymore

  • par (int, optional) – default is None. parallel processing, valid up to values of 10 for some archives.

  • timeout (int, optional) – This is a non-standard option for timeouts when using highrate downloads and requests. I added this parameter to let you set the timeout value, but it has not been implemented everywhere. right now just the BKG

  • extension (str, optional) – parameter that tells the code you want to use parameters saved in the gnssir json for that extension parameter. otherwise it uses station.json. It is a convenience for saving things like stream, samplerate, archive, orb, and snr settings that previously had to be input on the command line

  • debug (bool, optional) – run without task queue - important for debugging.

gnssrefl.rinex2snr_cl.z_process_jobs(mjd1, mjd2, args)

queue for non parallel processing

Parameters:
  • mjd1 (int) – starting ModJulDate for processing

  • mjd2 (int) – ending ModJulDate for processing

  • args (dict) – inputs to run_rinex2snr