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.process_jobs(mjd_list, args)

this is not being used - calls should be sent to function above instead

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

runs the rinex2snr queue

  • index (int) – which job to run args : dict dictionary of parameters for 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: int = 66, 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)

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

beta version of parallel processing available in this release. Set -par to a number < 11 Some archives have been set to non-compliant with this feature. Please look in the first few lines of code to see the names of these archives.

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

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

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.

For RINEX 3 files, I believe it checks for 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. It looks like I do not delete the RINEX 3 files (though I do delete the RINEX 2.11 files).

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

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


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

  • 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

    wum : Wuhan ultra-rapid, from CDDIS

    wum2 : Wuhan ultra-rapid, from Wuhan FTP

    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.

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

    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 : (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, 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 to exist)

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

  • srate (int, optional) – sample rate for RINEX 3 files 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 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.

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

  • par (int, optional) – default is NOne. parallel processing, valid up to 10