Re: About "-" in attribute name

From: Jeff <jeffelf_at_nyahnyahspammersnyahnyah>
Date: Tue, 26 May 2009 13:51:25 -0400

Hi Mary,

Thank you. It works now.

I should read the FQA first.

Thank you.
Yaosheng

On Tue, May 26, 2009 at 1:49 PM, Mary Haley <haley_at_ucar.edu> wrote:
>
> Sorry, I forgot that you need quotes:
>
>  print(fiw@$"WEST-EAST_GRID_DIMENSION"$)
>
> Please see:
>
>  http://www.ncl.ucar.edu/FAQ/#file_io_007
>
> --Mary
>
>
> On Tue, 26 May 2009, Jeff wrote:
>
>> Hi Mary,
>>
>> It does not work here,
>> Below is what I did and the error msg.
>> ================
>> fiw     = addfile("wrfout_d02_2001-07-01_23.sample.nc","r")
>> print(fiw@$WEST-EAST_GRID_DIMENSION$)
>>
>> fatal:syntax error: line 75 before or near -
>> print(fiw@$WEST-
>> ---------------^
>>
>> fatal:error in statement
>> ================
>>
>> Thank you,
>> Yaosheng
>>
>> On Tue, May 26, 2009 at 1:38 PM, Mary Haley <haley_at_ucar.edu> wrote:
>>>
>>> Use the special syntax "$..$" around the name:
>>>
>>>  f@$WEST-EAST_GRID_DIMENSION$
>>>
>>> --Mary
>>>
>>> On Tue, 26 May 2009, Jeff wrote:
>>>
>>>> Hi,
>>>>
>>>> In WRF output, there are several global attributes with "-" in their
>>>> names, for example, "WEST-EAST_GRID_DIMENSION".
>>>> When I use f_at_WEST-EAST_GRID_DIMENSION to read the dimension, NCL keeps
>>>> recognize the "-" to be a operator for "subtract" and says
>>>> "EAST_GRID_DIMENSION" is not a defined variable.
>>>>
>>>> How can I visit this attribute?
>>>>
>>>> Thank you.
>>>> Yaosheng
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue May 26 2009 - 11:51:25 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 01 2009 - 07:47:27 MDT