Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False color compositor using a land sea mask to colorize IR window channel #2721

Open
TAlonglong opened this issue Jan 17, 2024 · 6 comments · May be fixed by #2722
Open

False color compositor using a land sea mask to colorize IR window channel #2721

TAlonglong opened this issue Jan 17, 2024 · 6 comments · May be fixed by #2722
Assignees

Comments

@TAlonglong
Copy link
Collaborator

TAlonglong commented Jan 17, 2024

Feature Request

In the past I have used a script doing this. Examples can be seen here: https://api.met.no/weatherapi/geosatellite/1.4/?area=global&type=infrared

Revising my old code, I want to add this as an compositor.

I'm not sure if this is of interest of others, but it would make my setup easier.

If you think this is to special, I think I can import this compositor separate from satpy

@TAlonglong TAlonglong linked a pull request Jan 17, 2024 that will close this issue
4 tasks
@mraspaud
Copy link
Member

I think this is definitely interesting!

@gerritholl
Copy link
Collaborator

If I understand it correctly, that means the user would pass one background image to use for land and another background image to use for sea?

Looks interesting, but should it be a land-sea mask or a land-water mask? In your link, large lakes are coloured as land, whereas they probably should be coloured as sea (particularly clear at the Caspian Sea), so unless this is specifically about marine forecasting or so, I would call it a land-water mask from the start and implement it as such.

@TAlonglong
Copy link
Collaborator Author

No @gerritholl, one static image containing a land sea mask as https://github.com/pytroll/satpy/blob/main/satpy/etc/composites/fci.yaml#L165-L168

But I agree, I want to improve that also inland lakes are colored as water. So it is I good idea to use the term water instead of sea.

The draft PR already colors inland lakes as water

@simonrp84
Copy link
Member

I also have a need for a land/sea mask compositor and as you've shown @strandgren has also used one for the geocolor composite. Seems like there is a common need for a coordinated approach on the best way to organise this. Perhaps a separate compositor that can be used by all of our various needs, which can load a LSM (preferably including cached ones for the GEO sensors to speed things up, rather than resampling from a lat/lon image each time) and with an optional argument to specify the LSM resolution.

Don't have much time, but am happy to help implement something as the idea develops :-)

@TAlonglong
Copy link
Collaborator Author

Yeah @simonrp84, But it don't have to be a lsm or lwm (land water mask), but a generic mask dataset.

A mask is also applied using a dataset with the CloudType( I think) NWCSAF product.

@strandgren
Copy link
Collaborator

I also think this is a good idea. For GeoColor I made it quite generic (even though it's currently locked inside the GeoColor LowCloudCompositor), where the user provides a land-water mask dataset as a static image (geotiff) using the StaticImageCompositor and two lists of values that represent land and water respectively. So maybe you could build from that approach?

Because I think that this can rather easily be made more generic with for example a LandWaterMaskCompositor that takes a dataset/composite as input (loaded from e.g. satellite product directly or from a static image using the StaticImageCompositor ) and then the two lists of values that should represent land and water respectively. Under the hood I guess the MaskingCompositor can be utilized for more flexibility? The question is if the MaskingCompositor can maybe do the job alone, without the need for an additional compositor?

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

Successfully merging a pull request may close this issue.

5 participants