How to access right lon, lat information of curvilinear grids?

From: Mario Krapp <mario.krapp_at_nyahnyahspammersnyahnyah>
Date: Wed, 10 Jun 2009 16:44:59 +0200


I could not find out, how to make a contour_map/vector_map plot with data on a curvilinear grid.
The data I wanted to plot is the scalar temp(time,lev,lon,lat)
I read the data as follows:
ncfile_sst = Nio.open_file("","r")
temp = ncfile_sst.variables["var2"]
lon = ncfile_vel.variables["lon"]
lat = ncfile_vel.variables["lat"]
while lon = lon(x,y) and lat = lat(x,y) are 2D arrays

I tried using
tempres.sfXArray = lon[:,:]
tempres.sfYArray = lat[:,:]
co = Ngl.contour_map(wks,temp[0,0,:,:],tempres)

but I get this error message:
warning:ScalarFieldInitialize: 2d coordinate array sfXArray has an incorrect dimension size: defaulting sfXArray
warning:ScalarFieldInitialize: 2d coordinate array sfYArray has an incorrect dimension size: defaulting sfYArray

This data is plotted on the map, but the locations correspond to the x-y coordinates temp(x,y) instead of temp(lon,lat).

Cheers Mario
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Jun 10 2009 - 08:44:59 MDT

This archive was generated by hypermail 2.2.0 : Tue Jun 16 2009 - 10:06:42 MDT