GiniFile¶
-
class
metpy.io.
GiniFile
(filename)[source]¶ A class that handles reading the GINI format satellite images from the NWS.
This class attempts to decode every byte that is in a given GINI file.
Notes
The internal data structures that things are decoded into are subject to change.
Create an instance of
GiniFile
.- Parameters
filename (str or file-like object) – If str, the name of the file to be opened. Gzip-ed files are recognized with the extension
'.gz'
, as are bzip2-ed files with the extension'.bz2'
If filename is a file-like object, this will be read from directly.
Attributes Summary
Methods Summary
__init__
(filename)Create an instance of
GiniFile
.close
()get
(k[,d])Get the global attributes.
Get the file’s dimensions.
Get all variables in the file.
items
()keys
()load
()Load the variables and attributes simultaneously.
values
()Attributes Documentation
-
attrs
¶
-
channels
= ['Unknown', 'Visible', 'IR (3.9 micron)', 'WV (6.5/6.7 micron)', 'IR (11 micron)', 'IR (12 micron)', 'IR (13 micron)', 'IR (1.3 micron)', 'Reserved', 'Reserved', 'Reserved', 'Reserved', 'Reserved', 'LI (Imager)', 'PW (Imager)', 'Surface Skin Temp (Imager)', 'LI (Sounder)', 'PW (Sounder)', 'Surface Skin Temp (Sounder)', 'CAPE', 'Land-sea Temp', 'WINDEX', 'Dry Microburst Potential Index', 'Microburst Day Potential Index', 'Convective Inhibition', 'Volcano Imagery', 'Scatterometer', 'Cloud Top', 'Cloud Amount', 'Rainfall Rate', 'Surface Wind Speed', 'Surface Wetness', 'Ice Concentration', 'Ice Type', 'Ice Edge', 'Cloud Water Content', 'Surface Type', 'Snow Indicator', 'Snow/Water Content', 'Volcano Imagery', 'Reserved', 'Sounder (14.71 micron)', 'Sounder (14.37 micron)', 'Sounder (14.06 micron)', 'Sounder (13.64 micron)', 'Sounder (13.37 micron)', 'Sounder (12.66 micron)', 'Sounder (12.02 micron)', 'Sounder (11.03 micron)', 'Sounder (9.71 micron)', 'Sounder (7.43 micron)', 'Sounder (7.02 micron)', 'Sounder (6.51 micron)', 'Sounder (4.57 micron)', 'Sounder (4.52 micron)', 'Sounder (4.45 micron)', 'Sounder (4.13 micron)', 'Sounder (3.98 micron)', 'Sounder (3.74 micron)', 'Sounder (Visible)']¶
-
crafts
= ['Unknown', 'Unknown', 'Miscellaneous', 'JERS', 'ERS/QuikSCAT', 'POES/NPOESS', 'Composite', 'DMSP', 'GMS', 'METEOSAT', 'GOES-7', 'GOES-8', 'GOES-9', 'GOES-10', 'GOES-11', 'GOES-12', 'GOES-13', 'GOES-14', 'GOES-15', 'GOES-16']¶
-
dimensions
¶
-
lc_ps_fmt
= <metpy.io._tools.NamedStruct object>¶
-
mercator_fmt
= <metpy.io._tools.NamedStruct object>¶
-
missing
= 255¶
-
prod_desc2_fmt
= <metpy.io._tools.NamedStruct object>¶
-
prod_desc_fmt
= <metpy.io._tools.NamedStruct object>¶
-
sectors
= ['NH Composite', 'East CONUS', 'West CONUS', 'Alaska Regional', 'Alaska National', 'Hawaii Regional', 'Hawaii National', 'Puerto Rico Regional', 'Puerto Rico National', 'Supernational', 'NH Composite', 'Central CONUS', 'East Floater', 'West Floater', 'Central Floater', 'Polar Floater']¶
-
variables
¶
-
wmo_finder
= re.compile('(T\\w{3}\\d{2})[\\s\\w\\d]+\\w*(\\w{3})\r\r\n')¶
Methods Documentation
-
__init__
(filename)[source]¶ Create an instance of
GiniFile
.- Parameters
filename (str or file-like object) – If str, the name of the file to be opened. Gzip-ed files are recognized with the extension
'.gz'
, as are bzip2-ed files with the extension'.bz2'
If filename is a file-like object, this will be read from directly.
-
close
()¶
-
get
(k[, d]) → D[k] if k in D, else d. d defaults to None.¶
-
get_attrs
()[source]¶ Get the global attributes.
This is used by
xarray.open_dataset
.
-
get_dimensions
()[source]¶ Get the file’s dimensions.
This is used by
xarray.open_dataset
.
-
get_encoding
()¶
-
get_variables
()[source]¶ Get all variables in the file.
This is used by
xarray.open_dataset
.
-
items
() → a set-like object providing a view on D's items¶
-
keys
() → a set-like object providing a view on D's keys¶
-
load
()[source]¶ Load the variables and attributes simultaneously.
A centralized loading function makes it easier to create data stores that do automatic encoding/decoding.
For example:
class SuffixAppendingDataStore(AbstractDataStore): def load(self): variables, attributes = AbstractDataStore.load(self) variables = {'%s_suffix' % k: v for k, v in iteritems(variables)} attributes = {'%s_suffix' % k: v for k, v in iteritems(attributes)} return variables, attributes
This function will be called anytime variables or attributes are requested, so care should be taken to make sure its fast.
-
values
() → an object providing a view on D's values¶