The "GridDataset" you refer to is actually the domain sampling set --
usually a "visad.Gridded2DSet". Use the JPythonMethods method
"getDomainSet()" to get the Set for the FieldImpl.
Be a little careful about the structure of your "temperatures" object
-- if the first dimension is for "time", then you will need to
reference this as "temperature" for the methods to work correctly.
(I usually just do a "print len(temperature)" and if the value is 1,
then I know I must use "temperature" to reference the FlatField.)
On Thu, Jul 11, 2013 at 5:17 PM, Jose Carro <joandca@xxxxxxxxx> wrote:
> Thanks Tom
> I am able to get the array of points.
> I see that function "getLatLons() requires a GridDataset.
> Based on the simple code below I have a FieldImpl object.
> How can I get a gridset in order to send as parameter to getLanLons
> import visad.python.JPythonMethods as JPythonMethods
> filename = 'd:/mymodel.nc'
> file_opener = 'file.grid'
> variable = 'sst'
> ds = makeDataSource(filename, file_opener)
> temperatures = getData(ds.getName(), variable)
> #Obtain points for the required temperature range 0' - 2.99 Celsius
> ........more code .....
University of Wisconsin-Madison
Space Science & Engineering Center (SSEC)
Cooperative Institute for Meteorological Satellite Studies (CIMSS)
1225 W. Dayton Street
Madison, WI 53706 USA
ph: +1 608 262 2759