fre.app.generate_time_averages.frenctoolsTimeAverager module
class for utilizing timavg.csh (aka script to TAVG fortran exe) in frenc-tools
- class fre.app.generate_time_averages.frenctoolsTimeAverager.frenctoolsTimeAverager(pkg, var, unwgt, avg_type)
Bases:
timeAveragerclass inheriting from abstract base class timeAverager generates time-averages using fre-nctools
- generate_timavg(infile=None, outfile=None)
use fre-nctool’s CLI timavg.csh with subprocess call
- Parameters:
self – This is an instance of the class frenctoolsTimeAverager
infile (str, list) – path to history file, or list of paths, default is None
outfile (str) – path to where output file should be stored, default is None
- Returns:
1 if timavg.csh command is not properly executed, and 0 if function has a clean exit
- Return type:
int
- Raises:
ValueError –
instance variable self.avg_type not supported
No infile specified
Cannot find timavg.csh (likely the user is not in an environment with frenctools installed)
timavgcsh command is not properly executed