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

minor

parent c8cad014
Branches
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ from util.util import get_time_tuple_utc, GenericException, add_time_range_to_fi ...@@ -7,7 +7,7 @@ from util.util import get_time_tuple_utc, GenericException, add_time_range_to_fi
check_oblique, make_times, find_bin_index, get_timestamp, homedir, write_icing_file, make_for_full_domain_predict check_oblique, make_times, find_bin_index, get_timestamp, homedir, write_icing_file, make_for_full_domain_predict
from util.plot import make_icing_image from util.plot import make_icing_image
from util.geos_nav import get_navigation from util.geos_nav import get_navigation
from util.setup import model_path from util.setup import model_path_day, model_path_night
from aeolus.datasource import CLAVRx, CLAVRx_VIIRS, GOESL1B, CLAVRx_H08 from aeolus.datasource import CLAVRx, CLAVRx_VIIRS, GOESL1B, CLAVRx_H08
import h5py import h5py
import re import re
...@@ -1904,10 +1904,18 @@ def run_make_images(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ckpt_dir_s_pat ...@@ -1904,10 +1904,18 @@ def run_make_images(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ckpt_dir_s_pat
h5f.close() h5f.close()
def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=homedir, ckpt_dir_s_path=model_path, prob_thresh=0.5, satellite='GOES16', domain='CONUS', day_night='DAY'): def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=homedir, model_path=None, prob_thresh=0.5, satellite='GOES16', domain='CONUS', day_night='DAY'):
if day_night == 'DAY':
train_params = ['cld_height_acha', 'cld_geo_thick', 'cld_temp_acha', 'cld_press_acha', 'supercooled_cloud_fraction', train_params = ['cld_height_acha', 'cld_geo_thick', 'cld_temp_acha', 'cld_press_acha', 'supercooled_cloud_fraction',
'cld_emiss_acha', 'conv_cloud_fraction', 'cld_reff_dcomp', 'cld_opd_dcomp', 'iwc_dcomp', 'lwc_dcomp'] 'cld_emiss_acha', 'conv_cloud_fraction', 'cld_reff_dcomp', 'cld_opd_dcomp', 'iwc_dcomp', 'lwc_dcomp']
if model_path is None:
model_path = model_path_day
else:
train_params = ['cld_height_acha', 'cld_geo_thick', 'cld_temp_acha', 'cld_press_acha', 'supercooled_cloud_fraction',
'cld_emiss_acha', 'conv_cloud_fraction', 'cld_reff_acha', 'cld_opd_acha']
if model_path is None:
model_path = model_path_night
if satellite == 'H08': if satellite == 'H08':
clvrx_ds = CLAVRx_H08(clvrx_dir) clvrx_ds = CLAVRx_H08(clvrx_dir)
...@@ -1939,7 +1947,7 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h ...@@ -1939,7 +1947,7 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h
lons_2d = lon_s.reshape((num_lines, num_elems)) lons_2d = lon_s.reshape((num_lines, num_elems))
lats_2d = lat_s.reshape((num_lines, num_elems)) lats_2d = lat_s.reshape((num_lines, num_elems))
preds_2d_dct, probs_2d_dct = run_evaluate_static_new(data_dct, num_lines, num_elems, ckpt_dir_s_path=ckpt_dir_s_path, prob_thresh=prob_thresh) preds_2d_dct, probs_2d_dct = run_evaluate_static_new(data_dct, num_lines, num_elems, ckpt_dir_s_path=model_path, prob_thresh=prob_thresh)
write_icing_file(clvrx_str_time, output_dir, preds_2d_dct, probs_2d_dct, x_rad, y_rad, lons_2d, lats_2d) write_icing_file(clvrx_str_time, output_dir, preds_2d_dct, probs_2d_dct, x_rad, y_rad, lons_2d, lats_2d)
print('Done: ', clvrx_str_time) print('Done: ', clvrx_str_time)
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment