[ncl-talk] help using res and res2

Rick Brownrigg brownrig at ucar.edu
Fri Apr 29 09:45:58 MDT 2016


Hi Laura,

I took a peek at those files, and it appears that xtime is a character
array, such that if you print it, you get:

Variable: xtime (file variable)
Type: character
Total Size: 64 bytes
            64 values
Number of Dimensions: 2
Dimensions and sizes:    [Time | 1] x [StrLen | 64]
Coordinates:
Number Of Attributes: 0
(0,0)    2
(0,1)    0
(0,2)    1
(0,3)    5
(0,4)    -
(0,5)    0
(0,6)    5
(0,7)    -
(0,8)    0
(0,9)    6
(0,10)    _
(0,11)    0
(0,12)    0
(0,13)    :
(0,14)    1
(0,15)    5
(0,16)    :
(0,17)    0
(0,18)    0
(0,19)
(0,20)
(0,21)
(0,22)
...


You might try setting res2 at tiMainString = tostring(xtime)

HTH...
Rick


On Fri, Apr 29, 2016 at 9:08 AM, Laura Fowler <laura at ucar.edu> wrote:

> Hello:
>
> I am trying to plot the same string "tiMainString", one using
> "res at tiMainString =" for the title of a global plot and one using
> "res2 at tiMainString =" for the title of a regional plot centered over
> CONUS. At the top of my ncl script, I set res2 = res. I do not have
> any issue plotting the global and regional fields using
> res at gsnLeftString and res2 at gsnLeftString, but:
>
> I am able to plot the correct main title for the global map using
> res at tiMainString but for the regional map using res2 at tiMainString, I
> get a "2" for the main tile instead of the actual title. Printing
> res at tiMainString before calling gsn_csm_contour_map is correct, and
> the regional pdf file is correct as well, besides the main title? I am
> not sure what is going on, and why the correct "res2" title is not
> plotted correctly.
>
> My script is in
>
> /glade/scratch/laura/MPASprojects.2016/2016-04-26_00/plots/plots_mpas.t2m.mynn38.ncl
>
> Thanks,
> Laura
>
>
>
> --
>
> !-------------------------------------------------------------------------------------------------------------
> Laura D. Fowler
> Mesoscale and Microscale Meteorology Division (MMM)
> National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
>
> e-mail: laura at ucar.edu
> phone: 303-497-1628
>
>
> !-------------------------------------------------------------------------------------------------------------
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20160429/2073e281/attachment.html 


More information about the ncl-talk mailing list