Skip to content

Commit

Permalink
mnt: improve when MRMS merge runs
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Apr 29, 2024
1 parent e59d91a commit 302d5f4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 10 additions & 0 deletions scripts/RUN_10_AFTER.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ then
else
python merge_mrms_q3.py --date=$(date +'%Y-%m-%d')
fi
# QC comes about an hour delayed, so rerun the previous day
if [ $LHH -eq "03" ]
then
python merge_mrms_q3.py --date=$(date --date '1 days ago' +'%Y-%m-%d')
fi
# Special processing for DEP, to run at 5 PM, as DEP runs at 6 PM
if [ $LHH -eq "17" ]
then
python merge_mrms_q3.py --date=$(date --date +'%Y-%m-%d') --for-dep
fi

cd ../iemre
python merge_ifc.py $TODAY
Expand Down
7 changes: 3 additions & 4 deletions scripts/mrms/merge_mrms_q3.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,10 @@ def run(dt: datetime.date, for_dep: bool):

@click.command()
@click.option("--date", "dt", type=click.DateTime(), help="Date to process")
def main(dt):
@click.option("--for-dep", is_flag=True, help="For Daily Erosion Project")
def main(dt, for_dep):
"""go main go"""
run(dt.date(), False)
if "0415" <= f"{dt:%m%d}" <= "0531" and dt.year > 2014:
run(dt.date(), True)
run(dt.date(), for_dep)


if __name__ == "__main__":
Expand Down

0 comments on commit 302d5f4

Please sign in to comment.