Skip to content
Snippets Groups Projects
Commit 0f291269 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

new functionality added

parent 823e0657
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ import datetime ...@@ -17,6 +17,7 @@ import datetime
from da.analysis.daily_fluxes import daily_avg from da.analysis.daily_fluxes import daily_avg
from da.analysis.monthly_fluxes import monthly_avg from da.analysis.monthly_fluxes import monthly_avg
from da.analysis.yearly_fluxes import yearly_avg from da.analysis.yearly_fluxes import yearly_avg
from da.analysis.longterm_fluxes import longterm_avg
def time_avg(dacycle,avg='transcom'): def time_avg(dacycle,avg='transcom'):
""" Function to create a set of averaged files in a folder, needed to make longer term means """ """ Function to create a set of averaged files in a folder, needed to make longer term means """
...@@ -37,6 +38,8 @@ def time_avg(dacycle,avg='transcom'): ...@@ -37,6 +38,8 @@ def time_avg(dacycle,avg='transcom'):
if new_year(dacycle): if new_year(dacycle):
yearly_avg(analysisdir,avg) yearly_avg(analysisdir,avg)
longterm_avg(analysisdir,avg)
def new_month(dacycle): def new_month(dacycle):
""" check whether we just entered a new month""" """ check whether we just entered a new month"""
......
...@@ -20,7 +20,7 @@ def yearly_avg(rundir,avg): ...@@ -20,7 +20,7 @@ def yearly_avg(rundir,avg):
if avg not in ['transcom','olson','country','flux1x1']: if avg not in ['transcom','olson','country','flux1x1']:
raise IOError,'Choice of averaging invalid' 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 raise IOError,'rundir requested (%s) does not exist, exiting...'%rundir
monthdir = rundir + 'data_%s_monthly'%avg monthdir = rundir + 'data_%s_monthly'%avg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment