CDAT / cdms

8 stars 10 forks source link

generic grid fail to regrid #177

Open doutriaux1 opened 6 years ago

doutriaux1 commented 6 years ago

we cannot regrid generic grids

import requests
import cdms2

def download(fnm):
    r = requests.get("https://uvcdat.llnl.gov/cdat/sample_data/%s" % fnm,stream=True)
    with open(fnm,"wb") as f:
        for chunk in r.iter_content(chunk_size=1024):
            if chunk:  # filter local_filename keep-alive new chunks
                f.write(chunk)

download("sampleGenGrid3.nc")
f = cdms2.open("sampleGenGrid3.nc")
regrid_data = f("sample").regrid(cdms2.createGaussianGrid(128),regridTool="esmf",regridMethod="conserve")

same with linear regridMethod

durack1 commented 6 years ago

@doutriaux1 this is concerning, is it only with the latest nightly?

doutriaux1 commented 6 years ago

nope 2.12 seems to have it in as well. I think it's in since esmpy convertion, maybe even earlier.

durack1 commented 6 years ago

@doutriaux1 eek, this needs fixing quickly then.. It's one of the workhorse features

doutriaux1 commented 6 years ago

@durack1 curvilienare and rectilinear seem to work, it's only generic 1d grids.