[ncl-talk] Wondering Why I Get This Error

Barry Lynn barry.h.lynn at gmail.com
Fri Sep 8 02:11:12 MDT 2017


Hi:

I have some simple code, copied below.

I cannot add the value of 256 to dbz or the value of wrap_around after
setting it to 256.

  wrap_around = dbz

  wrap_around = 256.


  do j = 0,dims2d(0)-1

  do i = 0,dims2d(1)-1

  check = ismissing(dbz(j,i))

   if (check.eq.False)then

   if (dbz(j,i).lt.0)then

    dbz(j,i) = dbz(j,i) + wrap_around(j,i)

   end if

   end if

  end do

  end do

fatal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be
coerced to type of left hand side

fatal:["Execute.c":8575]:Execute: Error occurred at or near line 35 in file
./ra
PrintVarSummary gives:

Variable: dbz

Type: byte

Total Size: 480960 bytes

            480960 values

Number of Dimensions: 2

Dimensions and sizes: [radialR | 360] x [gateR | 1336]

Coordinates:

Number Of Attributes: 14

  units : dBz

  long_name : Reflectivity

  missing_value : 0

  signal_below_threshold : 0

  scale_factor : 0.5

  add_offset : -33

  _Unsigned : true

  range_folding_threshold : 50

  _CoordinateAxes : timeR elevationR azimuthR distanceR

  scale_factor_metadata : 0.5

  add_offset_metadata : -33

  range_folded_value_packed : 1

  range_folded_value : -32.5

  _FillValue : 0
-- 
Barry H. Lynn, Ph.D
Senior 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
US 914 432 3108
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170908/407de69b/attachment.html>


More information about the ncl-talk mailing list