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 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.

-w

Output format to write to (Currently only option is geotiff).

-h

Print helpful information.

--list-products

List all possible geo2grid product options to use with -p from the given input data and exit.

--list-products-all

List available geo2grid products options and custom/Satpy products and exit.

-p

List of products you want to create.

-f

Input files and paths.

--grid-coverage

Fraction of grid that must be covered by valid data. Default is 0.1.

-g <grid_name>

Specify the output grid to use. Default is the native instrument projection. See Grids and Custom Grids for information on other possible values.

--cache-dir <dir>

Directory to store resampling intermediate results between executions. Not used with ‘native’ resampling method.

--num-workers num_workers

Specify number of worker threads to use (Default: 4).

--progress

Show processing progress bar (Not recommended for logged output).

--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*

geo2grid.sh -r ami_l1b -w geotiff -p IR112 VI006 --num-workers 12 -f /ami/gk2a_ami_l31b*.nc

geo2grid.sh -r fci_l1c_nc -w geotiff -p ir_38 true_color -f /fci/MTG-FCI-L1C/*_N_JLS_C_0072*

geo2grid.sh -r agri_fy4a_l1 -w geotiff -p C07 natural_color --progress -f /fy4a/FY4A-_AGRI--*.HDF

geo2grid.sh -r agri_fy4b_l1 -w geotiff -p C01 C02 C03 -f FY4B-_AGRI--_N_DISK_1330E_L1*_V0001.HDF

geo2grid.sh -r abi_l2_nc -w geotiff -f /cloud_products/CG_ABI-L2-ACH?C-M6_G16*.nc

geo2grid.sh -r glm_l2 -w geotiff -p flash_extent_density -f CG_GLM-L2-GLMF-M3_G18*.nc

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

fci_l1c_nc

MTG FCI Level 1C from EUMETSAT

W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD*_N_JLS_C_*.nc

Ex: W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD–CHK-BODY–DIS-NC4E_C_EUMT_20231201115940_IDPFI_OPE_20231201115729_20231201115803_N_JLS_C_0072_0032.nc

ami_l1b

GEO-KOMPSAT AMI from KMA

gk2a_ami_le1b_?????_fd0??ge_YYYYMMDDHHMM.nc

Ex: gk2a_ami_le1b_vi006_fd005ge_201909300300.nc

agri_fy4a_l1 agri_fy4b_l1

FY4A, FY4B AGRI from CMA

FY4A-_AGRI--_N_DISK_1047E_L1-_???-MULT_NOM_YYYYMMDDHHMMSS_*_????M_V0001.HDF

FY4B-_AGRI--_N_DISK_1330E_L1-_???-MULT_NOM_YYYYMMDDHHMMSS_*_????M_V0001.HDF

Ex: FY4A-_AGRI–_N_DISK_1047E_L1-_FDI-_MULT_NOM_20220120040000_*_1000M_V0001.HDF

Ex: FY4B-_AGRI–_N_DISK_1330E_L1-_FDI-_MULT_NOM_20221115030000_*_0500M_V0001.HDF

abi_l2_nc

ABI Product Cloud Height and Cloud Top Temperature

CG_ABI-L2-{PROD}F-M6_G??_sYYYYDDDHHMMSSS_*.nc

Ex: CG_ABI-L2-ACHAF-M6_G17_s20223271830316_e20223271839394_c20223271842100.nc

Ex: CG_ABI-L2-ACHTF-M6_G17_s20223271830316_e20223271839394_c20223271842100.nc

glm_l2

CSPP Gridded GLM Product

CG_GLM-L2-GLM?-M3_G??_sYYYYDDDHHMMSSS_*.nc

Ex: CG_GLM-L2-GLMF-M3_G18_s20223141900000_e20223141901000_c20223142002160.nc

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

MTG-I1_FCI_???_??_YYYYMMDD_HHMMSS_mtg_fci_fdss_1km.tif

Ex: MTG-I1_FCI_nir_16_20231201_115000_mtg_fci_fdss_1km.tif

8-bit single band GeoTIFF

geotiff

GEO-KOMPSAT-2A_AMI_?????_YYYYMMDD_HHMMSS_ami_geos_fd.tif

Ex: GEO-KOMPSAT-2A_AMI_VI006_20190930_030031_ami_geos_fd.tif

8-bit single band GeoTIFF

geotiff

FY-4A_AGRI_C??_YYYYMMDD_HHMMSS_DISK_????m.tif

Ex: FY-4A_AGRI_C07_20220120_040004_DISK_2000m.tif

Ex: FY-4B_AGRI_C11_20221115_030002_DISK_4000m.tif

8-bit single band GeoTIFF

geotiff

GOES-17_ABI_????_YYYYMMDD_HHMMSS_GOES-West.tif

Ex: GOES-17_ABI_TEMP_20221123_183031_GOES-West.tif

Ex: GOES-17_ABI_HT_20221123_183031_GOES-West.tif

8-bit single band color enhanced GeoTIFF

geotiff

GOES-18_GLM_{PRODUCT}_YYYYMMDD_HHMMSS_GOES-West.tif

Ex: GOES-18_GLM_group_extent_density_20221110_190000_GOES-West.tif

8-bit single band GeoTIFF

3. 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 two 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.

  • Creation of pseudo “green” band if necessary (for instance ABI).

  • 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 recipes that have been decided upon by different satellite governing Agencies. For more information on RGB recipes, please see this site. Please Contact Us if you have any specific questions regarding RGB creation.

3.4. Creating Your Own Custom Grids

The Geo2Grid software bundle comes with a script for Custom Grid Utility that allows users to easily create Geo2Grid custom grid definitions over a user determined longitude and latitude region. Once these definitions have been created, they can be provided to Geo2Grid. 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.