[ncl-talk] How to get second partial derivative of a variable
Lyndz
olagueralyndonmark429 at gmail.com
Thu Apr 15 13:56:14 MDT 2021
Dear NCL-experts,
*Details:*
I have mean sea level pressure data from NCEP-DOE reanalysis with the
following dimensions and sizes.
Dimensions and sizes: [time | 124] x [lat | 73] x [lon | 144]
*Problems*:
(a) I would like to get the second partial derivative of the mslp
separately for the lon and lat.
I would like to get their products later and save as a variable such as the
below image:
[image: image.png]
a gradient of a gradient or components of a laplacian?
*What I have so far:*
I have the following initial script but only for getting the first partial
derivative using CFD.
diri = "."
fp = addfile ("mslp_jan_2017.nc", "r")
p = fp->mslp(:,:,:)
;****************************************
; calculate pressure gradients via CFD
;****************************************
p_gradLatLon = grad_latlon_cfd (p, p&lat, p&lon, True, False)
dpdY = u_gradLatLon[0]
dpdX = u_gradLatLon[1]
delete(p_gradLatLon)
dpdX at long_name = "longitudinal gradient of MSLP"
dpdX at units = "P/m" ;(Pa)*(1/m)
= Pa/m
dpdY at long_name = "latitudinal gradient of MSLP"
dpdY at units = "Pa/m"
printVarSummary(dpdX)
printMinMax(dpdX,0)
print("-------------")
printVarSummary(dpdY)
printMinMax(dpdY,0)
print("-------------")
I'll appreciate any help on this.
Sincerely,
Lyndz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210416/695dc318/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 3964 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210416/695dc318/attachment.png>
More information about the ncl-talk
mailing list