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. |
|
thanks for the PR @eantonini and sorry things take so long here. Such a refactor on the UX is definitely needed. I am wondering if we can make things more structured and transparent if another set of arguments, such as |
|
I am closing this as we should go for a re-stucturing like this #489 |
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.