#!/bin/bash -f # # This is a bash script to run python code and must be run in BASH SHELL. # Make sure the file is executable. In UNIX 'chmod u+x filename' # export EXECPATH="/path/to/python/script" export OUTDIR="/path/to/the/plot" export SN="Roosevelt" export FILE="/path/to/the/file/ShafterWSt_2018_2981.csv" bd=("6-1-2018") ed=("6-30-2018") length=${#bd[@]} for ((i=0;i<$length;i++)); do export BDATE=${bd[$i]} export EDATE=${ed[$i]} echo "Plotting for $SITE ..." export BIN="22.5" export MPCT="25" python $EXECPATH/windrose_mpl_metdb.py \ --file $FILE \ --sname $SN \ --bdate $BDATE \ --edate $EDATE \ --binwidth $BIN \ --bounds="[0,1,2,3,4,5,6,np.inf]" \ --max-pct=$MPCT \ --outpath $OUTDIR done