Commit e1f90751 authored by R.K.Garcia's avatar R.K.Garcia
Browse files

cleanup __init__

parent bfc6916c
......@@ -36,7 +36,7 @@ class HimawariAHIasCMIP(object):
path = None
_hs = None # HimawariScene object
_as_radiances = False # whether ot use bt/refl or rad
_data_name = False
_data_name = DEFAULT_CMIP_NAME
_projection_name = DEFAULT_CMIP_PROJECTION_NAME
_when = None
......@@ -53,10 +53,20 @@ class HimawariAHIasCMIP(object):
return OrderedDict((k, D[k]) for k in dimnames)
def __init__(self, path, as_radiances=False, data_name=None):
"""
Create a CMIP-compatibility file structure generator around HSD or HCAST data
:param path: partial or full common path of HSD or HCAST file/s to read
:param as_radiances: whether to return radiances or bt/refl
:param data_name: name of data variable to return, None for default CMI name, True for "bt"/"refl"/"rad"
"""
self.path = path
self._hs = HimawariScene(path)
self._as_radiances = as_radiances
self._data_name = data_name or (self.bt_or_refl if not as_radiances else 'rad')
if data_name is True:
data_name = 'rad' if as_radiances else self.bt_or_refl
if not data_name:
data_name = DEFAULT_CMIP_NAME
self._data_name = data_name
self._when = datetime.utcnow()
@property
......@@ -71,6 +81,10 @@ class HimawariAHIasCMIP(object):
data_kind = 'Radiances'
return 'Himawari ' + data_kind
@property
def short_name(self):
return self._data_name
@property
def standard_name(self):
if not self._as_radiances:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment