==============================================================================
RNX2GTEX ver. 1.1.4 (June 18, 2014) User Manual
===============================================================================

Version Information
  RNX2GTEX for Linux/Unix 1.1.4

Supported format
  This application supports the following data formats.
  Input data: RINEX(Receiver INdependent EXchange format) version 2.
  Output data: GTEX(GNSS-TEC EXchange format) version 1.0.

How to install RNX2GTEX
  1. Download the source file (tar+gz), gRNX2GTEX.tgzh, from the website:
     http://seg-web.nict.go.jp/GPS/DRAWING-TEC/software/RNX2GTEX.tgz
  2. Extract source files
     % tar zxvf RNX2GTEX.tgz
  3. Change directory
     % cd RNX2GTEX
  4. Edit "RNX2GTEX.sh"
    4.1. RINEX_DIR: Root directory name of the RINEX files(*). 
                    e.g., "/data/RINEX"
    4.2. TEC_DIR: Root directory name of the GTEX files . 
                    e.g., "/data/TEC" 
    4.3. ORBIT_DIR: Root directory name of the satellite orbit files.
                    e.g., "/data/ORBIT"
    4.4. work_DIR: Temporary working directory.
                    e.g., "/data/tmp"
    4.5. EXEC_DIR: Directory where the program is.
                    e.g., "/work/RNX2GTEX"
    4.6. ORBIT_TYPE: ORBIT data type to use convert.
                    Only "igs"(final) or "igr"(rapid) are selectable.
    4.7. GROUP: User group of converted GTEX files.

   (*) The directory tree for the RINEX files is assumed to be in the 
    following manner:
     e.g., RINEX_DIR/YEAR/DOY/
          YEAR: Four digit year
          DOY : Three digit day of year
     -------------------------
     [ROOT_DIRECTORY]
       |-...
       |-[2012]
       |-[2013]
          |-...
          |-[005]
          |-[006]
             |-abcd0060.13o.gz
             |-...
     -------------------------

5. Create GTEX (TEC_DIR), working (work_DIR), and orbit (ORBIT_DIR) 
   directories if necessary.
   % mkdir <TEC_DIR> <ORBIT_DIR> <work_DIR>

6. Compile the source files
   % make
   If the compilation is carried out successfully, "RNX2GTEX" is created.

7. FTP setting
   To download GPS orbit data from IGS FTP server, FTP client software 
   is needed.

   7.1. Installation FTP (if necessary)
   If FTP client is not installed, install FTP client software.
   e.g., Scientific Linux
     % su
     % yum install ftp

   7.2. FTP default setting
     For FTP automatic anonymous FTP login, ".netrc" file should contain
     "igscb.jpl.nasa.gov".


How to use the RNX2GTEX for Linux/Unix
  RNX2GTEX for Linux/Unix converts a daily RINEX file to the corresponding 
  daily GTEX file. The orbit file (*.igs or *.igr) for the corresponding 
  day is required for the conversion. Date-setting and file-overwriting 
  options are available as follows.


Date-setting options:
  [no option] <YEAR> <DOY>
    To convert the RINEX files of the specified day (ex. 2013 032), 
    type as below:
      % RNX2GTEX.sh 2013 032
  
  -r <Number>
    This option is used to convert the RINEX files of <Number> days 
    before the current day. If you want to convert the RINEX files of 
    yesterday, type as below:
      % RNX2GTEX.sh -r 1

  -b <YEAR1> <DOY1> <YEAR2> <DOY2>
    This option is used to convert the RINEX files from <DOY1> of <YEAR1> 
    to <DOY2> of <YEAR2> as below:
      % RNX2GTEX.sh -b 2013 365 2014 003

File-overwriting option:
  -o
    To overwrite a GTEX file if the GTEX file already exists in TEC_DIR
    directory. This option is used with any date-setting option as below:
      % RNX2GTEX.sh 2013 365 -o
      % RNX2GTEX.sh -r 1 -o
      % RNX2GTEX.sh -b 2013 365 2014 003 -o


References:
  RINEX version 2.11 format
  http://igscb.jpl.nasa.gov/igscb/data/format/rinex211.txt
  
  GTEX version 1.0 format
  (World Meteorological Organization)
  http://www.wmo.int/pages/prog/sat/meetings/documents/ICTSW-4_Doc_08-02-2_GTEX.pdf

===============================================================================
History:
RNX2GTEX V1.1.4
14 June, 2015 M.Nishioka
   Modified: definition of Path_Angle (Define.h)
     Definition of Path Angle was corrected (bad elevation and azimuth were fixed).

RNX2GTEX V1.1.3
12 Dec, 2014 M.Nihioka
    Write_TEC.f was modified to change the output format for the zenith 
    angle; f6..2->f5.2
    Write_Header.f was modified to output "v1.1.3" instead of "v1.1.2"

RNX2GTEX V1.1.2
22 Jul, 2014 SEC.
    Modified: To read RINEX file (Read_RINEX.f)
      If contain 3 or more lines as "TYPES OF OBSERV".
      If contain 25 or more observes at epoch header.
    Modified: Parameter file (Define.h)
      Set defaults of observation interval as 1 sec.
    Modified: GTEX output (Write_TEC.f)
      If GPS orbit data does not exist, it does not output GTEX file.
    Modified: Main routine (main.f)
      If application cannot calculate TEC value, it does not output GTEX file.
    Modified: RNX2GTEX execution script (RNX2GTEX.sh)
      Added date setting options as relative, and range designation.
      Added GTEX overwrite option, and not to overwrite as default.
    Modified: Several routine (*.f)
      Added error messages when occuring error.

RNX2GTEX V1.1
13 Feb, 2014  M. Nishioka
    Path_Position.f were modified to obtain correct zenith and azimuthal 
    angles.

RNX2GTEX V1.0
2 Feb, 2014  T. Tsugawa
    Read_GPS_Orbits.f, Path_Position.f, and gpscal.f were added to 
    calculate satellite zenith and azimuth angles.
    Some of other programs were modified to obtain a combination of
    RINEX observables for derivation TEC.

RNX2GTEX V0.1
11 Oct, 2013  T. Tsugawa
    Program name and some description of header part (Write_Header.f)
    were modified.

RNX2TEC V.3.1
January, 2012 Nishioka
    *"Read_RINED.f" Change to accept any sampling rate and sampling rate is printed out.
    *"Write_Header.f" Ignore "location.all"
     If no location in RINEX file, create TEC file without location information.
    *Change directory structure from YYYY/DOY_YYYY to YYY/DOY

RNX2TEC oldr than V.3.0
January, 2005 Tsugawa
    "Index_of_data" is added to grab time for three days
December, 2003 Nishioka
    "Read_RINEX.f", for the case of many (>12) satellite,
    change to read two lines of time strings
Decemver, 2003 Nishioka
    "Read_RINEX.f", for identify GPS satellite
    statement of sat_type "G" is included

RNX2TEC V2.1 

July, 2002 Tsugawa
September, 2001 Saito-A
    "Read_RINEX.f"
    Compatible to the RINEX files that contain more than 5 observables.
    Ignore "comments" in the middle of the Data
    
April 17, 2001 Saito-A
    "Write_Header.f" Latitude, Longitude and Altitude information is added
        in Header sector
