[ncl-talk] Issue Converting Year Fractions to Months

Barry Lynn barry.h.lynn at gmail.com
Thu May 23 00:18:06 MDT 2019


Hi:

What is the resource warning?

On Thu, May 23, 2019 at 6:29 AM Zach Rieck <zrr817 at gmail.com> wrote:

> To Whom it May Concern-
>
> I've created a panel of plots and want the x-axis to simply be months.
> These months need to be non-sequential in number order since I need
> November, December, January, February, and March in that order. It's ok if
> these months are tied to a year if necessary. The dates I am using are in
> yyyymmdd format, and I have converted them to year fractions as suggested
> in the online documentation. When I try using resources to convert this to
> month strings though I get a resource warning.
>
> I'll attach my whole script, but I've pasted my plotting section below to
> keep things simple since I'm guessing it's just an issue I can fix with
> some syntax changes.
>
> Thanks for the help!
>
>  wks = gsn_open_wks("pdf", "Pine_Creek")
>     plots = new(12,graphic)
>     res          = True
>     res at gsnDraw  = False                          ; don't draw
>     res at gsnFrame = False                          ; don't advance frame
>     res at cnInfoLabelOn = False                     ; turn off cn info label
>     colors = (/"blue","red"/)
>     res at tmXBMode     = "Explicit"
>     res at tmXBValues   = (/"Nov","Dec","Jan","Feb","Mar"/)
>     res at tmXBLabels   = res at tmXBValues
>     res at xyLineColors   = colors
>     res at tiXAxis = "Year"
>     res at tiYAxis = "LPE (mm)"
>
>     plots(0) = gsn_csm_xy(wks,yfrac,sums1,res)
>     plots(1) = gsn_csm_xy(wks,yfrac,sums2,res)
>     plots(2) = gsn_csm_xy(wks,yfrac,sums3,res)
>     plots(3) = gsn_csm_xy(wks,yfrac,sums4,res)
>     plots(4) = gsn_csm_xy(wks,yfrac,sums5,res)
>     plots(5) = gsn_csm_xy(wks,yfrac,sums6,res)
>     plots(6) = gsn_csm_xy(wks,yfrac,sums7,res)
>     plots(7) = gsn_csm_xy(wks,yfrac,sums8,res)
>     plots(8) = gsn_csm_xy(wks,yfrac,sums9,res)
>     plots(9) = gsn_csm_xy(wks,yfrac,sums10,res)
>     plots(10) = gsn_csm_xy(wks,yfrac,sums11,res)
>     plots(11) = gsn_csm_xy(wks,yfrac,sums12,res)
>
>     resP                    = True                 ; modify the panel plot
>     resP at gsnPanelMainString = "Pine Creek 38.88 N 112.25W elev 8790 ft"
>   ; set main title
>     gsn_panel(wks,plots,(/3,4/),resP)               ; now draw as one plot
>
> -Zach Rieck
> zrr817 at gmail.com
> (513)-502-5652
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


-- 
Barry H. Lynn, Ph.D
Senior Associate Scientist, 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190523/62d93133/attachment.html>


More information about the ncl-talk mailing list