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
Refactoring near by link appraoch related code and example notebook #139
Conversation
… one variable is passed anyway now
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #139 +/- ##
==========================================
- Coverage 75.17% 74.83% -0.35%
==========================================
Files 29 29
Lines 1112 1089 -23
==========================================
- Hits 836 815 -21
+ Misses 276 274 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the updates! I mainly have some comments regarding doc strings, but also one regarding a potential error in the code.
Two additional comment to the notebook:
You can remove that from the first cell I guess
%load_ext autoreload
%autoreload 2
import nearby_rain_retrival as nearby_rain
import nearby_wetdry as nearby_wetdry
I am confused about this part in the last cell
As reference, path-averaged rain rates along the CMLs paths from RADKLIM-YW are provided. This data has a temporal resolution of 5 minutes and is resampled to 15 minute rainfall intensities.
But then you do
path_ref.sel(cml_id=i).rainfall_amount.resample(time="15min").sum() * 4)
If path_ref
is already the 5-minute rain rate from RADKLIM-YW (as stated in your text), it should be best to just do .resample(time="15min").mean(), right? Or is
path_ref` not a rain rate? Either your text or you code is wrong.
…ional kwargs and fixing an error in p_c_max calculation as well as adopting tests
…enuation is used in the k-R relation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the swift update.
I still found some minor things that should be updated. Then it is ready to merge.
The notebook also looks good now. The plots with the time series of p_c_min and p_c_max really help to understand what the individual variables mean. 👍
Thanks for the review comments! Ready to be merged from my side. |
Thanks a lot again 👏 👏 👏 . Really good to now have this updated implementation of the nearby-link approach from RAINLINK in Python! 🎉 |
This PR should refactor the nearby link approach.
Todos:
instantaneous_to_minmax_data()
nearby_wetdry()
nearby_determine_reference_level()
andnearby_correct_recieved_signals()
to make the usage of pmax more intuitivetest_nearby_wetdry()
test_nearby_rainfall()