Skip to content

regrid broken? #237

@doutriaux1

Description

@doutriaux1
import cdms2
import vcs
f=cdms2.open(vcs.sample_data+"/clt.nc")
s=f("clt")
u=f("u")
s.regrid(u)

gives:

/Users/doutriaux1/anaconda2/envs/cdat8/lib/python2.7/site-packages/cdms2/avariable.py:1146: Warning: 
avariable.regrid: We chose regridTool = esmf for you among the following choices:
   Tools ->    'regrid2' (old behavior)
               'esmf' (conserve, patch, linear) or
               'libcf' (linear)
  warnings.warn(message, Warning)
/Users/doutriaux1/anaconda2/envs/cdat8/lib/python2.7/site-packages/cdms2/avariable.py:1153: Warning: 
avariable.regrid: We chose regridMethod = linear for you among the following choices:
    'conserve' or 'linear' or 'patch'
  warnings.warn(message, Warning)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-8-5f18d310af48> in <module>()
----> 1 s.regrid(u)

/Users/doutriaux1/anaconda2/envs/cdat8/lib/python2.7/site-packages/cdms2/avariable.pyc in regrid(self, togrid, missing, order, mask, **keywords)
   1179                             dstGridMask=None,
   1180                             dstGridAreas=None,
-> 1181                             **keywords)
   1182             # now interpolate
   1183             return ro(self, **keywords)

/Users/doutriaux1/anaconda2/envs/cdat8/lib/python2.7/site-packages/cdms2/mvCdmsRegrid.pyc in __init__(self, srcGrid, dstGrid, dtype, regridMethod, regridTool, srcGridMask, srcGridAreas, dstGridMask, dstGridAreas, **args)
    353 
    354         srcCoords = _getCoordList(srcGrid)
--> 355         dstCoords = _getCoordList(dstGrid)
    356 
    357         regridTool = str(regridTool)  # force string if unicode or byte

/Users/doutriaux1/anaconda2/envs/cdat8/lib/python2.7/site-packages/cdms2/mvCdmsRegrid.pyc in _getCoordList(grid)
    227 
    228         # have axes, need to convert to curvilinear grid
--> 229         cgrid = grid.toCurveGrid()
    230 
    231         lats = cgrid.getLatitude()

AttributeError: 'TransientVariable' object has no attribute 'toCurveGrid'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions