Re: BUFR to NetCDF conversion

From: Dennis Shea (shea AT
Date: Wed Nov 03 2004 - 10:16:09 MST

  • Next message: Sylvia Murphy: "Re: mm52ncdf plot"

    Hi Zack,

    I have contacted NCAR's Data Support Section (DSS).
    They have a suite of fortran based BUFR subroutines.
    It may be possible to invoke these subroutines from
    NCL to access the data. Conceptually:

    [1] Create a shared object using NCL's WRAPIT command line operator:

           WRAPIT bufr.f [ will create ]
    [2] NCL script
           external BUFR
             diri = "./" ; input directory
             fili = "bufr_file_name"
            ;create some arrays to hold the data
            ;returned from the shared object
             T = new ( ... )
             U = new ( ... )
             BUFR::read_bufr(diri+fili, T,U,...)
            ; create netCDF
             diro = "./" ; output dir
             filo = fili + ".nc"
             fnc = addfile (diro+filo, "c")
            ;create file attributes
             fnc@title = "netCDF version of BUFR file"
             fnc@source= fili
             fnc@creation_date = systemfunc("date")
             fnc->T = T
             fnc->U = U
    [3] Note: netCDF is great for gridded data. It can be
        used for station data. Wheteher it is well suited for
        your needs is problematical. There are many possible
        variations of how the netCDF file might look.
        If all data has max of N levels. It may be reasonable to have
        a station or bouy that may contain M variable
        BOSTON = new ( (/NTIM,M,N/), "float")
        WASH = new ( (/NTIM,M,N/), "float")

    [4] BUFR is 'ugly'


    >Date: Wed, 03 Nov 2004 11:30:39 -0500
    >From: "Zachary Bronder" <>
    >Cc: Mark Vincent <>
    >Cc: Greg Mott <>
    >Cc: John Kelley <>
    >NOS wants to extract buoy data from BUFR files and write the data to NetCDF
    >files that will be as forecast model input. What's the best way to do this? NCL
    >has good tools for extracting GRIB data, and I've used this to output NetCDF
    >files, but last time I checked there were no such tools for BUFR. Thanks in
    >ncl-talk mailing list

    ncl-talk mailing list

    This archive was generated by hypermail 2b29 : Wed Nov 03 2004 - 10:46:17 MST