[ncl-talk] Query- problem to plot cyclone track

Mary Haley haley at ucar.edu
Thu May 25 16:06:43 MDT 2017


My guess is that the 2nd warning message is coming from this line:

     txid1(i) = gsn_add_text(wks,plot,date(i),lon1d(ix),lat1d(ix),txres)

The third argument to gsn_add_text, which is supposed to be a string, is
actually being given an integer (date).  You can convert "date" to a string
by prepending a "":

     txid1(i) = gsn_add_text(wks,plot,""+date(i),lon1d(ix),lat1d(ix),txres)

You could also create a separate array that converts date to a string array:

str_date = tostring(date)

and then use:

     txid1(i) = gsn_add_text(wks,plot,str_date(i),lon1d(ix),lat1d(ix),txres)

--Mary



On Thu, May 25, 2017 at 3:36 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:

> That message is just a warning -- are you not getting the expected plot
> output?  Can you tell which function is issuing the 2nd warning message
> (try bracketing it by placing print statements at some strategic places.
>
> Rick
>
> On Thu, May 25, 2017 at 12:13 PM, Gaurav Tiwari <gaurav16 at iiserb.ac.in>
> wrote:
>
>> Hi Mary,
>>    I am continuously trying to plot the track of a cyclone by using
>> wrfoutput.nc file but I am getting error which is pasted below:
>>
>>
>> gaurav at 2-Lenovo-S510:~/ncl_scripts$ ncl trackmod.ncl
>>  Copyright (C) 1995-2017 - All Rights Reserved
>>  University Corporation for Atmospheric Research
>>  NCAR Command Language Version 6.4.0
>>  The use of this software is governed by a License Agreement.
>>  See http://www.ncl.ucar.edu/ for more details.
>> warning:gsnAddCyclic is not a valid resource in map at this time
>> (0)    dot:62.9357,13.9954
>> (0)    Eye:9140
>> warning:Argument 2 of the current function or procedure was coerced to
>> the appropriate type and thus will not change if the function or procedure
>> modifies its value
>>
>>
>> I am attaching my script and output figure. KIndly check my script and
>> help me  to solve my problem.
>>
>>
>> --Gaurav
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> 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/20170525/fd2d5396/attachment.html 


More information about the ncl-talk mailing list