Skip to content

Commit

Permalink
version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dannycbowman authored and cran-robot committed May 16, 2014
1 parent 8521950 commit 5446b41
Show file tree
Hide file tree
Showing 24 changed files with 828 additions and 346 deletions.
20 changes: 10 additions & 10 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ Package: rNOMADS
Type: Package
Title: An interface to the NOAA Operational Model Archive and
Distribution System
Version: 1.3.0
Date: 2014-03-17
Version: 2.0.0
Date: 2014-05-15
Authors@R: c(person(given="Daniel C.",family="Bowman", role=c("aut", "cre"),
email="daniel.bowman@unc.edu"))
Depends: R (>= 3.0.2)
Depends: R (>= 3.1.0)
Imports: scrapeR (>= 0.1.6), stringr (>= 0.6.2), fields (>= 6.7.6), XML
(>= 3.98.1.1), GEOmap (>= 2.1), MBA
Description: An interface to the National Oceanic and Atmospheric Administration's Operational Model Archive and Distribution System (NOMADS) that allows R users to quickly and efficiently download global and regional weather model data for processing. rNOMADS currently supports 54 models, ranging from global weather data to an altitude of 40 km, to high resolution regional weather models, to wave and sea ice models. It can also retrieve archived NOMADS models. rNOMADS uses an external series of routines called wgrib2 to read real time model data into R; this must be downloaded and installed separately. rNOMADS also offers limited support to reading archived data in GRIB1 format via the wgrib utility, which also must be downloaded and installed separately. Future versions of rNOMADS will have a native data reader.
(>= 3.98.1.1), GEOmap (>= 2.1), MBA, RCurl (>= 1.95-4.1)
Description: An interface to the National Oceanic and Atmospheric Administration's Operational Model Archive and Distribution System (NOMADS) that allows R users to quickly and efficiently download global and regional weather model data for processing. rNOMADS currently supports a variety of models ranging from global weather data to an altitude of 40 km, to high resolution regional weather models, to wave and sea ice models. It can also retrieve archived NOMADS models. rNOMADS can retrieve binary data in GRIB format as well as import ascii data directly into R by interfacing with the GrADS-DODS system.
License: GPL (>= 3)
URL: http://code.google.com/p/bovine-aerospace/ (subversion repository)
http://www.unc.edu/~haksaeng/rNOMADS/rNOMADS_examples.pdf (some
examples)
Packaged: 2014-03-17 18:34:03 UTC; bowman
Author: Daniel C. Bowman [aut, cre]
http://www.unc.edu/~haksaeng/rNOMADS/rNOMADS_dods_examples.pdf
http://www.unc.edu/~haksaeng/rNOMADS/rNOMADS_grib_examples.pdf
Packaged: 2014-05-15 20:29:28 UTC; bowman
Maintainer: Daniel C. Bowman <daniel.bowman@unc.edu>
Author: Daniel C. Bowman [aut, cre]
NeedsCompilation: no
Repository: CRAN
Date/Publication: 2014-03-17 20:36:05
Date/Publication: 2014-05-16 01:26:03
40 changes: 23 additions & 17 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
8c4ca1b8a830e7b29c151810092fa1dd *DESCRIPTION
51f5e7a942ee5075fd4261a7ddbd68e3 *DESCRIPTION
8b54e5a89fbda3af5e077053d40bec76 *NAMESPACE
b50009ef2cc56c7d1bad14831729bed0 *NEWS
ac93b34428aac067fdc392c12d220f37 *R/GetArchiveGrib.R
dcd0720b3c62464ca2bc9447889cd768 *R/GetRealTimeGrib.R
ba7932f404dcae6431101e73585016dc *R/RNomadsTools.R
0ae985afb1a6a8f7af8a911dffb2161f *NEWS
7c5fca27d886b469d97698afa0a9ffe5 *R/GetArchiveGrib.R
67cb23eabd3ceba0e099f14bc6212997 *R/GetDODS.R
cfb79120a31c49156f63e668f7c80428 *R/GetRealTimeGrib.R
324c1ac6081cd0bbf57ea1f0380986c0 *R/Models.R
c1b14e81f53e1417b0cced958805292a *R/RNomadsTools.R
0deae0d6acab221d7826e814acc60a43 *R/ReadGrib.R
70c6eb675cc7409c07bf90e101abeb22 *man/ArchiveGribGrab.Rd
2164ae225fd14611d99250048e54cb86 *man/BuildProfile.Rd
c3db37c6ee117bd69480cd15c7ce8396 *man/CheckNOMADSArchive.Rd
44d744f08fe9734affcc51396855f238 *man/CrawlModels.Rd
4ec36bb6a5f233a38a5dd25dafe698e4 *man/ArchiveGribGrab.Rd
ca122cdc954c5e0fa0977d46cc3c2cbe *man/BuildProfile.Rd
0bdff541e2fbd21d7b2e205fca3e8656 *man/CheckNOMADSArchive.Rd
78a1c39a63cd2c4c757dcecd9c0a5b72 *man/CrawlModels.Rd
04b1c8416d60eadeee49d1028362ac01 *man/DODSGrab.Rd
8e20e8969efe86b8a0a1634f31ba6144 *man/GetClosestGFSForecasts.Rd
57c03683469f2d353a74114092c83aa4 *man/GribGrab.Rd
3e7aeb8e388e3c3e9bd693441e140851 *man/GetDODSDates.Rd
74239adff204237e00f47977bafc0e90 *man/GetDODSModelRunInfo.Rd
a33d3af929c58a20e1e2833cf845dc0b *man/GetDODSModelRuns.Rd
31e0ff92471fc7b998f7d01a0d31ae81 *man/GribGrab.Rd
43004dfb2d645efdba52442e8e94bea1 *man/MagnitudeAzimuth.Rd
a6864f75ec5d7bd091e2de80e85b1eaa *man/ModelGrid.Rd
0e31dc41201c09c3cc466b093af65c21 *man/NOMADSArchiveList.Rd
ed761c567d03cbb8d62b20035466a099 *man/NOMADSRealTimeList.Rd
279fb81a8200494513fce358a350bbbf *man/ParseModelPage.Rd
cc1c63a4baeb4844db1244532442e186 *man/RTModelProfile.Rd
379b58c58374e25e8026a31ae5ef486b *man/ReadGrib.Rd
c1d4c134f5130dc3185053f500d90396 *man/ModelGrid.Rd
df43cf3706870565770577a17e4ec5a1 *man/NOMADSArchiveList.Rd
47cdec1459286f1d5dad62f7580d828e *man/NOMADSRealTimeList.Rd
f0374004ef53afcf22888903501e9cf8 *man/ParseModelPage.Rd
e98115fa5e482eb584fee30cc809abce *man/RTModelProfile.Rd
70c7e1df294b0af53f10694add387ff6 *man/ReadGrib.Rd
6a2249cbb7db7acd1dcfad27a924b3cd *man/SanitizeURL.Rd
d0f6d0412e8764aa61fa837812c61d28 *man/WebCrawler.Rd
f866da8ebf4f0038cf36b7297c265479 *man/rNOMADS-package.Rd
a3110512d1d2e4b02b36460ec980a9a8 *man/rNOMADS-package.Rd
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ A future version of rNOMADS will call this package to remove the necessity of in
1.3-0
Added support for archived model data, and the ability to read in GRIB1 files using the external "wgrib" series of codes.
Also added some nice tools to quickly generate atmospheric profiles and so forth.

