[ncl-talk] passing env variables to ncl scripts
Dave Allured - NOAA Affiliate
dave.allured at noaa.gov
Sat Jan 11 20:15:26 MST 2020
Use string referencing in your file reference command:
ndtooned(fd1->$var$(t,k,:,:))
http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#FileStringRef
On Sat, Jan 11, 2020 at 5:48 PM M P via ncl-talk <ncl-talk at ucar.edu> wrote:
> Thanks, I may be a novice but that does answer my question.
> I can getenv(var) from the environment but how to pass its value to
> ndtooned(fd1->var(t,k,:,:))
> where var needs to be replaced by something obtained from getenv
>
> On Sat, Jan 11, 2020 at 5:23 PM Dennis Shea <shea at ucar.edu> wrote:
>
>> *http://www.ncl.ucar.edu/Applications/system.shtml*
>> <http://www.ncl.ucar.edu/Applications/system.shtml>
>>
>> On Sat, Jan 11, 2020 at 3:32 PM M P via ncl-talk <ncl-talk at ucar.edu>
>> wrote:
>>
>>> Hello,
>>> I have ncl code that uses function
>>> temp = ndtooned(fd1->var(t,k,:,:)) ; Read some data;
>>> convert to 1D.
>>>
>>> Is there a way to pass name of var from unix script to the imbedded ncl
>>> script?
>>> Thanks,
>>> Mark
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200111/d52854ff/attachment.html>
More information about the ncl-talk
mailing list