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

snapshot...

parent bb767cc1
No related branches found
No related tags found
No related merge requests found
......@@ -479,6 +479,33 @@ class OPS(AMVFiles):
return dto
class NOAA_txt(AMVFiles):
def __init__(self, files_path, file_time_span, band='14'):
elem_name = None
line_name = None
lon_name = 'lon'
lat_name = 'lat'
params = ['pressure', 'wind_speed', 'wind_direction']
out_params = ['Lon', 'Lat', 'Element', 'Line'] + params
meta_dict = {'Lon': ('degrees east', 'f4'), 'Lat': ('degrees north', 'f4'), 'Element': (None, 'i4'), 'Line': (None, 'i4'),
'pressure': ('hPa', 'f4'), 'wind_speed': ('m s-1', 'f4'), 'wind_direction': ('degrees', 'f4')}
super().__init__(files_path, file_time_span, 'ASCII_AMV*.CT', band=band, 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('.')
dtstr = toks[2] + '.' + toks[3]
dto = datetime.datetime.strptime(dtstr, '%Y%j.%H%M').replace(tzinfo=timezone.utc)
return dto
class CarrStereo(AMVFiles):
def __init__(self, files_path, file_time_span, band='14'):
elem_name = 'Element'
......@@ -517,6 +544,8 @@ class CarrStereo(AMVFiles):
def get_datasource(files_path, source, file_time_span=10, band='14'):
if source == 'OPS':
return OPS(files_path, file_time_span, band=band)
elif source == 'NOAA_TXT':
return NOAA_txt(files_path, file_time_span, band=band)
elif source == 'FMWK':
return Framework(files_path, file_time_span, band=band)
elif source == 'CARR':
......
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