<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Title content=""><meta name=Keywords content=""><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Times;
panose-1:2 0 5 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.apple-tab-span
{mso-style-name:apple-tab-span;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.msoIns
{mso-style-type:export-only;
mso-style-name:"";
text-decoration:underline;
color:teal;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:595.0pt 842.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body bgcolor=white lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Correction:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Why not convert time once at the beginning?<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>time := stringtointeger(time)<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>/M<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>Marston S. Ward, PhD<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>Department of Earth Sciences<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>University of Gothenburg, Sweden<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>Email: <a href="mailto:marston.johnston@gu.se"><span style='color:#0070C0'>marston.johnston@gu.se</span></a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>SkypeID: marston.johnston <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>Phone: +46-31-7864901 <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>Only the fruitful thing is true!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<o:p></o:p></span></p></div><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:12.0pt;color:black'>From: </span></b><span style='font-size:12.0pt;color:black'>Prashanth Bhalachandran <prashanth.bhalachandran@gmail.com><br><b>Date: </b>Thursday, 19 October 2017 at 20:08<br><b>To: </b>Marston Johnston <shejo284@gmail.com><br><b>Cc: </b><ncl-talk@ucar.edu><br><b>Subject: </b>Re: [ncl-talk] Question regarding the transfer of integer values from shell to NCL<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>Marston, <o:p></o:p></p><div><p class=MsoNormal>The problem is I have several arrays where time is one of the variables as you will see in the attached code. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>For example, <o:p></o:p></p></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#B82D18'> u10 = a->u10 is [76 times] x [801 lats] x [810 lon]<o:p></o:p></span></p></div></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#B82D18'> u = a->u. Is [76 times] x [11 levels] [801 lats] x [810 lon]<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#B82D18'><o:p> </o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#B82D18'>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. <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#B82D18'><o:p> </o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#B82D18'>Therefore, when I use it like this : <o:p></o:p></span></p></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#B82D18'>speed(:,:) = wind_speed(u10(time,0,:,:),v10(time,0,:,:)) * toknots <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#B82D18'><br><br><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#B82D18'>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. <o:p></o:p></span></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#4D2F2D'>Variable: time<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#4D2F2D'>Type: string<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#4D2F2D'>Total Size: 8 bytes<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#4D2F2D'> 1 values<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#4D2F2D'>Number of Dimensions: 1<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#4D2F2D'>Dimensions and sizes:<span class=apple-tab-span> </span>[1]<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#4D2F2D'>Coordinates: <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#4D2F2D'>Number Of Attributes: 1<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#4D2F2D'> _FillValue :<span class=apple-tab-span> </span>-2147483647<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Courier",serif;color:#4D2F2D'>-2147483647<o:p></o:p></span></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>On Oct 19, 2017, at 10:42 AM, Marston Johnston <<a href="mailto:shejo284@gmail.com">shejo284@gmail.com</a>> wrote:<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal style='background:white'>It would help if you did a printVarSummary() on the problem array.<o:p></o:p></p></div><div><p class=MsoNormal style='background:white'> <o:p></o:p></p></div><div><p class=MsoNormal style='background:white'> <o:p></o:p></p></div><div><div><p class=MsoNormal style='background:white'><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><o:p></o:p></p></div><div><p class=MsoNormal style='background:white'><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>Marston S. Ward, PhD</span><o:p></o:p></p></div><div><p class=MsoNormal style='background:white'><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>Department of Earth Sciences</span><o:p></o:p></p></div><div><p class=MsoNormal style='background:white'><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>University of Gothenburg, Sweden</span><o:p></o:p></p></div><div><p class=MsoNormal style='background:white'><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>Email: <a href="mailto:marston.johnston@gu.se"><span style='color:#0070C0'>marston.johnston@gu.se</span></a></span><o:p></o:p></p></div><div><p class=MsoNormal style='background:white'><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>SkypeID: marston.johnston </span><o:p></o:p></p></div><div><p class=MsoNormal style='background:white'><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>Phone: +46-31-7864901 </span><o:p></o:p></p></div><div><p class=MsoNormal style='background:white'><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>Only the fruitful thing is true!</span><o:p></o:p></p></div><div><p class=MsoNormal style='background:white'><span style='font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070C0'>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><o:p></o:p></p></div></div><div><p class=MsoNormal style='background:white'> <o:p></o:p></p></div><div><p class=MsoNormal style='background:white'> <o:p></o:p></p></div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><div><p class=MsoNormal style='background:white'><b><span style='font-size:12.0pt'>From:<span class=apple-converted-space> </span></span></b><span style='font-size:12.0pt'>ncl-talk <<a href="mailto:ncl-talk-bounces@ucar.edu"><span style='color:#954F72'>ncl-talk-bounces@ucar.edu</span></a>> on behalf of Prashanth Bhalachandran <<a href="mailto:prashanth.bhalachandran@gmail.com"><span style='color:#954F72'>prashanth.bhalachandran@gmail.com</span></a>><br><b>Date:<span class=apple-converted-space> </span></b>Thursday, 19 October 2017 at 19:31<br><b>To:<span class=apple-converted-space> </span></b><<a href="mailto:ncl-talk@ucar.edu"><span style='color:#954F72'>ncl-talk@ucar.edu</span></a>><br><b>Subject:<span class=apple-converted-space> </span></b>[ncl-talk] Question regarding the transfer of integer values from shell to NCL</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:white'> <o:p></o:p></p></div></div><div><p class=MsoNormal style='background:white'><span style='font-size:13.5pt;font-family:"Times",serif'>Dear NCL team, </span><o:p></o:p></p></div><div><div><p class=MsoNormal style='background:white'><span style='font-size:13.5pt;font-family:"Times",serif'>Greetings. </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:white'> <o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:white'><span style='font-size:13.5pt;font-family:"Times",serif'>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><o:p></o:p></p></div></div><div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>20121030 13 73.34 51.77 -21.57</span><o:p></o:p></p></div></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:18.0pt;font-family:"Times",serif'><br><br><br></span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:18.0pt;font-family:"Times",serif'>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'>dimensions are time x lev x lat x lon. </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:13.5pt;font-family:"Times",serif'>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><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:13.5pt;font-family:"Times",serif'>Can one of you please guide me as to how I pass this value as an integer? </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'> <o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:13.5pt;font-family:"Times",serif'>Many thanks, </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:13.5pt;font-family:"Times",serif'>Prashanth </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'> <o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:13.5pt;font-family:"Times",serif'>Error: </span><o:p></o:p></p></div></div><div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif;color:#FF2600'>fatal:Illegal subscript. Subscripts must be integer when not using coordinate index</span><span style='font-size:12.0pt;font-family:"Times",serif'>ing</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'><br><br><br></span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><b><u><span style='font-size:12.0pt;font-family:"Times",serif'>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><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt'> </span><o:p></o:p></p></div></div><div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>#!bin/bash</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>file="/scratch/conte/s/sbhalach/DATA/RI_compute/CatRW2030.txt"</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>while read f1 f2 f3 f4;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>do</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt'> </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> export dirname=$(echo $f1)00post</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> echo $dirname</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> cd $dirname</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> <span class=apple-converted-space><span style='color:#FF2600'> </span></span><span style='color:#FF2600'>export filename=${f1}.nc</span></span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif;color:#FF2600'> export time=$f2</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt'> </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>#*************************************************************************</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> cat > varcalc.ncl << EOF </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt'> </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> load "/scratch/lustreD/s/sbhalach/DATA/func_center.ncl"</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> load "/scratch/lustreD/s/sbhalach/DATA/func_rtheta.ncl"</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt'> </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> a = addfile(filename,"r")</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> u10 = a->u10</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> v10 = a->v10</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> slp = a->slp</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> u = a->u</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> v = a->v</span><o:p></o:p></p></div></div><div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>allvars = new((/40/),float)</span><o:p></o:p></p></div></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'><br><br><br></span><o:p></o:p></p></div></div><div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>slpsub = slp(<span style='color:#FF2600'>time</span>,0,:,:) </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>;<span class=apple-converted-space> </span><b><span style='color:#FF2600'>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><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>. </span><o:p></o:p></p></div></div><div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>;;;;;;;;;;;;;;;;;;;;;; Write to a netcdf file ;;;;;;;;;;;;;;;;;;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> system("rm -f $f1_$f2_allvars.nc")</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> ncdf = addfile("$f1_$f2_allvars.nc","c")</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> ncdf->allvars = allvars</span><o:p></o:p></p></div></div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> </span><o:p></o:p></p></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>EOF</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'>#*************************************************************************</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> </span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> <b><span style='color:#FF2600'>ncl -n 'filename = "$filename"' 'time = "$time"' varcalc.ncl</span></b></span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> mv $f1_$f2_allvars.nc ../</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> cd ../</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'> done <"$file”</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'><br><br><br></span><o:p></o:p></p></div></div></div></div></div></div><div><div><div><div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt;font-family:"Times",serif'><br><br><br></span><o:p></o:p></p></div></div></div></div><div><div><p class=MsoNormal style='background:#EDEAD4'><span style='font-size:12.0pt'><br><br><br></span><o:p></o:p></p></div></div></div></div><div><p class=MsoNormal style='background:white'>_______________________________________________ ncl-talk mailing list<span class=apple-converted-space> </span><a href="mailto:ncl-talk@ucar.edu"><span style='color:#954F72'>ncl-talk@ucar.edu</span></a><span class=apple-converted-space> </span>List instructions, subscriber options, unsubscribe:<span class=apple-converted-space> </span><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"><span style='color:#954F72'>http://mailman.ucar.edu/mailman/listinfo/ncl-talk</span></a><o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>