[ncl-talk] Small rank bug in omega_ccm_driver

Colin Zarzycki zarzycki at umich.edu
Tue Sep 23 10:49:42 MDT 2014


Omega_ccm_driver should accept rank 3 or 4 values of U and V (and 2 or 3 of
PS). (with or without a time dimension)

However, when passing 3D wind (lev,lat,lon) instead of 4D wind into the
function, it crashes because it searches for dimu(3) (4th index of u
dimensions) which doesn't exist.

The simple fix is to replace:

  ntim   = dimu(0)
  klev   = dimu(1)
  nlat   = dimu(2)
  mlon   = dimu(3)

with...

  if (ranku.eq.3) then
    klev   = dimu(0)
    nlat   = dimu(1)
    mlon   = dimu(2)
  else
    ntim   = dimu(0)
    klev   = dimu(1)
    nlat   = dimu(2)
    mlon   = dimu(3)
  end if

Cheers,

-Colin

-- 
Colin M. Zarzycki, ASP postdoctoral fellow
Atmospheric Modeling and Predictability
National Center for Atmospheric Research
http://www.colinzarzycki.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140923/d77ba62a/attachment.html 


More information about the ncl-talk mailing list