<div dir="ltr">Thanks Dennis for all the information and the help. <br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio & Atmospheric Science Division <br></div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br></div><div>India<br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div>
<br><div class="gmail_quote">On Sat, Apr 1, 2017 at 12:05 AM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@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="ltr"><div><div><div><div><div><div><div><div>Variable: data<span class=""><br>Number of Dimensions: 3<br>Dimensions and sizes: [time | 30] x [latitude | 330] x [longitude | 300]<br><br></span></div>Dimension numbers: 0 1 2<br><br>-----<br><br></div>So the following are pointing to the *wrong* dimensions<br><br> lat1d = ndtooned(conform(data,data&lat<wbr>itude,0)) ; 0 is 'time'<br> lon1d = ndtooned(conform(data,data&lon<wbr>gitude,1)) ; 1 is 'lat'<br><br>the following is suggested<br><br> lat1d = ndtooned(conform(data,data&lat<wbr>itude,1))<br> lon1d = ndtooned(conform(data,data&lon<wbr>gitude,2))<br><br>====<br></div>Several manual describe dimension numbering but the following sentence is most succinct<br><br> <span class="m_-1142967708843732713gmail-highlight m_-1142967708843732713gmail-selected">"Dimension nu</span>mbering proceeds from left-to-right with the leftmost dimension equal to 0.{<br><br></div> (time) ; 0<br></div> (lat) , 0<br></div> (time,npts); time=0 , npts=1<br></div> (time,lat,lon) ; 0, 1, 2<br></div><div> (time,lev,lat,lon); 0, 1, 2, 3<br></div> (nensemble,time, lev,lat,lon) ; 0, 1, 2, 3, 4<br><div><div><div><div><div><div><br><br></div></div></div></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 31, 2017 at 12:14 PM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@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"><div><div><div>I apologize from the deep of my heart. I didn't mean to bother you. <br><br></div><div>actually<br></div>The script is reading all the 30 days files. <br><br>Variable: data<br>Type: float<br>Total Size: 11880000 bytes<br> 2970000 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [time | 30] x [latitude | 330] x [longitude | 300]<br>Coordinates: <br> time: [913824..914520]<br> latitude: [37.95..5.05]<br> longitude: [68.05..97.95]<br>Number Of Attributes: 3<br> long_name : Wildfire flux of Black Carbon<br><br><br></div>It showing an error <br><br>fatal:conform: the dimensions sizes of the second argument do not match those indicated by the third argument<br>fatal:["Execute.c":8578]:Execu<wbr>te: Error occurred at or near line 146 in file kunal.ncl<br><br>The error line are<br> lat1d = ndtooned(conform(data,data&lat<wbr>itude,0))<br> lon1d = ndtooned(conform(data,data&lon<wbr>gitude,1))<br><br></div>I tried to find to find this answer but I could not find it. I am sorry if i am bothering you again.<br><br><div><div><br><br><div><br><br><br></div></div></div></div><div class="gmail_extra"><span><br clear="all"><div><div class="m_-1142967708843732713m_-1300245139167623613gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio & Atmospheric Science Division <br></div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br></div><div>India<br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div>
<br></span><div><div class="m_-1142967708843732713h5"><div class="gmail_quote">On Fri, Mar 31, 2017 at 11:20 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@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="ltr"><div><div><div>I still find your question and the code confusing.<br><br></div>It takes time to look at code and determine what is happening. It is your responsibility to pose clear questions and, if appropriate, a clean, minimal script that illustrates the issue(s). We answer questions on a volunteer basis. Our time is valuable too! You must help us help you!<br><br></div><div>Please read the addfiles and adfiles documentation.<br><br><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml" target="_blank">http://www.ncl.ucar.edu/Docume<wbr>nt/Functions/Built-in/addfiles<wbr>.shtml</a><br><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml" target="_blank">http://www.ncl.ucar.edu/Docume<wbr>nt/Functions/Built-in/addfile.<wbr>shtml</a><br><br></div><div>With addfiles ... please look at examples 1 and 2. <br><br>Note the difference between 'cat' (the default) and 'join' (alternate approach)
</div><div><br><br></div><div>---<br></div><div>Create a script that contains *only* this part of your code. <br><br></div></div><br><div>;---Read var1 <br><span> dir = "/home/kunal/"<br> fnames = systemfunc("ls " + dir + "DAY_*.nc")<br><br></span> print(fnames)<br> nfil = dimsizes(fnames)<br> print("nfil="+nfil)<br></div><div> print("---")<br></div><div><span> <br> a = addfiles(fnames,"r")<br></span> data = a[:]->bcfire(0,:,:) ; only one timestep<br></div><div> printVarSummary(data) ; *****look at the structure **** and sizes <br><br></div><div><br></div><div><pre> <font size="2">DATA = a[:]->bcfire<br> printVarSummary(data) ; *****look at the structure **** </font></pre><pre><font size="2">DATA should have something like (time,lat,lon) where <br></font></pre><pre><font size="2">dimsizes(time) >1<br><br><br></font></pre><pre> <br></pre><pre><br><br></pre><br></div><div><br></div></div><div class="m_-1142967708843732713m_-1300245139167623613HOEnZb"><div class="m_-1142967708843732713m_-1300245139167623613h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 31, 2017 at 11:01 AM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@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"><div><div>Sorry for creating the confusion. <br><br></div>I changed the script as you suggested me and then run the attached script. But after running this, I am getting the file only of the single day instead of all 30 files separately. <br><span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008HOEnZb"><font color="#888888"><br></font></span></div><span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008HOEnZb"><font color="#888888"><br></font></span></div><div class="gmail_extra"><span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio & Atmospheric Science Division <br></div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br></div><div>India<br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></font></span><div><div class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008h5">
<br><div class="gmail_quote">On Fri, Mar 31, 2017 at 10:15 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@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="ltr"><div class="gmail_default" style="font-size:small">Kunal,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I'm a little confused by what you are asking for. You said you wanted to extract all 30 days of data instantly, which is what the previous "addfiles" example was meant to show. You don't need a loop to extract all the data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Did you actually try my suggestion of changing your script to use "addfiles" instead of "addfile"? If so, and you are still having a problem, then it would help to see the new version of your script.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Maybe my confusion is with what you want to do with the data after you extract all 30 days of data. Please be more specific if possible.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343HOEnZb"><div class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 30, 2017 at 10:19 PM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@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"><div><div>Dear Mary,<br><br></div>Thanks for the suggestions. <br></div>But still, it's extracting one file at a time, not extracting all the 30-day files separately of UK and NEP (as mentioned in the script). <br><span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277HOEnZb"><font color="#888888"><div><div><div><br><br></div></div></div></font></span><div class="gmail_extra"><span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><br><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></font></span><div><div class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277h5">
<br><div class="gmail_quote">On Fri, Mar 31, 2017 at 3:09 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@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="ltr"><div style="font-size:small">Kunal,</div><div style="font-size:small"><br></div><div style="font-size:small">You should be able to use "addfiles" to open all your files, and then read your data using the special [:] syntax:</div><div style="font-size:small"><br></div><div style="font-size:small"><div><font face="monospace, monospace"> dir = "/home/kunal/"</font></div><div><font face="monospace, monospace"> fnames = systemfunc("ls " + dir + "DAY_*.nc")</font></div><div><font face="monospace, monospace"> a = addfiles(fnames,"r")<br><span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032m_8302767070546682313gmail-s1"> data = a[:]</span><span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032m_8302767070546682313gmail-s2">-></span><span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032m_8302767070546682313gmail-s1">bcfire</span></font></div></div><div style="font-size:small"><br></div><div style="font-size:small">For more information see our addfiles examples page:</div><div style="font-size:small"><br></div><div><a href="http://www.ncl.ucar.edu/Applications/addfiles.shtml" target="_blank">http://www.ncl.ucar.edu/Applic<wbr>ations/addfiles.shtml</a><br></div><div><br></div><div>--Mary</div><div><br></div><div style="font-size:small"><p class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032m_8302767070546682313gmail-p1"><span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032m_8302767070546682313gmail-s1"><br></span></p><p class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032m_8302767070546682313gmail-p1"><span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032m_8302767070546682313gmail-s1"><br></span></p></div><div style="font-size:small"><br></div><div style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032h5">On Thu, Mar 30, 2017 at 12:42 PM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032h5"><div dir="ltr"><div>Dear NCL users<br><br><br></div>I have the data of 30 days. I want to extract this data with the loop.The attached script is based on to extract the data of a single day. So it's a tedious job to extract all the 30 days data one by one. So could anyone tell me that how to start the loop in the attached file so the I can get 30 days extracted data instantly. <br><br>Thank You<br><br>Regards<span class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032m_8302767070546682313HOEnZb"><font color="#888888"><br clear="all"><div><div><div><div class="m_-1142967708843732713m_-1300245139167623613m_5930006210116361008m_-6708397670434253343m_-5808586647480170277m_372109147063714032m_8302767070546682313m_2756078572688045071gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><br><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div>
</div></div></font></span></div>
<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></blockquote></div><br></div>
</blockquote></div><br></div></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></div>
</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></div>
</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></div>
</div></div></blockquote></div><br></div>