Extraction of scatterometer info from BUFR files

For a description of this product see: KNMI Scatterometer
This KNMI site contains also source files for software to decode the bufr files containing scatterometer data. I have used them to compile the program Bufr2Asc, which you can download here.

This program also needs BUFR table files, which is licensed under the GNU Lesser General Public License which incorporates the terms and conditions of version 3 of the GNU General Public License
See: ECMWF BUFR encoding/decoding software


Enabling scatterometer info at Eumetsat.

ERS-2 scatterometer data is broadcasted via Eumetcast Data Channel 1. You need to register for this data:

The program

Bufr2Asc is a stand-alone program. You can execute it from a commandline; just 2 arguments are needed:
Bufr2Asc inputfile outputfile
Example input file:
scatt_20080203_101907_ers2___00000_ear_o_250_ovw.l2_bufr
The content of the output file is like this:
#    Lat     Lon      Date  Time   Speed     Dir
   25.02 -109.18  20080202  1752    0.20    4.20
   25.12 -109.66  20080202  1752    0.73  152.00
   24.80 -109.23  20080202  1752    0.20    3.00
Etc.
  • Speed is in m/sec
  • Dir: You need to set environment variable BUFR_TABLES to the location where bufr tables are located.
    xrit2pic will set BUFR_TABLES and then runs Bufr2Asc. After that the results are plotted in the preview window.

    Linux

    Download:
    bufr2asc.tgz

    The tar file contains:

    Installation.

    That's all!

    The bufr tables will be located in $HOME/bin/bufr_tables. If you want the bufr tables in another location you need to change the location in preferences of xrit2pic:

  • Tab Directories, item BUFR Table location'

    The following command will be executed by xrit2pic, to translate the bufr file:

    export BUFR_TABLES=$HOME/bin/bufr_tables; Bin2Asc inputfile outputfile
    
  • BUFR_TABLES depends of course of the settings in Preferences, tab Directories.
  • inputfile is the BUFR file, e.g. received via Eumetcast.
  • outputfile is the result file.

    NOTE: All bufr tables I have are now in the tar file. Please let me know if you get a message like:

    ERROR in CheckBufrData: could not find BUFR TABLE ....
    

    Windows

    Download:
    setup_bufr2asc.exe

    This executable will install all files needed:

    Installation.

    That's all!

    The bufr tables will be located in <disk>:\bufr_tables, with <disk> the drive where windows was installed. Normally C:.
    If you want the bufr tables in another location you need to change the location in preferences of xrit2pic:

  • Tab Directories, item BUFR Table location'

    The following command will be executed by xrit2pic, to translate the bufr file:

    set BUFR_TABLES=c:\bufr_tables/ & Bin2Asc inputfile outputfile
    
  • BUFR_TABLES depends of course of the settings in Preferences, tab Directories.
  • inputfile is the BUFR file, e.g. received via Eumetcast.
  • outputfile is the result file.

    Running.

    ERS data is broadcasted via "EUMETSAT Data Channel 1". That is the same channel as used for NOAA AVHRR. If you use tqchansel this channel is probably tagged as 'NOAA'. In Preferences of tqchansel you can see the relation between channel and label on your tqchansel window.
    You need to ask Eumetsat to enable ERS-SCAT channel for your EKU. You can find it on the registration form near: "Regional Data Service (EARS)".
    Check in the main window of xrit2pic that you have ERS data vailable:


    You can select to only show ERS data, in the 'List' box, see xrit2pic window bottom-middle.

    If you select a line the column 'content' should give the amount of measure points; the column 'Segm / obit[pos] should contain the [lon,lat] position of this measure cell. If not: Check the 'Info' line at the very bottom of the xrit2pic window. If it contains a line like:
    Translator 'Bufr2Asc' or bufr tables not found!?
    then either program or bufr tables are not installed correctly.
    Check in Preferences:

    If the content and position info is present then the bufr reader is installed correctly. Exporting to a file or showing wind vectors on a satellite picture should work.
    To preview results on an earth map one more file is necessary: a plate carree picture of the world. Default setting is a file called 'earthmap.gif'. This low resolution map is present in the xrit2pic distribution.
    You can use any plate carree file for this, e.g. the high resolution files from Blue Marble. You can change filename in preferences, tab 'Files', box 'Earth maps', line near 'For scatterometer'.

    Next part to rewrite, not clear enough!

    Try Export:
    Select a ERS-line, and click on 'Export'. You should get a message in the info field, see pic at the bottom.
    If you get an error message: Translation failed! then something is wrong with Bufr2Asc installation.
    If you get an error message like: ERROR in CheckBufrData: could not find BUFR TABLE B !!! then something is wrong with the bufr table installation.
    If you get a message like shown, but mentioning 0 extracted points, then select another ERS item.
    If everything is OK you have just translated a BUFR file containing scatterometer data. This is an ASCII file; you can open it with a texteditor (nedit, wordpad,...) in the destination directory (see Preferences, xrit2pic).

    To plot info into a picture you don't need to export the scatterometer data.

  • Select and make a preview the usual way.
  • From menu 'View' choose 'Scatterometer'. This will give you a list of all available ERS bufr files:

    Columns 'pos1' and 'pos2' are the positions in [lon,lat] of the first and last data.

    Select one, et voila:

    To save the result: File -> Screendump

    Note:

    To add in future:
    Satellite track ERS2 and collected data.
    Starting from drawn ERS-2 location:

    start-timeend-time# datacomment
    14:3814:41438near south pole
    14:5415:03903the long one near asia
    15:1715:170file received without scattero data: ERS above land
    15:40:41149near US
    16:1016:20129again near south pole
    16:5316:530file received without scattero data: ERS above land (Russia)
    17:0717:070file received without scattero data: ERS above land (Greenland)
    17:4717:470file received without scattero data though ERS above sea? (near south pole)
    18:3818:40488near north pole