<div dir="ltr"><div><div>How about the following?<br><br>sdfopen <a href="http://shum.nc">shum.nc</a><br>sdfopen <a href="http://uwnd.nc">uwnd.nc</a><br>sdfopen <a href="http://vwnd.nc">vwnd.nc</a><br><br>p1000 = const(shum.1,1000,-a)<br>define qu=vint(p1000,shum.1*uwnd.2,100)<br>define qv=vint(p1000,shum.1*vwnd.3,100)<br>d -hdivg(qu,qv)<br><br></div>Best Regards<br></div>Sridhara<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 2, 2017 at 10:01 AM, afwande juliet <span dir="ltr"><<a href="mailto:afwandej965@gmail.com" target="_blank">afwandej965@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Dear users of grads<br></div>did someone manage to plot vertically integrated moisture flux.<br></div>I have tried the function vint but gets the below error<br><a href="http://cola.gmu.edu/grads/gadoc/gradfuncvint.html" target="_blank">http://cola.gmu.edu/grads/<wbr>gadoc/gradfuncvint.html</a> <br>ga-> q file<br>File 1 : mean daily NMC reanalysis (1997)<br> Descriptor: <a href="http://shum.1997.nc" target="_blank">shum.1997.nc</a><br> Binary: <a href="http://shum.1997.nc" target="_blank">shum.1997.nc</a><br> Type = Gridded<br> Xsize = 144 Ysize = 73 Zsize = 8 Tsize = 365 Esize = 1<br> Number of Variables = 1<br> shum 8 t,z,y,x mean Daily specific humidity<br>ga-> set t 1 <br>Time values set: 1997:1:1:0 1997:1:1:0 <br>ga-> set z 1 <br>LEV set to 1000 1000 <br>ga-> set z 2 <br>LEV set to 925 925 <br>ga-> set z 3 <br>LEV set to 850 850 <br>ga-> set z 8 <br>LEV set to 300 300 <br>ga-> d vint(850,shum.1*lterp(uwnd.2,<wbr>shum.1),600)<span class=""><br>Error from VINT: Incompatible grids. <br></span>Contouring: -0.25 to 0.2 interval 0.05 <br>*** Error in `grads': free(): invalid pointer: 0x000000000145a430 ***<br>======= Backtrace: =========<br>/lib/x86_64-linux-gnu/libc.so.<wbr>6(+0x777e5)[0x7f41ce33c7e5]<br>/lib/x86_64-linux-gnu/libc.so.<wbr>6(+0x7fe0a)[0x7f41ce344e0a]<br>/lib/x86_64-linux-gnu/libc.so.<wbr>6(cfree+0x4c)[0x7f41ce34898c]<br>grads(gagfre+0x5a)[0x449e5a]<br>grads(gagrel+0x58)[0x493be8]<br>grads(gadspl+0x668)[0x4ab318]<br>grads(gacmd+0x17ae)[0x4aa33e]<br>grads(main+0x62e)[0x41277e]<br>/lib/x86_64-linux-gnu/libc.so.<wbr>6(__libc_start_main+0xf0)[<wbr>0x7f41ce2e5830]<br>grads(_start+0x29)[0x412e79]<br>======= Memory map: ========<br>00400000-004e8000 r-xp 00000000 08:05 524842 <wbr> /usr/bin/grads<br>006e7000-006e8000 r--p 000e7000 08:05 524842 <wbr> /usr/bin/grads<br>006e8000-006ec000 rw-p 000e8000 08:05 524842 <wbr> /usr/bin/grads<br>006ec000-00992000 rw-p 00000000 00:00 0 <br>012a4000-014b8000 rw-p 00000000 00:00 0 <br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 31, 2017 at 1:00 AM, Jennifer M Adams <span dir="ltr"><<a href="mailto:jadams21@gmu.edu" target="_blank">jadams21@gmu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Usage Note #5: The vint function operates only in an X-Y varying dimension environment.<br>
<br>
So, you will have to fix A, and if you must have T varying, it will probably work with ‘define’ instead of ‘display’, but I would try fixing T first just to make sure you’re getting the result you intend:<br>
<br>
set z 1<br>
set t 182<br>
d vint(etc. etc.)<br>
<br>
If that works and you are sure your expression is what you want, then you can<br>
<br>
set t 182 274<br>
define yourvname = vint(etc. etc.)<br>
<br>
… and GrADS will loop over T under the hood to create your defined variable that varies X, Y, and T.<br>
<span class="m_-3965267870390237335HOEnZb"><font color="#888888">—Jennifer<br>
</font></span><div class="m_-3965267870390237335HOEnZb"><div class="m_-3965267870390237335h5"><br>
<br>
On May 30, 2017, at 5:43 PM, Pablo Camarena <<a href="mailto:jcamarena006@gmail.com" target="_blank">jcamarena006@gmail.com</a>> wrote:<br>
<br>
><br>
> Thanks Jennifer,<br>
><br>
> Now I'm trying the following:<br>
><br>
> sdfopen <a href="http://shum.mon.mean.nc" rel="noreferrer" target="_blank">shum.mon.mean.nc</a><br>
> sdfopen <a href="http://uwind.mon.mean.nc" rel="noreferrer" target="_blank">uwind.mon.mean.nc</a><br>
> sdfopen <a href="http://vwind.mon.mean.nc" rel="noreferrer" target="_blank">vwind.mon.mean.nc</a><br>
> set lon 225 227<br>
> set lat 23 24<br>
> set t 182 274<br>
> set z 1 3<br>
> d vint(1000,shum.1*lterp(uwnd.2,<wbr>shum.1),850)<br>
> And I get the following error:<br>
> "Operation error: Invalid dimension environment<br>
> Too many varying dimensions"<br>
><br>
> I think the error is with vertical levels.<br>
><br>
> 2017-05-30 14:08 GMT-06:00 Jennifer M Adams <<a href="mailto:jadams21@gmu.edu" target="_blank">jadams21@gmu.edu</a>>:<br>
> Hi, Pablo —<br>
> Grads shouldn’t be dumping core on you, but at least you got a clue before it crashed. The grids of your shum.1 and uwnd.2 files apparently don’t match. Try using the lterp() function to interpolate in the lat/lon dimenions, something like this:<br>
><br>
> ga-> d vint(1000,shum.1*lterp(uwnd.2,<wbr>shum.1),600)<br>
><br>
> In the script lines you posted, I noticed that the syntax here is incorrect:<br>
> > qu=vint(1000,shu,.1*uwnd.2,300<wbr>)<br>
> > qv=vint(1000,shu,.1*vwnd.3,300<wbr>)<br>
><br>
> change "shu,.1" to "shum.1"<br>
><br>
> If the problem is that the vertical levels are different in your data files, then you need to fix that. There’s a script in the library that may be helpful —<a href="ftp://cola.gmu.edu/grads/scripts/zinterp.gs" rel="noreferrer" target="_blank">ftp://cola.gmu.edu/grads/scri<wbr>pts/zinterp.gs</a>. I believe the vint() function is a bit fussy about the Z axis. The lterp() function does not do vertical interpolation. Please read the vint() function Usage Notes carefully (<a href="http://cola.gmu.edu/grads/gadoc/gradfuncvint.html" rel="noreferrer" target="_blank">http://cola.gmu.edu/grads/gad<wbr>oc/gradfuncvint.html</a>) to make sure you’ve got everything right. If you’re still having trouble, please also include the output from "ncdump -c” on your data files, the version of GrADS you are using, and the shortest possible script that illustrates the error.<br>
> —Jennifer<br>
><br>
><br>
> On May 30, 2017, at 2:18 PM, Pablo Camarena <<a href="mailto:jcamarena006@gmail.com" target="_blank">jcamarena006@gmail.com</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > I want to calculate Vertically integarted moisture flux convergence (VIMFC)<br>
> ><br>
> > But when I give the following instruction it marks me errors:<br>
> ><br>
> > sdfopen <a href="http://shum.mon.mean.nc" rel="noreferrer" target="_blank">shum.mon.mean.nc</a><br>
> > sdfopen <a href="http://uwind.mon.mean.nc" rel="noreferrer" target="_blank">uwind.mon.mean.nc</a><br>
> > sdfopen <a href="http://vwind.mon.mean.nc" rel="noreferrer" target="_blank">vwind.mon.mean.nc</a><br>
> ><br>
> > set lon 180 320<br>
> > set lat 0 60<br>
> > set t 763 766<br>
> > set lev 1000 300<br>
> > qu=vint(1000,shu,.1*uwnd.2,300<wbr>)<br>
> > qv=vint(1000,shu,.1*vwnd.3,300<wbr>)<br>
> ><br>
> > vimf=-hdivg(qu,qv)<br>
> > d vimf<br>
> ><br>
> > ga-> qu=vint(1000, shum.1*uwnd.2,600)<br>
> ><br>
> > Error from VINT: Incompatible grids.<br>
> > *** glibc detected *** grads: double free or corruption (!prev): 0x0000000003707c40 ***<br>
> > ======= Backtrace: =========<br>
> > /lib/x86_64-linux-gnu/libc.so.<br>
> > 6(+0x7e846)[0x7f898ac4c846]<br>
> > grads(gree+0x2bb)[0x4fab92]<br>
> > grads(gadef+0x126b)[0x518144]<br>
> > grads(gacmd+0x16c)[0x52af24]<br>
> > grads(main+0xa7a)[0x4975ab]<br>
> > /lib/x86_64-linux-gnu/libc.so.<wbr>6(__libc_start_main+0xed)[0x7f<wbr>898abef76d]<br>
> > grads[0x4960a9]<br>
> > ======= Memory map: ========<br>
> > 00400000-00bcb000 r-xp 00000000 08:05 1573111<br>
> > 7f898bdc2000-7f898bdc3000 r--p 00017000 08:05 1572886 /lib/x86_64-linux-gnu/libpthre<wbr>ad-2.15.soAborted (core dumped)<br>
> ><br>
> > Does anyone know how to fix it?<br>
> > Best,<br>
> > Pablo Camarena<br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > gradsusr mailing list<br>
> > <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
> > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
><br>
> --<br>
> Jennifer Miletta Adams<br>
> Center for Ocean-Land-Atmosphere Studies (COLA)<br>
> George Mason University<br>
><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
><br>
> ______________________________<wbr>_________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
<br>
--<br>
Jennifer Miletta Adams<br>
Center for Ocean-Land-Atmosphere Studies (COLA)<br>
George Mason University<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
</div></div></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>