thouska / spotpy

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

Long parameter names get truncated #269

Closed joAschauer closed 3 years ago

joAschauer commented 3 years ago

Hi there, thanks for the great package. I am calibrating a model with somewhat long parameter names and spotpy truncates the names internally. This is a bit annoying when the found parameters are intended to be used later on or when parameter names are referenced in the ´simulation()´ method of the Setup class.

The truncation is defined here: https://github.com/thouska/spotpy/blob/9c454e8858ebda267255f8dbb4bc00019fec437b/spotpy/parameter.py#L682

Is there any reasoning why you introduced the 30 character limit?

thouska commented 3 years ago

Hi @joAschauer , thank you for this error report. You are right, there was no particular reason, to introduce this 30 character limit. Which limit would suit you? I can publish a new version accordingly.

joAschauer commented 3 years ago

Hello @thouska, thanks for your reply. I don't know which limit would be suitable... You could go for a 100 character limit which I'd assume should suffice for most people.

thouska commented 3 years ago

100 characters sounds like a good suggestion, I changed the values accordingly. As the database saved values with a resolution of np.float16 by default, I also increased that setting to np.float32. This should, hopefully, prevent most errors, which are related to truncation of data.