Skip to content

Commit a405b06

Browse files
authored
Merge pull request #131 from openclimatefix/jacob/solar-location
Add solar position for PV-sites
2 parents 767c775 + 74aae2b commit a405b06

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pvnet/models/base_model.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def make_clean_data_config(input_path, output_path, placeholder="PLACEHOLDER"):
6262

6363
if "nwp" in config["input_data"]:
6464
for source in config["input_data"]["nwp"]:
65-
if config["input_data"]["nwp"][source][f"nwp_zarr_path"] != "":
66-
config["input_data"]["nwp"][source][f"nwp_zarr_path"] = f"{placeholder}.zarr"
65+
if config["input_data"]["nwp"][source]["nwp_zarr_path"] != "":
66+
config["input_data"]["nwp"][source]["nwp_zarr_path"] = f"{placeholder}.zarr"
6767

6868
if "pv" in config["input_data"]:
6969
for d in config["input_data"]["pv"]["pv_files_groups"]:

pvnet/models/multimodal/multimodal.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,11 @@ def forward(self, x):
343343

344344
if self.include_sun:
345345
sun = torch.cat(
346-
(x[BatchKey.gsp_solar_azimuth], x[BatchKey.gsp_solar_elevation]), dim=1
346+
(
347+
x[BatchKey[f"{self.target_key_name}_solar_azimuth"]],
348+
x[BatchKey[f"{self.target_key_name}_solar_elevation"]],
349+
),
350+
dim=1,
347351
).float()
348352
sun = self.sun_fc1(sun)
349353
modes["sun"] = sun

0 commit comments

Comments
 (0)