hydroTSM
is an R package that provides S3 functions for management, analysis,
interpolation and plotting of time series used in hydrology and related
environmental sciences. In particular, this package is highly oriented
to hydrological modelling tasks.
The focus of this package has been put in providing a collection of
tools useful for the daily work of hydrologists (although an effort was
made to optimize each function as much as possible, functionality has
had priority over speed).
Bugs / comments / questions / collaboration of any kind are very
welcomed, and in particular, datasets that can be included in this
package for academic purposes.
Time series management, analysis and interpolation for hydrological modelling
Author:
Mauricio Zambrano-Bigiarini [aut, cre]
Maintainer:
Mauricio Zambrano-Bigiarini
Description:
S3 functions for management, analysis, interpolation and plotting of time series used in hydrology and related environmental sciences. In particular, this package is highly oriented to hydrological modelling tasks. The focus of this package has been put in providing a collection of tools useful for the daily work of hydrologists (although an effort was made to optimise each function as much as possible, functionality has had priority over speed). Bugs / comments / questions / collaboration of any kind are very welcomed, and in particular, datasets that can be included in this package for academic purposes.
NEWS/ChangeLog for hydroTSM -------------------------- 0.3-7 under-development o new dataset: `KarameaAtGorgeQts', with hourly streamflows for the Karamea River(New Zeland), provided by the National Institute of Water and Atmospheric Research (http://www.niwa.co.nz/), thanks to the gentle collaboration of Shailesh Singh. o new function: `subdaily2daily' for aggregating sub-daily values into daily ones o new function: `subdaily2seasonal' for computing seasonal values for every year of a sub-daily time series o new function: `subdaily2monthly' for computing monthly values from sub-daily time series o new function: `subdaily2annual' for computing annual values from sub-daily time series o `seasonalfunction.zoo': season names are now correctly given (instead of just numbers) for zoo objects that are matrix/data.frame as well o `annualfunction.zoo' : TODO: check what happens in the previous version !!: -) now it handles sub-daily values -) `na.rm' argument is now used when the input zoo object is a matrix/data.frame (previously a single value of 1 was artificially introduced to the annual ts of each column when 'na.rm=TRUE', while a single value of 0 was artificially introduced to the annual ts of each column when 'na.rm=FALSE') => generally a very small difference o `hydroplot' : new argument `season.names', to customise the names of the weather seasons used for plotting o `sname2plot' : new argument `season.names', to customise the names of the weather seasons used for plotting o `daily2monthly' : now it handles sub-daily and weekly values o `daily2annual' : now it handles sub-daily, weekly and quarterly values o `monthlyfunction' : now it handles sub-daily values o `dm2seasonal' : -) now it handles sub-daily and weekly values -) improved examples o `time2season' : now it handles "POSIXct" and "POSIXt" values o NAMESPACE: functions form package zoo are imported explicitly o TODO: require(zoo) and require(xts) removed from all the functions 0.3-6 18-Oct-2012 o `vector2zoo' : -) now it handles sub-daily values -) `dates' argument accepts `POSIXct' & `POSIXlt' objects o `izoo2rzoo' : -) now it handles sub-daily values -) `dates' argument accepts `POSIXct' & `POSIXlt' objects o `sfreq' : was transformed into a wrapper to the 'xts::periodicity' function, in order to allow identification of more sampling frequencies: `minute', `hourly', `daily', `weekly', `monthly', `quarterly' and `annual' (instead of `yearly' as used in xts) o `fdc' : zero discharge value(s) are now removed ONLY when 'log="y"' AND 'plot=TRUE' (both default values of the function). Up to hydroTSM0.3-5, zero values were removed when 'log="y"' (default value of the function), even if 'plot=FALSE' (thanks to Giovanni Forzieri !) o `sname2ts' : now it works with date.fmt="m%d" (e.g. 20000101), which were previously interpreted as numbers and not as dates, leading to an error (thanks to Vishnu Pandey !) o `sname2plot' : now it works with date.fmt="m%d" (e.g. 20000101), which were previously interpreted as numbers and not as dates, leading to an error o `hydrokrige' : fixed interpolation error raised for some constant value maps o DESCRIPTION : 'Author@R' field was replaced by 'Authors@R' 0.3-5 04-Jul-2012 o `dwi.zoo' : fixed display error for years and months when `matrixplot' is used to plot the results of `dwi' applied to a matrix or data.frame. This error appeared after an update of the zoo package, and did not imply any error in the computation, only in the display of the years/months o `izoo2rzoo.zoo' : now works properly with matrix and data.frame objects o `hypsometric' : now is able to deal with raster objects with more than 1 band (thanks to Jan Schwanbeck for reporting the issue and proposing a solution) o `daily2monthly.data.frame' : -) calls to `as.Date' were changed to 'zoo::as.Date', to avoid possible conflicts with zoo >= 1.7-2 -) wrong labelling of months was fixed (only occurred when out.type="db") o `daily2annual.data.frame' : -) calls to `as.Date' were changed to 'zoo::as.Date', to avoid possible conflicts with zoo >= 1.7-2 o `daily2annual.zoo' : -) calls to `as.Date' were changed to 'zoo::as.Date', to avoid possible conflicts with zoo >= 1.7-2 -) default value for `out.fmt' was changed from "%Y" to "%Y-%m-%d" (this is the default for zoo objects) o `sfreq' : -) now gives the correct sampling frequency for zoo objects that are matrix/data.frame -) now only works with zoo objects (before it also accepted ts objects) o `hydroplot' : -) calls to `as.Date' were changed to 'zoo::as.Date', to avoid possible conflicts with zoo >= 1.7-2 o `monthlyfunction' : -) calls to `as.Date' were changed to 'zoo::as.Date', to avoid possible conflicts with zoo >= 1.7-2 (only for data.frame/matrix objects) -) fixed bug in the labelling of columns of the output object (only for data.frame/matrix objects) o `hydrokrige' : -) fixed visualisation error "Error using packet 1. `breaks' are not unique". 0.3-4 03-May-2012 o `fdc' : new arguments `leg.cex' and `leg.pos' to provide better control over the legend o `fdcu': new arguments `leg.cex' and `leg.pos' to provide better control over the legend 0.3-3 07-Nov-2011 o new `fdc.zoo', which works with vectors, matrices and/or data frames o `fdc.matrix' : -) the flow duration curve of each column is now returned as an output (although not in an efficient way, yet) `fdc.data.frame' -) axis numbers and labels are now drawn only once. -) when missing `ylim', it is now correctly computed when some series have missing values. 0.3-2 15-Sep-2011 o `smry' : bugfix in `smry.zoo' (when some values were NA) 0.3-1 14-Sep-2011 o hydroTSM 0.3-X is now compatible with R 2.12.X. 'sp::coordinates' & 'sp::proj4string' were replaced by `coordinates' & `proj4string', respectively. Thanks to Uwe Ligges. o `smry' : bugfix in `smry.data.frame' (when -at least- 1 column was not numeric) 0.3-0 01-Sep-2011 o hydroTSM now depends on xts >= 0.8-2 (=> zoo >= 1.7-2), in order to make use of improved plotting capabilities for ts objects. The first release of `xts' after the 0.8-0 (which was set as the default building block for plotting time series in hydroTSM) was the 0.8-2, and appeared on CRAN on August 9th, 2011 o NAMESPACE created, which leads to reduced dependency of packages e1071, gstat, automap, sp o `maptools' package is now "suggested" instead of a dependence. It is only used for reading shapefiles in the `hydrokrige' and `mspplot' functions. o `drawxaxis' : -) it was re-written, in order to take advantage of some features of the `xts' package (now added as a dependence), and now it should work with sub-daily time series. -) its name was changed from `drawxaxis' to `drawTimeAxis', in order to have a more intuitive name. The old `drawxaxis' function is deprecated, but still be kept for back-compatibility reasons. -) `tick.tstep' and `lab.tstep' now accept the values: "auto", "quarters", "weeks", "hours", "minutes", and "seconds", and its default value was changed to "auto". o `hydroplot' : -) it takes advantage of the new `drawTimeAxis' function. `sname2plot' : -) now it is able to plot seasonal values (ptype="seasonal") -) it works with xts objects as well. -) `tick.tstep' and `lab.tstep' now accept the values: "auto", "quarters", "weeks", "hours", "minutes", and "seconds", and its default value was changed to "auto". -) the name of `x' is now used as default for the Y axis label. -) an incorrect default title for the daily histogram was fixed. -) the default value for `cex' was changed from 0.7 to 0.3 -) new arguments: `from', `to', for plotting a slice of the original time series -) thanks to Tom Elliott for pointing out my attention to this function again !. -) new argument: `h', for plotting horizontal lines in seasonal plots -) new argument `stype', for allowing weather seasons different from c("DJF", "MAM", "JJA", "SON") (thanks to Lydie Sichoix !) -) default value for the `win.len1' argument was changed from 351*1 to 0, in order to avoid the plotting of the 1-year moving average (by default) -) default value for the `win.len2' argument was changed from 351*3 to 0, in order to avoid the plotting of the 3-years moving average (by default) o `hydroplot' : -) new argument: `date.fmt' for being used with the new arguments `from' and `to' o `sfreq' : -) it works now with xts objects o `vector2zoo' : -) added error checking for length of the numeric vector and the dates. o `hydrokrige' : -) updated documentation and new example of interpolation over a user-defined raster map. o `monthlyfunction' : -) new `monthlyfunction.zoo', ~ 8 times faster than before (for data.frames, when out.type="data.frame") -) it works now with matrix objects as well. -) it works now with xts objects as well. o `annualfunction' : -) new `annualfunction.zoo', much faster than before for data.frames. -) it works with matrix objects as well. -) it works with xts objects as well. o `daily2monthly' : -) new `daily2monthly.zoo', much faster than before (for data.frames, when out.type="data.frame") -) it works withannualxts objects as well. o `daily2annual' : -) new `daily2monthly.zoo', much faster than before (for data.frames, when out.type="data.frame") -) it works with xts objects as well. o `fdc' and `fdcu' : -) new argument `xat', for setting the position of the `x' axis labels when 'log="x"' o `time2season' : -) new argument `type', for allowing seasons different from c("DJF", "MAM", "JJA", "SON") (thanks to Lydie Sichoix !) o `dm2seasonal' : -) new argument `out.fmt', for better compatibility with zoo and xts objects. -) it works with matrix objects as well. -) it works with xts objects as well. -) argument `season' now allows weather seasons typical from French Polynesia: c("DJFM", "AM", "JJAS", "ON") (thanks to Lydie Sichoix !) o `seasonalfunction': -) new `seasonalfunction.zoo', ~ 30 times faster than before (for data.frames, when out.type="data.frame") -) it works with matrix objects as well. -) it works with xts objects as well. -) new argument `type', for allowing weather seasons different from c("DJF", "MAM", "JJA", "SON") (thanks to Lydie Sichoix !) o `extractzoo' : -) its name was changed from `extractzoo' to `extract', in order to have a shorter name (this function only apply to zoo objects anyway). The old `extractzoo' function is deprecated, but still be kept for back-compatibility reasons. -) new `extract.zoo' -) argument `trgt' now allows weather seasons typical from French Polynesia: c("DJFM", "AM", "JJAS", "ON") (thanks to Lydie Sichoix !) o `dwi' : -) new `dwi.zoo', much faster than before -) it works with xts objects as well. -) fixed documentation of the `out.unit' argument. -) argument `tstep' is not required any more, because it is not used any longer. It is kept for backwards compatibility purposes only. o 'matrixplot : -) it works with zoo objects as well (zoo matrices/data.frames) o `izoo2rzoo' : -) new `izoo2rzoo.zoo' -) it works with xts objects as well. o `smry' : -) new `smry.zoo' -) much faster than before for matrices and data.frames -) it works with xts objects as well. o Some `as.Date' calls were changed to 'zoo::as.Date', in order to work properly with zoo >= 1.7-2 ################################################### # Previous Releases (see old file 'WhatsNew.txt)' # ################################################### 0.2-2 14-Apr-2011 0.2-1 30-Nov-2010 0.2-0 10-Oct-2010 0.1.7 05-Mar-2009 (It was never released, because it finally becomes v0.2-0) 0.1.6 30-Nov-2009 0.1.5 16-Nov-2009 0.1.4 02-Nov-2009 0.1.3 13-Oct-2009 0.1.2 01-Oct-2009 0.1.1 15-Sep-2009 0.1.0 07-Sep-2009 (but the functions were developed since 2007)
See Also
hydroPSO: Model-independent Particle Swarm Optimisation (PSO) for environmental/hydrological models.
hydroGOF: Goodness-of-fit functions for comparison of simulated and observed hydrological time series.