Re: Making pressure-height plot with equally spaced pressure level

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Jan 05 2010 - 09:47:47 MST

You are on the right track with the idea of setting up coordinates.
You can use the coordinate array feature if your coordinates are 1D.

That is, you must have a 1D array of altitude values that has the
same number of points as the leftmost dimension of your data array,
and a 1D array of latitude values that has the same number of points
as the rightmost dimension of your data array.

If your data array is called "X", your altitude values "ALT", your
latitude values "LAT", then you can set up the metadata for "X" so
that you can plot it using gsn_csm_contour:

   X!0 = "alt" ; Name X's dimensions
   X!1 = "lat"
   X&alt = ALT ; Using the names we just created,
   X&lat = LAT ; attach the coordinate arrays to X

Now, if you plot X:

     plot = gsn_csm_contour(wks,X,res)

it will see the coordinate arrays attached to X, and you should have
the correct values on your X and Y axis.

--Mary

On Jan 4, 2010, at 10:34 AM, Jeff wrote:

> Hi, Sir/Madam,
>
> I would like to make plots of zonal mean of some variable, that is, a
> plot with altitude as Y-axis versus latitude as X-axis.
> However, all examples I found on NCL website using equally spaced
> height as Y-axis.
> How can I use equally spaced pressure or sigma level as Y-axis?
>
> I also checked examples for general contour plots. They may serve
> well. However, the example is too simple for me to follow. I have no
> idea about how should I setup coordinates for the variable to plot so
> that NCL can understand Y-axis is altitude and X-axis is latitude or
> whatever coordinate. Is there a detailed example?
>
> Thank you very much.
> Yaosheng Chen
> _______________________________________________
> 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 Tue Jan 5 09:48:33 2010

This archive was generated by hypermail 2.1.8 : Tue Jan 05 2010 - 11:04:11 MST