<p>you can use this:
this define integrated vapor transport(IVT)  or Moisture Flux:</p>
<pre><code> 'define qu=vint(const(lon,1000,-a),shum.1*uwind.2,300)'  
 'define qv=vint(const(lon,1000,-a),shum.1*vwind.3,300)'  
 'define VIMFC=mag(qu,qv)'
 'd VIMFC'
</code></pre>
<p>best regards</p>

CC BY-SA 4.0
2022-01-14T05:29:42.990Z
2022-01-14T07:07:41.050Z
2022-01-14T07:07:41.050Z
Aminollah Ghahramani
<p>I want to calculate vertically integrated moisture flux convergence (VIMFC) in <a href="http://cola.gmu.edu/grads/" rel="nofollow noreferrer">GrADS</a>.</p>

<p>But when I give the following instruction it marks me errors:</p>

<pre><code>sdfopen shum.mon.mean.nc
sdfopen uwind.mon.mean.nc
sdfopen vwind.mon.mean.nc

set lon 180 320
set lat 0 60
set t 763 766
set lev 1000 300

qu=vint(1000,shu,.1*uwnd.2,300)
qv=vint(1000,shu,.1*vwnd.3,300)

vimf=-hdivg(qu,qv)
d vimf

ga-&gt; qu=vint(1000, shum.1*uwnd.2,600)
</code></pre>

<p>Error from VINT:  </p>

<pre><code>Incompatible grids.
*** glibc detected *** grads: double free or corruption (!prev): 0x0000000003707c40 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.

6(+0x7e846)[0x7f898ac4c846]
grads(gree+0x2bb)[0x4fab92]
grads(gadef+0x126b)[0x518144]
grads(gacmd+0x16c)[0x52af24]
grads(main+0xa7a)[0x4975ab]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f898abef76d]
grads[0x4960a9]
======= Memory map: ========
00400000-00bcb000 r-xp 00000000 08:05 1573111
7f898bdc2000-7f898bdc3000 r--p 00017000 08:05 1572886                    /lib/x86_64-linux-gnu/libpthread-2.15.soAborted (core dumped)
</code></pre>

<p>Does anyone know how to fix it?</p>

<p>Best,
Pablo Camarena</p>

CC BY-SA 3.0
2017-05-31T03:01:49.093Z
have you checked the grids of your input files to see if they match?  It does say "Incompatible grids."
f.thorpe
CC BY-SA 3.0
2017-05-31T06:02:16.737Z
That'd be my first guess too.  I remember GrADS being annoyingly uninformative during errors like yours
JeopardyTempest
CC BY-SA 3.0
2017-06-28T13:53:11.343Z
I have come across the same problem. Some time ago, I have started using Matlab and R. Things have become more transparent. For some starting reference, I suggest taking a look at this topic: https://earthscience.stackexchange.com/a/10667/8396
ouranos
<meteorology><models><software><moisture-flux>
Moisture flux convergence in GrADS
Pablo Camarena
# Moisture flux convergence in GrADS

(Asked by: username_0 on 2017-05-30)

I want to calculate vertically integrated moisture flux convergence (VIMFC) in [GrADS](http://cola.gmu.edu/grads/).

But when I give the following instruction it marks me errors:

```
sdfopen shum.mon.mean.nc
sdfopen uwind.mon.mean.nc
sdfopen vwind.mon.mean.nc

set lon 180 320
set lat 0 60
set t 763 766
set lev 1000 300

qu=vint(1000,shu,.1*uwnd.2,300)
qv=vint(1000,shu,.1*vwnd.3,300)

vimf=-hdivg(qu,qv)
d vimf

ga-> qu=vint(1000, shum.1*uwnd.2,600)

```

Error from VINT:

```
Incompatible grids.
*** glibc detected *** grads: double free or corruption (!prev): 0x0000000003707c40 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.

6(+0x7e846)[0x7f898ac4c846]
grads(gree+0x2bb)[0x4fab92]
grads(gadef+0x126b)[0x518144]
grads(gacmd+0x16c)[0x52af24]
grads(main+0xa7a)[0x4975ab]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f898abef76d]
grads[0x4960a9]
======= Memory map: ========
00400000-00bcb000 r-xp 00000000 08:05 1573111
7f898bdc2000-7f898bdc3000 r--p 00017000 08:05 1572886                    /lib/x86_64-linux-gnu/libpthread-2.15.soAborted (core dumped)

```

Does anyone know how to fix it?

Best,
username_0

**Tags:** meteorology, models, software, moisture-flux

> **Comments:**
> **username_1**: have you checked the grids of your input files to see if they match?  It does say "Incompatible grids."  
> **username_2**: That'd be my first guess too.  I remember GrADS being annoyingly uninformative during errors like yours  
> **username_3**: I have come across the same problem. Some time ago, I have started using Matlab and R. Things have become more transparent. For some starting reference, I suggest taking a look at this topic: https://earthscience.stackexchange.com/a/10667/8396  

---

## 1 answers

### Answer by username_4 on 2022-01-14. Score: 1

you can use this:
this define integrated vapor transport(IVT) or Moisture Flux:

```
 'define qu=vint(const(lon,1000,-a),shum.1*uwind.2,300)'  
 'define qv=vint(const(lon,1000,-a),shum.1*vwind.3,300)'  
 'define VIMFC=mag(qu,qv)'
 'd VIMFC'

```

best regards


---

