This is the method I used to compute vertical integration of energy flux based on ERA-Interim 4 times daily datasets. It mainly includes how vertical integral should be done based on model level and what errors may results in if adopted improper integration scheme.
Variables should be based on model level and please refer to Trenberth 2002 to see the comparison between the difference between the computation under model level and pressure level.
The dimension of each variable is ntime*nlev*nlat*nlon. As I focus on one time slice computation, time dimension is 1.
Take thermal energy flux VT as an example.
V and T are both defined on midpoint layer and their dimension is 60*nlat*nlon. Here are the calculation steps:
1. compute VT=V*T at each layer (60*nlat*nlon)
2. calculate the pressure of each layer under vertical hybrid coordinate.
Note: nlev of vertical hybrid coordinate is 61 as we want to know the pressure of layer interfaces associated with hybrid coordinate. In this way, we can get the pressure difference between two adjacent layer dp = p(lower)-p(upper) (60*nlat*nlon)
3. do vertical integration, sum(VT*dp) at each layer.
Done!
Previously, I mistook that V and T are defined at layer interfaces and took the average of VT between two adjacent layer to represent the thermal flux between these two layers. Actually as V and T are already at midpoint layer, I shouldn’t do average again. And the underestimation of this wrong method can reach about 1/3 at some place. Experience in tears…
Hope this will be of help to youπ.