Skip to content

Commit

Permalink
Fixed GeospatialScenario running geospatial jobs with auto_templating
Browse files Browse the repository at this point in the history
  • Loading branch information
tobin-ford committed Nov 8, 2024
1 parent c7a39c4 commit 9a087a8
Show file tree
Hide file tree
Showing 3 changed files with 848 additions and 4,350 deletions.
8 changes: 6 additions & 2 deletions pvdeg/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,8 @@ def __init__(
geospatial=False,
weather_data: xr.Dataset = None,
meta_data: pd.DataFrame = None,
func: Callable = None,
template: xr.Dataset = None,
):
super().__init__(
name=name,
Expand All @@ -1106,6 +1108,8 @@ def __init__(
)
self.geospatial = geospatial
self.hpc = hpc
self.func = func
self.template = template

def __eq__(self, other):
raise NotImplementedError("""
Expand Down Expand Up @@ -1658,7 +1662,7 @@ def addJob(
if template is None:

# take the weather datapoints specified by metadata and create a template based on them.
geo_weather_sub = self.weather_data.sel(gid=self.meta_data.index)
self.weather_data = self.weather_data.sel(gid=self.meta_data.index)
template = pvdeg.geospatial.auto_template(func=func, ds_gids=self.weather_data)

self.template = template
Expand Down Expand Up @@ -2184,4 +2188,4 @@ def format_geo_weather(self):
</div>
"""

return weather_data_html
return weather_data_html
Loading

0 comments on commit 9a087a8

Please sign in to comment.