<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear Nitin,<div class="">if I understood the problem correctly, you should just take advantage of the <font face="Menlo" class="">“w”</font> option in the built-in <font face="Menlo" class="">addfile</font> function. With this additional requirement you can read (and write!) both files and then directly assign the variable with the new values taken from the other file.&nbsp;</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">in=addfile(“file1.nc", "w”)</font></div><div class=""><font face="Menlo" class="">in2=addfile(“file2.nc",&nbsp;“r")</font></div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">in-&gt;temp(:,:,:)=in2-&gt;temp</font><span style="font-family: Menlo;" class="">(:,:,:)</span></div></div><div class=""><br class=""></div><div class="">Be advised that some older versions of NCL don’t really play well with “w” option, so do an update first, just to be safe.&nbsp;</div><div class="">Although I still don’t understand the problem, since a simple rename would do the same…&nbsp;<br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class="Apple-interchange-newline">Guido Cioni</div><div class=""><a href="http://guidocioni.altervista.org" class="">http://guidocioni.altervista.org</a>&nbsp;</div><div class=""><br class=""></div></div><br class="Apple-interchange-newline" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline"></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">Il giorno 07 dic 2015, alle ore 11:01, Nitin Patil &lt;<a href="mailto:nitinpatil85@gmail.com" class="">nitinpatil85@gmail.com</a>&gt; ha scritto:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Dear ncl usr,<div class=""><br class=""></div><div class="">I have to netcdf file with 3 dims [time, lat, lon] and the 5 variables in it.</div><div class=""><br class=""></div><div class="">What I need is need to replace only data contain in that 5 variables from other file which also includes same dims and variable names, any idea or easy way?</div><div class=""><br class=""></div><div class="">Kindly let me know.</div><div class=""><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">--</div>Regards,<div class="">Nitin Patil</div></div></div></div></div></div></div></div></div></div>
</div></div>
_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></div></body></html>