Skip to content

Commit

Permalink
updated from 24 hours to 23 hours fix #55
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Havens committed Dec 2, 2020
1 parent cc71a0c commit 6ca85b0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,6 @@ test_data/RME_run/output/rme/*
#Integration tests
tests/RME/output/rme/*
awsm/utils/gitinfo.py

.venv
.vscode
21 changes: 11 additions & 10 deletions scripts/awsm_daily_airflow
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def mod_config(config_file, start_date, no_previous):
# define some formats
fmt_day = '%Y%m%d'
fmt_cfg = '%Y-%m-%d %H:%M'
add_day = pd.to_timedelta(24, unit='h')
add_day = pd.to_timedelta(23, unit='h')

# get config instance
config = get_user_config(config_file,
modules = ['smrf','awsm'])
modules=['smrf', 'awsm'])

# copy the config and get total start and end
# config = deepcopy(base_config)
Expand Down Expand Up @@ -60,11 +60,11 @@ def mod_config(config_file, start_date, no_previous):
'runs')

prev_data_base = os.path.join(paths['path_dr'],
paths['basin'],
ops,
'wy{}'.format(wy),
paths['proj'],
'data')
paths['basin'],
ops,
'wy{}'.format(wy),
paths['proj'],
'data')

new_config = copy.deepcopy(config)

Expand Down Expand Up @@ -104,13 +104,14 @@ def run():
'''

# Parse arguments
p = argparse.ArgumentParser(description='Run AWSM using Airflow scheduler.')
p = argparse.ArgumentParser(
description='Run AWSM using Airflow scheduler.')

p.add_argument('-c', '--cfg', required=True,
help='Config file that will be modified for the current run date')

p.add_argument('-sd','--start_date', required=True,
help="start date for run")
p.add_argument('-sd', '--start_date', required=True,
help="start date for run")

p.add_argument("-np", "--no_previous",
action="store_true", default=False,
Expand Down

0 comments on commit 6ca85b0

Please sign in to comment.