コード例 #1
0
ファイル: prept.py プロジェクト: fallisd/cmipdata
def test_cat_experiments(directory, sourcefiles, var, e1name, e2name):
    ctt.loadtestfiles(directory, sourcefiles)
    filepattern = "*.nc"
    ens = cd.mkensemble(filepattern)
    ens = cd.cat_experiments(ens, var, exp1_name=e1name, exp2_name=e2name)
    data = ctt.sha(ens)
    return data
コード例 #2
0
ファイル: prept.py プロジェクト: wydh/cmipdata
def test_cat_experiments(directory, sourcefiles, var, e1name, e2name):
    ctt.loadtestfiles(directory, sourcefiles)
    filepattern = '*.nc'
    ens = cd.mkensemble(filepattern)
    ens = cd.cat_experiments(ens, var, exp1_name=e1name, exp2_name=e2name)
    data = ctt.sha(ens)
    return data
コード例 #3
0
def process_local_cmip5_data(var):
    """time-merge
    """
    # 2. Join the time-slices
    # First build a cmipdata ensemble object
    filepattern = var + '*.nc' 
    ens = cd.mkensemble(filepattern)
    # Join the time-slices and limit to years between 1880 and 2012
    ens = cd.cat_experiments(ens, var, 'historical', 'rcp45')    
    ens = cd.time_slice(ens, '1881-01-01', '2012-12-31')    
コード例 #4
0
ファイル: prept.py プロジェクト: fallisd/cmipdata
def test_my_operator(directory, sourcefiles, var, e1name, e2name):
    ctt.loadtestfiles(directory, sourcefiles)
    filepattern = "*.nc"
    ens = cd.mkensemble(filepattern)
    ens = cd.cat_experiments(ens, var, exp1_name=e1name, exp2_name=e2name)
    filepattern = "*.nc"
    ens = cd.mkensemble(filepattern)
    my_cdo_str = "cdo remapdis,r1x180 -zonmean -seldate,1950-01-01,2000-12-31\
             -sub {infile} -timmean -seldate,1950-01-01,2000-12-31 {infile}\
             {outfile}"
    ens = cd.my_operator(ens, my_cdo_str, output_prefix="test_", delete=True)
    data = ctt.sha(ens)
    return data
コード例 #5
0
ファイル: prept.py プロジェクト: wydh/cmipdata
def test_my_operator(directory, sourcefiles, var, e1name, e2name):
    ctt.loadtestfiles(directory, sourcefiles)
    filepattern = '*.nc'
    ens = cd.mkensemble(filepattern)
    ens = cd.cat_experiments(ens, var, exp1_name=e1name, exp2_name=e2name)
    filepattern = '*.nc'
    ens = cd.mkensemble(filepattern)
    my_cdo_str = 'cdo remapdis,r1x180 -zonmean -seldate,1950-01-01,2000-12-31\
             -sub {infile} -timmean -seldate,1950-01-01,2000-12-31 {infile}\
             {outfile}'

    ens = cd.my_operator(ens, my_cdo_str, output_prefix='test_', delete=True)
    data = ctt.sha(ens)
    return data