Skip to content

Add initial 'metimage_l1b_nc' reader - #832

Merged
djhoese merged 3 commits into
ssec:mainfrom
djhoese:feat-metimage-reader
Sep 2, 2026
Merged

djhoese merged 3 commits into
ssec:mainfrom
djhoese:feat-metimage-reader

Conversation

@djhoese

@djhoese djhoese commented Aug 24, 2026

Copy link
Copy Markdown
Member

Written by Claude.

@djhoese djhoese added this to the Polar2Grid 3.3 milestone Aug 24, 2026
@djhoese
djhoese requested a review from kathys August 24, 2026 17:35
@djhoese djhoese self-assigned this Aug 24, 2026
@djhoese djhoese added enhancement component:reader reading/loading data labels Aug 24, 2026
@djhoese

djhoese commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

There is an optional orthorectify option in Satpy. I'm still figuring out if that is useful or recommended.

@coveralls

coveralls commented Aug 24, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 83.602% (+0.03%) from 83.573% — djhoese:feat-metimage-reader into ssec:main

@kathys kathys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just one comment. Can you please add support for false_color RGBs too?

@djhoese

djhoese commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

Natural color (most of this recipe comes from Satpy I think):

image

True color:

image

@djhoese

djhoese commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

I started looking into why the true color looks darker than other instruments (ex. VIIRS) and the conclusion is that the blue channel is far enough away wavelength-wise that it isn't able to produce the same type of image. There are other small things like VIIRS having higher resolution versions of the channel so ratio sharpening is being performed and VIIRS in Polar2Grid also uses CREFL atmospheric correction versus MetImage's pyspectral rayleigh correction, but those contributed much less to the difference between the two true colors.

@djhoese

djhoese commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

Note pyspectral needs this PR to avoid a lot of warnings about the instrument name not being found.

@djhoese

djhoese commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

@kathys Do you know if Liam has tried EWA/fornav resampling on metimage data? I'm curious if he has guesses for the best flags (-d/-D). Right now I'm using 40/2 which matches VIIRS. I would ask Andrea from EUMETSAT but he just left for vacation.

@kathys

kathys commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Dave, I asked Liam about the best EWA options for MetImage data, and he said he has not tried to make an image from the data yet. But he said Douglas has. @DougASchu can you provide us with any info on the EWA resampling options that you are using?

@DougASchu

Copy link
Copy Markdown
Contributor

@kathys I've been using the Satpy METimage reader built-in to P2G v3.2 without any specific adjustments to the resampling, so whatever the default resampling is from Satpy/P2G is what we've been using to create GeoTIFFs and then downstream PNGs/JPGs/webp images. For example:

sga1_vii_vii_668_20260825_160042_central_north_america

Using a command like:
polar2grid.sh -r vii_l1b_nc -w geotiff -p vii_668 --fill-value 0 --keep-palette -g central_north_america --grid-configs /home/dbvm/dbvm/scripts/grid_configs/psas_regional.yaml --grid-coverage=0.01 --extra-config-path /home/dbvm/dbvm/scripts/p2g_configs/conus --extra-config-path /home/dbvm/dbvm/scripts/p2g_configs/common --num-workers 16 -f input

@djhoese I also just wanted to make a comment on the METimage true color discussion above. @spruceboy and I noticed this true color mismatch, and I came up with a set of tweaks to treat the METimage bands like their MODIS counterparts in the CREFL code, which isn't a 1-to-1 match with VIIRS CREFL true color but gets fairly close to MODIS CREFL true color (see examples below). Certainly it reduces the "yellow skew" effect. I could share that if you are interested. I wouldn't call it validated in any way, just something to make the output more pleasant to look at.

sga1_vii_true_color_20260821_154330_MADISON noaa21_viirs_true_color_20260821_191157_MADISON aqua_modis_true_color_20260821_210523_MADISON

@djhoese

djhoese commented Aug 27, 2026 •

Copy link
Copy Markdown
Member Author

Thanks @DougASchu. I think I'm going to avoid CREFL for now just with how much people want to get this reader and data processed. I'm getting a pull request ready for Satpy that should improve dask chunking for metimage a bit, but I still need to get some thing finalized.

I asked some EUMETSAT folks and they said they didn't know of any effort to make the MetImage true color more like VIIRS. I do notice in your images Douglas that it is much closer to MODIS than I expected.

Edit: For my future reference, a chunk size in P2G of 1916 seems to perform best with these planned changes.

@djhoese

djhoese commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Not sure if it is MetImage or METImage or METimage...I'll merge this when CI passes and then fix the naming later.

@djhoese
djhoese merged commit 01bf225 into ssec:main Sep 2, 2026
9 checks passed
@djhoese
djhoese deleted the feat-metimage-reader branch September 2, 2026 02:33
@djhoese

djhoese commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Ah I also never finalized the orthorectify decision and if that was useful or preferred.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants