From 1a44516f4c9c7a7a75e4ef572be60f0443021848 Mon Sep 17 00:00:00 2001 From: Megawattz Date: Mon, 25 Sep 2023 11:17:47 +0000 Subject: [PATCH] small changes to pass ruff --- scripts/join_backtest.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/join_backtest.py b/scripts/join_backtest.py index af241c52..f7e7e124 100644 --- a/scripts/join_backtest.py +++ b/scripts/join_backtest.py @@ -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() @@ -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