goes_ortho.clip#
Functions for clipping GOES ABI imagery to smaller areas
- clip.getListOfFiles(dirName)[source]#
Create a list of file paths contained in the given directory, searching subdirectories.
- Parameters
dirName (str) – path of directory to search within
- Returns
allFiles – list of file paths
- Return type
list
- clip.subsetNetCDF(filepath, bounds, newfilepath=None)[source]#
Crop a GOES-R ABI NetCDF file to latitude/longitude bounds.
- Parameters
filepath (str) – path to a NetCDF file
bounds (list) – list or array containing latitude/longitude bounds like [min_lon, min_lat, max_lon, max_lat]
newfilepath (str) – path and filename for a new NetCDF file to write out to, defaults to None where it will overwrite the input NetCDF file
- Return type
None
Examples
Subset a GOES ABI CONUS image so that we only have the western half of CONUS within latitudes 30 and 50, and longitudes -125 and -105.
>>> bounds = [-125, 30, -105, 50] >>> subsetNetCDF('CONUS.nc',bounds,newfilepath='westernCONUS.nc')