-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
import cdms2, vcs
f = cdms2.open(vcs.sample_data + "/sampleGenGrid3.nc")
f2 = cdms2.open(vcs.sample_data + "/clt.nc")
sample = f("sample")
clt = f("clt")
sample.regrid(clt.getGrid())raises:
/Users/fries2/anaconda/envs/cdat_widgets/lib/python2.7/site-packages/cdms2/avariable.pyc in regrid(self, togrid, missing, order, mask, **keywords)
1128 dstGridMask = None,
1129 dstGridAreas = None,
-> 1130 **keywords)
1131 # now interpolate
1132 return ro(self, **keywords)
/Users/fries2/anaconda/envs/cdat_widgets/lib/python2.7/site-packages/cdms2/mvCdmsRegrid.pyc in __init__(self, srcGrid, dstGrid, dtype, regridMethod, regridTool, srcGridMask, srcGridAreas, dstGridMask, dstGridAreas, **args)
337 self.dstGrid = dstGrid
338
--> 339 srcCoords = _getCoordList(srcGrid)
340 dstCoords = _getCoordList(dstGrid)
341
/Users/fries2/anaconda/envs/cdat_widgets/lib/python2.7/site-packages/cdms2/mvCdmsRegrid.pyc in _getCoordList(grid)
216
217 # have axes, need to convert to curvilinear grid
--> 218 cgrid = grid.toCurveGrid()
219
220 lats = cgrid.getLatitude()
AttributeError: 'TransientGenericGrid' object has no attribute 'toCurveGrid'
This is because the TransientGenericGrid object has no function to convert to a TransientCurveGrid. I tried switching toCurveGrid() to toGenericGrid(), but that leads to a lot of weird errors.
Metadata
Metadata
Assignees
Labels
No labels