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

produced SCMI from HCAST but requires verification

parent c0f9dc87
......@@ -218,8 +218,10 @@ class HimawariAHIasCMIP(object):
}
@property
def projection_attrs(self):
def nav(self):
"""
CF navigation attributes as a mapping
goes_imager_projection:long_name = "GOES-R ABI fixed grid projection" ;
goes_imager_projection:grid_mapping_name = "geostationary" ;
goes_imager_projection:perspective_point_height = 35786023. ;
......@@ -302,6 +304,14 @@ class HimawariAHIasCMIP(object):
return self._hs.observation_area
# FUTURE: translate from FLDK et al to Full Disk et al?
@property
def central_wavelength(self):
"""
central wavelength in µm
"""
meta = self._hs.metadata
return meta.central_wavelength * 1e6
@property
def time_span(self):
meta = self._hs.metadata
......@@ -469,7 +479,7 @@ class HimawariAHIasCMIP(object):
yield self.p(), None, self._pug_global_dims, self._pug_global_attrs
# nav structure
yield self.p(self._projection_name), np.int32(0), {}, self.projection_attrs
yield self.p(self._projection_name), np.int32(0), {}, self.nav
# y and x variables and friends
for each in self.pvda_yx():
......@@ -511,7 +521,7 @@ class HimawariAHIasCMIP(object):
return self._hs.shape
@staticmethod
def _proj4_params(self, longitude_of_projection_origin=None, perspective_point_height=None, semi_major_axis=None,
def _proj4_params(longitude_of_projection_origin=None, perspective_point_height=None, semi_major_axis=None,
semi_minor_axis=None, x_0=0, y_0=0, sweep_angle_axis='x', **nav):
return (('proj', 'geos'),
('lon_0', longitude_of_projection_origin),
......@@ -527,7 +537,7 @@ class HimawariAHIasCMIP(object):
@property
def proj4_params(self):
return self._proj4_params(**self.projection_attrs)
return HimawariAHIasCMIP._proj4_params(**self.nav)
@property
def proj4_string(self):
......@@ -581,7 +591,7 @@ class HimawariAHIasCMIP(object):
@property
def perspective_point_height(self):
nav = self.projection_attrs
nav = self.nav
return float(nav['perspective_point_height'])
@property
......
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