Use dpres_plevel to get the layer thicknesses.
http://www.ncl.ucar.edu/Document/Functions/Contributed/dpres_plevel_Wrap.shtml
See Examples
Generically,
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
diri = "./"
fx = addfile(diri+"x.mon.mean.nc", "r")
fp = addfile(diri+"pres.mon.mean.nc", "r")
;x = fx->X
x = short2flt( fx->X ) ; if X is type short
lev = fx->level
ps = fp->pres
ptop = 300
dp = dpres_plevel(lev, ps, ptop, 0)
printVarSummary(dp)
xdp = x*dp
copy_VarCoords(x, xdp)
xInt = dim_sum_n_Wrap(xdp, 1)
xInt@long_name = "vertical integral [weighted sum]"
printVarSummary(xInt)
printMinMax(xInt, True)
xAvg = xInt/dim_sum_n(dp, 1)
xAvg@long_name = "vertical weighted average"
copy_VarCoords(xInt, xAvg)
printVarSummary(xAvg)
printMinMax(xAvg, True)
Good luck
> On Mar 5, 2010, at 11:11 AM, samir pokhrel wrote:
>
>>
>> Hello NCL users,
>>
>> I want to integrate humidity fields (NCEP reanalysis), from
>> surface to 300mb. Is there any simple definite integral
>> function is available in NCL or just summation is a solution. I hope
>> summation might not be that accurate as integration.
>>
>> Thanks in advance
>>
>> Regards
>> --
>> Samir Pokhrel
>> Climate and Global Modelling Division
>> Indian Institute of Tropical Meteorology
>> NCL Post, Pashan
>> Pune-411008
>> INDIA
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 12 13:48:44 2010
This archive was generated by hypermail 2.1.8 : Wed Mar 17 2010 - 13:00:16 MDT