[ncl-talk] Unable to Generate 2nd Plot on NCL Script

Barry Lynn barry.h.lynn at gmail.com
Thu Apr 18 21:14:52 MDT 2019


Did you try this?

https://www.ncl.ucar.edu/Document/Functions/Built-in/stringtointeger.shtml

On Fri, Apr 19, 2019 at 6:03 AM Zach Rieck <zrr817 at gmail.com> wrote:

> This is in follow up to early inquiry as outlined in the above email. I
> have printed the variables "Time2" and "Prec2" and the output has been
> integer data as expected. However, the plot function for plot2 still won't
> take the inputs. I think it is because I had to import as a string to get
> around the file being a CSV, but I can't find a function I could use to
> change my variables back to integers. Is there an easy way to accomplish
> this so the plot will accept my data?
>
> -Zach Rieck
> zrr817 at gmail.com
> (513)-502-5652
>
>
> On Wed, Apr 17, 2019 at 9:41 PM Will Hobbs <will.hobbs at utas.edu.au> wrote:
>
>> Zach
>>
>>
>>
>> The error message pretty much says it all: argument (1) (which in ncl is
>> the second argument) of gsn_csm_xy() is the wrong data type.
>>
>>
>>
>> If you look at the function description for gsn_csm_xy(), argument 1
>> (i.e. ‘time2’ in your example, has to be numeric, but from what I can tell
>> from your script time2 is actually a string. You can check this using
>> either print(typeof(time2)) OR printVarSummary(time2) – both will return
>> the data type,
>>
>>
>>
>> http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_xy.shtml
>>
>>
>>
>>
>>
>> Will
>>
>>
>>
>> *From: *ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of Zach Rieck <
>> zrr817 at gmail.com>
>> *Date: *Thursday, 18 April 2019 at 1:29 PM
>> *To: *"ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
>> *Subject: *[ncl-talk] Unable to Generate 2nd Plot on NCL Script
>>
>>
>>
>> To Whom it May Concern-
>>
>>
>>
>> I have been trying to create a script that will hold the frame on my
>> output so we caqn do a side by side comparison of our data in one figure.
>> One data file is a CSV excel file (for which I have generated code to make
>> it readable within NCL) and the other is a netcdf file. When I comment out
>> my 2nd plot command (line 125), I am able to generate the 1st figure
>> without any errors. However, when I try to run the 2nd plot command, I get
>> an"Argument mismatch on argument" error. This error is attached for your
>> reference.
>>
>>
>>
>> Your guidelines ask to be able to run the code as I am, so I have also
>> taken the liberty of attaching the data. My best guess is maybe the error
>> is because I'm trying to recycle the resources from my 1st plot in my 2nd?
>>
>>
>>
>> I have also commented out a few extra lines that are "how to's" for me
>> since I'm still very new to NCL. I am operating on version 6.5.
>>
>>
>>
>>  Thanks in advance for any guidance you can provide on this and let me
>> know if you have any clarification questions!
>>
>>
>>
>> Respectfully,
>>
>>
>> -Zach Rieck
>>
>> zrr817 at gmail.com
>>
>> (513)-502-5652
>>
>>
>>
>> University of Tasmania Electronic Communications Policy (December, 2014).
>> This email is confidential, and is for the intended recipient only.
>> Access, disclosure, copying, distribution, or reliance on any of it by
>> anyone outside the intended recipient organisation is prohibited and may be
>> a criminal offence. Please delete if obtained in error and email
>> confirmation to the sender. The views expressed in this email are not
>> necessarily the views of the University of Tasmania, unless clearly
>> intended otherwise.
>>
> _______________________________________________
> 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/20190419/4eceee7c/attachment.html>


More information about the ncl-talk mailing list