Enhancement/issue 170#180
Conversation
…in plant analysis, adding an optional end date argument
…inty with new reanalysis dates
Codecov Report
@@ Coverage Diff @@
## develop #180 +/- ##
===========================================
+ Coverage 66.50% 66.93% +0.43%
===========================================
Files 24 24
Lines 1803 1830 +27
===========================================
+ Hits 1199 1225 +26
- Misses 604 605 +1
Continue to review full report at Codecov.
|
RHammond2
left a comment
There was a problem hiding this comment.
Overall, this looks great, and have 3 things that need to be addressed below, which both should be fairly easy and quick to address.
- I left a comment in the tests to add in tests for working/failing start dates, and to split up the function into a monthly, daily, and hourly test for readability.
- In Notebook 2, cell 18, there is a comment about adding a line of best fit that doesn't exist, you might just want to remove that.
- In Notebook 2b, cell 8, the text description of what the plots show is a quite brief, and it might be nice to another sentence or two to fill in some more details on the (in)significance of the differences/similarities between the models and their resolutions.
…a doesn't include enough time for LT correction; improving readability of plant analysis reanalysis test functions
|
@RHammond2 thanks for the quick review! I addressed most of your comments as follows:
|
|
This looks great, thanks Eric! I have added the following text to example 2b (I have added this in PR #173 just because it was easier for me..): "Our analysis on a larger set of wind plants (Bodini et al. 2021, Wind Energy) showed how the uncertainty component connected to the regression decreases by up to 60% (relative change) when moving from monthly to daily resolution, and by up to 80% (relative change) when moving from monthly to hourly resolution. " Let me know if you'd like to edit this or add more info. A couple of comments:
|
|
I think Nicola's suggested edit for Notebook 2b, cell 8 will clear things up quite a bit, and add some of that commentary between the plots, just so readers don't get lost along the way, even if it's largely the same text. Also, I think this looks ready to go from my perspective at this point, so I'm updating my review to approved. |
RHammond2
left a comment
There was a problem hiding this comment.
This is ready to go from my perspective now, nice work!
|
Thanks for taking a look @nbodini. Regarding your two comments:
|
merging develop and resolving some expected conflicts in the example notebooks and tests
…ed AEP analysis test results to reflect new reanalysis end dates
|
@nbodini and @RHammond2, I just merged in Nicola's filtering changes and updated some of the notebooks and test results to account for both filtering and new reanalysis end dates. Specifically, I made the following updates:
Please feel free to take a look, otherwise I can merge this tomorrow (Friday). |
This fixes issue #170 by replacing the hard-coded start and end dates for the long-term reanalysis data used in the
MonteCarloAEPclass with dates determined automatically based on the raw data. Additionally, as was suggested in issue #170, an optional argument is added toMonteCarloAEPallowing the user to specify a particular end date. Most of the changes are in theprocess_reanalysis_datamethod that prepares the aggregate reanalysis data frame when aMonteCarloAEPobject is created.The changes are summarized as follows:
MonteCarloAEP.process_reanalysis_datamethod, instead of using hard-coded start and end dates for the aggregate reanalysis data frame the end date is chosen as the end of the last full month when all reanalysis products contain data. The start date is the beginning of the first full month/day/hour when all reanalysis products contain data, depending on the time resolution.end_date_ltis added toMonteCarloAEP. When this argument is defined, it is used as the end date for the aggregate reanalysis data frame instead of the default last full month. However, an error will be raised if the specified end date is past the last full time period when all reanalysis products contain data or if it does not leave enough data to cover the maximum number of years used in the long-term correction. Note that if the time resolution is monthly, then only the month field is considered (e.g., ifend_date_ltis "2020-05-15", the last time period will be the full month of May, not April 15 - May 15). Similar logic applies to daily resolution.MonteCarloAEP.run_AEP_monte_carlomethod. Previously, the list of the number of days per month was applied to thegross_lttime series, assuming the time series started in January and ended in December. But this wasn't always the case forgross_lt. Now the list of number of days per month is shifted to match the specific start and end dates ofgross_lt.