Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion src/satellite_consumer/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ class SatelliteMetadata:
(
"Rectified (level 1c) Meteosat-12 image data for Europe and Africa. ",
"The data is transmitted as High Rate transmissions in 16 spectral channels ",
"(12 low and 4 high resolution). ",
"(12 low and 4 high resolution). This is the low resolution subset.",
"See https://user.eumetsat.int/catalogue/EO:EUM:DAT:0662",
),
),
Expand All @@ -560,5 +560,27 @@ class SatelliteMetadata:
# Matches the files that cover only the top of the disk (UK)
file_filter_regex=r"\S+BODY\S+00(?:[3][2-9]|40).nc$",
),
"odegree-12-highres": SatelliteMetadata(
region="europe, africa",
cadence_mins=10,
longitude=0.0,
height=35786400,
product_id="EO:EUM:DAT:0665",
channels=MTG_1KM_CHANNELS,
description="".join(
(
"Rectified (level 1c) Meteosat-12 image data for Europe and Africa. ",
"The data is transmitted as High Rate transmissions in 16 spectral channels ",
"(12 low and 4 high resolution). This is the high resolution subset.",
"See https://user.eumetsat.int/catalogue/EO:EUM:DAT:0665",
),
),
spatial_coordinates={
"x_geostationary": list(np.linspace(-5567499.9985508835, 5567499.998550878, 22272)),
"y_geostationary": list(np.linspace(-5567499.998550887, 5567499.998550878, 22272)),
},
# Matches the files that cover only the top of the disk (UK)
file_filter_regex=r"\S+BODY\S+00(?:[3][2-9]|40).nc$",
),
}
"""Metadata for the available satellite data sets."""
2 changes: 1 addition & 1 deletion src/satellite_consumer/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def _serialize(d: dict[str, Any]) -> dict[str, Any]:
if "time" not in da.dims:
time = pd.to_datetime(rounded_time)
da = da.assign_coords({"time": time}).expand_dims("time")

da.attrs.pop("_FillValue", None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure this is right? I saw some errors like this with the upgrade from zarr2 to zarr3. What error do you get if you dont include this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this isn't here, it gives an error of

16:58:40.876 ERROR   [main.py:119] | Error: failed to prevent overwriting existing key _FillValue in attrs. This is probably an encoding field used by xarray to describe how a variable is serialized. To proceed, remove this key from the variable's attributes manually. 

Removing the FillValue here fixes that and allows for the dataarrays to be added to the Icechunk store successfully

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a funny, does that happen for you on the other satellites?

What python version you running? What zarr, xarray and icechunk version you running?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its with Zarr 3.1.1, Xarray 2025.7.1, icechunk 1.1.1

It doesn't with the other ones, but the MTG format is quite a bit different than the MSG ones. In #44, this also does show up for other geostationary satellites as well.

# Increase clarity of coordinates, including coordinate dimension names and attributes
da = da.rename({"x": "x_geostationary", "y": "y_geostationary"})
for name in ["x_geostationary", "y_geostationary"]:
Expand Down