[Rnomads-user] SubsetNOMADS

tmpwanadoo tmpwanadoo at wanadoo.fr
Thu Mar 2 19:58:42 CET 2017


Hi Danny,

Would it be possible to have a script example showing how to use 
SubsetNOMADS to extract the forecast for a specific time when 
downloading a grib with several times ?

Below is an example of the many things a tried !

Best

Sébastien


 > #Get data from NOMADS real time server
 > tmp.data <- DODSGrab(latest.model, latest.model.run, variables, time, 
lon, lat, display.url=FALSE)#, verbose=TRUE)
 > names(tmp.data)
[1] "model.run.date" "forecast.date"  "variables" "levels"         
"ensembles"      "lon" "lat"            "value"
[9] "request.url"
 > summary(tmp.data)
                Length Class   Mode
model.run.date 129444 -none-  character
forecast.date  129444 POSIXct numeric
variables      129444 -none-  character
levels         129444 -none-  character
ensembles      129444 -none-  character
lon            129444 -none-  numeric
lat            129444 -none-  numeric
value          129444 -none-  numeric
request.url         1 -none-  character

 > unique(tmp.data$forecast.date)
[1] "2017-03-02 13:00:00 CET" "2017-03-02 16:00:00 CET" "2017-03-02 
19:00:00 CET" "2017-03-02 22:00:00 CET"

 > unique(tmp.data$variables)
[1] "ugrd10m"

 > unique(tmp.data$model.run.date)
[1] "20170302gfs_0p25_12z"

 > unique(tmp.data$request.url)
[1] 
"http://nomads.ncep.noaa.gov:9090/dods/gfs_0p25/gfs20170302/gfs_0p25_12z.ascii?ugrd10m[0:3][120:280][520:720]"

 > SubsetNOMADS(model.data=tmp.data, forecast.date=c("2017-03-01 
07:00:00 CET"))
$model.run.date
character(0)

$forecast.date
character(0)

$variables
character(0)

$levels
character(0)

$ensembles
character(0)

$lon
numeric(0)

$lat
numeric(0)

$value
numeric(0)

$request.url
[1] 
"http://nomads.ncep.noaa.gov:9090/dods/gfs_0p25/gfs20170302/gfs_0p25_12z.ascii?ugrd10m[0:3][120:280][520:720]"


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus



More information about the Rnomads-user mailing list