Description Usage Arguments Value See Also Examples
GetGhcn2
downloads the daily GHCN (Global Historic Climatology
Network) data for each site in siteIds and creates a dataframe containing the
fields: siteIds, date, element, daily GHCN value, mFlag, qFlag, sFlag and
reportTime. This is a faster function compared to GetGhcn
if
you have many sites.
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 the csv files of daily GHCN by year. default is http://www1.ncdc.noaa.gov/pub/data/ghcn/daily/by_year/ |
A dataframe containing the siteIds, date, daily GHCN-D, element, sFlag, qFlag, mFlag and reportTime. If the element is PRCP, then divide the numbers by 10 to convert to mm. For more information on possible outcomes of flags and their meaning, refer to http://www1.ncdc.noaa.gov/pub/data/ghcn/daily/by_year/readme.txt
Other GHCN: CalcDailyGhcn
,
GetGhcn
, 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="2015/02/01"
endDate="2015/10/01"
element="PRCP"
obsPrcp<-GetGhcn2(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<-GetGhcn2(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.