<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">A simpler way to do this without using define and keeping both files open, is: <div>'sdfopen uwnd.nc'</div><div>'sdfopen vwnd.nc'</div><div>'d mag(u.1,v.2)'</div><div><br></div><div>Please read the documentation page on variables at <a href="http://iges.org/grads/gadoc/variable.html">http://iges.org/grads/gadoc/variable.html</a></div><div><br></div><div>--Jennifer</div><div><br><div><br></div><div><br><div><div><div>On Feb 21, 2011, at 6:17 AM, Muhammad Rahiz wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>sdfopen file1.nc<br>var1 = u<br>close 1<br><br>sdfopen file2.nc<br>var2 = v<br><br>Once you've assigned the variables to objects, you can do the intended <br>analysis e.g. to plot the difference, do<br><br>d var2-var1<br><br>-- <br>Muhammad Rahiz<br>Researcher & DPhil Candidate (Climate Systems & Policy)<br>School of Geography & the Environment<br>University of Oxford<br><br>On Sun, 20 Feb 2011, <a href="mailto:phd0802@pieas.edu.pk">phd0802@pieas.edu.pk</a> wrote:<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi All,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am new user of GrADS having two NetCDF files named as uwnd.1998.nc and<br></blockquote><blockquote type="cite">vwnd.1998.nc. Both files are same in every aspect except nature of<br></blockquote><blockquote type="cite">variables. One file has u-component of wind and other v-component. I want<br></blockquote><blockquote type="cite">to plot the magnitude of wind (i.e. mag(u,v)),but don't know how to open<br></blockquote><blockquote type="cite">these files in GrADS as an individual file. Can anybody help me. Thanks in<br></blockquote><blockquote type="cite">advance.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Sardar,<br></blockquote><blockquote type="cite">PhD Student, PIEAS,<br></blockquote><blockquote type="cite">Pakistan.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">gradsusr mailing list<br></blockquote><blockquote type="cite"><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br></blockquote><blockquote type="cite"><a href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></blockquote><blockquote type="cite"><br></blockquote>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></div></div></div></body></html>