I'm following this example given on the MapServer website.

But the angle of the raster is incorrect:

incorrect uv angle

The data is my grib files is correct, and should not yield these perfect opposite directions. I have confirmed this with a GRIB viewer.

My layer definition:

      NAME "grib_direction_sample"
      CONNECTIONTYPE uvraster
      DATA "/var/www/mapserver/data/grib/routeguard/4nwwin99_2013110412.grb2"    #u-component of wind @ Ground or water surface
      PROCESSING "BANDS=1.3,1.4"

          SYMBOL "arrow"
          ANGLE [uv_angle]
          SIZE [uv_length]
          COLOR 255 0 0
          #POLAROFFSET [uv_length_2] [uv_angle]
        END # style
      END # class

          "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +pm=-360"
END # layer

What am I missing here?

  • Without seeing the raw data, it's not possible to tell for sure, but the varying magnitudes, the unit tangents of all the angles, and the switch in directions only at the smallest magnitudes suggest you are using either a single band for both components or else are using two very strongly correlated bands for the vector components. To check this, why don't you print out some of the raw data or make separate images of the two bands you think you are using? – whuber May 21 '14 at 19:40
  • I had to use BANDS=1,2 instead of BANDS=1.1,1.2 although an inventory check with wgrib2 listed the messages in the grb2 files as 1.1 1.2 1.3 etc... You (or a night sleep) pushed me in the right direction, if you rewrite this as an answer i'll accept it. – jorrebor May 22 '14 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.