diff --git a/tools/RAiDER/cli/raider.py b/tools/RAiDER/cli/raider.py index faaa3cd85..d5a433590 100644 --- a/tools/RAiDER/cli/raider.py +++ b/tools/RAiDER/cli/raider.py @@ -272,8 +272,12 @@ def calcDelays(iargs=None): continue if len(wfiles)==0: - logger.error('No weather model data was successfully obtained.') - raise RuntimeError + logger.error('No weather model data was successfully obtained.') + if len(params['date_list']) == 1: + raise RuntimeError + # skip date if mnultiple are requested + else: + continue # nearest weather model time elif len(wfiles)==1 and len(times)==1: diff --git a/tools/RAiDER/models/hrrr.py b/tools/RAiDER/models/hrrr.py index 3435c5d45..0652944df 100644 --- a/tools/RAiDER/models/hrrr.py +++ b/tools/RAiDER/models/hrrr.py @@ -47,7 +47,12 @@ def download_hrrr_file(ll_bounds, DATE, out, model='hrrr', product='prs', fxx=0, ) # Iterate through the list of datasets - ds_list = H.xarray(":(SPFH|PRES|TMP|HGT):", verbose=verbose) + try: + ds_list = H.xarray(":(SPFH|PRES|TMP|HGT):", verbose=verbose) + except ValueError as E: + logger.error (E) + raise ValueError + ds_out = None for ds in ds_list: if ('isobaricInhPa' in ds._coord_names) or ('levels' in ds._coord_names): diff --git a/tools/RAiDER/models/weatherModel.py b/tools/RAiDER/models/weatherModel.py index 1b28964a1..16b5f28af 100755 --- a/tools/RAiDER/models/weatherModel.py +++ b/tools/RAiDER/models/weatherModel.py @@ -160,9 +160,12 @@ def fetch(self, out, time): # write the error raised by the weather model API to the log try: self._fetch(out) + err = False - except Exception as E: - logger.error(E) + except Exception: + err = True + + return err @abstractmethod diff --git a/tools/RAiDER/processWM.py b/tools/RAiDER/processWM.py index c61db4de1..5bedcc1a8 100755 --- a/tools/RAiDER/processWM.py +++ b/tools/RAiDER/processWM.py @@ -67,7 +67,10 @@ def prepareWeatherModel( # if no weather model files supplied, check the standard location else: - weather_model.fetch(path_wm_raw, time) + E = weather_model.fetch(path_wm_raw, time) + if E: + print ('raise runtimeerror') + raise RuntimeError # If only downloading, exit now if download_only: