#2678 closed defect (fixed)

FIX - WCPS - non-grid index expression on irregular axis returns out of bound array

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.1
Component: petascope Version: 10.0
Keywords: Cc:
Complexity: Medium

Description

For example, this WCPS query:

for $c in (temperature_new)
let $THI := 300,
   $TLO := 0,
   $SHI := imageCrsdomain($c, plev).hi,
  $SLO := imageCrsdomain($c, plev).lo,
  $r_plev := (($SHI - $SLO + 1) / ($THI - $TLO + 1))
 return
    encode(
      coverage scaledUp
      over $p plev($TLO:$THI)
      values
          (( $c[plev:"CRS:1"((long)(($p - $TLO) * $r_plev) + $SLO),
                ansi("2022-11-24T06:00:00"),
                Long(-6.2183)] - 273 ) + 68)
      , "image/png",
       " { \"transpose\": [0,1],
           \"colorMap\":  
         { \"type\": \"intervals\",
           \"colorTable\": {
                \"24.5\": [144, 102, 162, 255],
                \"27\": [129, 114, 168, 255],
                \"32\": [130, 146, 189, 255],
                \"37\": [134, 177, 210, 255],
                \"42\": [150, 199, 228, 255],
                \"47\": [225, 225, 225, 255],
                \"52\": [248, 215, 162, 255],
                \"57\": [240, 175, 103, 255],
                \"62\": [237, 156, 101, 255],
                \"67\": [234, 138, 99, 255],
                \"69.5\": [231, 123, 101, 255]
              }
           }
        }"
            
      )

returns array out bound for irregular coefficient 300.

Change History (1)

comment:1 by Bang Pham Huu, 22 months ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.