Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 23, 2024
1 parent a20036d commit 602f87b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions ocf_datapipes/training/pvnet_site.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Create the training/validation datapipe for training the PVNet Model"""

import logging
from functools import partial
from datetime import datetime, timedelta
from functools import partial
from typing import List, Optional

import xarray as xr
Expand Down Expand Up @@ -249,7 +249,7 @@ def construct_sliced_data_pipeline(
normalize_provider = "gfs_india"
else:
normalize_provider = conf_nwp[nwp_key].nwp_provider

nwp_datapipes_dict[nwp_key] = nwp_datapipe.normalize(
mean=NWP_MEANS[normalize_provider],
std=NWP_STDS[normalize_provider],
Expand Down
30 changes: 15 additions & 15 deletions ocf_datapipes/utils/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __getitem__(self, key):
"excarta",
"merra2",
"merra2_uk",
"mo_global"
"mo_global",
]

# ------ UKV
Expand Down Expand Up @@ -133,7 +133,7 @@ def __getitem__(self, key):
UKV_STD = _to_data_array(UKV_STD)
UKV_MEAN = _to_data_array(UKV_MEAN)

# --- MO Global
# --- MO Global

MO_GLOBAL_INDIA_MEAN = {
"temperature_sl": 295.34392488,
Expand All @@ -148,7 +148,7 @@ def __getitem__(self, key):
"visibility_sl": 23181.81547681,
}

MO_GLOBAL_INDIA_STD = {
MO_GLOBAL_INDIA_STD = {
"temperature_sl": 12.26983825,
"wind_u_component_10m": 3.45169835,
"wind_v_component_10m": 2.9825603,
Expand Down Expand Up @@ -219,34 +219,34 @@ def __getitem__(self, key):
"prate": 5.965701e-05,
"u10": 3.4826114,
"v10": 3.167296,
"u100":4.140226,
"v100":3.984121,
"u100": 4.140226,
"v100": 3.984121,
"dlwrf": 79.30329,
"dswrf": 325.58582,
"hcc": 39.91955,
"lcc": 23.208075,
"mcc": 33.283035,
"r": 25.545837,
"mcc": 33.283035,
"r": 25.545837,
"sde": 0.10192183,
"tcc": 42.583195,
"vis": 3491.437
"vis": 3491.437,
}
GFS_INDIA_MEAN_DICT = {
"t": 298.27713,
"prate": 1.7736e-05,
"u10": 1.5782778,
"v10": 0.09856875,
"u100":1.4558668,
"v100":-0.28256148,
"u100": 1.4558668,
"v100": -0.28256148,
"dlwrf": 356.57776,
"dswrf": 284.358,
"hcc": 26.965801,
"lcc": 9.2288,
"mcc": 17.2132,
"r": 38.2474,
"mcc": 17.2132,
"r": 38.2474,
"sde": 0.02070413,
"tcc": 36.962795,
"vis": 23386.936
"vis": 23386.936,
}


Expand Down Expand Up @@ -444,7 +444,7 @@ def __getitem__(self, key):
excarta=EXCARTA_STD,
merra2=MERRA2_STD,
merra2_uk=UK_MERRA2_STD,
mo_global=MO_GLOBAL_INDIA_STD
mo_global=MO_GLOBAL_INDIA_STD,
)
NWP_MEANS = NWPStatDict(
ukv=UKV_MEAN,
Expand All @@ -455,7 +455,7 @@ def __getitem__(self, key):
excarta=EXCARTA_MEAN,
merra2=MERRA2_MEAN,
merra2_uk=UK_MERRA2_MEAN,
mo_global=MO_GLOBAL_INDIA_MEAN
mo_global=MO_GLOBAL_INDIA_MEAN,
)

# --------------------------- SATELLITE ------------------------------
Expand Down

0 comments on commit 602f87b

Please sign in to comment.