Skip to content

Commit

Permalink
Update delay.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dbekaert authored Oct 29, 2020
1 parent 4017ef3 commit be35dda
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/RAiDER/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@ def tropo_delay(los, lats, lons, ll_bounds, heights, flag, weather_model, wmLoc,
if wmLoc is None:
wmLoc = os.path.join(out, 'weather_files')

# weather model download
wm_filename = make_weather_model_filename(weather_model['name'], time, ll_bounds)

# weather model calculation
if download_only:
return None, None
wm_filename = make_weather_model_filename(weather_model['name'], time, ll_bounds)
weather_model_file = os.path.join(wmLoc, wm_filename)

if not os.path.exists(weather_model_file):
weather_model, lats, lons = prepareWeatherModel(
weather_model, wmLoc, out, lats=lats, lons=lons, los=los, zref=zref,
time=time, download_only=download_only, makePlots=True
)

if download_only:
return None, None

try:
weather_model.write2HDF5(weather_model_file)
except Exception:
Expand Down

0 comments on commit be35dda

Please sign in to comment.