<div dir="ltr"><div><br></div><div>Hi all,</div><div><br></div><div>Is it possible to call in a string from an array in order to build a new variable name using part of the string that was called in? I put a mock example at the bottom that I'd think would be a way to do it... but obviously it doesn't work :)</div><div><br></div><div>Thanks in advance,</div><div>Mike V.</div><br clear="all"><div><br></div><div><div><br></div><div> statID_array = (/"KALB","KLGA"/)</div><div><br></div><div><br></div><div>do i = 0, dimsizes(statID_array)-1</div><div>station = statID(i)</div><div><br></div><div> k = 294</div><div><br></div><div> station+"_MaxT" = new((/dimsizes(dates(i*k:i*k+i))/), "float")</div><div> station+"_MaxT"!0 = "time"</div><div> station+"_MaxT"&time = dates(i*k:i*k+i)</div><div> station+"_MaxT"&time@units = dates@units</div><div> station+"_MaxT" = (/maxT(i*k:i*k+i)/)</div><div> </div></div><div>end do</div><div><br></div><div>;-----------------------------</div><div>; for i=0:</div><div>;KALB_MaxT = new((/dimsizes(dates(i*k:i*k+i))/), "float")</div><div>;KALB_MaxT!0 = "time"</div><div>;KALB_MaxT&time = dates(i*k:i*k+i)</div><div>;KALB_MaxT&time@units = dates@units</div><div>;KALB__MaxT" = (/maxT(i*k:i*k+i)/)</div><div><br></div><div><div>; for i=1:</div><div>;KLGA_MaxT = new((/dimsizes(dates(i*k:i*k+i))/), "float")</div><div>;KLGA_MaxT!0 = "time"</div><div>;KLGA_MaxT&time = dates(i*k:i*k+i)</div><div>;KLGA_MaxT&time@units = dates@units</div><div>;KLGA__MaxT" = (/maxT(i*k:i*k+i)/)</div></div><div><br></div><div><br></div><div>etc...</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font size="4" face="trebuchet ms, sans-serif" color="#000000"><strong> Michael </strong><strong>Ventrice, Ph.D. </strong><b>|</b> <b>Operational Scientist</b></font><span style="font-family:arial,helvetica,sans-serif;font-size:14px"><span style="color:rgb(64,64,65);margin-left:5px"></span></span><br>
<span style="font-family:arial,helvetica,sans-serif"><span style="margin-left:5px"><span style="font-size:12px"><font color="#000000"><strong><span style="font-size:8px"> </span>w:</strong> 978-983-6786</font></span><span style="font-size:12px"><font color="#000000"> <strong>e:</strong></font><font color="#696969"> </font><a href="mailto:michael.ventrice@weather.com" target="_blank"><font color="#0000ff">michael.ventrice@weather.com</font></a></span></span></span><br>
<img alt="" src="http://s.imwx.com/ads/creatives/weather/sigs/TheWeatherCompany_2014EmailSignature.jpg" style="width: 342px; height: 78px;"><br></div></div>
</div>