diff --git a/NAERSTADMO.py b/NAERSTADMO.py index 9855df1f4b4b8ee575688cb689cc9ea2e0e65abd..a236de59a3e54646636ee5a79240a0467e99b202 100644 --- a/NAERSTADMO.py +++ b/NAERSTADMO.py @@ -527,5 +527,11 @@ def run_cdo(cdo_command): logging.error(f"CDO command {cdo_command[1]} failed:", e) quit() +# Don't run if before start_date +start_date = datetime.strptime(os.getenv("START_DATE"), "%Y-%m-%d") +if datetime.now() <= start_date: + print(f"Today is before the configured start date of {start_date}. Exiting.") + exit(0) +# Run model create_dataset()