NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
I am attempting to read a Mcidas area (via adde) and then resample it to a grid with longitude increase to the right and lat increase up. The RealTupleType.SpatialEarth2DTuple seems to be the correct type to represent that grid. But the resampling produces all missing data. I began this code using RealTupleType.LatitudeLongitudeTuple which seems to work fine except the image is rotated with respect to the normal view point. is there something precular about Earth2DTuple?? Here is may test jython script. part of which works and part of which does not. from java.awt import * from javax.swing import JFrame, JPanel from java.awt.event import * from visad.python.JPythonMethods import * from visad import * from visad import Real, Unit, RealType from visad.data.mcidas import AreaAdapter import graph latc = 40. lonc = -106 #aeast AreaAdapter("adde://adde.ucar.edu/imagedata?group=rtimages&descr=ge-ir&l atlon=40 -105&size=100 100") #goese = aeast.getData() #etime1 = aeast.getNominalTime() #print etime1 goese load("adde://adde.ucar.edu/imagedata?group=rtimages&descr=ge-ir&latlon=4 0 -105&size=100 100") ## load and getData produce the same result graph.image(goese,colortable=None,title="goese raw") ## display is ok but lat/lon do not seem to have been loaded sampleLat = makeDomain(RealTupleType.LatitudeLongitudeTuple, 39, 41, 61, -106, -104, 61) d = goese.resample(sampleLat, Data.NEAREST_NEIGHBOR, Data.NO_ERRORS) graph.image(d,title="east Lat") # ok , but lat increasing to right, lon increasing up sampleDomain = makeDomain(RealTupleType.SpatialEarth2DTuple , -106., -104., 61, 39., 41., 61) x = sampleDomain.getX() print "xlocs " print x.getFirst() print x.getLast() y = sampleDomain.getY() print "ylocs " print y.getFirst() print y.getLast() d2 = goese.resample(sampleDomain, Data.NEAREST_NEIGHBOR, Data.NO_ERRORS) graph.image(d2,title="east Lon") # all seem to be missing # this image display seems to have the correct lat/lon reference when doing right/left mouse down and moveing around # just all the data is missing. Must be the resample function did not interpret SpatialEarth2DTuple correctly. G. Garrett Campbell Ph. D. Cooperative Institute for Research in the Atmosphere Colorado State University Ft. Collins, CO, USA 970 491 8497 campbell@xxxxxxxxxxxxxxxxxx
visad
archives: