Skip to content

Commit

Permalink
small changes to pass ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
zakwatts committed Sep 25, 2023
1 parent 6ee195d commit 1a44516
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/join_backtest.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
""" A script to download and processing the PVNet backtests that have been uploaded to GCP,
to ouput the pv data saved as Zarr. Currently set up for the 2022 backtest used for
the PVLive and PVNet evaluation.
"""
""" A script to download and processing the PVNet backtests that have been uploaded to GCP.
# dir = "gs://solar-pv-nowcasting-data/backtest/pvnet_v2_2022/hindcasts/"
# filename = 'gs://solar-pv-nowcasting-data/backtest/pvnet_v2_2022/hindcasts/2022-01-01T03:00:00.nc'
# save_to = "/home/zak/data/fc_bt_comp/pvnet_backtest_2022.zarr"
To ouput the forecast as a zarr.
"""

import click
import xarray as xr
import fsspec
import xarray as xr


@click.command()
Expand All @@ -26,13 +22,17 @@
help="The location to save the processed data including the filename.",
)
def main(dir, save_to):
"""
Process the specified directory and save the processed data to the specified location.
"""
# get all the files
fs = fsspec.open(dir).fs
files = fs.ls(dir)

# Can select a proportion of the data to processes as a test
N_start = 10080
N_end = 10100
# N_start = 10080
# N_end = 10100

N_files = len(files)
all_dataset_xr = []
# Change to iterate through N_start to N_end if wanting to use a sample
Expand Down

0 comments on commit 1a44516

Please sign in to comment.