You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have done a little exploration and this script as follows. The issue I found is you are requesting ESRI float files but it would be better to use the NetCDF files (but I could not see them in that FTP site).
from here you can either continue to try to use the ESRI files or find the nc files and rewrite to download the nc file and read that using the R package ncdf4
library(raster)
get_data<-function(startdate,enddate){
url="ftp://ftp.eoc.csiro.au/pub/awap/Australia_historical/Run26j/FWPT/{startdate}_{enddate}.FWPT.run26j.flt.zip"
url=gsub("{startdate}",startdate,url,fixed=TRUE)
url=gsub("{enddate}",enddate,url,fixed=TRUE)
download.file(url, sprintf("%s_%s%s.zip","FWPT",startdate,enddate) ,mode="wb")
}
get_data_range<-function(startdate,enddate){
thisdate<-startdate
while (thisdate<=enddate){
get_data(format(as.POSIXct(thisdate),"%Y%m%d"),format(as.POSIXct(thisdate),"%Y%m%d"))
thisdate<-thisdate+1
}
}
###################
get_data("20130101","20131231")
#Decompress
startdate <- "20130101"
enddate <- "20131231"
infile <- sprintf("%s_%s%s.zip","FWPT",startdate,enddate)
unzip(infile)
```
# this shows that we have downloaded flt (ESRI Float) data but it would be much better to access the nc (NetCDF).
#
The text was updated successfully, but these errors were encountered:
I have done a little exploration and this script as follows. The issue I found is you are requesting ESRI float files but it would be better to use the NetCDF files (but I could not see them in that FTP site).
from here you can either continue to try to use the ESRI files or find the nc files and rewrite to download the nc file and read that using the R package ncdf4
The text was updated successfully, but these errors were encountered: