@@ -2,72 +2,86 @@ Using Geo2Grid to Create Animations
22-----------------------------------
33
44The advantage of Geostationary Satellites is the temporal resolution of the
5- observations. Geo2Grid offers an easy interface for creating animations from
5+ observations. Geo2Grid offers an easy interface for creating animations from
66Geo2Grid GeoTIFF and PNG files. The following example demonstrates how
77Geo2Grid software can be used to create an animation of
8- files from a latitude/longitude subset of GOES-16 ABI CONUS GeoTIFF images
9- located over the Southeastern United States .
8+ files from a latitude/longitude subset of GOES-19 ABI Mesoscale Sector images
9+ centered over Hurricane Melissa in October 2025 .
1010
11- Create a series of GOES-16 ABI GeoTIFF files from a time sequence of data. In
12- the bash shell script example below, I use the ABI CONUS Band 1 files to
13- search for all files we have available from 4 January 2019. The files for
14- this day are all located in the same directory. I then create true and
15- natural color images from all time periods that are available.
11+ Create a series of GOES-19 ABI GeoTIFF files from a time sequence of data. In
12+ the bash shell script example below, I use the ABI MESO Sector 1, Band 1
13+ files to search for files that are available from October 28, 2025,
14+ limiting the search to files with an hour prefix of 15, 16, 17, or 18. These files
15+ were produced at 1 minute resolution. I then create true color images
16+ from all time periods that are available.
1617
1718.. code-block :: bash
1819
1920 #! /bin/bash
2021
22+ # Example script for using Geo2Grid Version 1.3 to create an MP4 animation.
23+
2124 # Set GEO2GRID environment variables
2225
23- export GEO2GRID_HOME=/home/g2g/geo2grid_v_1_2
26+ export GEO2GRID_HOME=/home/g2g/geo2grid_v_1_3
2427 export PATH=$PATH :$GEO2GRID_HOME /bin
2528
26- # Get input list of files/times based upon ABI Band 1 files
29+ # Get input list of available files/times based upon ABI Band 1 files
2730
28- ls -1 /data/abi16/20190104 /OR_ABI-L1b-RadC-M3C01_G16_s2019004 * .nc > file_list.txt
31+ ls -1 /data/abi19/20251028 /OR_ABI-L1b-RadM1-M6C01_G19_s2025301{15,16,17,18} * .nc > file_list.txt
2932
3033 sort_list=$( cat file_list.txt | sort)
3134
3235 # Make images for each time period available
33- for file in ${sort_list} ; do
36+ for file in ${sort_list} ; do
3437
35- echo ${file}
36- # get date/time for geo2grid file search
37- datetime=` basename $file | cut -c27-38 `
38- echo " datetime :" $datetime
38+ echo ${file}
39+ # get date/time for geo2grid file search
40+ datetime=` basename $file | cut -c27-39 `
41+ echo " datetime :" $datetime
3942
40- # Cut out a box with lat/lon bounds of 23N, 105W to 37N 75W
41- geo2grid.sh -r abi_l1b -w geotiff --ll-bbox -105 23 -75 37 --num-workers 8 -p true_color natural_color -f /data/abi16/20190104 /* ${datetime} * .nc
43+ # Cut out a box with lat/lon bounds of 80W, 16N to 74W 20N
44+ geo2grid.sh -r abi_l1b -w geotiff --num-workers 8 -- ll-bbox -80 16 -74 20 -p true_color -f /data/abi19/20251028 /* ${datetime} * .nc
4245
4346 done
4447
45- exit 0
48+ exit 0
49+
50+ This script creates 239 GeoTIFF images for my time range, 15:00 through 18:59 UTC,
51+ with a time step of every 1 minute.
52+
53+ Upon completion of the script, I add overlays to all of the GeoTIFF images using the ``add_coastlines.sh ``
54+ utility script.
55+
56+ .. code-block :: bash
57+
58+ add_coastlines.sh * .tif --add-coastlines --coastlines-resolution f --coastlines-level 6 --coastlines-outline black --cache-dir $HOME /
4659
47- This script created 120 GeoTIFF images for my time period 10:00 UTC through 20:00 UTC,
48- with a time step of every 5 minutes.
60+ I store the overlays using the ``--cache-dir `` option, which greatly improves the execution time of this command
61+ by reusing the overlay for all images with the same image grid and decorations. The result of executing this
62+ script is the creation of a PNG file that includes overlays for each GeoTIFF.
4963
50- To create a 120 image animation, I use the Geo2Grid utility script
64+ To create an MP4 animation from the PNG images , I use the Geo2Grid utility script
5165``gtiff2mp4.sh ``.
5266
5367.. code-block :: bash
5468
55- gtiff2mp4.sh my_true_color_animation .mp4 * true_color* .tif
69+ gtiff2mp4.sh GOES19_ABI_Hurricane_Melissa .mp4 * true_color* .png
5670
5771 The script wraps the ``ffmpeg `` video software, and combines all of the
58- ``*true_color*.tif `` files found in the directory into an animation
72+ ``*true_color*.png `` files found in the directory into an animation
5973based upon defaults that make the output animations most compatible
6074with modern video players. The output frame rate is 24 frames per
6175second. The images will automatically be resized if they are
6276large in order to ensure a smooth animation. I chose an output
63- filename of ``my_true_color_animation .mp4 ``. The software can also
64- create animations from input ``.png `` files.
77+ filename of ``GOES19_ABI_Hurricane_Melissa .mp4 ``. The software can also
78+ create animations from input ``.tif `` files.
6579
66- The figure below is the last image in the 120 loop sequence. The
67- output MP4 animation is available for viewing at `this site <https://bin.ssec.wisc.edu/pub/CSPP/g2g_examples/abi/my_true_color_animation .mp4 >`_.
80+ The figure below is the first image in the 239 loop sequence. The
81+ output MP4 animation is available for viewing at `this site <https://bin.ssec.wisc.edu/pub/CSPP/g2g_examples/abi/GOES19_ABI_Hurricane_Melissa .mp4 >`_.
6882
69- .. figure :: ../_static/example_images/GOES-16_ABI_RadC_true_color_20190104_195718_GOES -East.png
83+ .. figure :: ../_static/example_images/GOES-19_ABI_RadM1_true_color_20251028_150027_GOES -East.png
7084 :width: 100%
7185 :align: center
7286
73- The last GOES-16 ABI image from the 120 frame loop created with data from 4 January 2019 . The image observations are from 19:57 UTC.
87+ The first GOES-19 ABI image from the 239 frame loop created with data from 28 October 2025 showing the movement of Hurricane Melissa toward Jamaica . The image observations are from 15:00 UTC.
0 commit comments