# NOT RUN {
## Loading the monthly time series (10 years) of precipitation for the Ebro River basin.
data(EbroPPtsMonthly)
#######
## Ex1) Graphical correlation among the ts of monthly precipitation of the first
## 3 stations in 'EbroPPtsMonthly' (its first column stores the dates).
hydropairs(EbroPPtsMonthly[,2:4])
#######
## Ex2) Annual values of precipitation at the station "P9001"
sname2ts(EbroPPtsMonthly, sname="P9001", dates=1, var.type="Precipitation",
tstep.out="annual")
#######
## Ex3) Monthly and annual plots
sname2plot(EbroPPtsMonthly, sname="P9001", var.type="Precipitation", pfreq="ma")
#######
## Ex4) IDW interpolation and plot
## Loading the spatial data corresponding to 'EbroPPtsMonthly'
data(EbroPPgis)
## Loading the shapefile (polygon) with the subcatchments
data(EbroCatchmentsCHE)
## Selecting the first day of 'EbroPPtsMonthly' for all the stations
x.ts <- as.numeric(EbroPPtsMonthly[1, 2:ncol(EbroPPtsMonthly)])
## Setting the name of the gauging stations
names(x.ts) <- colnames(EbroPPtsMonthly[1,2:ncol(EbroPPtsMonthly)])
# Computing the interpolated values and plotting them
# Probably you will need to resize your window
# }
# NOT RUN {
x.idw <- hydrokrige(x.ts= x.ts, x.gis=EbroPPgis,
X="EAST_ED50" , Y="NORTH_ED50" , sname="ID",
bname= "CHE_BASIN_NAME", elevation="ELEVATION",
type= "both",
subcatchments= EbroCatchmentsCHE,
cell.size= 1000)
# }
# NOT RUN {
#######
## Ex5) Mean monthly values of streamflows
## Loading daily streamflows (3 years) at the station
## Oca en Ona (Ebro River basin, Spain)
data(OcaEnOnaQts)
monthlyfunction(OcaEnOnaQts, FUN=mean, na.rm=TRUE)
# }
Run the code above in your browser using DataLab