I am doing moisture budget analysis with WRF outputs. I have a few questions:

The moisture budget equation I used is

(Seager and Henderson 2013)

Q1: When calculating the vertically integrated moisture flux, I modified the code of vertical integration from (NCL example)

Can I use the method to do vertical integration on (ua * Qvapor) / dx and (va * Qvapor) / dy, and then add them up?

Q2: In WRF output, how can I calculate the last term in the Eq (9)?

Should I use the wa (z-wind component") at the lowest level or should I use ua * gradient of terrain height?

Q3: Dose the variable P in the Eq (9) mean the RAINNC(t) - RAINNC(t-1) in WRF output? Cumulus parameterization is not used.

And how about E? What is the corresponding variable in WRF output?

Any information would be greatly appreciated.