[ncl-talk] Slope and aspect
Gus Correa
gus at ldeo.columbia.edu
Fri Jan 19 15:08:52 MST 2018
Hi Michael
In this regard, the (first order centered) finite difference routines
may help:
https://www.ncl.ucar.edu/Document/Functions/Built-in/center_finite_diff.shtml
https://www.ncl.ucar.edu/Document/Functions/Built-in/center_finite_diff_n.shtml
Gus Correa
On 01/19/2018 04:50 PM, Michael Notaro via ncl-talk wrote:
> Guess I may have answered my own question about aspect....seems to work.
>
>
> ; a b c
>
> ; d e f
>
> ; g h i
>
>
> ; delta = 800.
>
>
> a=1000.
>
> b=800.
>
> c=600.
>
> d=1200.
>
> e=1000.
>
> f=800.
>
> g=1400.
>
> h=1200.
>
> i=1000.
>
>
> dzdx=((a+2.*d+g)-(c+2.*f+i))/(8.*800.)
>
> dzdy=((g+2.*h+i)-(a+2.*b+c))/(8.*800.)
>
>
> aspect=atan2(dzdx,dzdy)*45./atan(1.0)
>
>
> print(aspect)
>
>
>
> Michael Notaro
> Associate Director
> Nelson Institute Center for Climatic Research
> University of Wisconsin-Madison
> Phone: (608) 261-1503
> Email: mnotaro at wisc.edu
>
>
> ------------------------------------------------------------------------
> *From:* Michael Notaro
> *Sent:* Friday, January 19, 2018 3:16 PM
> *To:* ncl-talk at ucar.edu
> *Subject:* Slope and aspect
>
> Is there a way to compute slope and aspect
>
> in NCL given an equal area netcdf dataset of elevation (m)?
> Michael
>
>
> Michael Notaro
> Associate Director
> Nelson Institute Center for Climatic Research
> University of Wisconsin-Madison
> Phone: (608) 261-1503
> Email: mnotaro at wisc.edu
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
More information about the ncl-talk
mailing list