<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yui_3_16_0_1_1468680997189_4783"><br></div><div id="yui_3_16_0_1_1468680997189_4783" dir="ltr">I want to read u component of wind at different hpa level, variable names are like 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"><br></div><div id="yui_3_16_0_1_1468680997189_4783"><br></div><div id="yui_3_16_0_1_1468680997189_4783">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div id="yui_3_16_0_1_1468680997189_4784"> ;</div><div id="yui_3_16_0_1_1468680997189_4785"> ;</div><div id="yui_3_16_0_1_1468680997189_4786">begin</div><div id="yui_3_16_0_1_1468680997189_4787"><br id="yui_3_16_0_1_1468680997189_4788"></div><div id="yui_3_16_0_1_1468680997189_4789">f = addfile("UwindComponent/uwind_850_600gmt.nc" , "r")</div><div id="yui_3_16_0_1_1468680997189_4790">;all_files=systemfunc("uwind_850_600gmt.nc")</div><div id="yui_3_16_0_1_1468680997189_4791"> glond = f->longitude</div><div id="yui_3_16_0_1_1468680997189_4792"> glatd = f->latitude</div><div id="yui_3_16_0_1_1468680997189_4793"> </div><div id="yui_3_16_0_1_1468680997189_4794"><br id="yui_3_16_0_1_1468680997189_4795"></div><div id="yui_3_16_0_1_1468680997189_4796"> </div><div id="yui_3_16_0_1_1468680997189_4797"> dq = str_get_dq() </div><div id="yui_3_16_0_1_1468680997189_4798"><br id="yui_3_16_0_1_1468680997189_4799"></div><div id="yui_3_16_0_1_1468680997189_4800"> latS = 29.66 </div><div id="yui_3_16_0_1_1468680997189_4801"> latN = 34.66</div><div id="yui_3_16_0_1_1468680997189_4802"> lonW = -85.40</div><div id="yui_3_16_0_1_1468680997189_4803"> lonE = -80.40</div><div id="yui_3_16_0_1_1468680997189_4804"> </div><div id="yui_3_16_0_1_1468680997189_4805"> ;printVarSummary(lonW)</div><div id="yui_3_16_0_1_1468680997189_4806"> ;printVarSummary(lonE)</div><div id="yui_3_16_0_1_1468680997189_4807"> </div><div id="yui_3_16_0_1_1468680997189_4808"><br id="yui_3_16_0_1_1468680997189_4809"></div><div id="yui_3_16_0_1_1468680997189_4810">ji = region_ind(glatd,glond, latS, latN, lonW, lonE)</div><div id="yui_3_16_0_1_1468680997189_4811"><br id="yui_3_16_0_1_1468680997189_4812"></div><div id="yui_3_16_0_1_1468680997189_4813"> jStrt = ji(0) ; lat start</div><div id="yui_3_16_0_1_1468680997189_4814"> jLast = ji(1) ; lat last</div><div id="yui_3_16_0_1_1468680997189_4815"> iStrt = ji(2) ; lon start</div><div id="yui_3_16_0_1_1468680997189_4816"> iLast = ji(3) ; lon last</div><div id="yui_3_16_0_1_1468680997189_4817"><br id="yui_3_16_0_1_1468680997189_4818"></div><div id="yui_3_16_0_1_1468680997189_4819"> ;printVarSummary(jStrt)</div><div id="yui_3_16_0_1_1468680997189_4820"> ;print(jLast)</div><div id="yui_3_16_0_1_1468680997189_4821"> ;print(iStrt)</div><div id="yui_3_16_0_1_1468680997189_4822"> ;print(iLast)</div><div id="yui_3_16_0_1_1468680997189_4823"> </div><div id="yui_3_16_0_1_1468680997189_4824"> LAT2D = glatd(jStrt:jLast,iStrt:iLast)</div><div id="yui_3_16_0_1_1468680997189_4825"> LON2D = glond(jStrt:jLast,iStrt:iLast)</div><div id="yui_3_16_0_1_1468680997189_4826"><br id="yui_3_16_0_1_1468680997189_4827"></div><div id="yui_3_16_0_1_1468680997189_4828">; printVarSummary(LAT2D)</div><div id="yui_3_16_0_1_1468680997189_4829"> ;print(LON2D)</div><div id="yui_3_16_0_1_1468680997189_4830"><br id="yui_3_16_0_1_1468680997189_4831"></div><div id="yui_3_16_0_1_1468680997189_4832"> ; read data just for the region of interest</div><div id="yui_3_16_0_1_1468680997189_4833"> x = f->UGRD_500_ISBL(:,jStrt:jLast,iStrt:iLast)</div><div id="yui_3_16_0_1_1468680997189_4834">;print(x)</div><div id="yui_3_16_0_1_1468680997189_4835">csv_filename="mydata.csv"</div><div id="yui_3_16_0_1_1468680997189_4836">fields=(/"LAT","LON","Temperature"/)</div><div id="yui_3_16_0_1_1468680997189_4837"> </div><div id="yui_3_16_0_1_1468680997189_4838"> ; printVarSummary(LAT2D)</div><div id="yui_3_16_0_1_1468680997189_4839">fields=dq+fields+dq</div><div id="yui_3_16_0_1_1468680997189_4840"> header=[/str_join(fields,",")/]</div><div id="yui_3_16_0_1_1468680997189_4841"> </div><div id="yui_3_16_0_1_1468680997189_4842"> alist=[/LAT2D,LON2D,x/]</div><div id="yui_3_16_0_1_1468680997189_4843"> </div><div id="yui_3_16_0_1_1468680997189_4844"> format="%.2f,%.2f,%.2f"</div><div id="yui_3_16_0_1_1468680997189_4845"> </div><div id="yui_3_16_0_1_1468680997189_4846"> system("rm -rf " + csv_filename)</div><div id="yui_3_16_0_1_1468680997189_4847"> write_table(csv_filename,"w",header,"%s")</div><div id="yui_3_16_0_1_1468680997189_4848"> write_table(csv_filename,"a",alist,format)</div><div id="yui_3_16_0_1_1468680997189_4849"> </div><div id="yui_3_16_0_1_1468680997189_4850"> </div><div id="yui_3_16_0_1_1468680997189_4851"> </div><div id="yui_3_16_0_1_1468680997189_4852"> </div><div id="yui_3_16_0_1_1468680997189_4853"> </div><div id="yui_3_16_0_1_1468680997189_4854">end</div><div dir="ltr" id="yui_3_16_0_1_1468680997189_4855">please help</div></div></body></html>