コード例 #1
0
def bipm_utc_download(prefixdir=""):
    """
    Download Circular-T data from BIPM website.
    
    placed in UTC/ subdirectory
    """
    print "bipm_utc_download start ", datetime.datetime.utcnow()
    current_dir = os.getcwd()
    localdir = current_dir + "/UTC/"
    # Connection information
    server = "ftp2.bipm.org" #'5.144.141.242'
    username = '' # don't need a password for circular-T
    password = ''

    # directories and files to download
    utc_files= [ ["pub/tai/publication/utclab/","utc-mike"],
                 ["pub/tai/publication/utclab/","utc-usno"],
                 ["pub/tai/publication/utclab/","utc-ptb"],
                 ["pub/tai/publication/utclab/","utc-nict"],
                 ["pub/tai/publication/utclab/","utc-nist"],
                 ["pub/tai/publication/utclab/","utc-sp"],
                 ["pub/tai/publication/utclab/","utc-op"],
                 ["pub/tai/publication/utclab/","utc-npl"] ]

    for (remotedir, remotefile) in utc_files:
        ftp_tools.ftp_download( server, username, password, remotedir, remotefile, localdir, overwrite=True)

    
    print "bipm_utc_download Done ", datetime.datetime.utcnow()
コード例 #2
0
ファイル: bipm_ftp.py プロジェクト: aewallin/ppp-tools
def bipm_utc_download(prefixdir=""):
    """
    Download Circular-T data from BIPM website.
    
    placed in UTC/ subdirectory
    """
    print "bipm_utc_download start ", datetime.datetime.utcnow()
    current_dir = os.getcwd()
    localdir = current_dir + "/UTC/"
    # Connection information
    server = "ftp2.bipm.org" #'5.144.141.242'
    username = '' # don't need a password for circular-T
    password = ''

    # directories and files to download
    utc_files= [ ["pub/tai/publication/utclab/","utc-mike"],
                 ["pub/tai/publication/utclab/","utc-usno"],
                 ["pub/tai/publication/utclab/","utc-ptb"],
                 ["pub/tai/publication/utclab/","utc-nict"],
                 ["pub/tai/publication/utclab/","utc-nist"],
                 ["pub/tai/publication/utclab/","utc-sp"],
                 ["pub/tai/publication/utclab/","utc-op"],
                 ["pub/tai/publication/utclab/","utc-npl"] ]

    for (remotedir, remotefile) in utc_files:
        ftp_tools.ftp_download( server, username, password, remotedir, remotefile, localdir, overwrite=True)

    
    print "bipm_utc_download Done ", datetime.datetime.utcnow()
コード例 #3
0
def bipm_utcr_download():
    """
    Download UTC-rapid datafile from BIPM
    place result in the UTCr/ subdirectory
    """
    print "bipm_utcR_download start ", datetime.datetime.utcnow()
    
    current_dir = os.getcwd() # the current directory
    localdir = current_dir + "/UTCr/"
    server = "ftp2.bipm.org"   #  IP number '5.144.141.242'
    username = ''
    password = ''

    sys.stdout.flush()
    # list of directories and files we want
    utcr_files = [ ["pub/tai/publication/utcrlab/","utcr-op"],
                   ["pub/tai/publication/utcrlab/","utcr-ptb"],
                   ["pub/tai/publication/utcrlab/","utcr-nict"],
                   ["pub/tai/publication/utcrlab/","utcr-nist"],
                   ["pub/tai/publication/utcrlab/","utcr-sp"],
                   ["pub/tai/publication/utcrlab/","utcr-usno"],
                   ["pub/tai/publication/utcrlab/","utcr-mike"] ]
    
    for (remotedir, remotefile) in utcr_files:
        ftp_tools.ftp_download( server, username, password, remotedir, remotefile, localdir, overwrite=True)

    print "bipm_utcR_download Done ", datetime.datetime.utcnow()
