diff --git a/india_forecast_app/models/pvnet/utils.py b/india_forecast_app/models/pvnet/utils.py index 59e4fb8..9dfbb89 100644 --- a/india_forecast_app/models/pvnet/utils.py +++ b/india_forecast_app/models/pvnet/utils.py @@ -13,7 +13,7 @@ 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 india_forecast_app.data import nwp from .consts import ( nwp_ecmwf_path, @@ -160,8 +160,11 @@ def process_and_cache_nwp(nwp_config: NWPProcessAndCacheConfig): nwp_channels = list(nwp_config.config.nwp_channels) ds = ds.sel(variable=nwp_channels) + # get directory of file + regrid_coords = os.path.dirname(nwp.__file__) + # regrid data - ds = regrid_nwp_data(ds, "india_forecast_app/data/mo_global/india_coords.nc") + ds = nwp.regrid_nwp_data(ds, f"{regrid_coords}/mo_global/india_coords.nc") # Save destination path log.info(f"Saving NWP data to {dest_nwp_path}")