<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">dir_name  = "/Users/srishtidasarathy/Documents/Bowman/CALIPSO_Data_Processing/Backscatter_Test_Data/"  <br></div><div>file_name = systemfunc("cd "+dir_name+" ls "CAL_LID_L2_05kmAPro-Prov-V3-0*hdf")</div><div>nfile          = fimsizes(file_name)</div><div><br></div><div>; Is there a different file for each hdf or just one file???   altitudes.txt"</div><div>If one file than there is no need to loop.<br></div><div><br></div><div>;;dir_txt = "/Users/srishtidasarathy/Documents/Bowman/CALIPSO_Data_Processing/Backscatter_Test_Data/"</div><div>;;txt_name = systemfunc("cd "+dir_asc+" ls altitude........txt")</div><div><br></div><div>do nf=0,nfile-1</div><div>     hdf4_file = addfile(dir_name+file_name(nf), "r") <br></div><div>   ;;text_file = asciiread(dir_txt+txt_name(nf)....)</div><div><br></div><div>     ...<br></div><div>end do<br></div><div><br></div><div>Please note: any variable that may change size would require NCL's over-write/replacement syntax: := <br></div><div><br></div><div>     x <b>:=</b> .....<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 17, 2018 at 3:59 PM Srishti Dasarathy <<a href="mailto:srdasara@ucsd.edu">srdasara@ucsd.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear NCL-Talk, <div><br></div><div>I want to construct a loop in which I am able to access a directory of hdf files to construct a total backscatter coefficient plot. I've been able to construct the plot with a single hdf file (text file attached), but I'm unsure how to proceed. </div><div><br></div><div>The main challenge to me is that I've been able to extract all necessary altitude text files into a separate directory, since I was not able to access the altitude values straight from the hdf file within NCL itself. Because of this, my understanding is that the altitude text files should be simultaneously looped through as my hdf files are being looped through in order to construct the backscatter plot. Can you please help me with this? </div><div><br></div><div>Best wishes,</div><div>Srishti  <br>-- <br><div class="m_8905247184946274317gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Srishti Dasarathy<div>Graduate Student</div><div>Scripps Institution of Oceanography</div></div></div>
</div></div>
_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>