[ncl-talk] writing ascii file
Steeven Paul Yerraguntla
steevenpaul at gmail.com
Mon Sep 12 23:01:28 MDT 2016
Dear Rick,
Yours suggestion works. Thank you very much.
regards
Steeven Paul
On Mon, Sep 12, 2016 at 10:13 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:
> Hi Steeven,
>
> I believe this may be a bug -- it appears as through in the implementation
> of write_table, it is not prepared to handle elements in the list of type
> logical. I'll file a ticket on this. In the meantime, you should be able
> to work around by converting to string-types; something like this:
>
> yes_no1 = where(prob1.lt.siglvl,"True","False")
> yes_no2 = where(prob2.lt.siglvl,"True","False")
>
> Hope that helps...
> Rick
>
>
> On Mon, Sep 12, 2016 at 9:11 AM, Steeven Paul Yerraguntla <
> steevenpaul at gmail.com> wrote:
>
>> Dear NCL user,
>> I wanted to save three variables using the following NCL(version 6.1.0)
>> code
>> ===========================
>> slno = ispan(1,dimsizes(ccr1),1)
>> yes_no1 = where(prob1.lt.siglvl,True,False)
>> yes_no2 = where(prob2.lt.siglvl,True,False)
>> print(yes_no1)
>> print(yes_no2)
>> print(slno)
>> ====== Output for above print funtions ===========
>> Variable: yes_no1
>> Type: logical
>> Total Size: 104 bytes
>> 26 values
>> Number of Dimensions: 1
>> Dimensions and sizes: [26]
>> Coordinates:
>> True
>> True
>> True
>> True
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>>
>> Variable: yes_no2
>> Type: logical
>> Total Size: 104 bytes
>> 26 values
>> Number of Dimensions: 1
>> Dimensions and sizes: [26]
>> Coordinates:
>> True
>> True
>> True
>> True
>> True
>> True
>> True
>> True
>> True
>> False
>> False
>> False
>> False
>> True
>> True
>> True
>> True
>> True
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>> False
>>
>> Variable: slno
>> Type: integer
>> Total Size: 104 bytes
>> 26 values
>> Number of Dimensions: 1
>> Dimensions and sizes: [26]
>> Coordinates:
>> 1
>> 2
>> 3
>> 4
>> 5
>> 6
>> 7
>> 8
>> 9
>> 10
>> 11
>> 12
>> 13
>> 14
>> 15
>> 16
>> 17
>> 18
>> 19
>> 20
>> 21
>> 22
>> 23
>> 24
>> 25
>> 26
>> ===========================================
>> I wanted to save the above three variables to a text file, using
>> write_table function as follows and not able to get as i am facing the
>> following error statement.
>>
>> write_table("test.txt","w",[/slno,yes_no1,yes_no2/],"%2d %s %s")
>>
>> error Statement:
>>
>> * in file: userAddFuncs.c, line: 4633
>> UNRECOGANIZED thevalue->multidval.data_type 0x10000*
>> Please let me know how to sort out of this problem.
>>
>> regards
>> Steeven Paul
>>
>>
>>
>> _______________________________________________
>> 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/20160913/292ae92c/attachment.html
More information about the ncl-talk
mailing list