Ziying,
You can't mix and match 2D coordinate values with 1D coordinate arrays, so what I recommend is to "conform" your 1D time array to be a 2D time array.
For example, if the 2D pressure array is dimensioned nlev x ntime, and the 1D time array is ntime, then do something like this:
time2d = conform_dims((/nlev,ntime/),time,1)
where "time" is the original 1D time array.
Now that you have a 2D time array ("time2d"), and let's say your pressure array is called "level2d", then you can call gsn_csm_contour as Yongzuo suggested, but make sure you set the sfXArray and sfYArray resources to these 2D arrays:
res = True
... Set some other res resources...
res@sfXArray = time2d
res@sfYArray = level2d
plot = gsn_csm_contour(wks,data,res)
--Mary
On Oct 7, 2010, at 9:45 AM, ziying li wrote:
> Hi all,
>
> I currently meet a new case when I want to plot a two-dimensional cross-section (pressure/time) of dataset (which is 2D dataset). In normal case, both dimension (pressure&time) are 1D data. But in my case, Pressure is 2D dataset and second dimension of Time is 1D.
>
> Specifically, First dimension of Pressure field is the number of observations in one run and second dimension is pressure level actually observed during that specific observation.
>
> Would you please suggest me which plot type I should choose if I'd like to generate a plot like the one showed in the top of this page: http://www.ncl.ucar.edu/Applications/height_time.shtml ? I may want to represent all pressure info in one graphic.
>
> Thanks
>
> Ziying
> _______________________________________________
> 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 Thu Oct 7 14:23:41 2010
This archive was generated by hypermail 2.1.8 : Tue Oct 12 2010 - 15:27:00 MDT