GetDODSDates | R Documentation |
This function checks the GrADS data server to see what dates and model subsets are available for model specified by ABBREV
GetDODSDates(abbrev, request.sleep=1)
abbrev |
A model abbreviation as specified in |
request.sleep |
Seconds to pause between HTTP requests when scanning model pages - this prevents timeouts. Default |
This function determines which dates are available for download for a particular model through the GrADS - DODS system.
Once the user determines which dates are available, the output of this function can be passed to GetDODSModelRuns
to determine which model runs can be downloaded.
model |
The model that was requested. |
date |
A list of model run dates available for download. |
url |
A list of URLs corresponding to the model run dates. |
Sometimes, sending lots of HTTP requests in rapid succession can cause errors.
If messages resembling "Error: failed to load HTTP resource"
appear, try increasing request.sleep
.
The code will take longer to execute but it will be more likely to finish successfully.
Daniel C. Bowman danny.c.bowman@gmail.com
GetDODSModelRuns
, DODSGrab
#An example for the Global Forecast System 0.5 degree model
#Get the latest model url and date
abbrev <- "gfs_0p50"
## Not run:
urls.out <- GetDODSDates(abbrev)
print(paste("Most recent model run:",tail(urls.out$date, 1)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.