<div dir="ltr">Hi Arka:<div><br></div><div>I am not sure about this.</div><div><br></div><div>The best thing to do would be i) to include ncl-talk, so you can benefit from the knowledge of the group, and ii) paste the error into google and see if a solution appears.</div><div><br></div><div>Barry</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 22, 2017 at 8:38 AM, Arka Banerjee <span dir="ltr"><<a href="mailto:arka354deb@gmail.com" target="_blank">arka354deb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi..<div><br></div><div>I run the attached script as per our last discussion but I get the following error msg;</div><div><br></div><div><div>warning:_NclOpenFile: Can not open file </home/arkadeb/Arka/GMFD/<wbr>GSMap/gsmap_nrt.2 0100805.0600.dat>; file format not supported or file is corrupted</div><div>warning:_NclOpenFile: Can not open file </home/arkadeb/Arka/GMFD/<wbr>GSMap/gsmap_nrt.2 0100805.0900.dat>; file format not supported or file is corrupted</div><div>warning:_NclOpenFile: Can not open file </home/arkadeb/Arka/GMFD/<wbr>GSMap/gsmap_nrt.2 0100805.1200.dat>; file format not supported or file is corrupted</div><div>warning:_NclOpenFile: Can not open file </home/arkadeb/Arka/GMFD/<wbr>GSMap/gsmap_nrt.2 0100805.1500.dat>; file format not supported or file is corrupted</div><div>warning:_NclOpenFile: Can not open file </home/arkadeb/Arka/GMFD/<wbr>GSMap/gsmap_nrt.2 0100805.1800.dat>; file format not supported or file is corrupted</div><div>warning:_NclOpenFile: Can not open file </home/arkadeb/Arka/GMFD/<wbr>GSMap/gsmap_nrt.2 0100805.2100.dat>; file format not supported or file is corrupted</div><div>warning:_NclOpenFile: Can not open file </home/arkadeb/Arka/GMFD/<wbr>GSMap/gsmap_nrt.2 0130615.0300.dat>; file format not supported or file is corrupted</div><div>warning:_NclOpenFile: Can not open file </home/arkadeb/Arka/GMFD/<wbr>GSMap/gsmap_nrt.2 0130615.2100.dat>; file format not supported or file is corrupted</div><div>warning:_NclOpenFile: Can not open file </home/arkadeb/Arka/GMFD/<wbr>GSMap/gsmap_nrt.2 0130616.0600.dat>; file format not supported or file is corrupted</div><div>fatal:Could not coerce values for operation</div><div>fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 30 in file Gsmap. ncl</div></div><div><br></div><div>My script is attached below.</div><div><br></div><div>Please inform me how to fix it.</div><div><br></div><div>Thanks,</div><div>Arka</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 21, 2017 at 2:48 PM, Arka Banerjee <span dir="ltr"><<a href="mailto:arka354deb@gmail.com" target="_blank">arka354deb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Ok..I will inform you.<div dir="auto">Right now I am communicating and writing program in my mobile.</div><div dir="auto">When I will be with my system I will let you know.</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Arka</div></div><div class="m_-6658066284478246943HOEnZb"><div class="m_-6658066284478246943h5"><div class="gmail_extra"><br><div class="gmail_quote">On Dec 21, 2017 2:18 PM, "Barry Lynn" <<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_-6658066284478246943m_6788459685269564247quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi:<div><br></div><div>I'm not sure until you try it.</div><div><br></div><div>You can use a different name for the variable if you want.</div><font color="#888888"><div><br></div><div>Barry</div></font></div><div class="m_-6658066284478246943m_6788459685269564247elided-text"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 21, 2017 at 10:39 AM, Arka Banerjee <span dir="ltr"><<a href="mailto:arka354deb@gmail.com" target="_blank">arka354deb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Thanks! <div dir="auto">Above attached program is ok then?</div><div dir="auto"><br></div><div dir="auto">I have to use 'fn' some where else in this program thats why I am asking.</div><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto">Arka</div></font></span></div><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876HOEnZb"><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876h5"><div class="gmail_extra"><br><div class="gmail_quote">On Dec 21, 2017 14:05, "Barry Lynn" <<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi:<div><br></div><div>You don't need a dot unless you need it in order to choose between files with and without.</div><div><br></div><div>You can print("all_files = " + all_files) to see if you list is correct.</div><div><br></div><div>Barry</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 21, 2017 at 10:10 AM, Arka Banerjee <span dir="ltr"><<a href="mailto:arka354deb@gmail.com" target="_blank">arka354deb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">If I modify according to the example is it correct now for dat files?<div dir="auto"><br></div><div dir="auto">Datadir=("data/model/result/")</div><div dir="auto">diri=Datadir</div><div dir="auto">all_files=systemfunc("ls " +dir+ "day*dat")</div><div dir="auto">n_files=dimsizes(all_files)</div><div dir="auto">do n=0,n_files-1,1</div><div dir="auto">filename=all_files(n)</div><div dir="auto">fn=addfile(filename,"r")</div><div dir="auto"><br></div><div dir="auto">....</div><div dir="auto">....</div><div dir="auto">....</div><div dir="auto">....</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">end</div><div dir="auto"><br></div><div dir="auto">'addfile' is ok or it will be 'addfiles'?</div><div dir="auto">Now above fn is same as below mentioned in case of operation?</div><div dir="auto">fn=(/"day1.dat","day2.dat"/)</div><div dir="auto"><br></div></div><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549HOEnZb"><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549h5"><div class="gmail_extra"><br><div class="gmail_quote">On Dec 21, 2017 12:40, "Arka Banerjee" <<a href="mailto:arka354deb@gmail.com" target="_blank">arka354deb@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Yes.<div dir="auto">But one thing.</div><div dir="auto">There should not be a dot before grb?</div><div dir="auto"><br></div><div dir="auto">Code is attached below.</div><div dir="auto"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Dec 21, 2017 12:35 PM, "Barry Lynn" <<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If you want to access the files within, you need a do loop to indicate which file you want to read.<div><br></div><div>Barry</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 21, 2017 at 8:54 AM, Arka Banerjee <span dir="ltr"><<a href="mailto:arka354deb@gmail.com" target="_blank">arka354deb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Awesome, thanks! <div dir="auto"><br></div><div dir="auto">So for this a do loop is required?</div><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto">Arka</div></font></span></div><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744HOEnZb"><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744h5"><div class="gmail_extra"><br><div class="gmail_quote">On Dec 21, 2017 12:22, "Barry Lynn" <<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi:<div><br></div><div>Here is what you need (example)</div><div><br></div><div>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>DATADir = "/data1/wrf/NAM/"</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>diri = DATADir ; you can add "+ date" if you have files listed in directories by date.</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>all_files = systemfunc("ls " + diri + "</span><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(230,230,0)">nam</span><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures">*grb")</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>print("all_files = " + all_files)</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>n_files = dimsizes(all_files)</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>print("n_files = " + n_files)</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures">;do n=0,n_files -1,1</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>do n=12,14</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>print("all_files(n) = " + all_files(n))</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>file</span><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(230,230,0)">nam</span><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures">e = all_files(n)</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>print ("file</span><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(230,230,0)">nam</span><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures">e" + file</span><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(230,230,0)">nam</span><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures">e)</span></p>
<p class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-Apple-converted-space"> </span>a = addfile(file</span><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(230,230,0)">nam</span><span class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail-s1" style="font-variant-ligatures:no-common-ligatures">e,"r")</span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 21, 2017 at 8:31 AM, Arka Banerjee via ncl-talk <span dir="ltr"><<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">If one write the following line what does it mean?<div dir="auto"><br></div><div dir="auto">Fn=(/"day1.dat","day2.dat","da<wbr>y3.dat","day4.dat"/)</div><div dir="auto"><br></div><div dir="auto">The above line is not mean that all dat file names are concatenate in variable Fn?</div><div dir="auto">I required the same thing for 100 files but without manually putting the file name.</div><div dir="auto"><br></div><div dir="auto">That was the question.</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Arka</div></div><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984HOEnZb"><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984h5"><div class="gmail_extra"><br><div class="gmail_quote">On Dec 21, 2017 01:37, "Dennis Shea" <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:<br type="attribution"><blockquote class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984m_2048339712400554977quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>@Arka: Please read the <br><br><a href="https://www.ncl.ucar.edu/Document/Manuals/" target="_blank">https://www.ncl.ucar.edu/Docum<wbr>ent/Manuals/</a><br><br><ul><li><a href="https://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide" target="_blank">NCL User Guide, V1.1</a> <img src="https://www.ncl.ucar.edu/Images/new.gif">
</li><li><a href="https://www.ncl.ucar.edu/Document/Manuals/language_man.pdf" target="_blank">Mini-Language (pdf)</a></li></ul><p>==============================<wbr>======<br></p></div><div>NCL does allow a user to specify a <b><i>variable</i> </b>which spans multiple netCDF, grib or HDF files to (effectively) be concatenated via <b>addfiles </b>and the appropriate<b> ListSetType </b>options. <b>NOTE: the files are not concatenated ....only the specified variable.<br></b><br><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml" target="_blank">https://www.ncl.ucar.edu/Docum<wbr>ent/Functions/Built-in/addfile<wbr>s.shtml</a><br><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml" target="_blank">https://www.ncl.ucar.edu/Docum<wbr>ent/Functions/Built-in/ListSet<wbr>Type.shtml</a><br></div><div><br>=====<br>There is <b>no </b>explicit NCL function which concatenates <b>binary</b> or <b>text</b> (ascii)<i> files</i>. <br>Please Read: <a href="https://www.ncl.ucar.edu/Applications/r-binary.shtml" target="_blank">https://www.ncl.ucar.edu/Appli<wbr>cations/r-binary.shtml</a><br></div><div><br>===<br></div><div>Some options:<br><br></div><div>[1] On the {U/Li}nix command line:<br><br></div><div>%> <b>cat</b> LocalBinaryFiles*dat <b>>!</b> BigBinary.dat<br></div><div><br></div>The <b>!</b> will overwrite 'BigBinary.dat' if the file currently exits.<br><br></div><div>Depending on the binary file type, use:<br></div><pre> Direct Access: data = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/fbindirread.shtml" target="_blank"><strong>fbindirread</strong></a>("BigBinary.dat",re<wbr>c,dim,type)
Sequential Access: data = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/fbinrecread.shtml" target="_blank"><strong>fbinrecread</strong></a>("BigBinary.dat",re<wbr>c,dim,type)<br><br></pre><pre><b>Please read</b> the documentation for these function:<br><br><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/fbindirread.shtml" target="_blank">http://www.ncl.ucar.edu/Docume<wbr>nt/Functions/Built-in/fbindirr<wbr>ead.shtml</a><br><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/fbinrecread.shtml" target="_blank">http://www.ncl.ucar.edu/Docume<wbr>nt/Functions/Built-in/fbinrecr<wbr>ead.shtml</a><br><br></pre><pre>also, binary files could be '<i>BigEndian</i>" or '<i>LittleEndian</i><b>. </b>The following allows you to specify<br><br><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/isbigendian.shtml" target="_blank">http://www.ncl.ucar.edu/Docume<wbr>nt/Functions/Built-in/isbigend<wbr>ian.shtml</a><br><br> if (<strong>isbigendian</strong>() ) then ; is local machine big or little endian?
<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/setfileoption.shtml" target="_blank"><strong>setfileoption</strong></a>("bin","ReadByteO<wbr>rder","LittleEndian")
end if
</pre><pre> x = <b>fbindirread</b>(...)<br></pre><pre>or<br></pre><pre> c = <b>fbinrecread</b>(...)<br><br></pre><pre>Sfter you are finished, you may want to delete the 'BigBinary.dat' file<br><br></pre><pre>%> rm BigBinary.dat<br><br></pre><pre>Or, perhaps the individual binary files and keep the concatenated file:<br><br></pre><pre>%> rm LittleBinary*dat<br></pre><pre><br>[2] <br><br></pre><pre>diri = ".../" ; input dir<br></pre><pre>if (<strong>.not.fileexists</strong>("BigBinary.da<wbr>t")) then</pre><pre> system("cat LocalBinary*dat >! "BigBinary.dat")<br></pre><pre>end if<br></pre><pre><br> Direct Access: data = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/fbindirread.shtml" target="_blank"><strong>fbindirread</strong></a>("BigBinary.dat",re<wbr>c,dim,type)
Sequential Access: data = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/fbinrecread.shtml" target="_blank"><strong>fbinrecread</strong></a>("BigBinary.dat",re<wbr>c,dim,type)<br><br><br><br><br><br></pre><pre> <br></pre><div><div><div><div><div><div><br></div></div></div></div></div></div></div><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984m_2048339712400554977elided-text"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 20, 2017 at 10:27 AM, Laura Fowler via ncl-talk <span dir="ltr"><<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Arka:<br>
<br>
I usually use systemfunc, followed with ListSetType, and then addfiles<br>
to read a bunch of the same kind of files together. There are lots of<br>
examples on how to use systemfun on the ncl web site.<br>
<br>
Hope this helps,<br>
Laura<br>
<div><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984m_2048339712400554977m_12629403495640755h5"><br>
<br>
On Wed, Dec 20, 2017 at 9:13 AM, Arka Banerjee via ncl-talk<br>
<<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br>
> Hi all,<br>
><br>
> How to concatenate all file names in a single variable in NCL? I have 100 of<br>
> .dat files in a directory and I want to call them all in a variable like<br>
> below;<br>
><br>
> fn=(/"gsmap_nrt.20100805.0600.<wbr>dat","gsmap_nrt.20100805.0900.<wbr>dat"/)<br>
><br>
> So that 'fn' will be re-structured for 100 of .dat files in the same way of<br>
> above line.<br>
><br>
><br>
> How to execute this thing? Function 'addfiles' helps in this case? As I have<br>
> found it is not for ascii formate.<br>
><br>
><br>
> Thanks,<br>
><br>
> Arka<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
><br>
<br>
<br>
<br>
--<br>
!-----------------------------<wbr>------------------------------<wbr>------------------------------<wbr>--------------------<br>
Laura D. Fowler<br>
Mesoscale and Microscale Meteorology Division (MMM)<br>
National Center for Atmospheric Research<br>
P.O. Box 3000, Boulder CO 80307-3000<br>
<br>
e-mail: <a href="mailto:laura@ucar.edu" target="_blank">laura@ucar.edu</a><br>
phone: <a href="tel:303-497-1628" value="+13034971628" target="_blank">303-497-1628</a><br>
<br>
!-----------------------------<wbr>------------------------------<wbr>------------------------------<wbr>--------------------<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
</blockquote></div><br></div>
</div></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744m_-884285628354782439m_-4326042599139661984gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</blockquote></div></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549m_89441649945399260m_-6647498939214993983m_3083455239398501744gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</blockquote></div></div>
</blockquote></div></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876m_1833733773871021546m_-6081882033977555549gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</blockquote></div></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-6658066284478246943m_6788459685269564247m_-8499674741745773876gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US 914 432 3108<br></div></div></div>
</div>