Description Usage Arguments Value See Also Examples
GetGhcn
downloads the daily GHCN (Global Historic Climatology
Network) data for each site in siteIds and creates a dataframe containing
five fields: siteIds, date, daily GHCN value, the qFlag and the element. Data
has become available in two formats either categorized by gauge station (use
GetGhcn
) or categorized by year (use GetGhcn2
).
If there are many gauges, then GetGhcn2
would be much faster.
1 2 |
siteIds |
A single siteId or vector of siteIds. SiteIds should match the standardized GHCN-D IDs (for example : ACW00011604). See http://www1.ncdc.noaa.gov/pub/data/ghcn/daily/ghcnd-stations.txt for a list of siteIds. |
elements |
A character vector defining what type of observation you are interested in. There are five core elements as well as a number of additional elements. The five core elements are:
For the full list of elemenst refer to ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/readme.txt |
startDate, endDate |
Date. |
parallel |
Logical (DEFAULT=FALSE) |
fileAdd |
Address to the url containg all the daily GHCN data, default is http://www1.ncdc.noaa.gov/pub/data/ghcn/daily/all/ |
A dataframe containing the date, corresponding daily GHCN-D value, the qFlag and the element.
Other GHCN: CalcDailyGhcn
,
GetGhcn2
, SelectGhcnGauges
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
siteIds=c("ACW00011604","AJ000037579","AJ000037883","ASN00005095")
startDate="1949/02/01"
endDate="1949/10/01"
element="PRCP"
obsPrcp<-GetGhcn(siteIds,element,startDate,endDate,parallel=FALSE)
## End(Not run)
# Or you could use the results of SelectGhcnGauges:
## Not run:
countryCodeList=c("US")
networkCodeList=c("1")
statesList=c("WY")
selectedGauges<-SelectGhcnGauges(countryCode=countryCodeList,
networkCode=networkCodeList,
states=statesList)
obsPrcp<-GetGhcn(selectedGauges$siteIds,element,startDate,endDate,parallel=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.