Integration over the vertical levels:

From: Thejna Tharammal <ttharammal_at_nyahnyahspammersnyahnyah>
Date: Wed Dec 26 2012 - 20:12:33 MST

Hi all,

I want to calculate the total column mean of a variable from the CCSM model
results. I tried to use dim_sum_n for the purpose as,

;**************************************

dp = dpres_hybrid_ccm (ps,p0,hyai,hybi)

xdp=x(0,:,:,:)*dp

vint=x(0,0,:,:)

vint = dim_sum_n(xdp,0)

; for average, 1/(b-a) * integral ( from a to b ) of f(x)

vintAvg=vint

vintAvg =vint/dim_sum_n(dp, 0)

;**************************************

I find that the results obtained are very different from the ones calculated
using nco vertical integration functions ("ncwa -a lev") as a test. So I
wonder if the
method I used is correct?

Thanks,

Thejna

 

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Dec 26 20:12:55 2012

This archive was generated by hypermail 2.1.8 : Fri Jan 04 2013 - 15:32:29 MST