Skip to content
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

Add era5 examples as python scripts #61

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from

Conversation

uvchik
Copy link
Member

@uvchik uvchik commented Jun 16, 2021

Add Python examples

  • Download era5 data (single location and bounding box)
  • process single location with windpowerlib
  • process single location with pvlib
  • process bounding box

@uvchik uvchik self-assigned this Jun 16, 2021
@uvchik uvchik added this to the v0.1.0 milestone Jun 16, 2021
@uvchik uvchik marked this pull request as draft June 16, 2021 14:04
@uvchik uvchik mentioned this pull request Jun 17, 2021
3 tasks
@uvchik uvchik marked this pull request as ready for review June 18, 2021 08:25
from feedinlib.era5 import weather_df_from_era5


def processing_multi_locations():
Copy link
Member

@birgits birgits Jul 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would call the function processing_multiple_locations. Same goes for the file name which I would change to ..._multiple_locations.py.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second.

)


def download_era5_multiprocessing_examples():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the function name confusing. It sounds like the examples are downloaded in the function. I would either just call it download_era5_multiprocessing or download_era5_multiprocessing_example.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I get it right, this is parallel download rather than "multi processing", am I right?

@@ -84,14 +80,11 @@ def read(*names, **kwargs):
"cdsapi >= 0.1.4",
"geopandas",
"numpy >= 1.17.0",
"oedialect >= 0.0.6.dev0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the oedialect is needed to download open_FRED weather data. Shouldn't we keep this as a requirement? I see the weather data download as an essential functionality of the feedinlib.

@birgits
Copy link
Member

birgits commented Jul 18, 2021

Thank you @uvchik for picking up work on the feedinlib again and adding new functionality to the examples, especially the multiprocessing parts which are quite useful. However, I think we need to discuss whether we want to provide example notebooks or python files, because in my opinion having both leads to an unnecessary maintenance overhead.
I prefer notebooks as they are an easy entry point for people who don't know python very well, they can be nicely included in the documentation and we can offer them on binder so people can use the feedinlib without having to install it, if they just want to try it out (btw, did you take out binder @uvchik?). Furthermore, they can be converted to python scripts if someone prefers them, so I don't see the advantage of having additional python scripts. What's your opinion on that @oemof/feedinlib people?

)


def download_era5_multiprocessing_examples():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I get it right, this is parallel download rather than "multi processing", am I right?

from feedinlib.era5 import weather_df_from_era5


def processing_multi_locations():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second.

Comment on lines +88 to +89
"start_date": "2017-01-01",
"end_date": "2017-12-31",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the top, you talk about time zones. Maybe go from 2016-12-21 to 2018-01-01 to emphasize that point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants