This repository was archived by the owner on Jun 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
ocf_datapipes/load/nwp/providers Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,16 @@ def open_excarta(zarr_path) -> xr.Dataset:
37
37
Xarray DataArray of the NWP data
38
38
"""
39
39
# Doing the wildcard doesn't really work for Excarta at the moment
40
- zarr_paths = []
41
- for issue_date in pd .date_range (start = "2021-01-01" , end = "2023-12-31" , freq = "D" ):
42
- zarr_paths .append (
43
- issue_date .strftime (
44
- "https://storage.googleapis.com/excarta-public-us/hindcast/20220225/%Y/%Y%m%d.zarr"
40
+ if "*" in str (zarr_path ):
41
+ zarr_path = []
42
+ for issue_date in pd .date_range (start = "2021-01-01" , end = "2023-12-31" , freq = "D" ):
43
+ zarr_path .append (
44
+ issue_date .strftime (
45
+ "https://storage.googleapis.com/excarta-public-us/hindcast/20220225/%Y/%Y%m%d.zarr"
46
+ )
45
47
)
46
- )
47
48
# Open the data
48
- nwp = open_zarr_paths (zarr_paths , time_dim = "init_time_utc" , preprocessor = preprocess_excarta )
49
+ nwp = open_zarr_paths (zarr_path , time_dim = "init_time_utc" , preprocessor = preprocess_excarta )
49
50
nwp = nwp .rename ({"prediction_timedelta" : "step" })
50
51
nwp = nwp .sortby ("init_time_utc" )
51
52
# wind is split into speed and direction, so would want to decompose it with sin and cos
You can’t perform that action at this time.
0 commit comments