thouska / spotpy

A Statistical Parameter Optimization Tool
https://spotpy.readthedocs.io/en/latest/
MIT License
254 stars 152 forks source link

calibration parameter in array type #187

Closed ali1100 closed 6 years ago

ali1100 commented 6 years ago

Dear developers, I'm using a distributed hydrology model and some of my parameters like saturated hydraulic conductivity or root depth are in array type. actually, I want to calibrate those parameters but I don't know how to define them in spotpy. I will be thankful if you help me. Thanks!

thouska commented 6 years ago

Hi @ali1100 thanks for your message. So far there is no prefabricated way to deal with distributed paramter arrays. However, you have the freedom to perform more or less unlimited ways to perform such a calibration, depends what you want. If you already have an array of hydraulic conductivity, you could use spotpy to sample a paramater which only changes you array, e.g.:

factor_for_ksat = spotpy.parameter.Uniform(low=0, high=2)

def simulation(self, vector): new_ksat_array = your_ksat_array * vector.factor_for_ksat

Maybe this helps already. Another idea would be to generate hrus and sample the parameter for each of this regions and build an array out of it.

ali1100 commented 6 years ago

Thank you, actually, I have a predefined ksat parameter but the factor that you mentioned I think it will change the whole array. I was thinking of writing a loop for each pixel in the array and define a uniform distribution. in this way, there will be lots of parameters but I'm not sure if it will work.