Re: syntax error

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 10 Feb 2009 21:28:44 -0700

If "nyear" is an NCL variable, then I think what you want
is to use "+" as a string concatenator:

   nday_at_units="days since " + nyear + "-1-1"

You don't need a "$" to reference the variable name.

--Mary

On Tue, 10 Feb 2009 20:53:40 -0700
  Dennis Shea <shea_at_ucar.edu> wrote:
> What is $nyear ?
>
> Is it a *nix environment variable? If so use
> http://www.ncl.ucar.edu/Document/Functions/Built-in/getenv.shtml
>
> nday_at_units = "days since "+getenv("nyear")+"-1-1"
>
> If it is not an environment varable .... what is it?
>
>
>
> Guanghua Chen wrote:
>> Hi
>> When I use ut_calendar(nday,0), I define
>>nday_at_units="days since
>> $nyear-1-1". $nyear changes depending on my loop. It is
>>a syntax error.
>> How to revise?
>> Thanks
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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 Feb 10 2009 - 21:28:44 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 12 2009 - 10:16:44 MST