Skip to content

Conversation

@jacobbieker
Copy link
Member

@jacobbieker jacobbieker commented Aug 12, 2025

Pull Request

Description

Adds the MTG High resolution config, with the correct product ID to get the 4 high res channels.

How Has This Been Tested?

Running the configuration.

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@jacobbieker jacobbieker requested a review from devsjc August 12, 2025 10:08
@jacobbieker jacobbieker self-assigned this Aug 12, 2025
@jacobbieker jacobbieker added the enhancement New feature or request label Aug 12, 2025
@jacobbieker jacobbieker marked this pull request as ready for review August 12, 2025 10:08
@peterdudfield
Copy link
Contributor

Thanks @jacobbieker for this. Have you tested this against EUMETSAT?

@jacobbieker
Copy link
Member Author

@peterdudfield Yeah, it works. Here is the output from the first two timesteps of running the consumer on the 1000m high res MTG data:

<xarray.Dataset> Size: 2GB
Dimensions:          (time: 2, y_geostationary: 11136, x_geostationary: 11136,
                      variable: 2)
Coordinates:
  * time             (time) datetime64[ns] 16B 2025-04-01T00:10:00 2025-04-01...
  * y_geostationary  (y_geostationary) float64 89kB -5.567e+06 ... 5.567e+06
  * variable         (variable) object 16B 'ir_105' 'ir_38'
  * x_geostationary  (x_geostationary) float64 89kB 5.567e+06 ... -5.567e+06
Data variables:
    data             (time, y_geostationary, x_geostationary, variable) float32 2GB dask.array<chunksize=(1, 696, 696, 1), meta=np.ndarray>
Attributes: (12/17)
    time_parameters:     {'nominal_start_time': '2025-04-01T00:10:00', 'nomin...
    standard_name:       toa_brightness_temperature
    resolution:          1000
    start_time:          2025-04-01T00:10:00
    reader:              fci_l1c_nc
    file_type:           fci_l1c_hrfi
    ...                  ...
    units:               K
    calibration:         brightness_temperature
    sensor:              fci
    platform_name:       Meteosat-12
    area:                {'fill': {'description': 'fill', 'projection': {'pro...
    variables:           {'ir_38': {'coordinates': 'y x', 'wavelength': '3.8\...

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.

@devsjc
Copy link
Contributor

devsjc commented Sep 22, 2025

I wonder if this can actually be achieved with the existing odegree-12 config, and it's just a matter of changing the RESOLUTION option to 500 when starting the download. I appreciate the coordinates would then be wrong, but I think with icechunk those aren't used anymore anyway...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants