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

snapshot...

parent cbe89b12
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,14 @@ from amv.intercompare import pirep_icing
from deeplearning.amv_raob import get_images
import numpy as np
import pickle
import os
from util.util import get_time_tuple_utc
from aeolus.datasource import CLAVRx
clavrx_dir = '/apollo/cloud/scratch/ICING/'
dir_fmt = '%Y_%m_%d_%j'
# dir_list = [f.path for f in os.scandir('.') if f.is_dir()]
ds_dct = {}
pirep_file = '/home/rink/data/pirep/pireps_2018040100_2018123023.csv'
......@@ -29,6 +37,17 @@ for idx, time in enumerate(time_keys):
counts, edges = np.histogram(images[0,], range=[150, 350], bins=20)
hist += counts
def get_clavrx_datasource(timestamp):
dt_obj, time_tup = get_time_tuple_utc(timestamp)
date_dir_str = dt_obj.strftime(dir_fmt)
ds = ds_dct.get(date_dir_str)
if ds is None:
ds = CLAVRx(clavrx_dir + date_dir_str + '/')
ds_dct[date_dir_str] = ds
return ds
f = open('/home/rink/ice_hist.pkl', 'wb')
pickle.dump(hist, f)
f.close()
......
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