Skip to content
Snippets Groups Projects
Commit 10091eba authored by tomrink's avatar tomrink
Browse files

snapshot...

parent b1d9de05
No related branches found
No related tags found
No related merge requests found
...@@ -134,6 +134,34 @@ class FrameworkCloudHeight(AMVFiles): ...@@ -134,6 +134,34 @@ class FrameworkCloudHeight(AMVFiles):
return dto return dto
class FrameworkCloudPhase(AMVFiles):
def __init__(self, files_path, file_time_span):
elem_name = 'Element'
line_name = 'Line'
lon_name = 'Longitude'
lat_name = 'Latitude'
out_params = ['CloudPhase', 'CloudType']
params = ['CloudPhase', 'CloudType']
meta_dict = {'CloudPhase': (None, 'i1'), 'CloudType': (None, 'i1')}
super().__init__(files_path, file_time_span, '*_CLOUD_PHASE_EN'+'*.nc', band=None, elem_name=elem_name, params=params,
line_name=line_name, lat_name=lat_name, lon_name=lon_name, out_params=out_params, meta_dict=meta_dict)
def get_navigation(self):
return GEOSNavigation(sub_lon=-75.0)
def get_datetime(self, pathname):
fname = os.path.split(pathname)[1]
toks = fname.split('_')
dstr = toks[4]
tstr = toks[5]
dtstr = dstr + tstr
dto = datetime.datetime.strptime(dtstr, '%Y%j%H%M').replace(tzinfo=timezone.utc)
return dto
class OPS(AMVFiles): class OPS(AMVFiles):
def __init__(self, files_path, file_time_span, band='14'): def __init__(self, files_path, file_time_span, band='14'):
elem_name = None elem_name = None
...@@ -207,5 +235,7 @@ def get_datasource(files_path, file_time_span, source, band='14'): ...@@ -207,5 +235,7 @@ def get_datasource(files_path, file_time_span, source, band='14'):
return CarrStereo(files_path, file_time_span, band=band) return CarrStereo(files_path, file_time_span, band=band)
elif source == 'FMWK_CLD_HGT': elif source == 'FMWK_CLD_HGT':
return FrameworkCloudHeight(files_path, file_time_span) return FrameworkCloudHeight(files_path, file_time_span)
elif source == 'FMWK_CLD_PHASE':
return FrameworkCloudPhase(files_path, file_time_span)
else: else:
raise GenericException('Unknown data source type') raise GenericException('Unknown data source type')
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment