<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello ncl users</p>
<p>I am trying to create a loop to analyze my data but it is a bit
confusing for me. Can someone have a look at my codes?</p>
<p>What i want to archive is corrected trends over my 100 member
ensemble experiment: subtracting long term trend over each
ensemble member which has its own starting date from an
initialized experiment from my original dataset ==>[time,
ens|100, lat, lon]<br>
</p>
<div class="">for e.g. take member #50, it is initialized with the
control state at year 3140 while member #1 at control year 1898.
(i have all the start years in a separate table). <br class="">
</div>
<div class="">To correct #50 you multiply the 1242 yrs difference
with the trend S and subtract this from #50 <br class="">
</div>
<div class=""><b class=""></b></div>
<div class=""><b class="">a) corrected data #50=original data #50
-(picontrol trend</b><b class=""> * (3140 - 1898)) </b></div>
<div class=""><b class=""><br>
</b></div>
<div class=""><span class="">Is there a way to make it faster and
efficient with a loop?</span><b class=""> <br>
</b></div>
<p>
</p>
<p>Hist_trend_corrected_ensemble#1=ensemble#1 [time,1,lat,lon] -
(PI_trend [lat,lon] *ensemble#1 starting year-ensemble#1 starting
year) <br>
</p>
<p>Hist_trend_corrected_ensemble#2=ensemble#2 [time,2,lat,lon] -
(PI_trend [lat,lon] *ensemble#2 starting year-ensemble#1 starting
year) <br>
</p>
<p>Hist_trend_corrected_ensemble#3=ensemble#3 [time,3,lat,lon] -
(PI_trend [lat,lon] *ensemble#3 starting year-ensemble#1 starting
year)</p>
<p>.....</p>
<p>Hist_trend_corrected_ensemble#99=ensemble#99 [time,99,lat,lon] -
(PI_trend [lat,lon] *ensemble#99 starting year-ensemble#1 starting
year)</p>
<p>Thanx</p>
<p>Sri<br>
</p>
</body>
</html>