Skip to content

Add two ways to see clouds at night in goes_timeseries() #870

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

Merged
merged 1 commit into from
Jan 17, 2022

Conversation

ErikSeras
Copy link
Contributor

Add two ways to see clouds at night in goes_timeseries() #850 (comment)

@giswqs
Copy link
Member

giswqs commented Jan 17, 2022

Got an error with show_night=[True, "b_mode"]. Please double check.

image

@ErikSeras
Copy link
Contributor Author

Got an error with show_night=[True, "b_mode"]. Please double check.

image

show_night=[False, "a_mode" and show_night=[True, "a_mode"] output bands are ['CMI_C01', 'CMI_GREEN', 'CMI_C02', 'CMI_C03', 'CMI_C05'].

show_night=[True, "b_mode"] output bands are ['vis-red', 'vis-green', 'vis-blue']

This code replicates the result of show_night=[True, "b_mode"] from #850 (comment):

import ee
import geemap
import os

#geemap.ee_initialize()

region = ee.Geometry.Polygon(
            [ [
                    [177, -14],
                    [177, -29],
                    [192, -29],
                    [192, -14],
                ]
            ],
            None,
            False,
        )

start_date="2022-01-15T00:00:00"
end_date="2022-01-15T08:00:00"
data="GOES-17"
scan="full_disk"

# col = geemap.goes_timeseries(start_date, end_date, data, scan, region, show_night=[True, "b_mode"])
col = goes_timeseries(start_date, end_date, data, scan, region, show_night=[True, "b_mode"])

visParams = {
    'dimensions': 700,
    'framesPerSecond': 10,
    'region': region,
    'crs': col.first().projection()
}


out_dir = os.path.expanduser("~/Downloads")
out_gif = os.path.join(out_dir, "goes_timelapse.gif")
if not os.path.exists(out_dir):
    os.makedirs(out_dir)
    
geemap.download_ee_video(col, visParams, out_gif)

timestamps = geemap.image_dates(col, date_format='YYYY-MM-dd HH:mm').getInfo()

geemap.add_text_to_gif(out_gif, out_gif, xy=('3%', '3%'), text_sequence=timestamps, font_size=20, font_color='#ffffff')

goes_timelapse

@giswqs
Copy link
Member

giswqs commented Jan 17, 2022

I think the problem is the goes_timelapse function. I will look into this later.

https://github.com/giswqs/geemap/blob/ee32bf91df00557745ff87551fa1ebbcbc887b5d/geemap/timelapse.py#L2640
https://github.com/giswqs/geemap/blob/ee32bf91df00557745ff87551fa1ebbcbc887b5d/geemap/timelapse.py#L2698-L2705

@giswqs giswqs merged commit 1f90c88 into gee-community:master Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants