[ncl-talk] Partial derivative along a coordinate
Dennis Shea
shea at ucar.edu
Mon Apr 17 07:16:48 MDT 2017
NCL has functions to calculate gradients (derivatives).
Your original post did not show that you wanted gradients of SST.
Presumably, these have missing values (land).
*ftcurvd *will compute gradients but, as noted in the documentation, it
does not allow missing values.
NCL has other functions for gradients:
http://www.ncl.ucar.edu/Applications/gradients.shtml
Some use spherical harmonics which are "highly accurate" but, again, do
not allow for missing values.
--
The following 6.4.0 function does allow for missing values.
http://www.ncl.ucar.edu/Document/Functions/Contributed/grad_latlon_cfd.shtml
Read the documentation. This returns a variable of type 'list.' The list
(container) consists of two variables the zonal and meridional gradients.
---
The following is essentially Example 2:
fsst = addfile("....","r")
sst = f->SST ; assume a rectilinear grid
sst_grad_list = *grad_latlon_cfd* (sst, sst&lat sst&lon, True, False) ; global
;sst_grad_list = *grad_latlon_cfd* (sst, sst&lat sst&lon,False, False)
; regional
; for clarity, explicitly extract the variables within the list
sst_grad_zonal = sst_grad_list[0] ; [...] is NCL syntax for
accessing elements of a list
sst_grad_meriod = sst_grad_list[1]
delete(sst_grad_list)
printVarSummary(sst_grad_zonal)
printMinMax(sst_grad_zonal,0)
print("---")
printVarSummary(sst_grad_meriod)
printMinMax(sst_grad_meriod,0)
Good luck
On Mon, Apr 17, 2017 at 4:01 AM, gibies george <gibies at tropmet.res.in>
wrote:
> Thanks for your mail.
>
> Suppose if I have to calculate zonal gradient of SST(time|:,lat|:,lon|:)
>
> xcoord=confirm(*dimsizes*
> <https://www.ncl.ucar.edu/Document/Functions/Built-in/dimsizes.shtml>
> (SST),SST&lon,2)
> dsst_dx = *ftcurvd*(xcoord,SST,SST&lon)
>
> Is this correct ?
>
>
>
>
> *Dr. Gibies George,*
> *Project Scientist C,*
> *Monsoon Mission,*
>
> *Indian Institute of Tropical Meteorology,Dr. Homi Bhabha Road, *
> *NCL Post Office, *
>
>
>
>
>
>
> *Pashan, Pune 411008, India.Office Teleph : +912025904423
> <+91%2020%202590%204423>Office mail : gibies at tropmet.res.in
> <gibies at tropmet.res.in>____________________________________________Vettikuzhiyil
> House,Ezhakkaranadu South **Post Office,*
>
>
>
> *Puthencruz-682308, Kochi, India.Mobile number : +919028523910
> <+91%2090285%2023910>, +919420407392 <+91%2094204%2007392>, Personal mail :
> gibiesgeorge at gmail.com
> <gibiesgeorge at gmail.com>http://sites.google.com/site/gibiesge/
> <http://sites.google.com/site/gibiesge/>*
>
>
> *_______________________________________________________"Please do not
> print this e-mail unless you really need. Because every 3000 pages cost a
> tree. *
> *Save Trees, Save mother Earth." *
>
>
> On 13 April 2017 at 20:31, Andy <awmiller at mit.edu> wrote:
>
>> Yes, you can use ftcurvd.
>>
>> Andy
>>
>> Andy Miller
>> MIT PAOC PhD Candidate
>>
>> 77 Massachusetts Ave | 54-1715
>> Cambridge, MA 02139
>>
>> Phone: 617-253-3715 <(617)%20253-3715>
>> Email: awmiller at mit.edu
>>
>> On 04/13/2017 02:46 AM, gibies george wrote:
>>
>> Dear friends,
>>
>> Is there a function available to find partial derivative of a variable
>> along one of its coordinate (say, lonx, laty, levz, time, etc ) ?
>>
>> thanks and regards
>>
>>
>> *Dr. Gibies George,*
>> *Project Scientist C,*
>> *Monsoon Mission,*
>>
>> *Indian Institute of Tropical Meteorology, Dr. Homi Bhabha Road, *
>> *NCL Post Office, *
>>
>>
>>
>>
>>
>>
>> *Pashan, Pune 411008, India. Office Teleph : +912025904423
>> <020%202590%204423> Office mail : gibies at tropmet.res.in
>> <gibies at tropmet.res.in> ____________________________________________
>> Vettikuzhiyil House, Ezhakkaranadu South **Post Office,*
>>
>>
>>
>> * Puthencruz-682308, Kochi, India. Mobile number : +919028523910
>> <090285%2023910>, +919420407392 <094204%2007392>, Personal mail :
>> gibiesgeorge at gmail.com <gibiesgeorge at gmail.com>
>> http://sites.google.com/site/gibiesge/
>> <http://sites.google.com/site/gibiesge/>*
>>
>>
>> *_______________________________________________________ "Please do not
>> print this e-mail unless you really need. Because every 3000 pages cost a
>> tree. *
>> *Save Trees, Save mother Earth." *
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing listncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170417/8e7c46ab/attachment.html
More information about the ncl-talk
mailing list