Breakthrough-Energy/PowerSimData

Store PyPSA profiles in blob storage when first used

jenhagg opened this issue ยท 1 comments

๐Ÿš€

  • Is your feature request essential for your project?

Describe the workflow you want to enable

The profiles that come with a pypsa.Network need to be saved elsewhere when we convert to a grid object, so that after running a simulation we can call get_wind, get_solar, etc (since these work by transforming the base profile). Existing code already handles profiles from blob storage by caching them locally, so no code changes are needed once the profiles are there.

Describe your proposed implementation, if applicable

When creating a scenario, if the profiles don't exist in blob storage (for the current grid model and profile version), and a user has the access key configured (in an environment variable or similar), upload the profile. Otherwise, we should either output a warning or raise an error which indicates that the profile needs to be uploaded for the scenario results to behave as expected, e.g. a user can access the profiles in the analyze state.

Code done in #722, and profiles for existing networks have been uploaded.