<div dir="ltr"><div>The documentation needs to be improved.</div><div><br></div><div>The 'dp' should have the same shape and size as 'x'. This should have been done within the function.It wasn't. Hence, the user must perform this 'trivial' task.<br></div><div><br></div><div><div>  <b>DP</b>    =<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml"><b> conform</b></a>(qu, dp, 1)                      ; propagate to all dimensions.<br></div><div><b> </b> quint =<b> wgt_vertical_n</b>(qu,<b>DP</b>,vopt,1)</div><div>  delete(DP)                                                ; no longer needed<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 6, 2019 at 9:19 PM Lyndz <<a href="mailto:olagueralyndonmark429@gmail.com">olagueralyndonmark429@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear NCL-experts,<div><br></div><div>I am encountering the following errors when using <b><i>wgt_vertical_n</i></b> routine in NCL. </div><div><br></div><div><div><i>(0)<span style="white-space:pre-wrap">  </span>wgt_vertical_n: dimension sizes are not equal</i></div><div><i>(0)<span style="white-space:pre-wrap">      </span>wgt_vertical_n:  dimX=124</i></div><div><i>(1)<span style="white-space:pre-wrap"> </span>wgt_vertical_n:  dimX=8</i></div><div><i>(2)<span style="white-space:pre-wrap">   </span>wgt_vertical_n:  dimX=73</i></div><div><i>(3)<span style="white-space:pre-wrap">  </span>wgt_vertical_n:  dimX=144</i></div><div><i>(0)<span style="white-space:pre-wrap"> </span>wgt_vertical_n: dimDP=8</i></div></div><div><br></div><div>I am not sure why this is occurring.</div><div>Below is part of the script.</div><div><br></div><div><div>  f  = addfile("<a href="http://ncep_6h_jan.nc" target="_blank">ncep_6h_jan.nc</a>","r")       ; open netcdf file</div><div>  a  = addfile("moisture/<a href="http://shum_jan_6hr.nc" target="_blank">shum_jan_6hr.nc</a>","r"); moisutre file</div><div><br></div><div>  u   = f->U_GRD_2_ISBL(:,{1000:300},:,:)       ; pull u off file</div><div>  v   = f->V_GRD_2_ISBL(:,{1000:300},:,:)       ; pull v off file</div><div>  q   = a->shum(:,{1000:300},:,:)               ; pull q off file</div><div><br></div><div>  lat = f->lat</div><div>  lon = f->lon</div><div>  lev = (/1000.,925.,850.,700.,600.,500.,400.,300./)</div><div><br></div><div>  u   = u(:,:,::-1,:)</div><div>  printVarSummary(u)         ; [time | 124] x [level | 8] x [lat | 73] x [lon | 144]</div><div>  v   = v(:,:,::-1,:)</div><div>  printVarSummary(v)          ;[time | 124] x [level | 8] x [lat | 73] x [lon | 144]</div><div>  q   = q(:,:,::-1,:)</div></div><div>  printVarSummary(q)          ;[time | 124] x [level | 8] x [lat | 73] x [lon | 144]</div><div><br></div><div>;**********************************************************</div><div>;integration</div><div>;***********************************************************</div><div><div>  qu = q*u                             ;[124] x [8] x [73] x [144]</div><div>  qv = q*v                             ;[124] x [8] x [73] x [144]  </div><div><br></div><div>  ptop = 300.0</div><div>  psfc = 1000.0</div></div><div>  dp = dpres_plevel_Wrap(lev,psfc,ptop,0)</div><div>  vopt = 0</div><div><b>  quint = wgt_vertical_n(qu,dp,vopt,1)</b></div><div><br></div><div>Problems:</div><div>[1] NCL exits after the last line (quint) and gives the error above. Both qu and dp have the same number of levels. </div><div><br></div><div>Any suggestion on how to do this correctly in NCL?</div><div><br></div><div>I'll appreciate any help.</div><div><br></div><div>Sincerely,</div><div>        </div><div><div><div dir="ltr" class="gmail-m_-7761376555116037467gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="comic sans ms, sans-serif"><b><u>Lyndz</u></b></font><br><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>