[ncl-talk] NCL Query

Kyle Griffin ksgriffin2 at wisc.edu
Wed Sep 10 08:13:15 MDT 2014


Kunal,

PLEASE look at your graph and understand what it is saying. First, your
plot goes far above 200 hPa. There is a LOT of data above 200 hPa. This
appears to be plotting all available data you have, which appears to be up
to or at least near 0 hPa based on the tick marks (perhaps it is up to 10
hPa?). Also, there is no such level as 0 hPa in the atmosphere, so be
careful using this for anything meaningful.

This ENTIRE PAGE of examples (see link below) shows you how to make the
plot you are working on. It may have been sent to you in your previous
posts - if not, it is very easily searchable if you type "pressure latitude
plot" in the wonderful search box on the website. It is important to look
at ALL of the examples, as most of the common functionality with these
plots are presented in some combination of the examples.

http://ncl.ucar.edu/Applications/height_lat.shtml

In this case, please refer to example 8. However, I don't think this will
help you unless your data actually extend to 0 hPa (which I think is
unlikely), as you can't plot data that you don't have. It might be a good
idea to use printVarSummary to figure out the name of your vertical
coordinate variable and then print(name_of_that_variable) so you can see
how far it extends. I also think you might run into problems trying to have
a logarithmic plot include a zero value, which would need to be infinitely
far away from all other numbers. So, overall, be careful and you might need
to accept that this is potentially all the data you can plot.


Kyle

----------------------------------------
Kyle S. Griffin
Department of Atmospheric and Oceanic Sciences
University of Wisconsin - Madison
Room 1421
1225 W Dayton St, Madison, WI 53706
Email: ksgriffin2 at wisc.edu

On Wed, Sep 10, 2014 at 7:24 AM, Kunal Bali <kunal.bali9 at gmail.com> wrote:

> Dear NCL
>
> I have plotted the pressure vs latitude graph.
> But in that pressure levels values is not coming from 0 to 1000. its
> coming from 200 to 1000 hpa. I need to display pressure levels from 0 to
> 1000.
>
> So how to correct the script. I used the script for this plot given below
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> begin
>  in  = addfile("14-01.nc","r")
>   ts  = in->CH4_VMR_A
> zave = dim_avg_Wrap(ts)
>  wks  = gsn_open_wks("pdf","zonal")
>   gsn_define_colormap(wks,"BlAqGrYeOrRe")
>   res            = True
>   res at cnFillOn = True
>   res at mpFillOn = True
>   res at mpFillColors = (/ -1,-1,103,-1/)
> ;  res at mpMinLatF = -70.
> ;  res at mpMaxLatF = 70.
>
>   res at tiMainString = " Is it OK "
>
>   res at trYReverse = True                            ; reverse Y axis
>   res at trXReverse = True                            ; reverse X axis
>
>   plot=gsn_csm_contour(wks,zave(:,:),res)
> ;***********************************************
> end
>
>
> Kunal Bali
> Research Scholar
> Radio & Atmospheric Science Division
> CSIR - National Physical Laboratory
> New Delhi - 110012
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140910/86fb5c0a/attachment.html 


More information about the ncl-talk mailing list