Re: regarding changing of parameters in hydromad

26 views
Skip to first unread message

Willem Vervoort

unread,
Jun 9, 2021, 7:47:38 AMJun 9
to hydromad-users, Deva Charan
Dear Deva,
I am not sure what you mean: what do you exactly mean when you say "I want to give more parameters". Do you mean parameter ranges, or do you mean other parameters which are part of the model? 
if you can provide a clear reproducible example of what you are trying to achieve that would be great and we would be able to help you

Regards
Willem

On Wed, Jun 9, 2021 at 8:59 PM Deva Charan <devach...@gmail.com> wrote:
sir, thanks for responding
i am good with that sir
but I want to give more parameters

On Wed, Jun 9, 2021 at 4:27 PM Willem Vervoort <willemv...@gmail.com> wrote:
Hi,
see the help file or the tutorial
modx <- hydromad(x, sma = "cmd", routing = "expuh",
                 f = 0.5, d = 200, e = 0.15, shape = 0)
Willem

On Wed, Jun 9, 2021 at 8:38 PM Deva Charan <devach...@gmail.com> wrote:
hello sir,

I hope you are doing well in this pandemic situation sir.
sir, for this model
modspec <- hydromad(camelsma "cmd", routing "expuh")
the parameters are f, e, d, and shape.

like above for any type of different sma and routing models, parameters have been fixed in hydromad.
so, sir I want to change those parameters by giving manually.
is there any way that we can do like that sir ?
if there pls let me know sir.

I would be very helpful if you respond sir
thanks in advance,
Deva Charan

Willem Vervoort

unread,
Jun 9, 2021, 8:27:47 AMJun 9
to Deva Charan, hydromad-users
Dear Deva, please copy in hydromad-users so other people can benefit as well from our discussion.
I assume you have investigated hydromad.options() where I think these parameters are defined and where they can be changed.
Regards
Willem

On Wed, 9 Jun 2021, 21:56 Deva Charan, <devach...@gmail.com> wrote:

$timedelay
[1] 1.469517

$maxwatr_1
[1] 499.6686

$maxwatr_2
[1] 766.9147

$fracten
[1] 0.8319582

$frchzne
[1] 0.4061263

sir, I want to give the above-mentioned parameters adding to f,d,e,shape  
to the model  modspec <- hydromad(camelsma "cmd", routing "expuh"
but i am facing error like this
Warning in coef.hydromad(object, ..., warn = FALSE) :
  unrecognised parameters: timedelay


so sir, is there any way to give those parameters?

thank-you for your response sir

Deva Charan

unread,
Jun 9, 2021, 8:42:11 AMJun 9
to hydromad users
sir, I have seen hydromad.options()
but I am unable to get how to give those extra parameters sir
pls help me in this problem sir

Willem Vervoort

unread,
Jun 9, 2021, 5:51:48 PMJun 9
to hydromad-users
Dear Deva,
I am lost now, Can you show an exact reproducible example of what you are trying to do? Are you saying this warning comes up with the command you show:
 modspec <- hydromad(camelsma "cmd", routing "expuh"

Because:
data("Cotter")
 modspec <-hydromad(Cotter[1:1000],sma="cmd",routing="expuh")

Does not give me any errors

Where exactly did you find time delay, and where and why are you trying to change this?

Willem

> str(modspec)
List of 9
 $ call        : language hydromad(DATA = Cotter[1:1000], sma = "cmd", routing = "expuh")
 $ parlist     :List of 4
  ..$ f    : num [1:2] 0.01 3
  ..$ e    : num [1:2] 0.01 1.5
  ..$ d    : num [1:2] 50 550
  ..$ shape: num 0
 $ last.updated: POSIXct[1:1], format: "2021-06-10 07:49:26"
 $ data        :‘zooreg’ series from 1966-05-01 to 1969-01-24
  Data: num [1:1000, 1:3] 0 0 0 0 48.1 ...
  ..- attr(*, "dimnames")=List of 2
  .. ..$ : NULL
  .. ..$ : chr [1:3] "P" "Q" "E"
  Index:  Date[1:1000], format: "1966-05-01" ...
  Frequency: 1
 $ sma         : chr "cmd"
 $ sma.fun     : chr "cmd.sim"
 $ sma.formals :Dotted pair list of 7
  ..$ DATA        : symbol
  ..$ f           : symbol
  ..$ e           : symbol
  ..$ d           : symbol
  ..$ shape       : num 0
  ..$ M_0         : language d/2
  ..$ return_state: logi FALSE
 $ routing     : chr "expuh"
 $ warmup      : num 100
 - attr(*, "class")= chr [1:2] "hydromad.cmd" "hydromad"


--
You received this message because you are subscribed to the Google Groups "hydromad users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hydromad-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hydromad-users/2d8d5dff-f176-4d54-85e2-6fd294e12445n%40googlegroups.com.

Deva Charan

unread,
Jun 10, 2021, 10:36:51 AMJun 10
to hydromad users
sir, actually what I have done is,

I have calibrated the hydromad model using fuse models as mentioned below:

hydromad.options(fusesma = fusesma.ranges(),
fuserouting = fuserouting.ranges())
# Set up the model
modspec <- hydromad(camel, sma = "fusesma", routing = "fuserouting", mid = 1:1248, deltim = 1)
modfit <- fitBySCE(modspec)

now, I have tried to get state variables for the model but I am getting the error because the command 'predict(object, return_state = TRUE, return_components = TRUE)'  is not working for the hydromad models which include fuse.

so, what I have thought is 
after calibrating the above model, I got some parameters like  timedelay, maxwater, fracten, etc....
now I want to assign these parameters to the basic hydromad model:  'modspec <-hydromad(camel,sma="cmd",routing="expuh")'  
so that I can now use this command 'predict(object, return_state = TRUE, return_components = TRUE)'  and get all state variables.

for, modspec <-hydromad(camel,sma="cmd",routing="expuh")  we are getting state variables as U,CMD,ET,Xs,Xq
for,  modspec <-hydromad(camel,sma="sacramento",routing="expuh")  we are getting state variables as  uztwm, uzfwm, uzk, pctim, adimp, zperc, rexp, etc...
like this, I also want to get state variables for my model sir
this was my problem sir.
is there any solution sir.


Alex

unread,
Jun 11, 2021, 1:43:04 AMJun 11
to hydromad users
If you look at the documentation for fusesma.sim, it tells you how to get the state variables out: "By default StatesFluxes = FALSE which means the function only output is the instantaneous runoff. If StatesFluxes=TRUE, the output also contains the list of fluxes and state variables."

Just add that argument to your hydromad model 

modspec <- hydromad(camel, sma = "fusesma", routing = "fuserouting", mid = 1:1248, deltim = 1, StatesFluxes = TRUE)
Reply all
Reply to author
Forward
0 new messages