[ncl-talk] Problem with wgt_vertical_n routine
    Lyndz 
    olagueralyndonmark429 at gmail.com
       
    Mon May  6 21:18:33 MDT 2019
    
    
  
Dear NCL-experts,
I am encountering the following errors when using *wgt_vertical_n* routine
in NCL.
*(0) wgt_vertical_n: dimension sizes are not equal*
*(0) wgt_vertical_n:  dimX=124*
*(1) wgt_vertical_n:  dimX=8*
*(2) wgt_vertical_n:  dimX=73*
*(3) wgt_vertical_n:  dimX=144*
*(0) wgt_vertical_n: dimDP=8*
I am not sure why this is occurring.
Below is part of the script.
  f  = addfile("ncep_6h_jan.nc","r")       ; open netcdf file
  a  = addfile("moisture/shum_jan_6hr.nc","r"); moisutre file
  u   = f->U_GRD_2_ISBL(:,{1000:300},:,:)       ; pull u off file
  v   = f->V_GRD_2_ISBL(:,{1000:300},:,:)       ; pull v off file
  q   = a->shum(:,{1000:300},:,:)               ; pull q off file
  lat = f->lat
  lon = f->lon
  lev = (/1000.,925.,850.,700.,600.,500.,400.,300./)
  u   = u(:,:,::-1,:)
  printVarSummary(u)         ; [time | 124] x [level | 8] x [lat | 73] x
[lon | 144]
  v   = v(:,:,::-1,:)
  printVarSummary(v)          ;[time | 124] x [level | 8] x [lat | 73] x
[lon | 144]
  q   = q(:,:,::-1,:)
  printVarSummary(q)          ;[time | 124] x [level | 8] x [lat | 73] x
[lon | 144]
;**********************************************************
;integration
;***********************************************************
  qu = q*u                             ;[124] x [8] x [73] x [144]
  qv = q*v                             ;[124] x [8] x [73] x [144]
  ptop = 300.0
  psfc = 1000.0
  dp = dpres_plevel_Wrap(lev,psfc,ptop,0)
  vopt = 0
*  quint = wgt_vertical_n(qu,dp,vopt,1)*
Problems:
[1] NCL exits after the last line (quint) and gives the error above. Both
qu and dp have the same number of levels.
Any suggestion on how to do this correctly in NCL?
I'll appreciate any help.
Sincerely,
*Lyndz*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190507/2a3ec0f1/attachment.html>
    
    
More information about the ncl-talk
mailing list