Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify number of decimal in the creation of parameters #321

Open
SQPaul opened this issue Mar 28, 2024 · 3 comments
Open

Specify number of decimal in the creation of parameters #321

SQPaul opened this issue Mar 28, 2024 · 3 comments

Comments

@SQPaul
Copy link

SQPaul commented Mar 28, 2024

Hi everyone, I'm calibrating the surface energy and mass balance model COSIPY using SCEUA algorithm.
I would like to know how to specify the number of decimals in the creation of the parameters. In my case I have int and float parameters, and the float parameters have different significant digits.

Example of my code:

    self.params = [spotpy.parameter.Uniform(name='lapse_RRR',            low=0.0005,   high=0.001), #significant digits = 4
                   spotpy.parameter.Uniform(name='albedo_fresh_snow',    low=0.81,     high=0.95),  #significant digits = 2
                   spotpy.parameter.Uniform(name='albedo_mod_snow_aging',low=1,        high=28)]    #integer
@philippkraft
Copy link
Collaborator

This functionality does not exist in spotpy. Does your model have problems with continuous parameters? If not, use the parameters as sampled (with all digits). If yes, perhaps you can round the parameters to the number of digits in your code. But this might lead to problems for algorithms with convergence criterea, beacuse you get the same output for different values (eg. albedo_mod_snow_aging=3.10578 or 3.43267). But it can work as well, this is hard to forsee.

@SQPaul
Copy link
Author

SQPaul commented Apr 1, 2024

Thank you for the answer Philipp.

I can use continuos values for my model, but I have some doubts.
Before the calibration process I did a sensitivity analysis using FAST algorithm. I don't know if the results are really my most sensitive parameters or they are associated with the decimals and range that I give to each of them. For example the most sentivity parameter is 'albedo_mod_snow_aging' whose range is [1,28] vs the less sensitive is 'albedo_fresh_snow' range=[0.81-0.95]. So I have the doubt if I define the step (number of decimal) for each parameter the result would be the same.

I appreciate any recommendation or appreciation regarding my question.

Cheers

@philippkraft
Copy link
Collaborator

You can try with the simulation above (round in your model). But I do not see why this should change anything. I see this rather a wide range (1-28, two magnitudes) vs. low range (0.1 magnitudes change) problem. I would broaden the fresh snow albedo to see it makes a difference. Or you can accept the result as: The fresh snow albedo is well known and bound to a small range by physics and is hence not a big contributor of parameter uncertainty in your model (that is a sensitive parameter). The aging factor is rather unknown and therefore highly sensitive for this model. Or you change the snow aging factor to a smaller range, getting old in a day does not sound reasonably.

If your experiments with internally rounded results show that the number of significant digits have indeed an important impact on the FAST algorithm, please provide us with a minimal example (eg. with a simplified mock model) to reproduce the issue. Otherwise we would close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants