[ncl-talk] Small rank bug in omega_ccm_driver

Dennis Shea shea at ucar.edu
Tue Sep 23 12:11:24 MDT 2014


Thank you.

A JIRA ticket has been created: Issue NCL-2077 - omega_ccm_driver does not
work with 3D array <https://vets.development.ucar.edu/jira/browse/NCL-2077>

This will be fixed in the 6.3.0 release

--
As you know, you can use an editor to extract the 'omega_ccm_driver' code
from contributed.ncl.
Then modify it as you suggest (my_omega_ccm_driver.ncl) and load the new
version, preceding it with
This will 'undefine' the original version and use the new version

So, my_omega_ccm_driver.ncl has

undef("omega_ccm_driver")
function omega_ccm_driver(p0,psfc,u,v,hyam[*],hybm[*],hyai[*],hybi[*])
;

Then

load "./my_omega_ccm_driver.ncl"



load

===
I will change the driver script but we must check the code to make sure it
works.
I think Colin has done so.

D




On Tue, Sep 23, 2014 at 10:49 AM, Colin Zarzycki <zarzycki at umich.edu> wrote:

> 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
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140923/8a1dfeba/attachment.html 


More information about the ncl-talk mailing list