From cd7785518548e87715690ce29f7bad0b4aee96bf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:58:06 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ocf_datapipes/load/nwp/nwp.py | 2 +- ocf_datapipes/training/pseudo_irradience.py | 36 ++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ocf_datapipes/load/nwp/nwp.py b/ocf_datapipes/load/nwp/nwp.py index 6c34453dd..6cc90ec38 100644 --- a/ocf_datapipes/load/nwp/nwp.py +++ b/ocf_datapipes/load/nwp/nwp.py @@ -8,9 +8,9 @@ from torchdata.datapipes import functional_datapipe from torchdata.datapipes.iter import IterDataPipe +from ocf_datapipes.load.nwp.providers.ecmwf import open_ifs from ocf_datapipes.load.nwp.providers.icon import open_icon_eu, open_icon_global from ocf_datapipes.load.nwp.providers.ukv import open_ukv -from ocf_datapipes.load.nwp.providers.ecmwf import open_ifs _log = logging.getLogger(__name__) diff --git a/ocf_datapipes/training/pseudo_irradience.py b/ocf_datapipes/training/pseudo_irradience.py index c57ca64db..0f2b2c137 100644 --- a/ocf_datapipes/training/pseudo_irradience.py +++ b/ocf_datapipes/training/pseudo_irradience.py @@ -108,7 +108,7 @@ def _normalize_by_pvlib(pv_system): ) # Guess want fraction of total irradiance on panel, to get fraction to do with capacity fraction_clear_sky = total_irradiance["poa_global"] / ( - clear_sky["dni"] + clear_sky["dhi"] + clear_sky["ghi"] + clear_sky["dni"] + clear_sky["dhi"] + clear_sky["ghi"] ) print(fraction_clear_sky) pv_system /= pv_system.capacity_watt_power @@ -380,23 +380,23 @@ def _get_id_from_location(x): def pseudo_irradiance_datapipe( - configuration_filename: Union[Path, str], - use_sun: bool = True, - use_nwp: bool = True, - use_sat: bool = True, - use_hrv: bool = True, - use_pv: bool = True, - use_topo: bool = True, - use_future: bool = False, - size: int = 256, - size_meters: int = 256_000, - use_meters: bool = False, - start_time: datetime.datetime = datetime.datetime(2014, 1, 1), - end_time: datetime.datetime = datetime.datetime(2023, 1, 1), - batch_size: int = 1, - normalize_by_pvlib: bool = True, - one_d: bool = False, - is_test: bool = False, + configuration_filename: Union[Path, str], + use_sun: bool = True, + use_nwp: bool = True, + use_sat: bool = True, + use_hrv: bool = True, + use_pv: bool = True, + use_topo: bool = True, + use_future: bool = False, + size: int = 256, + size_meters: int = 256_000, + use_meters: bool = False, + start_time: datetime.datetime = datetime.datetime(2014, 1, 1), + end_time: datetime.datetime = datetime.datetime(2023, 1, 1), + batch_size: int = 1, + normalize_by_pvlib: bool = True, + one_d: bool = False, + is_test: bool = False, ) -> IterDataPipe: """ Make Pseudo-Irradience Datapipe