<div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear NCL-experts,</div><div><br></div><div><b>Details/Problem:</b></div><div>I am calculating vertically integrated moisture flux and its divergence.</div><div>But, I am getting incorrect results. There should be convergence along 5-10N. The fluxes are also weird.</div><div><br></div><div>Attached in this email are the script, the expected output image, and the output of the script.</div><div>I already used the <b>::-1</b> to sort the latitudes. </div><div><br></div><div><b>Input Files:</b></div><div>I uploaded my files here:</div><div><a href="https://www.dropbox.com/sh/43iscphbydw43w2/AABobBktPuOX3V8VxqmvFtiGa?dl=0">https://www.dropbox.com/sh/43iscphbydw43w2/AABobBktPuOX3V8VxqmvFtiGa?dl=0</a><br></div><div><br></div><div><b>What I have so far:</b></div><div>Below is the part of the attached script.</div><div><br></div><div><b><br></b></div><div><b><br></b></div><div>  fu  = addfile("<a href="http://lyndz_uv_file.nc">lyndz_uv_file.nc</a>","r")       ; open netcdf file<br>  fq  = addfile("<a href="http://lyndz_shum_file.nc">lyndz_shum_file.nc</a>","r"); moisutre file<br><br>  u   = fu->U_GRD_2_ISBL(:,{1000:300},::-1,:)       ; pull u off file<br>  v   = fu->V_GRD_2_ISBL(:,{1000:300},::-1,:)       ; pull v off file<br>  q   = fq->shum(:,{1000:300},::-1,:)               ; pull q off file<br></div><div><br></div><div>;*******************************************************************************</div><div>;Vertical Integration</div><div>;*******************************************************************************</div><div>  qu = q*u<br>  qv = q*v<br><br>  ptop = 300.0<br>  psfc = 1000.0<br><br>  dp = dpres_plevel_Wrap(lev,psfc,ptop,0)<br>  DP = conform(qu,dp,1)<br>  vopt = 1<br>  quint = wgt_vertical_n(qu,DP,vopt,1)<br>  quint := tofloat(quint)<br>  quint@long_name = "QUFLUX: vertically integrated"<br>  quint@units = "kg m-1 s-1"<br><br>  qvint = wgt_vertical_n(qv,DP,vopt,1)<br>  qvint := tofloat(qvint)<br>  qvint@long_name = "QVFLUX: vertically integrated"<br>  qvint@units = "kg m-1 s-1"<br><br>  qdiv = uv2dvF_Wrap(quint,qvint)<br>  qdiv := tofloat(qdiv)<br>  qdiv@units = "kg m-2 s-1"<br>  qdiv@long_name = "QDIV: vertically integrated"</div><div><br></div><div><br><br></div><div>I'll appreciate any help.</div><div><br></div><div>Sincerely,</div><div><br></div><div>Lyndz</div><div><br></div></div></div></div></div></div></div></div></div></div>