diff --git a/NAERSTADMO.py b/NAERSTADMO.py index 7c35ae81f8b383cc9cbbdf9018450b1c33bd8d18..5bf37c8e37adefb9636b74abb0f361f2b1208750 100644 --- a/NAERSTADMO.py +++ b/NAERSTADMO.py @@ -89,6 +89,11 @@ def create_dataset(): ) subprocess.run(f"rm {tmpfile_path}tmpfile.nc", shell=True) + # Ensure that model is not run if weather data is not available + if not os.path.exists(f"{tmpfile_path}weather_data.nc"): + print(f"{tmpfile_path}weather_data.nc does not exist. Exit.") + return + subprocess.run(f"rm {outtmp_path}final_*", shell=True) create_saturation()