mcmancini / UkWofost

Implementation of the WOFOST crop yield model to simulate crop yields in the UK
https://netzeroplus.ac.uk/
1 stars 0 forks source link

Modify ERA5 weather data provider to be able to take also OS code locations instead of just parcels #45

Closed mcmancini closed 6 months ago

mcmancini commented 6 months ago

At the moment, the ERA5 Weather data provider retrieves weather data for the location of a parcel defined as an instance of the Parcel class. I want a more general behaviour where I can query data based on either a parcel, or a location. This includes the following:

  1. Class WofostSimulator:
    • add the option to pass a (lon-lat) tuple as an argument for what's currently called parcel. Maybe rename this to location or something more general, rather than parcel.
    • As now the parcel attribute can be either a tuple, a string (OS grid code) or an instance of the Parcel class, make sure to have a procedure to build the required attributes correctly (i.e., OS code from lon-lat pair if that's what's being passed to instantiate the WofostSimulator)
  2. Class Era5WeatherDataProvider: at the moment this can only take a parcel to be instantiated. Modify it such that it can also take an OS grid code of a location.
mcmancini commented 6 months ago

Changes merged into dev with PR https://github.com/mcmancini/UkWofost/pull/47