[ncl-talk] Passing numbers to NCL scripts (08 --> 8)
Barry Lynn
barry.h.lynn at gmail.com
Wed Aug 29 00:12:56 MDT 2018
Actually, the problem is that in the delimiter "month1", even if I specify
it as "08" instead of passing it, it is written out as "8" in the following
line.
myFiles = systemfunc("ls -l
weather_it_is_telav_20"+year1+month1+day1+"*csv")
I found this information in the help pages
(https://www.ncl.ucar.edu/Document/Functions/Built-in/sprinti.shtml)
Even if the number is passed as "8" instead of "08," it gets converted to
"08" using the format statement below.
i = month1
print( sprinti("%0.2i", i) ) ;
Also, if I pass "18" it remains as 18.
So, I am set.
Thank you
On Wed, Aug 29, 2018 at 8:43 AM Barry Lynn <barry.h.lynn at gmail.com> wrote:
> Hi:
>
> I am wondering how I might pass the number 08 as is, instead of finding it
> to be equal to "8" within the scriipt.
>
> ncl ./parse_tau_obs.ncl year1=18 month1=08 day1=28
>
> --
> Barry H. Lynn, Ph.D
> Senior Associate Scientist, Lecturer,
> The Institute of the Earth Science,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
>
>
--
Barry H. Lynn, Ph.D
Senior Associate Scientist, Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581
C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180829/6c18e961/attachment.html>
More information about the ncl-talk
mailing list