コード例 #1
0
ファイル: loadCESMLE.py プロジェクト: kemccusker/pyscripts
import cccmautils as cutl
import pandas as pd
import cccmaNC as cnc
import constants as con
import numpy as np

""" as loadLE.py but specifically for CESM1 (instead of CanESM2
    3/24/2016

"""
con=reload(con)

bp=con.get_LEbasepath(model='CESM1')

basepath=bp['basepath']
ensnum=30
prefix = 'b.e11'
res = 'f09_g16'

#  Make this a class! CESMLE

def get_hh(comp):

    if comp=='cam':
        return 'h0'
    elif comp=='cice':
        return 'h'
    else:
        raise Exception('loadCESMLE.get_hh(): Comp other than cam not implemented!')
    
コード例 #2
0
ファイル: loadLE.py プロジェクト: kemccusker/pyscripts
import cccmautils as cutl
import pandas as pd
import cccmaNC as cnc
import constants as con
import numpy as np

con=reload(con)

bp=con.get_LEbasepath()

basepath=bp['basepath']
ensnum=10

ensDT = {'historical':'historical',
         'historicalNat': 'historicalNat',
         'historicalAA': 'historicalMisc',
         'historicalSO': 'historicalMisc',
         'historicalLU': 'historicalMisc',
         'historicalSI': 'historicalMisc',
         'historicalGHG': 'historicalGHG'}
pnumDT = {'historical':'1', 'historicalNat': '1',
          'historicalAA': '4',
          'historicalSO':'6', 'historicalLU': '2',
          'historicalSI': '3','historicalGHG':'1'}
timeperDT={'le':'195001-202012',
           'cmip':'185001-201212',
           'historicalSO': '195001-200012'} # except for some reason SO is '195001-200012', '200101-205012'

#  Make this a class! CanESM2LE

def load_LEdataxr(fielddict, ens, seas=None, timesel=None,infodict=None,ftype='fullts',