Skip to content

Commit

Permalink
hot fix for multiple spatial coords
Browse files Browse the repository at this point in the history
  • Loading branch information
dfulu committed Oct 25, 2023
1 parent da41084 commit 0643efa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pvnet_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,12 @@ def app(
# Download nwp data
logger.info("Downloading nwp data")
fs = fsspec.open(os.environ["NWP_ZARR_PATH"]).fs
fs.get(os.environ["NWP_ZARR_PATH"], "nwp.zarr", recursive=True)

# Hot fix as datapipes can't handle both lat-lon and osgb on same coord
fs.get(os.environ["NWP_ZARR_PATH"], "raw_nwp.zarr", recursive=True)
ds_nwp = xr.open_zarr("raw_nwp.zarr")
ds_nwp.drop_vars(("latitude", "longitude")).to_zarr("nwp.zarr")
del ds_nwp

# ---------------------------------------------------------------------------
# 2. Set up data loader
Expand Down

0 comments on commit 0643efa

Please sign in to comment.