geoips.plugins.modules.readers.utils package#

Submodules#

geoips.plugins.modules.readers.utils.geostationary_geolocation module#

Generalized geolocation calculations for geostationary satellites.

exception geoips.plugins.modules.readers.utils.geostationary_geolocation.AutoGenError[source]#

Bases: Exception

Raise exception on auto generated geolocation error.

geoips.plugins.modules.readers.utils.geostationary_geolocation.calculate_solar_angles(metadata, lats, lons, dt)[source]#

Calculate solar angles.

geoips.plugins.modules.readers.utils.geostationary_geolocation.get_geolocation(dt, gmd, fldk_lats, fldk_lons, BADVALS, area_def=None)[source]#

Gather and return the geolocation data for the input metadata.

Input metadata should be the metadata for a single ABI data file.

If latitude/longitude have not been calculated with the metadata form the input data file they will be recalculated and stored for future use. They shouldn’t change often. This will be slow the first time it is called after a metadata update, but fast thereafter.

The same is true for satellite zenith and azimuth angles.

Solar zenith ang azimuth angles are always calculated on the fly. This is because they actually change. This may be slow for full-disk images.

geoips.plugins.modules.readers.utils.geostationary_geolocation.get_geolocation_cache_filename(pref, metadata, area_def=None)[source]#

Set the location and filename format for the cached geolocation files.

There is a separate filename format for satellite latlons and sector latlons

Notes

Changing geolocation filename format will force recreation of all files, which can be problematic for large numbers of sectors.

geoips.plugins.modules.readers.utils.geostationary_geolocation.get_indexes(metadata, lats, lons, area_def)[source]#

Return two 2-D arrays containing the X and Y indexes.

These are indices that should be used from the raw data for the input sector definition.

geoips.plugins.modules.readers.utils.geostationary_geolocation.get_satellite_angles(metadata, lats, lons, BADVALS, sect=None)[source]#

Get satellite angles.

geoips.plugins.modules.readers.utils.hrit_reader module#

Utility for reading HRIT datasets.

class geoips.plugins.modules.readers.utils.hrit_reader.HritDtype[source]#

Bases: object

HRIT data type.

types = {'byte': 'B', 'int16': '>i2', 'int32': '>i4', 'int64': '>i8', 'int8': 'i1', 'uint16': '>u2', 'uint32': '>u4', 'uint64': '>u8', 'uint8': 'u1', 'unicode': 'U'}#
exception geoips.plugins.modules.readers.utils.hrit_reader.HritError(msg, code=None)[source]#

Bases: Exception

Raise exception when errors occur in reading xRIT data files.

class geoips.plugins.modules.readers.utils.hrit_reader.HritFile(fname)[source]#

Bases: object

Hrit File class.

property annotation_metadata#

Return annotation metadata (ie, platform, start time, etc).

property band#

Return band specified in block_128, if it exists.

property basename#

Return file basename.

property block_info#

Block info.

property block_map#

Return block map.

property compressed#

Return True if compressed, False if not.

decompress(outdir)[source]#

Decompress an xRIT file and return a file handle.

The file will be decompressed to outdir and read from there.

Returns an HritFile instance for the decompressed file. If already decompressed, raises an HritError.

property dirname#

Return file dirname.

property epilogue#

Return epilogue.

property file_type#

Return file_type.

property geolocation_metadata#

Return geolocation metadata.

property metadata#

Return metadata.

property name#

Return name.

property prologue#

Return prologue.

property segment#

Return segment specified in block_128, if it exists.

property start_datetime#

Return start_datetime.

geoips.plugins.modules.readers.utils.hrit_reader.read10bit(buff)[source]#

Read 10 bit little endian data from a buffer.

Returns:

16 bit unsigned int.

Return type:

int

geoips.plugins.modules.readers.utils.remss_reader module#

Read derived surface winds from REMSS SMAP, WINDSAT, and AMSR netcdf data.

geoips.plugins.modules.readers.utils.remss_reader.read_remss_data(wind_xarray, data_type)[source]#

Reformat SMAP or WindSat xarray object appropriately.

variables: latitude, longitude, time, wind_speed_kts attributes: source_name, platform_name, data_provider, interpolation_radius_of_influence

Module contents#

geoips reader utils init file.