New updates to the rNOMADS package and big changes in the GFS model
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
I rolled out a big update to the rNOMADS package in R about two weeks ago. Now, the list of real time weather, ocean, and sea ice models available through rNOMADS updates automatically by scraping the NOMADS web site. This way, changes in model inventories will be instantly reflected in rNOMADS without the need for a new version release.
Keep abreast of future updates to rNOMADS by subscribing to the mailing list here. Feel free to ask for help or make comments on this list as well.
In other news, NOAA just updated the Global Forecast System to provide 0.25 x 0.25 degree output – doubling the resolution of the model! Check out this crystal clear views of surface temperatures across the planet (source code below the image):
library(rNOMADS)
library(GEOmap)
#Get dates of model output
model.urls <- GetDODSDates(“gfs_0p25″)
#Find day of most recent model run
latest.model <- tail(model.urls$url, 1)
#Find most recent model run on that day
model.runs <- GetDODSModelRuns(latest.model)
#Get the most recent model (excluding analysis only)
latest.model.run <- tail(model.runs$model.run[which(grepl(“z$”, model.runs$model.run))], 1)
#Define model domain
time <- c(0,0) #Analysis model
lon <- c(0, 1439) #All longitude points
lat <- c(0, 720) #All latitude points
variables <- c(“tmp2m”) #Temperature 2 m above ground
#Get data from NOMADS real time server
tmp.data <- DODSGrab(latest.model, latest.model.run,
variables, time, lon, lat, display.url = FALSE)
#Reformat it
tmp.grid <- ModelGrid(tmp.data, c(0.25, 0.25), “latlon”)
#Define color scale
colormap <- rev(rainbow(500, start = 0 , end = 5/6))
#Plot it
image(x = tmp.grid$x, y = sort(tmp.grid$y), z = tmp.grid$z[1,1,,], col = colormap,
xlab = “Longitude”, ylab = “Latitude”,
main = paste(“World Temperature at Ground Level:”,
tmp.grid$fcst.date))
plotGEOmap(coastmap, border = “black”, add = TRUE,
MAPcol = NA)
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.