From b583a07550934ac61c1014f3560f5fb874ab5863 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Wed, 1 Nov 2023 10:27:52 -0500
Subject: [PATCH] snapshot...

---
 modules/icing/util.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/icing/util.py b/modules/icing/util.py
index 84c7ae49..0a7924c1 100644
--- a/modules/icing/util.py
+++ b/modules/icing/util.py
@@ -1,6 +1,4 @@
 import numpy as np
-import deeplearning.icing_fcn as icing_fcn
-import deeplearning.icing_cnn as icing_cnn
 from icing.pirep_goes import setup, time_filter_3
 from icing.moon_phase import moon_phase
 from util.util import get_time_tuple_utc, is_day, check_oblique, get_median, homedir, \
@@ -706,8 +704,10 @@ def run_icing_predict(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_dir=h
                       model_type='FCN', use_dnb=False):
 
     if model_type == 'CNN':
+        import deeplearning.icing_cnn as icing_cnn
         model_module = icing_cnn
     elif model_type == 'FCN':
+        import deeplearning.icing_fcn as icing_fcn
         model_module = icing_fcn
 
     if use_flight_altitude is True:
@@ -922,6 +922,7 @@ def run_icing_predict_fcn(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output_d
                           prob_thresh=0.5, satellite='GOES16', domain='CONUS', day_night='AUTO',
                           l1b_andor_l2='both', use_flight_altitude=False, res_fac=1, use_nan=False):
 
+    import deeplearning.icing_fcn as icing_fcn
     model_module = icing_fcn
 
     if day_model_path is not None:
@@ -1034,8 +1035,10 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
                             res_fac=1, model_type='CNN', extent=[-105, -70, 15, 50], pirep_file=None, icing_dict=None,
                             obs_lons=None, obs_lats=None, obs_times=None, obs_alt=None, obs_intensity=None):
     if model_type == 'CNN':
+        import deeplearning.icing_cnn as icing_cnn
         model_module = icing_cnn
     elif model_type == 'FCN':
+        import deeplearning.icing_fcn as icing_fcn
         model_module = icing_fcn
 
     if day_model_path is not None:
@@ -1236,6 +1239,7 @@ def run_icing_predict_image_fcn(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', ou
                                 pirep_file='/Users/tomrink/data/pirep/pireps_202109200000_202109232359.csv',
                                 obs_lons=None, obs_lats=None, obs_times=None, obs_alt=None, flight_level=None, obs_intensity=None):
 
+    import deeplearning.icing_fcn as icing_fcn
     model_module = icing_fcn
 
     if day_model_path is not None:
-- 
GitLab