I've been working with on the possibility to mix CDAT and CliMAF. But for the moment I have difficulties to convert a CliMAF object to a MA:
jservon@ciclad-ng:~/Evaluation/CliMAF> python
Python 2.7.4 (default, Apr 22 2014, 14:55:23)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> from climaf.api import *
Cache set to /data/jservon/climaf_cache
>>> cdef('project','CMIP5')
>>> cdef('experiment','historical')
>>> cdef('frequency','monthly')
>>> dataloc(organization="CMIP5_DRS",url=['/prodigfs/esg/'])
<climaf.dataloc.dataloc instance at 0x7f47c10a1c68>
>>> dat=ds(model='IPSL-CM5A-LR',
... rip='r1i1p1',
... variable='tas',
... period='1980-2000',
... )
>>> dat.baseFiles()
'/prodigfs/esg/CMIP5/merge/IPSL/IPSL-CM5A-LR/historical/mon/atmos/Amon/r1i1p1/v20110406/tas/tas_Amon_IPSL-CM5A-LR_historical_r1i1p1_185001-200512.nc'
>>> test = cMA(dat)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ssenesi/climaf/climaf/api.py", line 160, in cMA
return climaf.driver.ceval(obj,format='MaskedArray',deep=deep)
File "/home/ssenesi/climaf/climaf/driver.py", line 180, in ceval
rep=ceval(extract,userflags=userflags,format=format,deep=deep,recurse_list=recurse_list)
File "/home/ssenesi/climaf/climaf/driver.py", line 267, in ceval
return cread(file)
File "/home/ssenesi/climaf/climaf/driver.py", line 545, in cread
if varname is None: varname=varOfFile(datafile)
File "/home/ssenesi/climaf/climaf/netcdfbasics.py", line 14, in varOfFile
if (filevar not in fileobj.dimensions) and not re.findall("^time_",filevar) :
NameError: global name 're' is not defined
>>>