Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Dec 2, 2024
1 parent 64517bd commit be7a556
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions india_forecast_app/data/nwp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
def regrid_nwp_data(nwp_ds: xr.Dataset, target_coords_path: str) -> xr.Dataset:
"""This function loads the NWP data, then regrids and saves it back out if the data is not
on the same grid as expected. The data is resaved in-place.
method can be 'conservative' or 'bilinear'
"""

logger.info(f"Regridding NWP data to expected grid to {target_coords_path}")
Expand All @@ -27,7 +25,7 @@ def regrid_nwp_data(nwp_ds: xr.Dataset, target_coords_path: str) -> xr.Dataset:

if not needs_regridding:
logger.info(f"No NWP regridding required - skipping this step")
return
return ds_raw

# flip latitude, so its in ascending order
if ds_raw.latitude[0] > ds_raw.latitude[-1]:
Expand Down
3 changes: 1 addition & 2 deletions india_forecast_app/models/pvnet/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
import xarray as xr
import yaml
from ocf_datapipes.batch import BatchKey
from ocf_datapipes.utils.consts import ELEVATION_MEAN, ELEVATION_STD
from ocf_datapipes.config.model import NWP
from ocf_datapipes.utils.consts import ELEVATION_MEAN, ELEVATION_STD
from pydantic import BaseModel

from india_forecast_app.data.nwp import regrid_nwp_data

from .consts import (
nwp_ecmwf_path,
nwp_gfs_path,
Expand Down

0 comments on commit be7a556

Please sign in to comment.