• Add hbv.sim model
  • Add KGE to hydromad.stats
  • Update tutorial to Rmarkdown format
  • Added contributing guidelines
  • Removed eventsExplorer(), due to dependency on archived playwith
  • fix AET values for bucket model #188

Bug fixes: * fixed several problems caused by the change in behaviour of filter() introduced in R 2.13.2. * fixed override of cmd default parameters

Enhancements: * routing looks for default pars in function routing.ranges()

  • improvements to speed of some objective functions and eventapply by avoiding unnecessary zoo operations

  • can now be used with opencpu, as key imported functions from other packages are now exported

  • objFunVal.runlist accepts function of runlist

  • if return_state is specified, state variables from SMA can be used for calibration

  • U generated by armax.inverse.fit is now accessible in hydromad object through data$U or fitted(object,U=TRUE)

  • updates to Sacramento: allow setting initial state and returning state

New features: * parallelised evalPars, update.runlist, objFunVal.runlist

  • added paretoCatchments, paretoTimeAnalysis

  • added paretoObjectivesNsga2, paretoObjectivesVaryWeights

  • added crossValidate, splitData

  • added link to sensitivity package, using new function evalPars

  • added leakyExpStore and expuh3s to model disconnection of streamflow from slowflow store

  • gr4j parameters can now be transformed to improve identifiability

  • added deconvolution of unit hydrograph (deconvolution.uh)

  • added code to apply variable event-based time delay to time series (adjVarTd)

  • added non-integer time delay estimation

  • added fitByCMAES

  • added fitByNSGA2

  • added rotatedSampling

  • fixes for gr4j model based on comparison to reference implementation (xls). Contributed by Joseph Guillaume.

  • fixed convertFlow() to or from “metres”.

  • updated list of objective functions in ?hydromad.stats

  • renamed ‘hydromad’ vignette to ‘hydromad_paper’ (build problems).

  • bug fix for preInterEventDuration().

  • updates and docs for feasible set / GLUE stuff.

  • make .9/.1 split in gr4j an option.

  • remove strict dependency on ‘dream’ package since it is not on CRAN.

  • defineFeasibleSet() works now, along with a new argument ‘glue.quantiles’ which is also now an argument to predict() and update(). The help pages have been updated.

  • new vignette(“hydromad”).

  • glue.hydromad() has been revised and renamed to defineFeasibleSet().

  • arguments to the function armax.inverse.sim() have changed, such that sma = “armax.inverse” can be used for baseflow filtering. See the help.

  • fix bug in simulate(): additional empty values were returned.

  • remove functions byDays(), byYears(), bySecs(), tsCleanup(), autocorrTime().

  • revised catchment area of Queanbeyan data from 506 to 490 km^2 (from BOM).

  • summary() and runlist() were failing on results from simulate().

  • updated to use new version of ‘car’ package.

  • fixed bug in predict() with feasible sets.

  • xyplot(feasible.bounds = TRUE) now works on log scales too.

  • xyplot() now run on hydromad objects which have not been fitted.

  • fixed error in gr4jrouting with x4 = 1.999999999.

  • fixed error in glue.hydromad.default.

  • support for feasible parameter sets: use glue.hydromad() on results from fitBySampling() or fitByDream(); then xyplot/fitted/predict/etc.
  • buildObjectiveFun() renamed to buildTsObjective().

  • new function buildTsLikelihood().

  • new function event.xyplot() with methods for formula, hydromad and runlist.

  • new SMA “intensity”.

  • the residuals() method can now transform the data before taking residuals.

  • the default hydromad.options(“optim.method”) is now “PORT” (fitByOptim).

  • one can now pass ‘Q’ to hmadstat() to pre-evaluate (cache) statistics.

  • the ‘item’ argument to observed() has been re-named to ‘select’.

  • some fitBy…() functions were failing if the objective returned NA.

  • expuh.ls.fit() and expuh.sriv.fit() should now refit non-physical solutions properly.

  • all the fitBy…() methods now maximise rather than minimise.

  • nseStat() is the new name for fitStat(); the old name is now deprecated. nseStat() returns “R squared”: 1 - sum((Q-X)2)/sum((Q-ref)2)

  • the default objective function changed (~ r.sq.sqrt + r.sq.monthly…)

  • new model GR4J: functions gr4j.sim() and gr4jrouting.sim().

  • simulate() and other functions using parameterSets() were doing too few samples in the method “all.combinations”.

  • NOTE: major changes that will break existing code (see below).

  • new function buildObjectiveFun().

  • objective functions can now include expressions which will be evaluated once and cached for efficiency by calibration/simulation functions. See ?hydromad.stats

  • fitStat() now returns, typically, sum((Q-X)2)/sum((Q-ref)2) whereas it used to return 1 - this. So “R squared” is now calculated as ~ 1 - fitStat(Q,X).

  • tsFitStat() has been removed as fitStat() now automatically merges time series and its other functionality has been taken over by buildObjectiveFun().

  • fitBias() has been removed in favour of hmadstat(“rel.bias”).

  • the ‘offset’ argument to fitStat() has been removed; in particular log transformations will not have an automatic offset added unless you use hmadstat(“r.sq.log”).

  • hydromad.options(“stats”) has been removed in favour of hydromad.stats().

  • eventseq() now takes arguments ‘inthresh’, ‘inx’, ‘indur’, ‘extend’ and ‘continue’. The ‘inter’ argument, which was deprecated, has been removed.

  • new function eventsExplorer(), a graphical user interface.

  • fitByOptim() now sets control$parscale from the initial parameter values.

  • the default log-likelihood function (hydromad.options(“loglik”)) changed.

  • optimtrace() for Dream results now avoids a problem with objective values. (not an issue with runs generated from dream >= 0.3-2).

  • summary.runlist() now passes on further arguments to summary() (or FUN).

  • the summary() method for hydromad.runlist now has with.hydrostats = FALSE.

  • new function optimtrace() to extract history of fitting process.

  • the ‘elitism’ option to SCEoptim() now defaults to 1 (linear weights).

  • fitByOptim() now handles boundaries differently, perhaps avoiding errors.

  • statistics are now managed by new functions hydromad.stats() and hmadstat(). The use of hydromad.options(“stats”) is now deprecated.

  • statistics and objective functions are now represented as functions rather than formulae. Formulae can still be specified for the ‘objective’ argument, for convenience.

  • changed tsFitStat() to calculate ‘ref’ as mean(trans(obs)) rather than trans(mean(obs)), as was always intended. Also fitStat() now removes any NAs introduced by ‘trans’.

  • the coef()<- assignment method has been removed.

  • new update() method for runlists, which simple uses lapply().

  • revised statistics.

  • new method “PORT”, based on nlminb(), for fitByOptim().

  • changes some default options for SCEoptim() and fitBy*().

  • new power and hyperbolic forms of the CMD model, contributed by Jarkko Koskela.

  • added hydromad.options(“loglik”), used by fitByDream() and a new logLik() method.

  • new function fitByOptim1(), for optimising a single parameter.

  • new function fitDbmToPeaks() for use with sma = “dbm”.

  • fixed error when using rfit methods with “expuh” routing.

  • fixed error when using coef() on a runlist.

  • new function fitByDream(), using the dream package. NB: this uses a likelihood function, not the objective function.

  • the fitting functions now store the result from their respective optimisation functions in the model object as “fit.result”, and fitByOptim and fitBySampling now record the objective over time.

  • fitByOptim, fitBySCE, fitByDE all now have a vcov argument, default FALSE, to estimate the parameter variance-covariance matrix.

  • xyplot() applied to a hydromad.runlist now recognises the ‘scales’ argument (it was erroneously ignored previously).

  • fixed the “r.sq.monthly” statistic (it gave an error).

  • added new statistics “r.sq.smooth7”, “ar1” and “X0”, and fixed “X1” and “U1” (they threw an error).

  • summary() now gives a warning for NaN stats, not an error.

  • new function findThresh() and correponding argument ‘n’ to eventseq(), to identify a given number of events.

  • arguments to eventseq() and eventapply() have changed.

  • estimateDelay() now has a ‘negative.ok’ argument.

  • the setting ‘series = 1’ to expuh.sim() now places the “s” component in parallel, rather than the “q” component.

  • ‘HydroTestData’ now has a (POSIXct) 3 hourly time index.

  • the “bucket” SMA now has a C code back-end.
  • the update() method now has a ‘newpars’ argument, to supply parameter values as a named vector rather than a series of named arguments.

  • the summary() method now takes a ‘stats’ argument, and definitions of these are looked up in hydromad.options(“stats”). The default set of stats is given (as a set of names) in hydromad.options(“summary.stats”).

  • improved the “tutorial” vignette.

  • improved examples for SMA models.

  • time series data is now stored as ‘zooreg’ rather than ‘ts’, and fitted(), residuals(), predict() will generally return ‘zooreg’. The simulation functions will keep to the format of their input data.

  • xyplot() methods for ‘hydromad’ and ‘runlist’ have been rewritten.

  • the package now depends on the new version of lattice, and therefore depends on R version 2.11.0 or later.

  • column names are retained in eventapply, it now has a ‘simplify’ argument, and it just generally works better.

  • ‘summary’ with the ‘breaks’ argument now returns a zoo object rather than a data.frame, which makes plotting easier.

  • fixed bug in print.summary.runlist

  • the mass balance term ‘c’ in cwi.sim is now called ‘scale’.

  • arbitrary arguments for the model simulation function(s) (i.e. objects which are not to be treated as model parameters) may now be passed to ‘hydromad’.

  • new power law routing ‘powuh’.

  • new SMA ‘awbm’.

  • the ‘summary’ method for ‘runlist’ is now much simpler and does not include parameter values (as the ‘pars’ argument did previously). Instead a ‘coef’ method for ‘runlist’ returns the parameter values.

  • ‘summaryOrders’ removed, just use ‘summary’.

  • fixed another case of hydromad() failing if ‘Q’ was not given in DATA.

  • renamed ‘eventAttributes’ to ‘eventinfo’.

  • ‘width’ parameter for ‘runoffratio’ SMA now defaults to 30.

  • more complete help pages and examples.

  • the CMD and snow models now run C code when return_state = TRUE.

  • fixed a bug in simulate() and fitBySampling() for models with only one (or zero) free parameters.

  • coef<-() method now has an ‘all’ argument, allowing free parameters to be easily updated inside an optimisation / simulation loop.

  • fixed the case where hydromad() failed if ‘Q’ was not given in DATA.
  • snow.sim now has a C code back-end.

  • parameterSets (used by fitBySampling etc) now generates a regular sequence along each parameter range, rather than using quantile().

  • new SMA “snow” – as function snow.sim() – from Jarkko Koskela.

  • SMA “runoffratio” now has threshold and mass balance parameters.

  • class of hydromad objects is now c(“hydromad.”, “hydromad”).

  • the ‘fixed.ar’ argument to armax.sriv.fit now works (and this is used by expuh rfit methods too).

  • hydromad.options(“prefilter”) now has 3 hard-coded prefilters. The ‘prefilter’ argument is now allowed to be a prefilter-generating function (function(DATA)).

  • more information about fit results is printed.

  • armax.sriv.fit() now takes an argument fallback (default TRUE), to return the current best result if the matrix cannot be solved.

  • predict(return_components = TRUE) didn’t work.

  • armax.sim() (and therefore predict()) takes return_components argument.

  • new simple SMA “runoffratio” - and function runoffratio.sim(). (it scales P by observed flow, so can not be used for prediction).

  • coef() can now be assigned to.

  • update(model, sma = …) changes the SMA and resets its parameters.

  • changed default hydromad.options(“inverse.rel.tolerance”) to 1/1000.

  • “uh” routing renamed to “armax”.

  • new “lambda” routing option.

  • better simulation of third order transfer function models.

  • unit tests for transfer functions.

  • event.clusters() renamed to eventseq()

  • functions getU() and getP() removed; use fitted(U = TRUE) and observed(item = “P”).