Both of your suggestions can work well. Thanks very much. Feng
From: Carl Schreck
Date: 2014-06-18 22:59
To: Karin Meier-Fleischer
CC: ChenFeng; ncl-talk
Subject: Re: [ncl-talk] how to deliver an environment variable into ncl script
I usually use
ncl script.ncl var=\"$var\"
Carl
On Wed, Jun 18, 2014 at 10:22 AM, Karin Meier-Fleischer <meier-fleischer@dkrz.de> wrote:
Hi Feng,
try ncl 'var="'$var'"' script.ncl
Bye,
Karin
Am 18.06.2014 um 16:06 schrieb ChenFeng <fengfengabc003@163.com>:
> Hi all,
>
> I need to deliver an environment variable into ncl script. Such as:
> export var="0300"
> ncl var="$var" script.ncl
> But I found the kind of variable var change from string to integer (in the ncl script the var is 300, rather than "0300").
> If I use
> ncl 'var="$var"' script.ncl
> then the variable in script is "$var", also not "0300".
> I have no idea about it.
> It is very appreciate if anybody can solve the problem.
>
> feng
> _______________________________________________
> 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
--
Carl J. Schreck III, PhD
Research Associate
Cooperative Institute for Climate and Satellites NC
North Carolina State University
NOAA's National Climatic Data Center
151 Patton Ave, Asheville, NC 28801
e: cjschrec@ncsu.edu
o: +1 828 257 3140
CycloneCenter.org: Help analyze tropical cyclones
monitor.cicsnc.org/mjo: See recent MJO diagnostics
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 18 07:15:29 2014
This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT