Don’t know if anyone out there can help me since the rNOMADS package is so 
specialized and it requires a download of wgrib2 software from NOAA – National 
Oceanographic and Atmospheric Administration.
tion.

Is there a way to grab multiple forecasts with the ReadGrib function (page 33 
of the documentation).  I’m trying to get  the rapid update forecast (RAP) on 
the 13 km scale


    RAPOut <- CrawlModels(abbrev = "rap", depth = 1)

    RAPParameters <- ParseModelPage(RAPOut[1])

    RAPPred <- RAPParameters$pred[grep("t12z", RAPParameters$pred)]#12 Zulu is 
5 am in Phoenix

    RAPPred2 <- RAPPred[grep(c("awp130"), RAPPred)] #picks out 13 km forecasts

    RAPPred3 <- RAPPred2[grep(c("pgrbf00|pgrbf01"),RAPPred2)] #Forecast for 12 
Z and 13 Z          

    levels <- c("800 mb")
    variables <- c("TMP")             

    RAPInfo <- GribGrab(RAPOut[1], RAPPred3, levels, variables) #Everything 
works perfectly to this point.  The two requested forecasts are listed below.  
As you can see [[1]] is for 12 Z and [[2]] is for 13 Z – red in 18 point type.

RAPInfo
[[1]]
[[1]]$file.name
[1] 
"C:\\Users\\Owner\\Documents\\Ballooning\\WeatherBriefing/rap.t12z.awp130pgrbf00.grib2.grb"

[[1]]$url
[1] 
"https://nomads.ncep.noaa.gov/cgi-bin/filter_rap.pl?file=rap.t12z.awp130pgrbf00.grib2&lev_800_mb=on&var_TMP=on&dir=%2Frap.20200728";


[[2]]
[[2]]$file.name
[1] 
"C:\\Users\\Owner\\Documents\\Ballooning\\WeatherBriefing/rap.t12z.awp130pgrbf01.grib2.grb"

[[2]]$url
[1] 
"https://nomads.ncep.noaa.gov/cgi-bin/filter_rap.pl?file=rap.t12z.awp130pgrbf01.grib2&lev_800_mb=on&var_TMP=on&dir=%2Frap.20200728";


RAPData <- ReadGrib(RAPInfo[[2]]$file.name, levels, variables,
                    domain=c(-113.20,-112.78,33.70,33.40), #an area west of 
Phoenix
                    domain.type="latlon",
                    file.type="grib2")

I can grab the 12 Z forecast with [[1]] in the first line above or the 13 Z 
forecast if I enter [[2]].  But is there a way to get both at t he same time?

Thanks,
Philip Heinrich
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to