<div dir="ltr"><div>No need to loop over longitude or time or level ... <br><br></div>From example 6<br><div><br><pre>dTdX = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/new.shtml"><strong>new</strong></a> ( (/ntim,klev,nlat,mlon/), <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/typeof.shtml"><strong>typeof</strong></a>(T), T@_FillValue)

   do nl=0,nlat-1                      ; loop over each latitude
      dX = 6378388.*<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/cos.shtml"><strong>cos</strong></a>(0.0174533*lat(nl))*dlon  ; constant at this latitude
      dTdX(:,:,nl:nl,:) = <strong>center_finite_diff_n</strong> (T(:,:,nl:nl,:), dX , True,0,<b>3</b>)
   end do</pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 15, 2017 at 6:50 AM, Andrew Kren - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:andrew.kren@noaa.gov" target="_blank">andrew.kren@noaa.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear ncl-talk,<div><br></div><div>I have a question about calculating a metric. I am trying to calculate the S1 skill score (<a href="http://www.cawcr.gov.au/projects/verification/" target="_blank">http://www.cawcr.gov.au/<wbr>projects/verification/</a>), which uses differences between forecast and observed adjacent points. I will be using centered finite differences for this and came across the example 6 here (<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/center_finite_diff_n.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Functions/Built-in/<wbr>center_finite_diff_n.shtml</a>) which calculates dx at each latitude. My question would be, would I also loop over longitude to get dy or would this be included in the calculation already? I would calculate the S1 skill score over a global grid of 181x360 grid points in lat/lon.</div><div><br></div><div>Thanks,<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_-8127780377500410693gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>Andrew Kren, PhD<br>
Research Scientist I, Global Observing Systems Analysis (GOSA) Group<br>
NOAA ESRL Global Systems Division (Rm 3C515)<br>
325 Broadway, Boulder, CO 80305<br>
<a href="tel:%28303%29%20497-5418" value="+13034975847" target="_blank">(303) 497-5418</a><span><font color="#888888"><br>
</font></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</font></span></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>