Commit 7e7fcda8 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

caught some minor coding mistakes. fixed now

parent f9bc4b09
......@@ -20,7 +20,7 @@ def daily_avg(rundir,avg):
if avg not in ['transcom','olson']:
raise IOError,'Choice of averaging invalid'
if no os.path.exists(rundir):
if not os.path.exists(rundir):
raise IOError,'rundir requested (%s) does not exist, exiting...'%rundir
weekdir = os.path.join(rundir + 'data_%s_weekly'%avg)
......@@ -51,10 +51,13 @@ def daily_avg(rundir,avg):
if __name__ == "__main__":
rundir = "/Storage/CO2/ivar/zeus_output/ICDC9/ctdas_co2c13_terdisbcb_manscale/analysis/"
try:
rundir = sys.argv[1]
except:
rundir = "/Storage/CO2/ivar/zeus_output/ICDC9/ctdas_co2c13_terdisbcb_manscale/analysis/"
try:
avg=sys.argv[1]
avg=sys.argv[2]
except:
avg='transcom'
......
......@@ -20,7 +20,7 @@ def monthly_avg(rundir,avg):
if avg not in ['transcom','olson']:
raise IOError,'Choice of averaging invalid'
if no os.path.exists(rundir):
if not os.path.exists(rundir):
raise IOError,'rundir requested (%s) does not exist, exiting...'%rundir
daydir = rundir + 'data_%s_daily'%avg
......@@ -69,8 +69,14 @@ def monthly_avg(rundir,avg):
if __name__ == "__main__":
rundir = "/Storage/CO2/ivar/zeus_output/ICDC9/ctdas_co2c13_terdisbcbmanscale_neweps449_test/analysis/"
try:
avg=sys.argv[1]
rundir = sys.argv[1]
except:
rundir = "/Storage/CO2/ivar/zeus_output/ICDC9/ctdas_co2c13_terdisbcb_manscale/analysis/"
try:
avg=sys.argv[2]
except:
avg='transcom'
monthly_avg(rundir,avg)
......@@ -20,7 +20,7 @@ def yearly_avg(rundir,avg):
if avg not in ['transcom','olson']:
raise IOError,'Choice of averaging invalid'
if no os.path.exists(rundir):
if not os.path.exists(rundir):
raise IOError,'rundir requested (%s) does not exist, exiting...'%rundir
monthdir = rundir + 'data_%s_monthly'%avg
......@@ -64,13 +64,16 @@ def yearly_avg(rundir,avg):
if __name__ == "__main__":
rundir = "/Storage/CO2/ivar/zeus_output/ICDC9/ctdas_co2c13_terdisbcbmanscale_neweps449_test/analysis/"
try:
rundir = sys.argv[1]
except:
rundir = "/Storage/CO2/ivar/zeus_output/ICDC9/ctdas_co2c13_terdisbcb_manscale/analysis/"
try:
avg=sys.argv[1]
avg=sys.argv[2]
except:
avg='transcom'
yearly_avg(rundir,avg)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment