how to use do loop for variable name changes

From: Guangshan Chen <gchen9_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 13 2010 - 14:18:18 MDT

Dear there,

Let's say that I have the following variables for three regions:
ccsm_var_EAS(10),
ccsm_var_SAS(10),
ccsm_var_NAU(10)

Now I want to create a new array to hold these three varaibles:
ccsm_var_3reg = new((/3,10/),float)

if I create a string array to hold the region name:
reg_nm = (/"EAS","SAS","NAU"/)

How could I use do loop to put the three variables to ccsm_var_3reg?

some thing like this:

do i=0,2
ccsm_var_3reg(i,:) = ccsm_var_"reg_nm(i)"
end do

Guangshan

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 13 13:18:37 2010

This archive was generated by hypermail 2.1.8 : Thu Sep 16 2010 - 11:05:24 MDT