goes_ortho.orthorectify#

Functions to orthorectify GOES-R ABI images using a DEM

orthorectify.ABIpixelMap(abi_grid_x, abi_grid_y)[source]#

Converts an array of continuous ABI scan angles into discrete pixel center locations (in scan angle coordinates, incrimenting by the pixel IFOV) NOTE: This function isn’t needed for the applying the mapping to a GOES ABI image, but we can still use this to make some visualizations of what we’re doing.

Parameters
  • abi_grid_x (np.array) – 2-dimensional array of x coordinates (scan angle) in ABI Fixed Grid [radians]

  • abi_grid_y (np.array) – 2-dimensional array of y coordinates (elevation angle) in ABI Fixed Grid [radians]

Returns

  • center_x (np.array) – pixel center x coordinates (scan angle) in ABI Fixed Grid [radians]

  • center_y (np.array) – pixel center y coordinates (elevation angle) in ABI Fixed Grid [radians]

Examples

orthorectify.make_ortho_map(goes_filepath, dem_filepath, out_filepath=None)[source]#

For the entire DEM, determine the ABI scan angle coordinates for every DEM grid cell, taking into account the underlying terrain and satellite’s viewing geometry. Create the mapping between GOES-R ABI pixels (netCDF input file) and a DEM grid (geotiff input file)

Parameters
  • goes_filepath (str) – filepath to GOES ABI NetCDF file

  • dem_filepath (str) – filepath to digital elevation model (DEM), GeoTiff file

  • out_filepath (str) – optional filepath and filename to save this map to, defaults to None

Returns

ds – dataset of the map relating ABI Fixed Grid coordinates to latitude and longitude

Return type

xarray.Dataset

Examples

orthorectify.ortho(goes_image_path, data_vars, bounds, api_key, new_goes_filename, dem_filepath=None, demtype='SRTMGL3', keep_dem=True)[source]#

Wraps around get_dem(), make_ortho_map(), orthorectify_abi()

Parameters
  • goes_image_path (str) – filepath to GOES ABI NetCDF file

  • data_vars (list) – list of variable names from the GOES ABI NetCDF file we wish to extract

  • bounds (list) – longitude and latitude bounds to clip and orthorectify GOES ABI image, like [min_lon, min_lat, max_lon, max_lat]

  • api_key (str) – Opentopography.org API key, can be created at https://portal.opentopography.org/requestService?service=api

  • new_goes_filename (str) – new filepath and filename to save the orthorectified image to

  • dem_filepath (str) – filepath to save DEM to, defaults to None

  • demtype (str) – DEM from Opentopography.org, see documentation in get_data.get_dem()

  • keep_dem (bool) – option to save DEM file or delete after use

Return type

None

Examples

orthorectify.orthorectify_abi(goes_filepath, pixel_map, data_vars, out_filename=None)[source]#

Using the pixel mapping for a specific ABI viewing geometry over a particular location, orthorectify the ABI radiance values and return an xarray dataarray with those values.

Parameters
  • goes_filepath (str) – filepath to GOES ABI NetCDF file

  • pixel_map (xarray.Dataset) – dataset of the map relating ABI Fixed Grid coordinates to latitude and longitude

  • data_vars (list) – list of variable names from the GOES ABI NetCDF file we wish to extract

  • out_filename (str) – optional filepath and filename to save the orthorectified image to, defaults to None

Returns

pixel_map – dataset of the orthorectified GOES ABI image

Return type

xarray.Dataset

Examples