3. Geo2Grid Basics

All of the tools provided by Geo2Grid can be found in the bin directory of the extracted tarball. The majority of the scripts in the software bundle are bash wrappers around python software.

3.1. Basic Usage

The purpose of Geo2Grid is to convert satellite data files into high quality gridded image files. The main run script is geo2grid.sh and requires users to choose an input reader (-r what instrument data would you like to use) and an output writer (-w what output format would you like to create). The only other required input is the list of files or a directory pointing to the location of the input files (-f). Each instrument data reader by default will create single band output image GeoTIFF files for whatever bands are provided, along with true and natural color images. Only one time step can be processed with each script execution.

For example, executing the following command above will create 8-bit GeoTIFF files of all 16 ABI imager channels, a true color RGB, and natural color RGB in the native resolution of the instrument channel (500m for RGB composites). This can be customized with command line arguments.

$GEO2GRID_HOME/bin/geo2grid.sh -r abi_l1b -w geotiff -f <path to files>

This script takes advantage of the modular design of Geo2Grid; a user only needs to decide on a Reader and a Writer and provide them to geo2grid.sh.

If processing errors occur Geo2Grid will attempt to continue processing to make as many products as it can.

3.2. Common Script Options

Additional command line arguments for the geo2grid.sh script and their defaults are described in the related reader or writer sections. Options that affect remapping are described in the Remapping section. Additionally all Geo2Grid bash scripts accept a -h argument to list all the available command line arguments. Although the available command line arguments may change depending on the reader and writer specified, there are a set of common arguments that are always available:

-r Instrument input files to read from (choose from abi_l1b, ahi_hsd, and ahi_hrit).
-w Output format to write to (Currently only option is geotiff).
-h Print helpful information.
--list-products
 List all possible product options to use with -p from the given input data.
-p List of products you want to create.
-f Input files and paths.
-g <grid_name> Specify the output grid to use. Default is the native instrument projection. See Provided Grids and Custom Grids for information other possible values.
--cache-dir <dir>
 Directory to store resampling intermediate results between executions. Not used with ‘native’ resampling method.
--num-workers Specify number of parallel processing worker threads to use (default: 4)
--progress Display a timed progress bar to show processing progress
--ll-bbox <lonmin latmin lonmax latmax>
 Subset input data to the bounding coordinates specified.
-v Print detailed log information.

Examples:

geo2grid.sh -r abi_l1b -w geotiff --list-products -f <path to files>/<list of files>

geo2grid.sh -r abi_l1b -w geotiff -p C01 natural_color -v -f <path to files>

geo2grid.sh -r abi_l1b -w geotiff --ll-bbox -95.0 40.0 -85.0 50.0 -f /abi/OR_ABI-L1b-RadF-*.nc

geo2grid.sh -r ahi_hsd -w geotiff -p B03 B04 B05 B14 -f /ahi/*FLDK*.DAT

geo2grid.sh -r ahi_hrit -w geotiff -f /ahi/IMG_DK01*

For information on other scripts and features provided by Geo2Grid see the Utility Scripts section or the various examples throughout the document.

3.3. Reader/Writer Combinations

The tables below provide a summary of the possible combinations of readers and writers and expectations for the inputs and outputs of geo2grid.sh. To access these features provide the “reader” and “writer” names to the geo2grid.sh script followed by other script options:

$GEO2GRID_HOME/bin/geo2grid.sh -r <reader> -w <writer> --list-products <options> -f /path/to/files
Table 3.2 Geo2Grid Reader Summary Table
Reader Name Input Source Input Filename Pattern
abi_l1b ABI L1B

OR_ABI-L1b-Rad?-M?C??_G??_s<YYYYDDDHHMMSSS_eYYYYDDDHHMMSSS_c*.nc

Ex: OR_ABI-L1b-RadF-M3C03_G16_s20183161830345_e20183161841112_c20183161841154.nc

ahi_hsd AHI HSD

HS_H08_YYYYMMDD_HHMM_B??_*_*_S*.DAT

Ex: HS_H08_20181112_1230_B08_FLDK_R20_S0910.DAT

ahi_hrit AHI HRIT (HimawariCast) from JMA

IMG_DK01B??_YYYYMMDDHHMM

Ex: IMG_DK01B05_201811121230

Table 3.3 Geo2Grid Writer Summary Table
Writer Name Output Filename Pattern Output Format
geotiff

GOES-??_ABI_Rad?_C??_YYYYMMDD_HHMMSS_*.tif

Ex: GOES-16_ABI_RadF_C03_20181112_183034_GOES-East.tif

8-bit single band GeoTIFF
geotiff

HIMAWARI-8_AHI_B??_YYYYMMDD_HHMMSS_*.tif

Ex: HIMAWARI-8_AHI_B03_20181112_183020_FLDK.tif

8-bit single band GeoTIFF
geotiff

HIMAWARI-8_AHI_B??_YYYYMMDD_HHMMSS_*.tif

Ex: HIMAWARI-8_AHI_B15_20181112_183000_FLDK.tif

8-bit single band GeoTIFF

3.4. Creating Red Green Blue (RGB) Composite Imagery

The list of supported products includes true and natural color 24-bit RGB imagery. The software uses the number of specified CPU threads to create high quality reprojections in the lowest latency possible thanks to the dask python library. Dask splits data arrays in to multiple “chunks” and processes them in parallel. The creation of these RGBs includes the following steps, which are performed by default with each execution:

  • Check for required spectral bands used in RGB creation among input files.
  • Upsample and sharpen composite bands to the highest spatial resolution (500m).
  • Creation of pseudo “green” band for the ABI instruments.
  • Reflectance adjustment (dividing by cosine of the solar zenith angle).
  • Removal of atmospheric Rayleigh scattering (atmospheric correction).
  • Nonlinear scaling before writing data to disk

Geo2Grid also supports the creation of other RGBs (this varies depending on the instrument), however these files are not produced by default. The recipes for creating these RGBs come from historical EUMETSAT recipes that have been adjusted to work with the data being used in Geo2Grid.

3.5. Creating Your Own Custom Grids

The Geo2Grid software bundle comes with a wrapper script for the Custom Grid Utility for easily creating Geo2Grid grid definitions over a user determined longitude and latitude region. Once these definitions have been created, they can be provided to geo2grid.sh. To run the utility script from the software bundle wrapper run:

$GEO2GRID_HOME/bin/p2g_grid_helper.sh ...

See the script’s documentation for more information on how to use this script and the arguments it accepts.