<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Gurbrinder,<div class=""><br class=""></div><div class="">please take a look at the addfiles function to read multiple files:</div><div class=""><br class=""></div><div class=""><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml" class="">http://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml</a></div><div class=""><br class=""></div><div class="">Bye,</div><div class="">Karin</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 16.07.2016 um 17:10 schrieb gurbrinder aulakh &lt;<a href="mailto:gurbrinderaulakh@yahoo.co.in" class="">gurbrinderaulakh@yahoo.co.in</a>&gt;:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><div id="yui_3_16_0_1_1468680997189_4783" class=""><br class=""></div><div id="yui_3_16_0_1_1468680997189_4783" dir="ltr" class="">I want to read u component of wind at different hpa level, variable names are like&nbsp;UGRD_500_ISBL,UGRD_800_ISBL and so on in multiple netcdf files. Can I read these different variable names from multiple .nc files at once......Please help...As otherwise I have to read one by one as in the following script.....</div><div id="yui_3_16_0_1_1468680997189_4783" class=""><br class=""></div><div id="yui_3_16_0_1_1468680997189_4783" class=""><br class=""></div><div id="yui_3_16_0_1_1468680997189_4783" class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div id="yui_3_16_0_1_1468680997189_4784" class="">&nbsp; &nbsp; &nbsp; &nbsp;;</div><div id="yui_3_16_0_1_1468680997189_4785" class="">&nbsp; &nbsp; &nbsp; &nbsp;;</div><div id="yui_3_16_0_1_1468680997189_4786" class="">begin</div><div id="yui_3_16_0_1_1468680997189_4787" class=""><br id="yui_3_16_0_1_1468680997189_4788" class=""></div><div id="yui_3_16_0_1_1468680997189_4789" class="">f &nbsp; &nbsp; = addfile("UwindComponent/uwind_850_600gmt.nc" , "r")</div><div id="yui_3_16_0_1_1468680997189_4790" class="">;all_files=systemfunc("uwind_850_600gmt.nc")</div><div id="yui_3_16_0_1_1468680997189_4791" class="">&nbsp;glond = &nbsp;f-&gt;longitude</div><div id="yui_3_16_0_1_1468680997189_4792" class="">&nbsp; glatd = &nbsp;f-&gt;latitude</div><div id="yui_3_16_0_1_1468680997189_4793" class="">&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4794" class=""><br id="yui_3_16_0_1_1468680997189_4795" class=""></div><div id="yui_3_16_0_1_1468680997189_4796" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4797" class="">&nbsp; dq = str_get_dq()&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4798" class=""><br id="yui_3_16_0_1_1468680997189_4799" class=""></div><div id="yui_3_16_0_1_1468680997189_4800" class="">&nbsp; latS &nbsp; = 29.66 &nbsp; &nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4801" class="">&nbsp; latN &nbsp; = 34.66</div><div id="yui_3_16_0_1_1468680997189_4802" class="">&nbsp; lonW &nbsp; = -85.40</div><div id="yui_3_16_0_1_1468680997189_4803" class="">&nbsp; lonE &nbsp; = -80.40</div><div id="yui_3_16_0_1_1468680997189_4804" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4805" class="">&nbsp; ;printVarSummary(lonW)</div><div id="yui_3_16_0_1_1468680997189_4806" class="">&nbsp; ;printVarSummary(lonE)</div><div id="yui_3_16_0_1_1468680997189_4807" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4808" class=""><br id="yui_3_16_0_1_1468680997189_4809" class=""></div><div id="yui_3_16_0_1_1468680997189_4810" class="">ji = region_ind(glatd,glond, latS, latN, lonW, lonE)</div><div id="yui_3_16_0_1_1468680997189_4811" class=""><br id="yui_3_16_0_1_1468680997189_4812" class=""></div><div id="yui_3_16_0_1_1468680997189_4813" class="">&nbsp; jStrt = ji(0) &nbsp; &nbsp; &nbsp;; lat start</div><div id="yui_3_16_0_1_1468680997189_4814" class="">&nbsp; jLast = ji(1) &nbsp; &nbsp; &nbsp;; lat last</div><div id="yui_3_16_0_1_1468680997189_4815" class="">&nbsp; iStrt = ji(2) &nbsp; &nbsp; &nbsp;; lon start</div><div id="yui_3_16_0_1_1468680997189_4816" class="">&nbsp; iLast = ji(3) &nbsp; &nbsp; &nbsp;; lon last</div><div id="yui_3_16_0_1_1468680997189_4817" class=""><br id="yui_3_16_0_1_1468680997189_4818" class=""></div><div id="yui_3_16_0_1_1468680997189_4819" class="">&nbsp; ;printVarSummary(jStrt)</div><div id="yui_3_16_0_1_1468680997189_4820" class="">&nbsp; ;print(jLast)</div><div id="yui_3_16_0_1_1468680997189_4821" class="">&nbsp; ;print(iStrt)</div><div id="yui_3_16_0_1_1468680997189_4822" class="">&nbsp; ;print(iLast)</div><div id="yui_3_16_0_1_1468680997189_4823" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4824" class="">&nbsp; LAT2D = glatd(jStrt:jLast,iStrt:iLast)</div><div id="yui_3_16_0_1_1468680997189_4825" class="">&nbsp; LON2D = glond(jStrt:jLast,iStrt:iLast)</div><div id="yui_3_16_0_1_1468680997189_4826" class=""><br id="yui_3_16_0_1_1468680997189_4827" class=""></div><div id="yui_3_16_0_1_1468680997189_4828" class="">; printVarSummary(LAT2D)</div><div id="yui_3_16_0_1_1468680997189_4829" class="">&nbsp; ;print(LON2D)</div><div id="yui_3_16_0_1_1468680997189_4830" class=""><br id="yui_3_16_0_1_1468680997189_4831" class=""></div><div id="yui_3_16_0_1_1468680997189_4832" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; read data just for the region of interest</div><div id="yui_3_16_0_1_1468680997189_4833" class="">&nbsp; x = f-&gt;UGRD_500_ISBL(:,jStrt:jLast,iStrt:iLast)</div><div id="yui_3_16_0_1_1468680997189_4834" class="">;print(x)</div><div id="yui_3_16_0_1_1468680997189_4835" class="">csv_filename="mydata.csv"</div><div id="yui_3_16_0_1_1468680997189_4836" class="">fields=(/"LAT","LON","Temperature"/)</div><div id="yui_3_16_0_1_1468680997189_4837" class="">&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4838" class="">&nbsp;; printVarSummary(LAT2D)</div><div id="yui_3_16_0_1_1468680997189_4839" class="">fields=dq+fields+dq</div><div id="yui_3_16_0_1_1468680997189_4840" class="">&nbsp; header=[/str_join(fields,",")/]</div><div id="yui_3_16_0_1_1468680997189_4841" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4842" class="">&nbsp; alist=[/LAT2D,LON2D,x/]</div><div id="yui_3_16_0_1_1468680997189_4843" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4844" class="">&nbsp; format="%.2f,%.2f,%.2f"</div><div id="yui_3_16_0_1_1468680997189_4845" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4846" class="">&nbsp; system("rm -rf " + csv_filename)</div><div id="yui_3_16_0_1_1468680997189_4847" class="">&nbsp; write_table(csv_filename,"w",header,"%s")</div><div id="yui_3_16_0_1_1468680997189_4848" class="">&nbsp; write_table(csv_filename,"a",alist,format)</div><div id="yui_3_16_0_1_1468680997189_4849" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4850" class="">&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4851" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4852" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4853" class="">&nbsp;&nbsp;</div><div id="yui_3_16_0_1_1468680997189_4854" class="">end</div><div dir="ltr" id="yui_3_16_0_1_1468680997189_4855" class="">please help</div></div></div>_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><div apple-content-edited="true" class=""><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""></div></body></html>