コード例 #4
0
ファイル: bipm_ftp.py プロジェクト: aewallin/ppp-tools
def bipm_utcr_download():
    """
    Download UTC-rapid datafile from BIPM
    place result in the UTCr/ subdirectory
    """
    print "bipm_utcR_download start ", datetime.datetime.utcnow()
    
    current_dir = os.getcwd() # the current directory
    localdir = current_dir + "/UTCr/"
    server = "ftp2.bipm.org"   #  IP number '5.144.141.242'
    username = ''
    password = ''

    sys.stdout.flush()
    # list of directories and files we want
    utcr_files = [ ["pub/tai/publication/utcrlab/","utcr-op"],
                   ["pub/tai/publication/utcrlab/","utcr-ptb"],
                   ["pub/tai/publication/utcrlab/","utcr-nict"],
                   ["pub/tai/publication/utcrlab/","utcr-nist"],
                   ["pub/tai/publication/utcrlab/","utcr-sp"],
                   ["pub/tai/publication/utcrlab/","utcr-usno"],
                   ["pub/tai/publication/utcrlab/","utcr-mike"] ]
    
    for (remotedir, remotefile) in utcr_files:
        ftp_tools.ftp_download( server, username, password, remotedir, remotefile, localdir, overwrite=True)

    print "bipm_utcR_download Done ", datetime.datetime.utcnow()
コード例 #5
0
def cddis_brdc_file(dt, prefixdir=""):
  server =   "cddis.gsfc.nasa.gov"
  remotedir = "gnss/data/daily/%d/brdc" % dt.year
  doy = dt.timetuple().tm_yday
  f = "brdc%03d0.%dn.Z" % (doy, dt.year-2000)
  #YYYY/brdc/brdcDDD0.YYn.Z
  localdir = prefixdir + "/stations/brdc/"
  ftp_tools.check_dir(localdir)
  
  ftp_tools.ftp_download( server, username="******", password="", remotedir=remotedir, remotefile=f, localdir=localdir)
  return localdir+f
コード例 #6
0
ファイル: igs_ftp.py プロジェクト: pzgnss/ppp-tools
def CODE_download( server, username, password, remotedir, files, localdir):
    print "CODE_download start ", datetime.datetime.now()
    ftp_tools.check_dir(localdir)

    for f in files:
        local_file = localdir+f
        ftp_tools.ftp_download( server, username, password, remotedir, f, localdir)
    print "CODE_download Done ", datetime.datetime.now()
    sys.stdout.flush()
    output=[]
    for f in files:
        output.append( localdir+f)
    return output # returns list of files: [CLK, EPH, ERP]
コード例 #7
0
ファイル: UTCStation.py プロジェクト: ahmetoluc/ppp-tools
 def get_rinex(self,dt):
     """
         Retrieve RINEX file using ftp
     """
     current_dir = os.getcwd()
     localdir = current_dir + '/stations/' + self.name + '/'
     return ftp_tools.ftp_download( self.ftp_server, self.ftp_username, self.ftp_password,
                      self.ftp_dir, self.rinex_filename(dt), localdir)
コード例 #8
0
ファイル: station.py プロジェクト: aewallin/ppp-tools
 def get_rinex(self,dt):
     """
         Retrieve RINEX file using ftp
     """
     current_dir = os.getcwd()
     localdir = current_dir + '/stations/' + self.name + '/'
     ftp_tools.check_dir(localdir) # create directory if it doesn't exist
     return ftp_tools.ftp_download( self.ftp_server, self.ftp_username, self.ftp_password,
                      self.ftp_dir, self.rinex_filename(dt), localdir)
コード例 #9
0
 def get_rinex(self, dt):
     """
         Retrieve RINEX file using ftp
     """
     current_dir = os.getcwd()
     localdir = current_dir + '/stations/' + self.name + '/'
     return ftp_tools.ftp_download(self.ftp_server, self.ftp_username,
                                   self.ftp_password, self.ftp_dir,
                                   self.rinex_filename(dt), localdir)
コード例 #10
0
 def get_rinex(self, dt):
     """
         Retrieve RINEX file using ftp
     """
     current_dir = os.getcwd()
     localdir = current_dir + '/stations/' + self.name + '/'
     ftp_tools.check_dir(localdir)  # create directory if it doesn't exist
     return ftp_tools.ftp_download(self.ftp_server, self.ftp_username,
                                   self.ftp_password, self.ftp_dir,
                                   self.rinex_filename(dt), localdir)