R/JAXAdownloaddaily.R

Defines functions JAXA_download

## so we can load the perl/sh script in the next step

## download JAXA daily file

JAXA_download <-function(date, satellite, UVRtype){
  dir.create("rawdata")
  date<-gsub("-","", date)
      FTP <- paste0("ftp://apollo.eorc.jaxa.jp/pub/JASMES/Global_05km/", UVRtype, "/daily/", substring(date,1,6), "/")
      file<-paste0("MOD", "02SSH_A", date , "Av1_v601_7200_3601_",UVRtype,"__le.gz")
      searchFTP<-paste0(FTP, satellite, "02SSH_A", date, "Av1_v811_7200_3601_",UVRtype,"__le.gz")
      download.file(searchFTP, destfile=paste0(getwd(), "/rawdata/", sub(FTP, "", searchFTP)))
}
markocherrie/uvR documentation built on Nov. 4, 2019, 5:25 p.m.