[ncl-talk] How to calculate vertically integrated moisture budget
최화진(환경공학부)
hjchoi0620 at postech.ac.kr
Tue Jul 16 05:30:24 MDT 2019
Dear all,
Hello.
I am trying to calculate vertically integrated moisture budget.
I used "uv2dvF" and "wgt_vertical_n" functions because these data have regular grid and pressure coordinate.
I am worried about whether the following script is correct or not.
f=addfile(dir2+"/q/q_day_ERA-20C_V0_r360x181_"+year+"0101-"+year+"1231.nc","r")
g=addfile(dir2+"/u/u_day_ERA-20C_V0_r360x181_"+year+"0101-"+year+"1231.nc","r")
h=addfile(dir2+"/v/v_day_ERA-20C_V0_r360x181_"+year+"0101-"+year+"1231.nc","r")
i=addfile(dir2+"/sp/sp_day_ERA-20C_V0_r360x181_"+year+"0101-"+year+"1231.nc","r")
q=short2flt(f->q) ; units= kg kg-1
u=short2flt(g->u)
v=short2flt(h->v)
sfp=short2flt(i->sp) ;units=pa, time*lat*lon
lon=f->lon
lat=f->lat
time=f->time
sfp=sfp*0.01
sfp at units="millibars"
lev=f->level
printVarSummary(lev)
u_q=u*q
v_q=v*q
CV=uv2dvF_Wrap(u_q,v_q)
ptop=10
grav=9.8
vopt=1
dp=dpres_plevel_Wrap(lev,sfp,ptop,0) ;time*level*lat*lon
cv_integ=wgt_vertical_n(CV,dp,vopt,1)
cv=cv_integ*86400 ; for mm/day
cv=cv/grav
cv!0="time"
cv!1="latitude"
cv!2="longitude"
cv&latitude=lat
cv&longitude=lon
cv&time=time
cv=-cv
If you could get back to me, I'd appreciate it.
Thanks for your time and consideration.
Best Regards,
Hwa-Jin Cho
*************************************************************************************************
Hwa-Jin Choi
Climate Change Research Lab (CCRL),
Division of Environmental Science and Engineering,
Pohang University of Science and Technology (POSTECH)
77, Cheongam-ro, Nam-gu, Pohang, Kyongbuk, 37673, South Korea
*************************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190716/8fda59d9/attachment.html>
More information about the ncl-talk
mailing list