Re: Problem with procedure write_table

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 14 2013 - 08:35:12 MDT

Hi Sven,

It would help if you include the actual line of code that contains the "write_table" call.

Argument #2, which is the 3rd argument in the list (argument count starts at 0) must be a list.

So, to correctly write soil_moisture_string to a file, it must be turned into a list, by enclosing it with [/ and /]:


I don't think the attributes of this variable should come into play, since only the variable itself will be written to the file. However, if you think the attributes are the source of the problem, you can try wrapping the variable in (/ and /), which causes metadata to be stripped off:


The attribute thing is a bit odd, and I would like to look into this further as a separate issue.

How is soil_moisture_string being created? If it's read off a file, can you provide me with the file so I can have a look?



On Oct 13, 2013, at 4:41 AM, Sven Eiermann <> wrote:

> Hello everyone,
> when trying to write a string variable to a file with write_table I always get this error:
> >> fatal:Argument type mismatch on argument (2) of (write_table) can not coerce <<
> I think its occurring because the variable I try to write has to much metadata.
> Here is the output of printVarSummary(soil_moisture_string) where "soil_moisture_string" is the variable I want to write to a file with write_table:
> >> Variable: soil_moisture_string
> Type: string
> Total Size: 4 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Number Of Attributes: 0 <<
> I guess the error I mentioned above is because of the "Number of Attributes: 0" in the metadata of the variable(?).
> Is there a way to avoid this error by deleting this kind of metadata or something similar?
> Any help is much appreciated!
> Thank you in advance!
> Sven
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Mon Oct 14 08:35:22 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 22 2013 - 10:35:27 MDT