<div dir="ltr"><div>If the *global* grid is oriented South-to-North ( think: ([at(n+1)-lat(n-1)] ), I am not aware of any rational for multiplying by -1. <br><br></div><div>The highly accurate spherical harmonic functions are used to calculate the gradients. They require global, rectilinear (eg, gaussian, 1x1, 2x3...) grids which are ordered South-to-North. <br><br>To be explicit, the WRF grids are curvilinear not rectilinear. Further, as noted in the referenced post, they are not global.<br></div><div><br>---<br></div><div>A side-point, the announced 6.3.0 function 'advect_variable' was inadvertently released as 'advect_var'. You can see the code via (search for 'advect_var')<br><br>%> less $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl<br><br></div><div>In the *SOON* to be released 6.4.0, users can access the function using 'advect_var' or 'advect_variable'<br><br>-------<br></div><div><br></div><div>The 6.4.0 release will have:<br><br> <a href="http://www.ncl.ucar.edu/Applications/gradients.shtml">http://www.ncl.ucar.edu/Applications/gradients.shtml</a><br><br></div><div>Note that this release will contain a new gradient function which will allow gradients to be calculated on non-global grids. It uses less accurate centered-finite-difference. The grids must be rectilinear and ordered South-to-North<br><br> <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/grad_latlon_cfd.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/grad_latlon_cfd.shtml</a><br><br></div><div>Hence, you could calculate the regional (say) temperature [T] gradients dT/dlat, dT/dlon, then multiply by u, v to get the advection.<br></div><div><br> <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 23, 2017 at 9:56 PM, Peter Gibson <span dir="ltr"><<a href="mailto:peter.gibson@unsw.edu.au" target="_blank">peter.gibson@unsw.edu.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_2700221468348641439divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p>Hello,</p>
<p><br>
</p>
<p>I am using the advect_variable function in NCL v6.3 on 3 hourly global reanalysis data to calculate horizontal temperature advection.</p>
<p>The patterns of temperature advection I am seeing seem realistic, but appear to be the wrong sign (cold advection has positive values etc.)</p>
<p><br>
</p>
<p>There is some discussion of multiplying by -1 to get the right sign here: <a href="http://mailman.ucar.edu/pipermail/wrf-users/2016/004188.html" class="m_2700221468348641439OWAAutoLink" id="m_2700221468348641439LPlnk498338" target="_blank">
http://mailman.ucar.edu/<wbr>pipermail/wrf-users/2016/<wbr>004188.html</a></p>
<p><br>
</p>
<p>Can you confirm that it is indeed appropriate to multiply by -1?</p>
<p><br>
</p>
<p>Thanks,<br>
Peter<br>
</p>
<p><br>
</p>
</div>
</div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>