Fixed scaling parameters in the Interpol2D::IDWCore() functions (libinterpol2d.cc)
This issue was reported by Kristian Förster.
Dear MeteoIO developers,
I am using the MeteoIO library for meteorological interpolations in Alpine catchments using the IDW method. The set-up for each variable is quite similar (sometimes a lapse rate is applied as well).
We carefully checked the results through comparing them with observed values at the station's locations. For precipitation, the meteorological field derived by meteoio's IDW method is often smoothed, which holds especially true when extreme values have been observed at single stations (the interpolated value at the location of the respective station is much lower than the observed value).
After having a closer look at the IDWCore() methods in the libinterpol2d.cc file, I was wondering why there are fixed scale values defined. Indeed, defining them makes sense as they prevent the algorithm from division by zero errors.
I agree that this value is suitable for most applications. As we are using meteoio for meteorological interpolation for 50m grid spacings, I would expect smaller values to be more appropriate in this case. Is there a reason for choosing a fixed value of 1000m? I manually changed it for my application.
Would it make sense to apply a resolution dependent scale parameter (e.g., 50m if the grid spacing is 50m, 250m if the grid spacing is 250m, ...)? In my opinion an input dependent value might be an interesting new feature.
Thank you very much for sharing meteoio, which is a great library!
Best regards,
Kristian