Re: plotting data on irregular grids

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri, 19 Jun 2009 22:04:38 -0600

Mark

I will send you an 'improved' version of your script offline.

[1]
Why the (0,0,::-1,:) ?
Graphics do not care about the latitude order.

[2]
Not all arrays containing coordinates are "coordinate variables".
The Unidata/netCDF (hence, NCL) definition of coordinate
variables is:

     One dimensional; monotonically {in/de}creasing;
     Further, the dimension name must be the same
     as the variable name. [Unidata/netCDf (hence, NCL) definition]
     eg: time(time), lat(lat), longitude(longitude)

The lat/lon arrays on your file are 2-dimensional. They
are arrays that contain coordinates but they are not
"coordinate variables".

NCL has reserved attributes named "lat2d" and "lon2d"
EG: http://www.ncl.ucar.edu/Applications/popscal.shtml

[3]
Unfortunately, the CDO [Climate Data Operators] do not use
COARDS/CF/udunits for latitude and longitude. NCL
recognizes common udunits. I manually added the correct units.

[4]
The script has

  plots = new(8,graphic)
[snip]
  plots(1)=gsn_csm_contour_map(wks,mpi(0,0,:,:),res)
[snip]
  pnlres = True
  gsn_panel(wks,plots,(/4,2/),pnlres)

Only "plots(1)" was filled. All other are "missing"

When gsn_panel uses 'plot,(/4,2/)'

will plot in the following order

   0 1
   2 3
   4 5
   6 7

Since only 'plot(1)' was filled, the figure
appeared in the upper right hand corner.

Good luck
D

Mark.Collier_at_csiro.au wrote:
> Hi,
> I'm trying to plot some data from an ocean model on a grid which is defined by a 2d latitude and longitude arrays.
>
> If I remove the lonFlip command I get some filled contours, however, it doesn't
> look right. As the files are too big for submission to the group I've put files
>
> mpi.ncl, figure5b_mpiom_run_b.nc and grab.doc
>
> on my anonymous ftp area, ftp.dar.csiro.au, macftp, macftp
>
> Many thanks,
> Mark.
>
> CSIRO Marine and Atmospheric Research
> Australia.
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jun 19 2009 - 22:04:38 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 22 2009 - 15:36:10 MDT