<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Marston, <div class="">Thank you, that getenv was new. But the result is still the same. </div><div class=""><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> time         = toint(getenv(time))</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> printVarSummary(time)</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> print(time)</span></div></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Copyright (C) 1995-2017 - All Rights Reserved</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> University Corporation for Atmospheric Research</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> NCAR Command Language Version 6.4.0</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> The use of this software is governed by a License Agreement.</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> See <a href="http://www.ncl.ucar.edu/" class="">http://www.ncl.ucar.edu/</a> for more details.</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><font color="#ff2600" class="">warning:toint: A bad value was passed (string); input strings must contain numeric digits, replacing with missing value</font></span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Variable: time</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Type: string</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Total Size: 8 bytes</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            1 values</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Number of Dimensions: 1</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Dimensions and sizes:<span class="Apple-tab-span" style="white-space:pre">        </span>[1]</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Coordinates: </span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Number Of Attributes: 1</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  _FillValue :<span class="Apple-tab-span" style="white-space:pre">      </span>-2147483647</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212); min-height: 19px;" class=""><br class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(77, 47, 45); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-2147483647</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 19, 2017, at 11:39 AM, Barry Lynn <<a href="mailto:barry.h.lynn@gmail.com" class="">barry.h.lynn@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">HI Marston:<div class=""><br class=""></div><div class="">Can time be a variable like 201710201800?</div><div class=""><br class=""></div><div class="">Barry</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Oct 19, 2017 at 9:37 PM, Marston Johnston <span dir="ltr" class=""><<a href="mailto:shejo284@gmail.com" target="_blank" class="">shejo284@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" lang="EN-GB" link="blue" vlink="purple" class=""><div class="m_7321342518497639465WordSection1"><p class="MsoNormal"><span class="">Oh forgot the reply to all, <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span class="">If time is a single value then is it actually easier to call it via the environment:<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span class="">export time=$time; ncl ….my_script.ncl<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span class="">Then in the ncl script: time = toint(getenv(time))<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span class="">I use this method all the time.<u class=""></u><u class=""></u></span></p><span class=""><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span class="">/M<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p><div class=""><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Marston S. Ward, PhD<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Department of Earth Sciences<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">University of Gothenburg, Sweden<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Email: <a href="mailto:marston.johnston@gu.se" target="_blank" class=""><span style="color:#0070c0" class="">marston.johnston@gu.se</span></a><u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">SkypeID: marston.johnston <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Phone: <a href="tel:+46%2031%20786%2049%2001" value="+46317864901" target="_blank" class="">+46-31-7864901</a> <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Only the fruitful thing is true!<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<u class=""></u><u class=""></u></span></p></div><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p></span><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm" class=""><p class="MsoNormal"><b class=""><span style="font-size: 12pt;" class="">From: </span></b><span style="font-size: 12pt;" class="">Prashanth Bhalachandran <<a href="mailto:prashanth.bhalachandran@gmail.com" target="_blank" class="">prashanth.bhalachandran@<wbr class="">gmail.com</a>><br class=""><b class="">Date: </b>Thursday, 19 October 2017 at 20:32<br class=""><b class="">To: </b>Marston Johnston <<a href="mailto:shejo284@gmail.com" target="_blank" class="">shejo284@gmail.com</a>><br class=""><b class="">Cc: </b>ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>>, Barry Lynn <<a href="mailto:barry.h.lynn@gmail.com" target="_blank" class="">barry.h.lynn@gmail.com</a>></span></p><div class=""><div class="h5"><br class=""><b class="">Subject: </b>Re: [ncl-talk] Question regarding the transfer of integer values from shell to NCL<u class=""></u><u class=""></u></div></div><div class=""><br class="webkit-block-placeholder"></div></div><div class=""><div class="h5"><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div><p class="MsoNormal">Marston, <u class=""></u><u class=""></u></p><div class=""><p class="MsoNormal">It is being passed from Bash, yes. But it is not an array. The bash script reads one line from the text file containing the file name and the time, passes this to NCL, writes the output to a NETCDF file for that particular file and time and moves to the next file and list. So, as far as NCL is concerned, the time is a single value. When I tested the NCL script, I simply gave it <u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal">Filename = “<a href="http://20141009.nc/" target="_blank" class="">20141009.nc</a>”<u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal">Time = 40 <u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div><div class=""><p class="MsoNormal">And the script works perfectly fine. <u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div><div class=""><p class="MsoNormal">Barry : This is not an array of time values where some of them are missing. The missing value is because of the string passed. In this case, every value will be missing. The output of printMinMax(time,False)  is as follows : <u class=""></u><u class=""></u></p></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Variable: time<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Type: integer<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Total Size: 4 bytes<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">            1 values<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Number of Dimensions: 1<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Dimensions and sizes:<span class="m_7321342518497639465apple-tab-span">   </span>[1]<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Coordinates: <u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Number Of Attributes: 1<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">  _FillValue :<span class="m_7321342518497639465apple-tab-span"> </span>-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank" class="">2147483647</a><u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">min=-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank" class="">2147483647</a>   max=-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank" class="">2147483647</a><u class=""></u><u class=""></u></span></p></div></div><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p><div class=""><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt" class=""><div class=""><p class="MsoNormal">On Oct 19, 2017, at 11:27 AM, Barry Lynn <<a href="mailto:barry.h.lynn@gmail.com" target="_blank" class="">barry.h.lynn@gmail.com</a>> wrote:<u class=""></u><u class=""></u></p></div><p class="MsoNormal"><u class=""></u> <u class=""></u></p><div class=""><div class=""><p class="MsoNormal">Hi:<u class=""></u><u class=""></u></p><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div><div class=""><p class="MsoNormal">printMinMax(time,False) shows no min/max?<u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div><div class=""><p class="MsoNormal">You can handle missing values by checking for them with "ismissing."  If it is true, then you can't use the time variable.<u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div><div class=""><p class="MsoNormal">Barry<u class=""></u><u class=""></u></p></div></div><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p><div class=""><p class="MsoNormal">On Thu, Oct 19, 2017 at 9:20 PM, Prashanth Bhalachandran <<a href="mailto:prashanth.bhalachandran@gmail.com" target="_blank" class="">prashanth.bhalachandran@<wbr class="">gmail.com</a>> wrote:<u class=""></u><u class=""></u></p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm" class=""><div class=""><p class="MsoNormal">Marston, <u class=""></u><u class=""></u></p><div class=""><p class="MsoNormal">I did this previously too. The problem is as follows. It is being assigned a missing value. <u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class=""> time        := stringtointeger(time)<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class=""> printVarSummary(time)<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class=""> print(time)<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class=""><br class=""><br class=""><u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class=""><br class=""><br class=""><u class=""></u><u class=""></u></span></p></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Variable: time<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Type: integer<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Total Size: 4 bytes<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">            1 values<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Number of Dimensions: 1<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Dimensions and sizes:<span class="m_7321342518497639465m-256501566104331939apple-tab-span"> </span>[1]<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Coordinates: <u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Number Of Attributes: 1<u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">  _FillValue :<span class="m_7321342518497639465m-256501566104331939apple-tab-span"> </span>-<a href="tel:(214)%20748-3647" target="_blank" class="">2147483647</a><u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">-<a href="tel:(214)%20748-3647" target="_blank" class="">2147483647</a><u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class=""><br class=""><br class=""><u class=""></u><u class=""></u></span></p></div><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class=""><br class=""><br class=""><u class=""></u><u class=""></u></span></p></div></div><div class=""><div class=""><div class=""><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt" class=""><div class=""><p class="MsoNormal">On Oct 19, 2017, at 11:16 AM, Marston Johnston <<a href="mailto:shejo284@gmail.com" target="_blank" class="">shejo284@gmail.com</a>> wrote:<u class=""></u><u class=""></u></p></div><p class="MsoNormal"><u class=""></u> <u class=""></u></p><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:white">Correction:<u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white">Why not convert time once at the beginning?<u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white">time := stringtointeger(time)<u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white">/M<u class=""></u><u class=""></u></p></div><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Marston S. Ward, PhD</span><u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Department of Earth Sciences</span><u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">University of Gothenburg, Sweden</span><u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Email: <a href="mailto:marston.johnston@gu.se" target="_blank" class=""><span style="color:#0070c0" class="">marston.johnston@gu.se</span></a></span><u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">SkypeID: marston.johnston </span><u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Phone: <a href="tel:+46%2031%20786%2049%2001" target="_blank" class="">+46-31-7864901</a> </span><u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Only the fruitful thing is true!</span><u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><u class=""></u><u class=""></u></p></div></div><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm" class=""><div class=""><p class="MsoNormal" style="background:white"><b class=""><span style="font-size:12.0pt" class="">From:<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span></span></b><span style="font-size:12.0pt" class="">Prashanth Bhalachandran <<a href="mailto:prashanth.bhalachandran@gmail.com" target="_blank" class=""><span style="color:purple" class="">prashanth.bhalachandran@<wbr class="">gmail.com</span></a>><br class=""><b class="">Date:<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span></b>Thursday, 19 October 2017 at 20:08<br class=""><b class="">To:<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span></b>Marston Johnston <<a href="mailto:shejo284@gmail.com" target="_blank" class=""><span style="color:purple" class="">shejo284@gmail.com</span></a>><br class=""><b class="">Cc:<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span></b><<a href="mailto:ncl-talk@ucar.edu" target="_blank" class=""><span style="color:purple" class="">ncl-talk@ucar.edu</span></a>><br class=""><b class="">Subject:<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span></b>Re: [ncl-talk] Question regarding the transfer of integer values from shell to NCL</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div><div class=""><p class="MsoNormal" style="background:white">Marston, <u class=""></u><u class=""></u></p></div><div class=""><div class=""><p class="MsoNormal" style="background:white">The problem is I have several arrays where time is one of the variables as you will see in the attached code. <u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white">For example, <u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class=""> u10  = a->u10 is [76 times] x [801 lats] x [810 lon]</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class="">  u   = a->u.  Is [76 times] x [11 levels] [801 lats] x [810 lon]</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class=""> </span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class="">Using the input argument from the shell script, I am reading these variables at particular times. That is, the text file contains the name of the file and the particular time. </span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class=""> </span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class="">Therefore, when I use it like this : </span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class="">speed(:,:)   = wind_speed(u10(time,0,:,:),<wbr class="">v10(time,0,:,:)) * toknots </span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="margin-bottom:12.0pt;background:#edead4"><u class=""></u> <u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#b82d18" class="">Or any such line, there will be an error primarily because the time input from the shell script is a string. As you can see from the printVarSummary of the received time from the shell script. </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Variable: time</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Type: string</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Total Size: 8 bytes</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">            1 values</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Number of Dimensions: 1</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Dimensions and sizes:<span class="m_7321342518497639465m-256501566104331939apple-tab-span">  </span><span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span>[1]</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Coordinates: </span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">Number Of Attributes: 1</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">  _FillValue :<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span>-<a href="tel:(214)%20748-3647" target="_blank" class="">2147483647</a></span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Courier",serif;color:#4d2f2d" class="">-<a href="tel:(214)%20748-3647" target="_blank" class="">2147483647</a></span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div><div class=""><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt" class=""><div class=""><div class=""><p class="MsoNormal" style="background:white">On Oct 19, 2017, at 10:42 AM, Marston Johnston <<a href="mailto:shejo284@gmail.com" target="_blank" class=""><span style="color:purple" class="">shejo284@gmail.com</span></a>> wrote:<u class=""></u><u class=""></u></p></div></div><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:white">It would help if you did a printVarSummary() on the problem array.<u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Marston S. Ward, PhD</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Department of Earth Sciences</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">University of Gothenburg, Sweden</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Email: <a href="mailto:marston.johnston@gu.se" target="_blank" class=""><span style="color:#0070c0" class="">marston.johnston@gu.se</span></a></span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">SkypeID: marston.johnston </span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Phone: <a href="tel:+46%2031%20786%2049%2001" target="_blank" class="">+46-31-7864901</a> </span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">Only the fruitful thing is true!</span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0" class="">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm" class=""><div class=""><div class=""><p class="MsoNormal" style="background:white"><b class=""><span style="font-size:12.0pt" class="">From:<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span></span></b><span style="font-size:12.0pt" class="">ncl-talk <<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank" class=""><span style="color:#954f72" class="">ncl-talk-bounces@ucar.edu</span></a>> on behalf of Prashanth Bhalachandran <<a href="mailto:prashanth.bhalachandran@gmail.com" target="_blank" class=""><span style="color:#954f72" class="">prashanth.bhalachandran@<wbr class="">gmail.com</span></a>><br class=""><b class="">Date:<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span></b>Thursday, 19 October 2017 at 19:31<br class=""><b class="">To:<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span></b><<a href="mailto:ncl-talk@ucar.edu" target="_blank" class=""><span style="color:#954f72" class="">ncl-talk@ucar.edu</span></a>><br class=""><b class="">Subject:<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span></b>[ncl-talk] Question regarding the transfer of integer values from shell to NCL</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:13.5pt;font-family:"Times",serif" class="">Dear NCL team, </span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:13.5pt;font-family:"Times",serif" class="">Greetings. </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:white"><span style="font-size:13.5pt;font-family:"Times",serif" class="">I have a shell script that does the following : Read from a text file which has a list of dates (yyyyddmm) format and times. For example, the first column in the text represents the date and the second the time. </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">20121030        13     73.34     51.77    -21.57</span><u class=""></u><u class=""></u></p></div></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="margin-bottom:12.0pt;background:#edead4"><span style="font-size:18.0pt;font-family:"Times",serif" class=""><br class=""><br class=""></span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:18.0pt;font-family:"Times",serif" class="">My shell script reads in the first and second column and stores those values and passes off as arguments to my NCL script. My NCL script reads the first argument as the filename and the second as time. I use this time as an index in several of my arrays in my NCL script since my variable </span><span style="font-size:13.5pt;font-family:"Times",serif" class="">dimensions are time x lev x lat x lon. </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:13.5pt;font-family:"Times",serif" class="">The problem here is that shell reads these values as strings and I am unable to get it as an integer, which is compulsory if I want to use it as an array index. Please see the below error. </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:13.5pt;font-family:"Times",serif" class="">Can one of you please guide me as to how I pass this value as an integer? </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"> <u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:13.5pt;font-family:"Times",serif" class="">Many thanks, </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:13.5pt;font-family:"Times",serif" class="">Prashanth </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"> <u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:13.5pt;font-family:"Times",serif" class="">Error: </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif;color:#ff2600" class="">fatal:Illegal subscript. Subscripts must be integer when not using coordinate index</span><span style="font-size:12.0pt;font-family:"Times",serif" class="">ing</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="margin-bottom:12.0pt;background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""><br class=""><br class=""></span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><b class=""><u class=""><span style="font-size:12.0pt;font-family:"Times",serif" class="">My code (I’m attaching the entire code in case you want to have a look, but I am pasting the necessary portions here) : </span></u></b><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt" class=""> </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">#!bin/bash</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">file="/scratch/conte/s/<wbr class="">sbhalach/DATA/RI_compute/<wbr class="">CatRW2030.txt"</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">while read f1 f2 f3 f4;</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">do</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt" class=""> </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">  export dirname=$(echo $f1)00post</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">  echo $dirname</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">  cd $dirname</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> <span class="m_7321342518497639465m-256501566104331939apple-converted-space"><span style="color:#ff2600" class=""> </span></span><span style="color:#ff2600" class="">export filename=${f1}.nc</span></span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif;color:#ff2600" class="">  export time=$f2</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt" class=""> </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">#*****************************<wbr class="">******************************<wbr class="">**************</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">  cat > varcalc.ncl << EOF </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr class="">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr class="">;;;;;;;;;;;;;;  </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr class="">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr class="">;;;;;;;;;;;;;;  </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt" class=""> </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/contributed.<wbr class="">ncl"</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> load "/scratch/lustreD/s/sbhalach/<wbr class="">DATA/func_center.ncl"</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> load "/scratch/lustreD/s/sbhalach/<wbr class="">DATA/func_rtheta.ncl"</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt" class=""> </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> a    = addfile(filename,"r")</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> u10  = a->u10</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> v10  = a->v10</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> slp  = a->slp</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> u    = a->u</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> v    = a->v</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">allvars   = new((/40/),float)</span><u class=""></u><u class=""></u></p></div></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="margin-bottom:12.0pt;background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""><br class=""><br class=""></span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">slpsub       = slp(<span style="color:#ff2600" class="">time</span>,0,:,:) </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">;<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span><b class=""><span style="color:#ff2600" class="">Note that the time here is taken as string and hence the error. I obviously tried the toint() and strongpoint() functions but then the function only returns missing values. </span></b></span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">.</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">.</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">. </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">;;;;;;;;;;;;;;;;;;;;;; Write to a netcdf file ;;;;;;;;;;;;;;;;;;</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">  system("rm -f $f1_$<a href="http://f2_allvars.nc/" target="_blank" class="">f2_allvars.nc</a>")</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">  ncdf = addfile("$f1_$<a href="http://f2_allvars.nc/" target="_blank" class="">f2_allvars.nc</a>","<wbr class="">c")</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">  ncdf->allvars = allvars</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> </span><u class=""></u><u class=""></u></p></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">EOF</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class="">#*****************************<wbr class="">******************************<wbr class="">**************</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> </span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> <b class=""><span style="color:#ff2600" class="">ncl -n 'filename = "$filename"' 'time = "$time"' varcalc.ncl</span></b></span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> mv $f1_$<a href="http://f2_allvars.nc/" target="_blank" class="">f2_allvars.nc</a> ../</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> cd ../</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""> done <"$file”</span><u class=""></u><u class=""></u></p></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="margin-bottom:12.0pt;background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""><br class=""><br class=""></span><u class=""></u><u class=""></u></p></div></div></div></div></div></div></div><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><p class="MsoNormal" style="margin-bottom:12.0pt;background:#edead4"><span style="font-size:12.0pt;font-family:"Times",serif" class=""><br class=""><br class=""></span><u class=""></u><u class=""></u></p></div></div></div></div></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="margin-bottom:12.0pt;background:#edead4"><span style="font-size:12.0pt" class=""><br class=""><br class=""></span><u class=""></u><u class=""></u></p></div></div></div></div></div><div class=""><div class=""><p class="MsoNormal" style="background:white">______________________________<wbr class="">_________________ ncl-talk mailing list<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span><a href="mailto:ncl-talk@ucar.edu" target="_blank" class=""><span style="color:#954f72" class="">ncl-talk@ucar.edu</span></a><span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span>List instructions, subscriber options, unsubscribe:<span class="m_7321342518497639465m-256501566104331939apple-converted-space"> </span><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class=""><span style="color:#954f72" class="">http://mailman.<wbr class="">ucar.edu/mailman/listinfo/ncl-<wbr class="">talk</span></a><u class=""></u><u class=""></u></p></div></div></div></blockquote></div><div class=""><p class="MsoNormal" style="background:white"> <u class=""></u><u class=""></u></p></div></div></div></div></blockquote></div><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br class="">______________________________<wbr class="">_________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><u class=""></u><u class=""></u></p></blockquote></div><p class="MsoNormal"><br class=""><br clear="all" class=""><u class=""></u><u class=""></u></p><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div><p class="MsoNormal">-- <u class=""></u><u class=""></u></p><div class=""><div class=""><p class="MsoNormal">Barry H. Lynn, Ph.D<u class=""></u><u class=""></u></p><div class=""><div class=""><p class="MsoNormal">Senior Lecturer,<u class=""></u><u class=""></u></p></div><div class=""><div class=""><p class="MsoNormal"><span style="color:#888888" class="">The Institute of the Earth Science, <br class="">The Hebrew University of Jerusalem, <br class="">Givat Ram, Jerusalem 91904, Israel </span><u class=""></u><u class=""></u></p></div><p class="MsoNormal"><span style="color:#888888" class="">Tel: 972 547 231 170<br class="">Fax: (972)-25662581</span><u class=""></u><u class=""></u></p></div></div><div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div><div class=""><p class="MsoNormal">C.E.O, Weather It Is, LTD<br class="">Weather and Climate Focus<br class=""><a href="http://weather-it-is.com/" target="_blank" class="">http://weather-it-is.com</a><br class="">Jerusalem, Israel<br class="">Local: 02 930 9525<br class="">Cell: 054 7 231 170<br class="">Int-IS: x972 2 930 9525<br class="">US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank" class="">914 432 3108</a><u class=""></u><u class=""></u></p></div></div></div></div></div></blockquote></div><p class="MsoNormal"><u class=""></u> <u class=""></u></p></div></div></div></div></div>
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class="">Barry H. Lynn, Ph.D<div class=""><div class="">Senior Lecturer,</div><div class=""><div class=""><span style="color:rgb(136,136,136)" class="">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)" class=""><span style="color:rgb(136,136,136)" class="">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)" class=""><span style="color:rgb(136,136,136)" class="">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)" class=""></div><span style="color:rgb(136,136,136)" class="">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)" class=""><span style="color:rgb(136,136,136)" class="">Fax: (972)-25662581</span></div></div><div class=""><span style="color:rgb(136,136,136)" class=""><br class=""></span></div><div class="">C.E.O, Weather It Is, LTD<br class="">Weather and Climate Focus<br class=""><a href="http://weather-it-is.com/" target="_blank" class="">http://weather-it-is.com</a><br class="">Jerusalem, Israel<br class="">Local: 02 930 9525<br class="">Cell: 054 7 231 170<br class="">Int-IS: x972 2 930 9525<br class="">US 914 432 3108<br class=""></div></div></div>
</div>
</div></blockquote></div><br class=""></div></body></html>