[ncl-talk] "QVP" radar diagrams

Barry Lynn barry.h.lynn at gmail.com
Sun Mar 11 10:53:18 MDT 2018


Hi:

To solve the problem discussed below, I reversed the dimensions of the
input variables, after assigning units and dimensions.

I also added the hour and minute to the x-axis.

I have included this program again (for reference) and the program that
read the radar data and created the QVP profiles themselves.  Hopefully, I
did the calculations correctly.

The reference is:

https://journals.ametsoc.org/doi/full/10.1175/WAF-D-17-0054.1

Please let me know if you use it and find anything that needs correcting.

Barry

On Fri, Mar 9, 2018 at 12:50 AM, Adam Phillips <asphilli at ucar.edu> wrote:

> Hi Barry,
> When setting the tmYLValues resource, one needs to make sure that the
> values input into tmYLValues match up with the range of the coordinate
> variable data associated with the first dimension of the array input into
> the gsn plotting function. In this case, you are setting this:
> opts_xy at tmYLMode                = "Explicit"
> opts_xy at tmYLValues              = fspan(0,zspan,nz)                    ;
> Create tick marks
> opts_xy at tmYLLabels             := sprintf("%.1f",fspan(zmin,zmax,nz))  ;
> Create labels
>
> and creating a plot like this:
> plot_rad1(0) = gsn_csm_contour(wks,dbz,opts_rad)
>
> In this case, dbz does not have any coordinate variable associated with
> the first dimension. Thus, NCL under-the-hood assigns it an array equal to
> ispan(0,8,1) (as the first dimension of dbz is of size 9). Your tmYLValues
> range from 0 to 100 by 10. Thus, NCL only has data that goes as high as 8
> but you are assigning tickmark labels every 10, and NCL will only plot the
> range of data it has (unless you overrule it by setting trYMaxF = 100 for
> instance).
>
> Your second question is semi-related to the first. You can set the
> tmXBValues/tmXBLabels much as how you set the tmYL resources, but again you
> need to make sure that your tmXBValues are within the range of the
> coordinate variable associated with the 2nd dimension of the array input
> into the NCL plotting function.
>
> In this case, you again do not have any coordinate variable associated
> with the 2nd dimension of dbz, so NCL assigns an array of ispan(0,100,1).
> Thus, the values in tmXBValues much be within that range. Finally, there
> are numerous ways to set the tickmarks. See examples here:
> http://www.ncl.ucar.edu/Applications/time_labels.shtml
> and here:
> http://www.ncl.ucar.edu/Applications/tickmarks.shtml
>
> Hope that helps.
> Adam
>
>
> On Wed, Mar 7, 2018 at 11:02 AM, Barry Lynn <barry.h.lynn at gmail.com>
> wrote:
>
>> Hello:
>>
>> I am plotting qvp diagrams.
>>
>> To run this program, you need to use the *tar file and the ncl file.
>>
>> The y or z axis is height and the x-axis should be time.
>>
>> I have a couple of questions.
>>
>> 1) I see that the label
>>
>> opts_xy at tmYLLabels0.0
>> is defined for all values from 0 to 5, but it does not appear on the y
>> axis.
>>
>> 2) I am wondering how I can convert the times (from time_var) in the
>> variable Times to something I could put on the x-axis, and how I would get
>> these times to appear as well.
>>
>> Thank you for help in solving these two problems.
>>
>> Barry
>>
>> --
>> Barry H. Lynn, Ph.D
>> Senior Lecturer,
>> The Institute of the Earth Science,
>> The Hebrew University of Jerusalem,
>> Givat Ram, Jerusalem 91904, Israel
>> Tel: 972 547 231 170
>> Fax: (972)-25662581
>>
>> C.E.O, Weather It Is, LTD
>> Weather and Climate Focus
>> http://weather-it-is.com
>> Jerusalem, Israel
>> Local: 02 930 9525
>> Cell: 054 7 231 170
>> Int-IS: x972 2 930 9525
>> US 914 432 3108 <(914)%20432-3108>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> --
> Adam Phillips
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/   303-497-1726 <(303)%20497-1726>
>
> <http://www.cgd.ucar.edu/staff/asphilli>
>



-- 
Barry H. Lynn, Ph.D
Senior Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
US 914 432 3108
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180311/90875f5c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: radar_write_qvp.f
Type: application/octet-stream
Size: 720 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180311/90875f5c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: radar_write_qvp.ncl
Type: application/octet-stream
Size: 19768 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180311/90875f5c/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: radar_vert_qvp.ncl
Type: application/octet-stream
Size: 12995 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180311/90875f5c/attachment-0002.obj>


More information about the ncl-talk mailing list