Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] painfully trying to plot isofill with gengrid #322

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

doutriaux1
Copy link
Contributor

@danlipsa @sankhesh @aashish24 I need some help here.

I'm trying to get isofill (then isoline) to plot a generic grid w/o vertices info. In "theory" it shouldbe doable since we use only pointdata for isofill.

So far I create the unstructured grid and it appears I set the data on it, but the code complains there's no input data.

Here's my script and I'm attaching the grids as well

from __future__ import print_function
import vcs
import cdms2
import os
import numpy
import vtk

data = cdms2.open("/Users/doutriaux1/PeterC/ne30_TS.nc")("TS")
gridFile = cdms2.open("/Users/doutriaux1/PeterC/ne30np4_latlon.091226.nc")
lats = gridFile("lat").filled()
lons = gridFile("lon").filled()
ncols = len(lats)
latAxis = cdms2.auxcoord.TransientAuxAxis1D(lats)
lonAxis = cdms2.auxcoord.TransientAuxAxis1D(lons)
grid = cdms2.gengrid.TransientGenericGrid(latAxis,lonAxis) 
data.setAxis(-1,grid.getAxisList()[0])
data.setGrid(grid)
import vcs
x=vcs.init()
gm = vcs.createisofill()
x.plot(data,gm)
x.png("isof")

grid.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant