fluxnetCDF.py
def find_flux_file(path, site, temporal_agg, settype):
    """Finds specific FLUXNET2015 station CSV data from folder containing several station CSV files."""
    if settype not in ['FULLSET', 'SUBSET']:
        raise SetTypeError(settype)
    flux_dir = [dir for dir in os.listdir(path) if site in dir]
    if len(flux_dir) != 1:
        raise SiteCodeError

    files = [os.path.basename(file) for file in glob.glob(path + flux_dir[0] + '/*.csv')]
    files = [file for file in files if file.split('_')[1] == site and file.split('_')[3] == settype]
    fname = [file for file in files if file.split('_')[4] == temporal_agg]
    return flux_dir[0] + '/' + fname[0]
Finds specific FLUXNET2015 station CSV data from folder containing several station CSV files.
Finds specific FLUXNET2015 station CSV data from folder containing several station CSV files.
Finds specific FLUXNET2015 station CSV data from folder containing several station CSV files .
def find_flux_file(path, site, temporal_agg, settype):
    if settype not in ['FULLSET', 'SUBSET']:
        raise SetTypeError(settype)
    flux_dir = [dir for dir in os.listdir(path) if site in dir]
    if len(flux_dir) != 1:
        raise SiteCodeError
    files = [os.path.basename(file) for file in glob.glob(path + flux_dir[0] + '/*.csv')]
    files = [file for file in files if file.split('_')[1] == site and file.split('_')[3] == settype]
    fname = [file for file in files if file.split('_')[4] == temporal_agg]
    return flux_dir[0] + '/' + fname[0]
def find_flux_file ( path , site , temporal_agg , settype ) : if settype not in [ 'FULLSET' , 'SUBSET' ] : raise SetTypeError ( settype ) flux_dir = [ dir for dir in os . listdir ( path ) if site in dir ] if len ( flux_dir ) != 1 : raise SiteCodeError files = [ os . path . basename ( file ) for file in glob . glob ( path + flux_dir [ 0 ] + '/*.csv' ) ] files = [ file for file in files if file . split ( '_' ) [ 1 ] == site and file . split ( '_' ) [ 3 ] == settype ] fname = [ file for file in files if file . split ( '_' ) [ 4 ] == temporal_agg ] return flux_dir [ 0 ] + '/' + fname [ 0 ]
Finds specific FLUXNET2015 station CSV data from folder containing several station CSV files.
Finds specific FLUXNET2015 station CSV data from folder containing several station CSV files .
"""Finds specific FLUXNET2015 station CSV data from folder containing several station CSV files."""
path
site
temporal_agg
settype