Open cchwala opened 5 months ago
One remark regarding the discussion about potential to improve computation speed: I now found the comment which I referred to in our discussion today when I said that I recall to have read somewhere about an R package to speed things up. The comment is in this notebook of the training school in the "Notes" somewhere at the top of the notebook. This is the comment
-It is possible to run the code faster using the sf package and a maximum limit for the number of neighbour PWSs (if more nearby stations are available only the closest neighbours are considered). See PWSQC_1_alternativeversion.R for that approach
Hence, this only concerns the calculation of the nearby neighbours, for which, if needed, we can also use something like scipy.spatil.KDTree
.
implementation and further discussion is ongoing in #26
Draft code in Python
We have a first very preliminary draft of the code for the "station outlier filter" here at the bottom of the notebook.
Some notes from discussion with Lottte:
apply
in combination withwhich
in R, e.g. like in line 83 in the linked code