diff --git a/test/test_intersect.py b/test/test_intersect.py index 37e4159c9..534c51292 100644 --- a/test/test_intersect.py +++ b/test/test_intersect.py @@ -24,7 +24,7 @@ def test_cube_intersect(wm): 'time_group': {'time': time, 'interpolate_time': False}, 'weather_model': wm, 'aoi_group': { - 'lat_file': os.path.join(SCENARIO_DIR, 'lat.rdr'), + 'lat_file': os.path.join(SCENARIO_DIR, 'lat.rdr'), 'lon_file': os.path.join(SCENARIO_DIR, 'lon.rdr') }, 'runtime_group': { @@ -64,9 +64,7 @@ def test_cube_intersect(wm): @pytest.mark.parametrize('wm', 'ERA5'.split()) def test_gnss_intersect(wm): SCENARIO_DIR = os.path.join(TEST_DIR, 'scenario_6') - WM_DIR = os.path.join(SCENARIO_DIR, 'weather_files') - - gnss_file = os.path.join(SCENARIO_DIR, 'stations.csv') + gnss_file = os.path.join(SCENARIO_DIR, 'stations.csv') id = 'TORP' date = 20200130 @@ -93,8 +91,8 @@ def test_gnss_intersect(wm): proc = subprocess.run(cmd.split(), stdout=subprocess.PIPE, universal_newlines=True) assert proc.returncode == 0, 'RAiDER Failed.' - gold = {'ERA5': 2.3466, 'GMAO': np.nan, 'HRRR': np.nan} - df = pd.read_csv(os.path.join(SCENARIO_DIR, f'{wm}_Delay_{date}T{time.replace(":", "")}.csv')) + gold = {'ERA5': 2.34514, 'GMAO': np.nan, 'HRRR': np.nan} + df = pd.read_csv(os.path.join(SCENARIO_DIR, f'{wm}_Delay_{date}T{time.replace(":", "")}_ztd.csv')) td = df['totalDelay'][df['ID']==id].values # test for equality with golden data diff --git a/tools/RAiDER/models/weatherModel.py b/tools/RAiDER/models/weatherModel.py index 04552d2a9..fcbfda1c3 100755 --- a/tools/RAiDER/models/weatherModel.py +++ b/tools/RAiDER/models/weatherModel.py @@ -162,8 +162,8 @@ def fetch(self, out, time): self._fetch(out) err = False - except Exception: - err = True + except Exception as E: + err = E return err diff --git a/tools/RAiDER/processWM.py b/tools/RAiDER/processWM.py index 5bedcc1a8..b1b034061 100755 --- a/tools/RAiDER/processWM.py +++ b/tools/RAiDER/processWM.py @@ -69,7 +69,7 @@ def prepareWeatherModel( else: E = weather_model.fetch(path_wm_raw, time) if E: - print ('raise runtimeerror') + logger.warning (E) raise RuntimeError # If only downloading, exit now