feedinlib icon indicating copy to clipboard operation
feedinlib copied to clipboard

Revise weather df from era5

Open uvchik opened this issue 4 years ago • 1 comments

Revise the functions weather_df_from_era5() and some connected functions:

  • add function extract_coordinates_from_era5(filename) to get a 'GeoSeries` with all coordinates of the era5-netCDF-file (5aa50ea)
  • If only one point was found within a polygon an error was raised -> fixed (c737488)
  • If no point was found in some cases an error was raised -> fixed (ea93026e)
  • A parameter was added to decide whether the levels with the coordinates were dropped or not (792883a)
  • Add tests for the era5.py module
  • Add coordinates as index name if levels are dropped (6e5c70b) e.g. print(df.index.name) -> (12.3, 53.2)
  • If one Point is passed as a shapely.geometry the nearest point is used instead of within as it was before.

~~The last point does not work, so I added a failing test. See code comment below.~~ -->fixed

One parameter in the function is called area but it can be a point, so I would like to rename it to geometry or filter or...

uvchik avatar Jun 18 '21 14:06 uvchik

Sorry, it is not good practice to remove the 3.6 support within this PR. I was just to lazy to open an extra one. If you have objections I will revert it.

uvchik avatar Jun 21 '21 09:06 uvchik