2.0-0
Implemented support for the GrADS-DODS data retrieval system.
rNOMADS can now import data directly into R for all operating systems, not just Linux.
Since this is a very major change, I have incremented the version accordingly.
EXISTING USERS SHOULD NOTE THAT MODEL ABBREVIATIONS HAVE CHANGED.
I am sorry for this necessity but I had to conform with the existing NOMADS URL structure.
68 changes: 2 additions & 66 deletions R/GetArchiveGrib.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ArchiveGribGrab <- function(abbrev, model.date, model.run, pred, local.dir = "."
}

#Get model info and set up URL to archive
model.url <- NOMADSArchiveList(abbrev)$url
model.url <- NOMADSArchiveList("grib", abbrev=abbrev)$url
download.url <- paste0(model.url, paste(model.date[1:6], collapse = ""), "/", paste(model.date, collapse = ""), "/")
file.part <- paste0(paste(model.date, collapse = ""), "_", sprintf("%02.f", model.run), "00_", sprintf("%03.f", pred), suffix)

Expand Down Expand Up @@ -101,7 +101,7 @@ CheckNOMADSArchive <- function(abbrev, model.date = NULL) {
# $PRED - What predictions are available
# $FILE.NAME - The grib file with model data for the date, model run, and prediction

model.url <- NOMADSArchiveList(abbrev)$url
model.url <- NOMADSArchiveList("grib", abbrev=abbrev)$url
model.list <- c()
if(is.null(model.date)) { #Check all available dates
#Find out which months are available
Expand Down Expand Up @@ -135,67 +135,3 @@ CheckNOMADSArchive <- function(abbrev, model.date = NULL) {
invisible(available.models)

}
NOMADSArchiveList <- function(abbrev = NULL) {
#Returns a list of model abbreviations for archived models, a short description, and URL for each model offered by the NOMADS server
#If a specific model abbreviation is requested, the abbreviation is checked against the model list.
#If a match is found, information is returned about that model; otherwise an error occurs
#INPUTS
# ABBREV is the model abbreviation that rNOMADS uses to figure out which model you want.
# If NULL, returns information on all models
#OUTPUTS
# MODEL.LIST - a list of model metadata with elements
# $ABBREV - the abbrevation used to call the model in rNOMADS
# $NAME - the name of the model
# $URL - the location of the model on the NOMADS website

abbrevs <- c(
"ruc20",
"ruc13",
"nam-nrt",
"gfs-nrt1.0",
"gfs-nrt0.5",
"rap-nrt20",
"rap-nrt13",
"gfs-anl",
"ruc-anl",
"nam-anl"
)

names <- c(
"Rapid Update Cycle 20 km grid",
"Rapid Update Cycle 13 km grid",
"North American Mesoscale, Near Real Time",
"Global Forecast System, Near Real Time, 1 degree grid",
"Global Forecast System, Near Real Time, 0.5 degree grid",
"Rapid Refresh Weather Prediction System - Near Real Time, 20 km grid",
"Rapid Refresh Weather Prediction System - Near Real Time, 13 km grid",
"Global Forecast System, Analysis",
"Rapid Update Cycle, Analysis",
"North American Mesoscale, Analysis"
)

urls <- c(
"http://nomads.ncdc.noaa.gov/data/ruc/",
"http://nomads.ncdc.noaa.gov/data/ruc13",
"http://nomads.ncdc.noaa.gov/data/meso-eta-hi/",
"http://nomads.ncdc.noaa.gov/data/gfs-avn-hi/",
"http://nomads.ncdc.noaa.gov/data/gfs4/",
"http://nomads.ncdc.noaa.gov/data/rap252/",
"http://nomads.ncdc.noaa.gov/data/rap130/",
"http://nomads.ncdc.noaa.gov/data/gfsanl/",
"http://nomads.ncdc.noaa.gov/data/rucanl/",
"http://nomads.ncdc.noaa.gov/data/namanl/"
)

if(!is.null(abbrev)) {
i <- which(abbrevs == abbrev)
if(length(i) == 0) {
stop(paste("The model you searched for:\"", abbrev, "\"is not included in rNOMADS. Sorry!"))
} else {
return(list(abbrev = abbrev, name = names[i], url = urls[i]))
}
}

return(list(abbrevs = abbrevs, names = names, urls = urls))
}

0 comments on commit 5446b41

Please sign in to comment.