Re: BUFR to NetCDF conversion

From: Dennis Shea (shea AT cgd.ucar.edu)
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 bufr.so ]
           
    [2] NCL script
         
           external BUFR bufr.so
           begin
             diri = "./" ; input directory
             fili = "bufr_file_name"
             
            ;create some arrays to hold the data
            ;returned from the shared object
            
             T = new ( ... )
             U = new ( ... )
             [etc]
             
             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
           end
             
             
    [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'

    D

    >Delivered-To: shea AT ucar.edu
    >Delivered-To: ncl-talk AT ucar.edu
    >Date: Wed, 03 Nov 2004 11:30:39 -0500
    >From: "Zachary Bronder" <Zachary.Bronder AT noaa.gov>
    >To: ncl-talk AT ucar.edu
    >Cc: Mark Vincent <Mark.Vincent AT noaa.gov>
    >Cc: Greg Mott <Greg.Mott AT noaa.gov>
    >Cc: John Kelley <John.Kelley AT noaa.gov>
    >
    >Howdy,
    >
    >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
    advance.
    >
    >Zack
    >_______________________________________________
    >ncl-talk mailing list
    >ncl-talk AT ucar.edu
    >http://mailman.ucar.edu/mailman/listinfo/ncl-talk

    _______________________________________________
    ncl-talk mailing list
    ncl-talk AT ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



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