From 961c1a583c353e330a55c24f89547981cef31431 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Mon, 18 Jan 2021 10:46:55 -0600 Subject: [PATCH] snapshot... --- modules/aeolus/aeolus_amv.py | 6 +++--- modules/aeolus/datasource.py | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py index e0752cea..64a7f497 100644 --- a/modules/aeolus/aeolus_amv.py +++ b/modules/aeolus/aeolus_amv.py @@ -239,9 +239,9 @@ def create_file2(filename, raob_to_amv_dct, raob_dct, amv_files): def run_best_fit_all(amv_dir, source, product_dir, product, raob_path, gfs_path, full_domain=False): - amv_files = get_datasource(amv_dir, 10, source) - prd_files = get_datasource(product_dir, 10, product) - gfs_files = get_datasource(gfs_path, 10, 'GFS') + amv_files = get_datasource(amv_dir, source) + prd_files = get_datasource(product_dir, product) + gfs_files = get_datasource(gfs_path, 'GFS') raob_files = glob.glob(raob_path+'raob_soundings*.cdf') out_list = [] diff --git a/modules/aeolus/datasource.py b/modules/aeolus/datasource.py index 1059352f..b2b3f64e 100644 --- a/modules/aeolus/datasource.py +++ b/modules/aeolus/datasource.py @@ -52,8 +52,8 @@ class Files: class RAOBfiles(Files): - def __init__(selfs, files_path, file_time_span, pattern): - super().__init__(files_path, file_time_span, pattern) + def __init__(selfs, files_path): + super().__init__(files_path, 10, 'raob_soundings*.cdf') def get_datetime(self, pathname): filename = os.path.split(pathname)[1] @@ -63,8 +63,8 @@ class RAOBfiles(Files): class GFSfiles(Files): - def __init__(self, files_path, file_time_span, pattern): - super().__init__(files_path, file_time_span, pattern) + def __init__(self, files_path): + super().__init__(files_path, 10, 'gfs*.h5') def get_datetime(self, pathname): filename = os.path.split(pathname)[1] @@ -330,7 +330,7 @@ class CarrStereo(AMVFiles): return dto -def get_datasource(files_path, file_time_span, source, band='14'): +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 == 'FMWK': @@ -344,6 +344,8 @@ def get_datasource(files_path, file_time_span, source, band='14'): elif source == 'OPS_CLD_PHASE': return OpsCloudPhase(files_path, file_time_span) elif source == 'GFS': - return GFSfiles(files_path, file_time_span, 'gfs*.h5') + return GFSfiles(files_path) + elif source == 'RAOB': + return RAOBfiles(files_path) else: raise GenericException('Unknown data source type') \ No newline at end of file -- GitLab