diff --git a/presto/dataset.py b/presto/dataset.py index 64997c2..e4c189b 100644 --- a/presto/dataset.py +++ b/presto/dataset.py @@ -495,11 +495,11 @@ def nc_to_arrays( cls, filepath: Path ) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]: ds = xr.open_dataset(filepath) - epsg_coords = CRS.from_wkt(xr.open_dataset(filepath).crs.attrs["crs_wkt"]).to_epsg() + epsg = int(CRS.from_wkt(xr.open_dataset(filepath).crs.attrs["crs_wkt"]).to_epsg()) inarr = ds.drop("crs").to_array(dim="bands") eo_data, mask = cls._extract_eo_data(inarr) - latlons = cls._extract_latlons(inarr, epsg_coords) + latlons = cls._extract_latlons(inarr, epsg) months = cls._extract_months(inarr) if cls.Y not in ds: