-
Notifications
You must be signed in to change notification settings - Fork 122
Refresh convert.py #473
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
base: master
Are you sure you want to change the base?
Refresh convert.py #473
Conversation
|
I'll try to have a look next week. Some brief comments:
|
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
Hey @euronion, thanks for your feedback and suggestions. Since your last comment, I added type hints and checked any overlaps with #346 . Both PRs implement a clearer logic for aggregation. From that PR, I copied the case in which a default capacity layout (1MW per grid cell) is used if no layout or matrix is provided. That PR also adds a feature to resample the output time series. Let me know if that is a feature that you also want to be implemented. All tests now run error free. |
Closes #362 .
Changes proposed in this Pull Request
This PR implements a refreshed convert.py with hopefully clearer arguments and logic. Tests and Jupyter notebooks have been updated to reflect these changes.
Newly introduced arguments are:
mean_over_timein place ofcapacity_factorsum_over_timecapacity_unitsArguments that change meaning are:
capacity_factorin place ofper_unitRemoved arguments are:
capacity_factor_timeseriesper_unitA new logic has also been introduced to account for cases where aggregation is to be performed (
aggregate=Truewhenmatrix,shapesorlayoutis passed) and cases where the capacity and capacity factor have to be computed after the aggregation (capacity_factor=Trueorreturn_capacity=True).convert_temperature,convert_soil_temperature, andconvert_dewpoint_temperaturehave been combined into a singleconvert_temperaturebecause all those functions were simply converting Kelvin to Celsius. They don't seem to be used outside convert.py.Lastly, units are now specified in each of the
convert_*function.Checklist
doc.environment.yaml,environment_docs.yamlandsetup.py(if applicable).doc/release_notes.rstof the upcoming release is included.