Merged
Conversation
Function crasehd when 'ET' or 'PT' not present in list of countries.
copy timeslice would add data although country not present in load
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this Pull Request
Bugfix for
approximate_missing_eia_stats()If ES or PT were not present in the list of optimized countries, the IEA hydropower approximation would fail, i.e.
approximate_missing_eia_stats(). Therefore runs, where the optioneia_approximate_missingwas activated would fail for weather years not part of the IEA data. The functoin would throw a key error:KeyError: "None of [Index(['ES', 'PT'], dtype='object', name='name')] are in the [index]"The reason is that
approximate_missing_eia_stats()overwrites anomalous years for 'ES' and 'PT'. By checking if the countries are present before overwriting the data, the bug can be fixed:if ("ES") in runoff:runoff.loc[1978, ["ES"]] = runoff.loc[1979, ["ES"]]if ("PT") in runoff:runoff.loc[1978, ["PT"]] = runoff.loc[1979, ["PT"]]Bugfix for
manual_adjustment()The
copy_timeslice()procedure will add countries to the load data which are not present in the countries list, if afn_loadobject is provided. Ifmanual_adjustment()is called, which usescopy_timeslice(), this will partly add data for some countries such as GB. Later on, this causes anAssertionError: Load data contains nans.Checklist
envs/environment.yaml.config.default.yaml.doc/configtables/*.csv.doc/release_notes.rstis added.