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

snaphot...

parent e145aee2
Branches
No related tags found
No related merge requests found
......@@ -41,7 +41,8 @@ def get_search_box(cc, ll):
return c_rng, l_rng
def match_calipso_clavrx_to_amvs(calipso_clavrx_ds, calipso_clavrx_file, amv_files, calipso_clavrx_params, gfs_ds):
#def match_calipso_clavrx_to_amvs(calipso_clavrx_ds, calipso_clavrx_file, amv_files, calipso_clavrx_params, gfs_ds):
def match_calipso_clavrx_to_amvs(nom_time, calipso_clavrx_nc4, amv_files, calipso_clavrx_params, gfs_ds):
nav = amv_files.get_navigation()
amv_params = amv_files.get_parameters()
all_params = [amv_files.lon_name, amv_files.lat_name, amv_files.elem_name, amv_files.line_name] + amv_params
......@@ -49,10 +50,10 @@ def match_calipso_clavrx_to_amvs(calipso_clavrx_ds, calipso_clavrx_file, amv_fil
coords = {'num_params': all_params}
dims = ['num_params', 'num_amvs']
nom_time = calipso_clavrx_ds.get_datetime(calipso_clavrx_file).timestamp()
calipso_clavrx_nc4 = Dataset(calipso_clavrx_file)
#nom_time = calipso_clavrx_ds.get_datetime(calipso_clavrx_file).timestamp()
#calipso_clavrx_nc4 = Dataset(calipso_clavrx_file)
print('start processing: ', calipso_clavrx_file)
#print('start processing: ', calipso_clavrx_file)
amv_fname, ftime, f_idx = amv_files.get_file(nom_time)
if f_idx is None:
......@@ -316,7 +317,11 @@ def run_caliop_clavrx_amv_match(output_path, path_to_caliop_clavrx, path_to_amvs
gfs_ds = get_datasource(path_to_gfs, 'GFS')
for f in caliop_clavrx_ds.flist:
match_dict = match_calipso_clavrx_to_amvs(caliop_clavrx_ds, f, amv_ds, caliop_clavrx_params, gfs_ds)
nom_time = caliop_clavrx_ds.get_datetime(f).timestamp()
calipso_clavrx_nc4 = Dataset(f)
print('Start processing: ', f)
match_dict = match_calipso_clavrx_to_amvs(nom_time, calipso_clavrx_nc4, amv_ds, caliop_clavrx_params, gfs_ds)
calipso_clavrx_nc4.close()
if match_dict is None or not match_dict:
print('No matches for: ', f)
continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment