[ncl-talk] Wondering why I am getting this dimensions error

Barry Lynn barry.h.lynn at gmail.com
Wed Nov 27 10:21:43 MST 2019


Hi:

I have some simple code.

      do k = 0,dims3d(0)-1

       qs(k,:,:) = where(qs(k,:,:).lt.0.1,q_null(k,:,:),qs(k,:,:))

       sum_q = 1.

       sum_q =  where(qs(k,:,:).ge.0.1,sum_q+1,sum_q)

       qs_1(k) = sum(qs(k,:,:))/sum_q+qs_1(k)

      end do


Why can't I do the "where" sum?


fatal:Number of dimensions on right hand side do not match number of
dimension in left hand side

-- 
Barry H. Lynn, Ph.D
Senior Associate Scientist, Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191127/42357972/attachment.html>


More information about the ncl-talk mailing list