Re: How to use write_matrix to output data with comma delimiter

From: guangshan Chen <gchen9_at_nyahnyahspammersnyahnyah>
Date: Thu, 17 May 2007 22:27:49 -0500

Hi Rick,

Thanks for your response.

Example #6 is very good which explains how to output 1D array. But I
didn't read it carefully. With the help of Michael Notaro,
I solved the problem. The problem is still because write_matrix
requires the array should be 2D. If I want use wirte_matrix to output
1D array, I should transfer 1D array to 2D array.

For example: new_array(:,1) = old_array(:)

Guangshan

On May 17, 2007, at 10:07 PM, Rick Grubin wrote:

> Hi Guangshan,
>
>> Now I want to use write_matrix to output 1D time series to a text
>> file with comma delimiter between column.
>
>> fatal:Number of dimensions in parameter (0) of (write_matrix) is
>> (1), (2) dimensions were expected
>> fatal:Execute: Error occurred at or near line 171 in file
>> script_get_ts.ncl
>>
>> What does this mean? Because my variable is not 2D or other things?
>
> The error does mean that your input data argument is not a 2D
> array, as write_matrix() requires. The
> documentation is at: http://www.ncl.ucar.edu/Document/Functions/
> Built-in/write_matrix.shtml
>
> That said, it is possible to print a 1D array using write_matrix
> (). Example #6 in the documentation
> shows how to do this.
>
> -Rick.
> ----
> Rick Grubin NCAR/TDD/CISL/VETS
> Visualization + Enabling Technologies
> grubin_at_ucar.edu 303.497.1832
>
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 17 2007 - 21:27:49 MDT

This archive was generated by hypermail 2.2.0 : Fri May 18 2007 - 09:11:09 MDT