1 | import string |
---|
2 | import utils_c4 as utils |
---|
3 | |
---|
4 | validCmip5Experiments = ['1pctCO2', 'abrupt4xCO2', 'amip', 'amip4K', 'amip4xCO2', 'amipFuture', 'aqua4K', 'aqua4xCO2', 'aquaControl', 'decadal1959', 'decadal1960', 'decadal1961', 'decadal1962', 'decadal1963', 'decadal1964', 'decadal1965', 'decadal1966', 'decadal1967', 'decadal1968', 'decadal1969', 'decadal1970', 'decadal1971', 'decadal1972', 'decadal1973', 'decadal1974', 'decadal1975', 'decadal1976', 'decadal1977', 'decadal1978', 'decadal1979', 'decadal1980', 'decadal1981', 'decadal1982', 'decadal1983', 'decadal1984', 'decadal1985', 'decadal1986', 'decadal1987', 'decadal1988', 'decadal1989', 'decadal1990', 'decadal1991', 'decadal1992', 'decadal1993', 'decadal1994', 'decadal1995', 'decadal1996', 'decadal1997', 'decadal1998', 'decadal1999', 'decadal2000', 'decadal2001', 'decadal2002', 'decadal2003', 'decadal2004', 'decadal2005', 'decadal2006', 'decadal2007', 'decadal2008', 'decadal2009', 'decadal2010', 'decadal2011', 'decadal2012', 'esmControl', 'esmFdbk1', 'esmFdbk2', 'esmFixClim1', 'esmFixClim2', 'esmHistorical', 'esmrcp85', 'historical', 'historicalExt', 'historicalGHG', 'historicalMisc', 'historicalNat', 'lgm', 'midHolocene', 'noVolc1960', 'noVolc1965', 'noVolc1970', 'noVolc1975', 'noVolc1980', 'noVolc1985', 'noVolc1990', 'noVolc1995', 'noVolc2000', 'noVolc2005', 'past1000', 'piControl', 'rcp26', 'rcp45', 'rcp60', 'rcp85', 'sst2020', 'sst2030', 'sst2090', 'sst2090rcp45', 'sstClim', 'sstClim4xCO2', 'sstClimAerosol', 'sstClimSulfate', 'volcIn2010'] |
---|
5 | |
---|
6 | validCordexExperiment = validCmip5Experiments + ['evaluation'] |
---|
7 | |
---|
8 | |
---|
9 | validCmip5Frequencies = ['fx','yr','monClim','mon','day','6hr','3hr','subhr'] |
---|
10 | validCordexFrequencies = ['fx','sem','mon','day','6hr','3hr'] |
---|
11 | validSpecsFrequencies = ['fx','mon','day','6hr'] |
---|
12 | validCcmiFrequencies = ['fx','yr','mon','day','hr','subhr'] |
---|
13 | validSpecsExptFamilies = map( lambda x: string.split( x )[0], open( 'specs_vocabs/exptFamily.txt' ).readlines() ) |
---|
14 | |
---|
15 | validCordexDomainsL = [ 'SAM-44', 'CAM-44', 'NAM-44', 'EUR-44', 'AFR-44', 'WAS-44', 'EAS-44', 'CAS-44', 'AUS-44', 'ANT-44', 'ARC-44', 'MED-44'] |
---|
16 | validCordexDomainsLi = map( lambda x: x + 'i', validCordexDomainsL ) |
---|
17 | validCordexDomainsH = ['EUR-11'] |
---|
18 | validCordexDomains = validCordexDomainsL + validCordexDomainsLi + validCordexDomainsH |
---|
19 | |
---|
20 | plevRequired = ['clh', 'clm', 'cll', 'ua850', 'va850', 'ta850', 'hus850', 'ua500', 'va500', 'ta500', 'zg500', 'ua200', 'va200', 'ta200', 'zg200'] |
---|
21 | plevBndsRequired = ['clh', 'clm', 'cll'] |
---|
22 | heightRequired = ['tas','tasmax','tasmin','huss','sfcWind','sfcWindmax','wsgsmax','uas','vas'] |
---|
23 | |
---|
24 | |
---|
25 | ii = open( 'cordex_vocabs/GCMModelName.txt' ).readlines() |
---|
26 | validGcmNames = [] |
---|
27 | for l in ii: |
---|
28 | if l[0] != '#' and len( string.strip(l) ) > 0: |
---|
29 | validGcmNames.append( string.split(l)[0] ) |
---|
30 | |
---|
31 | ii = open( 'cordex_vocabs/RCMModelName.txt' ).readlines() |
---|
32 | validRcmNames = [] |
---|
33 | validInstNames = [] |
---|
34 | for l in ii: |
---|
35 | if l[0] != '#' and len( string.strip(l) ) > 0: |
---|
36 | bits = string.split(l) |
---|
37 | validRcmNames.append( bits[0] ) |
---|
38 | validInstNames.append( bits[1] ) |
---|
39 | |
---|
40 | plevValues = {'clh':22000, 'clm':56000, 'cll':84000} |
---|
41 | for i in [200,500,850]: |
---|
42 | for v in ['zg','ua', 'va', 'ta', 'hus']: |
---|
43 | k = '%s%s' % (v,i) |
---|
44 | plevValues[k] = i*100 |
---|
45 | |
---|
46 | heightRequired = ['tas', 'tasmax', 'tasmin', 'huss', 'sfcWind', 'sfcWindmax', 'wsgsmax', 'uas', 'vas'] |
---|
47 | heightValues = {} |
---|
48 | heightRange = {} |
---|
49 | for v in heightRequired: |
---|
50 | if v in ['tas', 'tasmax', 'tasmin', 'huss']: |
---|
51 | heightValues[v] = 2 |
---|
52 | else: |
---|
53 | heightValues[v] = 10 |
---|
54 | heightRange[v] = (1.5,10.) |
---|
55 | |
---|
56 | ii = open( 'cordex_vocabs/cordex_domains.csv' ).readlines() |
---|
57 | keys = ['name','tag','res','grid_np_lon','grid_np_lat','nlon','nlat','w','e','s','n'] |
---|
58 | rotatedPoleGrids = {} |
---|
59 | for l in ii[2:16]: |
---|
60 | bits = string.split(string.strip(l),',') |
---|
61 | ee = {} |
---|
62 | i = 0 |
---|
63 | for k in keys: |
---|
64 | if k in ['nlon','nlat']: |
---|
65 | ee[k] = int(bits[i]) |
---|
66 | elif k in ['grid_np_lon','grid_np_lat','w','e','s','n','res']: |
---|
67 | if bits[i] != 'N/A': |
---|
68 | ee[k] = float(bits[i]) |
---|
69 | else: |
---|
70 | ee[k] = bits[i] |
---|
71 | else: |
---|
72 | ee[k] = bits[i] |
---|
73 | i += 1 |
---|
74 | rotatedPoleGrids[bits[1]] = ee |
---|
75 | |
---|
76 | ##Area,Name, deg,Nlon,Nlat,West8,East8,South8,North8, |
---|
77 | keys = ['name','tag','res','nlon','nlat','w','e','s','n'] |
---|
78 | interpolatedGrids = {} |
---|
79 | for l in ii[18:33]: |
---|
80 | bits = string.split(string.strip(l),',') |
---|
81 | ee = {} |
---|
82 | i = 0 |
---|
83 | for k in keys: |
---|
84 | if k in ['nlon','nlat']: |
---|
85 | ee[k] = int(bits[i]) |
---|
86 | elif k in ['w','e','s','n','res']: |
---|
87 | ee[k] = float(bits[i]) |
---|
88 | else: |
---|
89 | ee[k] = bits[i] |
---|
90 | i += 1 |
---|
91 | interpolatedGrids[bits[1]] = ee |
---|
92 | |
---|
93 | class readVocab: |
---|
94 | |
---|
95 | def __init__(self,dir): |
---|
96 | self.dir = dir |
---|
97 | |
---|
98 | def getSimpleList(self,file,bit=None): |
---|
99 | ii = open('%s/%s' % (self.dir,file) ) |
---|
100 | oo = [] |
---|
101 | for l in ii.readlines(): |
---|
102 | if l[0] != '#': |
---|
103 | ll = string.strip(l) |
---|
104 | if bit == None: |
---|
105 | oo.append(ll) |
---|
106 | else: |
---|
107 | oo.append(string.split(ll)[bit]) |
---|
108 | return oo |
---|
109 | |
---|
110 | validSpecsInstitutions = ['IC3', 'MPI-M', 'KNMI', 'UOXF', 'CNRM-CERFACS', 'ENEA', 'MOHC', 'SMHI', 'IPSL', 'UREAD', 'ECWMF'] |
---|
111 | |
---|
112 | def getVocabs(pcfg): |
---|
113 | "Returns a dictionary of vocabulary details for the project provided." |
---|
114 | if pcfg.project == 'SPECS': |
---|
115 | ##'experiment_id':utils.patternControl( 'experiment_id', "(?P<val>.*)[0-9]{4}", list=validSpecsExptFamilies ), \ |
---|
116 | vocabs = { 'variable':utils.mipVocab(pcfg), \ |
---|
117 | 'Conventions':utils.listControl( 'Conventions', ['CF-1.6'] ), \ |
---|
118 | 'frequency':utils.listControl( 'frequency', validSpecsFrequencies ), \ |
---|
119 | 'experiment_id':utils.listControl( 'experiment_id', validSpecsExptFamilies ), \ |
---|
120 | 'initialization_method':utils.patternControl( 'initialization_method', "[0-9]+" ), \ |
---|
121 | 'physics_version':utils.patternControl( 'physics_version', "[0-9]+" ), \ |
---|
122 | 'realization':utils.patternControl( 'realization', "[0-9]+" ), \ |
---|
123 | 'project_id':utils.listControl( 'project_id', ['SPECS'] ), \ |
---|
124 | ## 'institution':utils.listControl( 'institution', validSpecsInstitutions ), \ |
---|
125 | 'modeling_realm':utils.listControl( 'realm', ['atmos', 'ocean', 'land', 'landIce', 'seaIce', 'aerosol', 'atmosChem', 'ocnBgchem'], split=True ), \ |
---|
126 | 'series':utils.listControl( 'series', ['series1','series2'] ), \ |
---|
127 | } |
---|
128 | elif pcfg.project == 'CMIP5': |
---|
129 | ##'experiment_id':utils.patternControl( 'experiment_id', "(?P<val>.*)[0-9]{4}", list=validSpecsExptFamilies ), \ |
---|
130 | lrdr = readVocab( 'cmip5_vocabs/') |
---|
131 | vocabs = { 'variable':utils.mipVocab(pcfg), \ |
---|
132 | 'Conventions':utils.listControl( 'Conventions', ['CF-1.4','CF-1.5'] ), \ |
---|
133 | 'experiment_id':utils.listControl( 'experiment_id', lrdr.getSimpleList( 'experiments.txt' ) ), \ |
---|
134 | 'frequency':utils.listControl( 'frequency', validCmip5Frequencies ), \ |
---|
135 | 'initialization_method':utils.patternControl( 'initialization_method', "[0-9]+" ), \ |
---|
136 | 'physics_version':utils.patternControl( 'physics_version', "[0-9]+" ), \ |
---|
137 | 'realization':utils.patternControl( 'realization', "[0-9]+" ), \ |
---|
138 | 'project_id':utils.listControl( 'project_id', ['CMIP5'] ), \ |
---|
139 | ## 'institution':utils.listControl( 'institution', validSpecsInstitutions ), \ |
---|
140 | 'modeling_realm':utils.listControl( 'realm', ['atmos', 'ocean', 'land', 'landIce', 'seaIce', 'aerosol', 'atmosChem', 'ocnBgchem'], split=True ), \ |
---|
141 | } |
---|
142 | elif pcfg.project == 'CCMI': |
---|
143 | |
---|
144 | lrdr = readVocab( 'ccmi_vocabs/') |
---|
145 | vocabs = { 'variable':utils.mipVocab(pcfg), \ |
---|
146 | 'frequency':utils.listControl( 'frequency', validCcmiFrequencies ), \ |
---|
147 | 'experiment_id':utils.listControl( 'experiment_id', lrdr.getSimpleList( 'ccmi_experiments.txt', bit=-1 ) ), \ |
---|
148 | ## do not preserve or check relation between model and institution. |
---|
149 | 'institution':utils.listControl( 'institution', lrdr.getSimpleList( 'models_insts.txt', bit=1 ) ), \ |
---|
150 | 'model_id':utils.listControl( 'model_id', lrdr.getSimpleList( 'models_insts.txt', bit=0 ) ), \ |
---|
151 | 'modeling_realm':utils.listControl( 'realm', ['atmos', 'ocean', 'land', 'landIce', 'seaIce', 'aerosol', 'atmosChem', 'ocnBgchem'] ), \ |
---|
152 | 'atmosChem' and 'ocnBgchem' |
---|
153 | 'project_id':utils.listControl( 'project_id', ['CCMI'] ) } |
---|
154 | elif pcfg.project == '__dummy': |
---|
155 | vocabs = { 'variable':utils.mipVocab(pcfg,dummy=True) } |
---|
156 | else: |
---|
157 | vocabs = { 'variable':utils.mipVocab(pcfg), \ |
---|
158 | 'driving_experiment_name':utils.listControl( 'driving_experiment_name', validCordexExperiment ), \ |
---|
159 | 'project_id':utils.listControl( 'project_id', ['CORDEX'] ), \ |
---|
160 | 'CORDEX_domain':utils.listControl( 'CORDEX_domain', validCordexDomains ), \ |
---|
161 | 'driving_model_id':utils.listControl( 'driving_model_id', validGcmNames ), \ |
---|
162 | 'driving_model_ensemble_member':utils.patternControl( 'driving_model_ensemble_member', 'r[0-9]+i[0-9]+p[0-9]+' ), \ |
---|
163 | 'rcm_version_id':utils.patternControl( 'rcm_version_id', '[a-zA-Z0-9-]+' ), \ |
---|
164 | 'model_id':utils.listControl( 'model_id', validRcmNames ), \ |
---|
165 | 'institute_id':utils.listControl( 'institute_id', validInstNames ), \ |
---|
166 | 'frequency':utils.listControl( 'frequency', validCordexFrequencies ) } |
---|
167 | |
---|
168 | return vocabs |
---|
169 | |
---|
170 | class projectConfig: |
---|
171 | |
---|
172 | def __init__(self, project): |
---|
173 | knownProjects = ['CMIP5','CCMI','CORDEX','SPECS','__dummy'] |
---|
174 | assert project in knownProjects, 'Project %s not in knownProjects %s' % (project, str(knownProjects)) |
---|
175 | |
---|
176 | self.project = project |
---|
177 | if project == 'CORDEX': |
---|
178 | self.requiredGlobalAttributes = [ 'institute_id', 'contact', 'rcm_version_id', 'product', 'CORDEX_domain', 'creation_date', \ |
---|
179 | 'frequency', 'model_id', 'driving_model_id', 'driving_experiment', 'driving_model_ensemble_member', 'experiment_id'] |
---|
180 | self.controlledGlobalAttributes = ['frequency', 'driving_experiment_name', 'project_id', 'CORDEX_domain', 'driving_model_id', 'model_id', 'institute_id','driving_model_ensemble_member','rcm_version_id'] |
---|
181 | self.globalAttributesInFn = [None,'CORDEX_domain','driving_model_id','experiment_id','driving_model_ensemble_member','model_id','rcm_version_id'] |
---|
182 | self.requiredVarAttributes = ['long_name', 'standard_name', 'units'] |
---|
183 | self.drsMappings = {'variable':'@var','institute':'institute_id', 'product':'product', 'experiment':'experiment_id', \ |
---|
184 | 'ensemble':'driving_model_ensemble_member', 'model':'model_id', 'driving_model':'driving_model_id', \ |
---|
185 | 'frequency':'frequency', \ |
---|
186 | 'project':'project_id', 'domain':'CORDEX_domain', 'model_version':'rcm_version_id' } |
---|
187 | |
---|
188 | elif project == 'SPECS': |
---|
189 | lrdr = readVocab( 'specs_vocabs/') |
---|
190 | self.requiredGlobalAttributes = [ 'contact', 'product', 'creation_date', 'tracking_id', \ |
---|
191 | 'experiment_id', 'series'] |
---|
192 | self.requiredGlobalAttributes = lrdr.getSimpleList( 'globalAts.txt' ) |
---|
193 | self.exptFamilies = lrdr.getSimpleList( 'exptFamily.txt', bit=0 ) |
---|
194 | self.controlledGlobalAttributes = [ 'project_id','experiment_id', 'series','frequency','Conventions','modeling_realm', \ |
---|
195 | 'initialization_method','physics_version','realization'] |
---|
196 | self.globalAttributesInFn = [None,'@mip_id','model_id','experiment_id','series','@forecast_reference_time','@ensemble'] |
---|
197 | #sic_Oimon_EC-Earth2_seaIceBestInit_S19910501_series1_r1i1p1_199501-199502.nc |
---|
198 | ## mip_id derived from global attribute Table_id (CMOR convention); experiment family derived from experiment_id, ensemble derived from rip attributes. |
---|
199 | self.requiredVarAttributes = ['long_name', 'standard_name', 'units'] |
---|
200 | self.drsMappings = {'variable':'@var', 'institute':'institution', 'product':'product', 'experiment':'experiment_id', \ |
---|
201 | 'ensemble':'@ensemble', 'model':'model_id', 'series':'series', 'realm':'modeling_realm', \ |
---|
202 | 'frequency':'frequency', 'start_date':'@forecast_reference_time', \ |
---|
203 | 'project':'project_id'} |
---|
204 | |
---|
205 | elif project == 'CMIP5': |
---|
206 | lrdr = readVocab( 'cmip5_vocabs/') |
---|
207 | self.requiredGlobalAttributes = [ 'contact', 'product', 'creation_date', 'tracking_id', \ |
---|
208 | 'experiment_id'] |
---|
209 | ##self.requiredGlobalAttributes = lrdr.getSimpleList( 'globalAts.txt' ) |
---|
210 | self.controlledGlobalAttributes = [ 'project_id','experiment_id', 'frequency','Conventions','modeling_realm', \ |
---|
211 | 'initialization_method','physics_version','realization'] |
---|
212 | self.globalAttributesInFn = [None,'@mip_id','model_id','experiment_id','@ensemble'] |
---|
213 | #sic_Oimon_EC-Earth2_seaIceBestInit_S19910501_series1_r1i1p1_199501-199502.nc |
---|
214 | ## mip_id derived from global attribute Table_id (CMOR convention); experiment family derived from experiment_id, ensemble derived from rip attributes. |
---|
215 | self.requiredVarAttributes = ['long_name', 'standard_name', 'units'] |
---|
216 | ## key: DRS element name, value: global attribute name or tag for mapping from file information ("@...."). |
---|
217 | self.drsMappings = {'variable':'@var', 'institute':'institute_id', 'product':'product', 'experiment':'experiment_id', \ |
---|
218 | 'ensemble':'@ensemble', 'model':'model_id', 'realm':'modeling_realm', \ |
---|
219 | 'frequency':'frequency', \ |
---|
220 | 'project':'project_id'} |
---|
221 | |
---|
222 | elif project == 'CCMI': |
---|
223 | lrdr = readVocab( 'ccmi_vocabs/') |
---|
224 | self.requiredGlobalAttributes = [ 'creation_date', 'tracking_id', 'forcing', 'model_id', 'parent_experiment_id', 'parent_experiment_rip', 'branch_time', 'contact', 'institute_id' ] |
---|
225 | self.requiredGlobalAttributes = lrdr.getSimpleList( 'globalAts.txt' ) |
---|
226 | self.controlledGlobalAttributes = [ 'experiment_id', 'project', 'frequency' ] |
---|
227 | self.globalAttributesInFn = [None,'@mip_id','model_id','experiment_id','@ensemble'] |
---|
228 | self.requiredVarAttributes = ['long_name', 'standard_name', 'units'] |
---|
229 | self.drsMappings = {'variable':'@var'} |
---|
230 | |
---|
231 | elif project == '__dummy': |
---|
232 | self.requiredGlobalAttributes = map( lambda x: 'ga%s' % x, range(10) ) |
---|
233 | self.controlledGlobalAttributes = [ ] |
---|
234 | self.globalAttributesInFn = [None,'ga2', 'ga3', 'ga4' ] |
---|
235 | self.requiredVarAttributes = ['long_name', 'standard_name', 'units'] |
---|
236 | self.drsMappings = {'variable':'@var'} |
---|
237 | |
---|
238 | ####### used in checkStandardDims |
---|
239 | |
---|
240 | self.plevRequired = plevRequired |
---|
241 | self.plevValues = plevValues |
---|
242 | self.heightRequired = heightRequired |
---|
243 | self.heightValues = heightValues |
---|
244 | self.heightRange = heightRange |
---|
245 | |
---|
246 | ####### used in checkGrids |
---|
247 | self.rotatedPoleGrids = rotatedPoleGrids |
---|
248 | self.interpolatedGrids = interpolatedGrids |
---|
249 | self.doCheckGrids = self.project in ['CORDEX',] |
---|
250 | |
---|
251 | ####### used in checkFileName (freqIndex also used in checkByVar) |
---|
252 | |
---|
253 | if self.project == 'CORDEX': |
---|
254 | self.fnPartsOkLen = [8,9] |
---|
255 | self.fnPartsOkFixedLen = [8,] |
---|
256 | self.fnPartsOkUnfixedLen = [9,] |
---|
257 | self.checkTrangeLen = True |
---|
258 | self.domainIndex = 1 |
---|
259 | self.freqIndex = 7 |
---|
260 | elif self.project == 'CMIP5': |
---|
261 | ## cRoot_Lmon_CESM1-WACCM_rcp85_r3i1p1_200601-205512.nc |
---|
262 | self.fnPartsOkLen = [5,6] |
---|
263 | self.fnPartsOkFixedLen = [5,] |
---|
264 | self.fnPartsOkUnfixedLen = [6,] |
---|
265 | self.checkTrangeLen = False |
---|
266 | self.domainIndex = None |
---|
267 | self.freqIndex = None |
---|
268 | elif self.project == 'SPECS': |
---|
269 | self.fnPartsOkLen = [7,8] |
---|
270 | self.fnPartsOkFixedLen = [7,] |
---|
271 | self.fnPartsOkUnfixedLen = [8,] |
---|
272 | self.checkTrangeLen = False |
---|
273 | self.domainIndex = None |
---|
274 | self.freqIndex = 1 |
---|
275 | elif self.project == 'CCMI': |
---|
276 | self.fnPartsOkLen = [5,6] |
---|
277 | self.fnPartsOkFixedLen = [5,] |
---|
278 | self.fnPartsOkUnfixedLen = [6,] |
---|
279 | self.checkTrangeLen = False |
---|
280 | self.domainIndex = None |
---|
281 | self.freqIndex = None |
---|
282 | elif self.project == '__dummy': |
---|
283 | self.fnPartsOkLen = [4,5] |
---|
284 | self.fnPartsOkFixedLen = [4,] |
---|
285 | self.fnPartsOkUnfixedLen = [5,] |
---|
286 | self.checkTrangeLen = False |
---|
287 | self.domainIndex = None |
---|
288 | self.freqIndex = 1 |
---|
289 | |
---|
290 | |
---|
291 | self.defaults = { 'variableDataType':'float' } |
---|
292 | ######## used in mipVocabs |
---|
293 | if self.project == 'CORDEX': |
---|
294 | self.mipVocabDir = 'cordex_vocabs/mip/' |
---|
295 | self.mipVocabTl = ['fx','sem','mon','day','6h','3h'] |
---|
296 | self.mipVocabVgmap = {'6h':'6hr','3h':'3hr'} |
---|
297 | self.mipVocabFnpat = 'CORDEX_%s' |
---|
298 | elif self.project == 'CMIP5': |
---|
299 | self.mipVocabDir = 'cmip5_vocabs/mip/' |
---|
300 | self.mipVocabTl = ['fx','Oyr','Oclim','Omon','Amon','Lmon','LImon','OImon','cfMon','aero','cfDay','day','cfOff','cfSites','6hrLev','6hrPlev','3hr','cf3hr'] |
---|
301 | self.mipVocabVgmap = {} |
---|
302 | self.mipVocabFnpat = 'CMIP5_%s' |
---|
303 | self.defaults['variableDataType'] = None |
---|
304 | elif self.project == 'SPECS': |
---|
305 | self.mipVocabDir = 'specs_vocabs/mip/' |
---|
306 | self.mipVocabTl = ['fx','Omon','Amon','Lmon','OImon','day','6hr'] |
---|
307 | self.mipVocabVgmap = {} |
---|
308 | self.mipVocabFnpat = 'SPECS_%s' |
---|
309 | elif self.project == 'CCMI': |
---|
310 | self.mipVocabDir = 'ccmi_vocabs/mip/' |
---|
311 | self.mipVocabTl = ['fixed','annual','monthly','daily','hourly'] |
---|
312 | self.mipVocabVgmap = {'fixed':'fx','annual':'yr','monthly':'mon','daily':'day','hourly':'hr'} |
---|
313 | self.mipVocabFnpat = 'CCMI1_%s_comp-v5.txt' |
---|
314 | else: |
---|
315 | self.mipVocabDir = None |
---|
316 | self.mipVocabTl = ['day', 't2'] |
---|
317 | self.mipVocabVgmap = {} |
---|
318 | self.mipVocabFnpat = None |
---|
319 | self.mipVocabPars = [self.mipVocabDir, self.mipVocabTl, self.mipVocabVgmap, self.mipVocabFnpat] |
---|
320 | |
---|
321 | ######## used in checkByVar |
---|
322 | if self.project == 'CORDEX': |
---|
323 | self.groupIndex = 7 |
---|
324 | elif self.project in ['CMIP5','CCMI','SPECS','__dummy']: |
---|
325 | self.groupIndex = 1 |
---|
326 | |
---|
327 | self.vocabs = getVocabs(self) |
---|
328 | |
---|
329 | ##assert self.project != 'CCMI', 'Not completely set up for CCMI yet' |
---|