<p>The formula for moisture flux is $$q\vec{V} $$ 
where $q$ is the water vapor mixing ratio, which can be found using <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/mixhum_ptrh.shtml" rel="nofollow noreferrer">mixhum_ptr</a> and $\vec{V}$ is the velocity.</p>

<p>Therefore the divergence of the moisture flux must be 
$$\nabla{\dot{}q\vec{V}}=\frac{\partial(qu)}{\partial x}+\frac{\partial(qv)}{\partial y}+\frac{\partial(qw)}{\partial z} $$
$$\approx\frac{\delta(qu)}{\delta x}+\frac{\delta(qv)}{\delta y}+\frac{\delta(qw)}{\delta z}$$</p>

<p>which is computable if you have gridded data.</p>

<p>For example, you could compute this by setting
$$qu=q\ast u$$ $$qv=q\ast v$$ $$qfluxDiv=uv2dv\_cfd(qu,qv,lat,lon,opt) $$
Use uv2dv_cfd per <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/uv2dv_cfd.shtml" rel="nofollow noreferrer">http://www.ncl.ucar.edu/Document/Functions/Built-in/uv2dv_cfd.shtml</a></p>

<p>Note: If you wanted the turbulent moisture flux, you would need to subtract $\nabla{\dot{}\bar{\vec{V}}\bar{q}}$ from your answer.</p>

CC BY-SA 3.0
2016-07-21T03:18:46.527Z
Thank you very much for your answer. I have gridded data. I can't able to calculate. Can you please suggest how to calculate?
Kay
CC BY-SA 3.0
2016-07-21T13:37:10.060Z
Which language are you using? In NCL it is very easy, in Python and MATLAB it is easy, but in a language like C++ or FORTRAN, it is hard.
BarocliniCplusplus
CC BY-SA 3.0
2016-07-22T01:30:43.633Z
Please suggest in NCL or grads. Thank you
Kay
CC BY-SA 3.0
2016-07-22T03:55:38.710Z
For horizontal water vapor flux, divergence try this NCL code: qfluxDiv=uv2dv_cfd(qu,qv,lat,lon,opt)
BarocliniCplusplus
CC BY-SA 3.0
2016-07-22T13:43:07.713Z
I added that to the answer, but without data and code, it is hard to give an example. I provided a link to the NCL function, so that you may know how to use the function. There is an example there on how to use the function.
BarocliniCplusplus
CC BY-SA 3.0
2016-10-31T14:25:52.887Z
Done. Also, I made a correction to an admittedly silly math error regarding divergence.
BarocliniCplusplus
CC BY-SA 3.0
2016-11-01T14:15:26.540Z
The method to get mixing ratio has been added, though it requires pressure.
BarocliniCplusplus
CC BY-SA 3.0
2016-11-01T15:06:52.703Z
The nice thing about NCL @gansub, is that there is a built in function for that conversion.
BarocliniCplusplus
CC BY-SA 3.0
2016-07-20T20:43:04.183Z
2016-11-01T14:14:30.680Z
2016-11-01T14:14:30.680Z
BarocliniCplusplus
<p>I have temperature, u wind, v wind and relative humidity. I am wondering to calculate water vapor flux divergence and convergence. </p>

<p>Would anybody kindly help to find our a solution for this? </p>

<meteorology><water-vapour><moisture-flux>
How to calculate water vapor flux divergence from temperature, relative humidity, u wind and v wind?
Kay
# How to calculate water vapor flux divergence from temperature, relative humidity, u wind and v wind?

(Asked by: username_0 on 2016-07-20)

I have temperature, u wind, v wind and relative humidity. I am wondering to calculate water vapor flux divergence and convergence.

Would anybody kindly help to find our a solution for this?

**Tags:** meteorology, water-vapour, moisture-flux


---

## 1 answers

### Answer by username_1 on 2016-07-20. Score: 7

The formula for moisture flux is $$q\vec{V} $$
where $q$ is the water vapor mixing ratio, which can be found using [mixhum\_ptr](http://www.ncl.ucar.edu/Document/Functions/Built-in/mixhum_ptrh.shtml) and $\vec{V}$ is the velocity.

Therefore the divergence of the moisture flux must be
$$\nabla{\dot{}q\vec{V}}=\frac{\partial(qu)}{\partial x}+\frac{\partial(qv)}{\partial y}+\frac{\partial(qw)}{\partial z} $$
$$\approx\frac{\delta(qu)}{\delta x}+\frac{\delta(qv)}{\delta y}+\frac{\delta(qw)}{\delta z}$$

which is computable if you have gridded data.

For example, you could compute this by setting
$$qu=q\ast u$$ $$qv=q\ast v$$ $$qfluxDiv=uv2dv\\_cfd(qu,qv,lat,lon,opt) $$
Use uv2dv\_cfd per <http://www.ncl.ucar.edu/Document/Functions/Built-in/uv2dv_cfd.shtml>

Note: If you wanted the turbulent moisture flux, you would need to subtract $\nabla{\dot{}\bar{\vec{V}}\bar{q}}$ from your answer.

> **Comments:**
> **username_0**: Thank you very much for your answer. I have gridded data. I can't able to calculate. Can you please suggest how to calculate?  
> **username_1**: Which language are you using? In NCL it is very easy, in Python and MATLAB it is easy, but in a language like C++ or FORTRAN, it is hard.  
> **username_0**: Please suggest in NCL or grads. Thank you  
> **username_1**: For horizontal water vapor flux, divergence try this NCL code: qfluxDiv=uv2dv_cfd(qu,qv,lat,lon,opt)  
> **username_1**: I added that to the answer, but without data and code, it is hard to give an example. I provided a link to the NCL function, so that you may know how to use the function. There is an example there on how to use the function.  
> **username_1**: Done. Also, I made a correction to an admittedly silly math error regarding divergence.  
> **username_1**: The method to get mixing ratio has been added, though it requires pressure.  
> **username_1**: The nice thing about NCL @gansub, is that there is a built in function for that conversion.  

---

