<div dir="ltr"><div>Hi Pavani,</div><div>You do not need the loop in this case. The following would do the same as in your loop:</div><div><br></div><div>
f->ALBEDO(0,mn(:,0),mn(:,1))=0.1200218<br>f->ALBEDO(1,mn(:,0),mn(:,1))=0.12<br>f->ALBEDO(2,mn(:,0),mn(:,1))=0.1203444<br>f->ALBEDO(3,mn(:,0),mn(:,1))=0.1250593<br>f->ALBEDO(4,mn(:,0),mn(:,1))=0.1295258<br>f->ALBEDO(5,mn(:,0),mn(:,1))=0.139174<br>f->ALBEDO(6,mn(:,0),mn(:,1))=0.1493438<br>f->ALBEDO(7,mn(:,0),mn(:,1))=0.1549511<br>f->ALBEDO(8,mn(:,0),mn(:,1))=0.143491<br>f->ALBEDO(9,mn(:,0),mn(:,1))=0.1334304<br>f->ALBEDO(10,mn(:,0),mn(:,1))=0.1294655<br>f->ALBEDO(11,mn(:,0),mn(:,1))=0.1244921
</div><div><br></div><div>This should only take a few seconds/minutes!!</div><div>Cheers,<br></div><div>Rashed<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 15, 2019 at 4:20 AM Goriparthi Pavani via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,153)"><div><font color="#000000">Hi,</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">I am trying to modify variable(albedo) in ncfile over some gridpoints in the given domain.The time for completing this task is taking 7days.I still need to modify two more variables.Is there any better way to do this so that this task can complete in lesser time?</font></div><div><br></div><div><font color="#000000">The code I wrote is:</font><br></div><div>------------------------------------------------------------------</div><div>f=addfile("<a href="http://modlis_input.d01.nc" target="_blank">modlis_input.d01.nc</a>","w")<br>mn=asciiread("latlonmod.txt",(/47425,2/),"integer")<br>do i=0,47424<br>f->ALBEDO(0,mn(i,0),mn(i,1))=0.1200218<br>f->ALBEDO(1,mn(i,0),mn(i,1))=0.12<br>f->ALBEDO(2,mn(i,0),mn(i,1))=0.1203444<br>f->ALBEDO(3,mn(i,0),mn(i,1))=0.1250593<br>f->ALBEDO(4,mn(i,0),mn(i,1))=0.1295258<br>f->ALBEDO(5,mn(i,0),mn(i,1))=0.139174<br>f->ALBEDO(6,mn(i,0),mn(i,1))=0.1493438<br>f->ALBEDO(7,mn(i,0),mn(i,1))=0.1549511<br>f->ALBEDO(8,mn(i,0),mn(i,1))=0.143491<br>f->ALBEDO(9,mn(i,0),mn(i,1))=0.1334304<br>f->ALBEDO(10,mn(i,0),mn(i,1))=0.1294655<br>f->ALBEDO(11,mn(i,0),mn(i,1))=0.1244921<br>end do</div><div>-----------------------------------------------------------------------------</div><div><br></div><div><font color="#000000">Thanks,</font></div><div><font color="#000000">Pavani</font><br></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></blockquote></div>