station | R Documentation |
allgood
and clean.station
provide two filters for extracting
stations with good data (discarding missing values). allgood
will not
leave any NA's whereas clean.station
provides a more 'gentle'
filtering.
station(...)
loc |
A string of characters as the name of the location (weather/climate station) or an object of class "stationmeta". |
param |
Parameter or element type or variable identifier. There are several core parameters or elements as well as a number of additional parameters. The parameters or elements are: precip = Precipitation (mm) tas, tavg = 2m-surface temperature (in degrees Celcius) tmax, tasmax = Maximum temperature (in degrees Celcius) tmin, tasmin = Minimum temperature (in degrees Celcius) |
src |
Source: limit the downscaling to a specific data set ("NARP", "NACD", "NORDKLIMA", "GHCNM", "METNOM", "ECAD", "GHCND" and "METNOD") |
stid |
A string of characters as an identifier of the weather/climate station. |
lon |
Numeric value of longitude (in decimal degrees East) for the reference point (e.g. weather station) as a single value or a vector containing the range of longitude values in the form of c(lon.min,lon.max) |
lat |
Numeric value of latitude for the reference point (in decimal degrees North) or a vector containing the range of latitude values in the form of c(lat.min,lat.max) |
alt |
Numeric value of altitude (in meters a.s.l.) used for selection. Positive value, select all stations above this altitude; for negative values, select all stations below this latitude. |
cntr |
A string or a vector of strings of the full name of the country: Select the stations from a specified country or a set of countries. |
it |
A single integer or a vector of integers or Dates. An integer in the range of [1:12] for months, an integer of 4 digits for years (e.g. 2014), or a vector of Dates in the form "2014-01-01"). |
is |
Index space: integer (station ID) or character (location name) or list with lon/lat ranges. |
nmin |
Select only stations with at least nmin number of years, months or days depending on the class of object x (e.g. 30 years). |
plot |
Logical value. If, TRUE provides a plot. |
verbose |
Logical value defaulting to FALSE. If FALSE, do not display comments (silent mode). If TRUE, displays extra information on progress. |
path |
The path where the data are stored. Can be a symbolic link. |
url |
The URL of the data portal or webpage for requesting new client credentials. |
station.sonel
, station.gloss
, and station.newlyn
read
sea level from tidal gauges in France (SONEL), on a global scale (GLOSS) and
for a single station (sub-daily data)in the UK (Newlyn).
A time series of "zoo" "station" class with additional attributes used for further processing.
A. Mezghani
clean.station allgood station.thredds map.station select.station
## Not run:
# Get daily and monthly mean temperature for "Oslo" station ("18700") from METNO data source
t2m.dly <- station.metnod(stid="18700",param="t2m")
t2m.mon <- station.metnom(stid="18700",param="t2m")
# Get daily data from the ECA&D data source:
# If called for the first time, the script will download a huge chunk of
# data and store it locally.
# select meta for "De Bilt" station into ss,
ss <- select.station(loc = "de bilt",param="t2m",src="ECAD")
# Retrieve the data from the local directory specified in path based on
# previous selected station
t2m.dly <- station.ecad(loc=ss,path="~/data.ECAD")
# or directly retrieve the data without a prior selection
t2m.dly <- station.ecad(loc = "oslo - blindern",param="t2m",path="~/data.ECAD")
plot(t2m.dly)
# Aggregate to monthly and annual mean temperature values and plot the results
t2m.mon <- as.monthly(t2m.dly, FUN="mean") ; plot(t2m.mon)
t2m.ann <- as.annual(t2m.mon, FUN = "mean") ; plot(t2m.ann)
# specify one station from ECAD, and this time get daily mean precipitation
precip.dly <- station.ecad(loc="Oxford",param="precip") ; plot(precip.dly)
# Aggregate to annual accumulated precipitation values and plot the result
precip.ann <- as.annual(precip.dly,FUN="sum") ; plot(precip.ann)
# Get daily data from the GHCND data source
# Select a subset of stations across Norway with a minimum number of
# 130 years using "GHCND" as a data source, retrieve the data and show its
# structure.
ss <- select.station(cntr="NORWAY",param="precip",src="GHCND",nmin=130)
y <- station.ghcnd(loc=ss , path="~/data.GHCND",plot=TRUE)
str(y)
# Subselect one station and display the geographical location of both selected
# stations and highlight the subselected station (is=2).
y1 <- subset(y,is=2)
map(y, xlim = c(-10,30), ylim = c(50,70), cex=1, select=y1, cex.select=2, showall=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.