Re: Reading Meteosat MPE in GRIB2

From: Matthew Janiga <matthew.janiga_at_nyahnyahspammersnyahnyah>
Date: Fri, 15 May 2009 21:01:12 -0400

David,

Using the following program....

http://www.satsignal.eu/software/grib-viewer.htm

I was able to load the grib file and find which pixels (since each is
equal to an element in the grib file) line up with which lat/lon
coordinates since all I want to do is overlay model data on the MPE
data. The program allows one to drag the mouse around the image and
find the lat and lon of each pixel. Then I can just plot a subsection
of the MPE data with gsn_csm_contour and overlay model data using
gsn_csm_contour_map in satellite projection. Its a fudge but it does
what I need it to do.

I had no luck with wgrib2 either but perhaps the ecmwf grib software would work?

http://www.ecmwf.int/products/data/software/grib_api.html

Or.... perhaps the people at satsignal can help.

Thanks!
Matt

On Fri, May 15, 2009 at 8:11 PM, David Brown <dbrown_at_ucar.edu> wrote:
> Hi Matthew,
>
> Here is what I have been able to find out about the Meteosat MPE files:
>
> As far as I can tell the parameters 98 and 99 are not listed in any
> recognized table. The most recent version of the NCEP tool wgrib2 gives no
> name for them. It also agrees with NCL that the grid values for these
> parameters are messed up.  It gives the following information if invoked as
> wgrib2 -grid:
>
> BAD GDS:lon1=4294.967295 lon2=60.000000 should be 0..360
> 1.2:272:grid_template=0:
>        lat-lon grid:(24 x 24) units 1e-06 input WE:SN output WE:SN res 56
>        lat -2147.483647 to 60.000000 by 5.000000
>        lon 4294.967295 to 60.000000 by 5.000000 #points=576
>
> However, I note that the URL
> http://www.eumetsat.int/Home/Main/Access_to_Data/Meteosat_Meteorological_Products/Product_List/SP_1119538666663?l=en
>
> states the following
> Note: The GRIB2 data files contain two quality indicators to identify area
> where the rain retrieval can be used with confidence. More details about
> these indicators can be found in the following document:
>
> http://www.eumetsat.int/groups/ops/documents/document/pdf_metprod_mpe_quality_info.pdf
>
> This document states that the quality indicator values are standard
> deviation and correlation coefficient and they are defined on a lat/lon grid
> that goes from -60 to 60 in both lat and lon with a step size of 5 degrees.
>
> I still cannot at this point help you much with the coordinates of the
> INSTRR_P30_GSV0 variable. Hopefully that will change soon.
>  -dave
>
>
> On May 14, 2009, at 1:32 PM, Matthew Janiga wrote:
>
>> Thanks,
>>
>> The files can be downloaded at the following page...under the MET-9 files.
>> http://oiswww.eumetsat.int/~idds/html/grib.html
>>
>>> 1) the problem with 5.1.0 is a result of a missing flag in the
>>> compilation
>>> of the NCEP-supplied GRIB 2 low-level library. It causes all GRIB 2 files
>>> to
>>> seem empty. It only affects 64-bit versions of NCL so this diagnosis is
>>> based on the assumption that you are using a 64-bit NCL.
>>
>> I was also wondering why this version didn't work with GFS GRIB2 data.
>> Also, the build of NCL is below...it is 64 bit.
>> ncl_ncarg-5.1.0.Linux_x86_64_gcc411
>>
>>> 2) The missing parameter entries are visible in your file as variables
>>>  VAR_3_1_98_P30_GLL1 and VAR_3_1_99_P30_GLL1. Coordinate variables in
>>> NCL's
>>> representation of GRIB data are always generated by NCL. They are not
>>> found
>>> in the code tables and therefore do not have parameter numbers.
>>
>> This is what I suspected.
>>
>>> 3) The space-view perspective grid is not fully supported yet in NCL.
>>> That
>>> is why there are no coordinate variables associated with dimensions
>>> 'lat_0'
>>> or 'lon_0'. However,
>>> there should have been a warning indicating this fact and the dimension
>>> names are misleading and seems to indicate a bug. They should have 'x'
>>> and
>>> 'y' in their names rather than 'lat' and 'lon'. Implementing coordinates
>>> for
>>> the space-view perspective grid is on the active priority list, and
>>> hopefully will be completed soon.
>>
>> Sounds good. Would there be a way to output some information on the
>> coordinates that would give me a way to convert to lat/lon? I guess I
>> could also go the route of converting the data to some other format
>> (via the ECMWF GRIB2 library
>> [http://www.ecmwf.int/products/data/software/grib2.html]) first.
>>
>>> 4) The Lo1 and La1 attributes for the lat_1, lon_1 coordinates seem to be
>>> incorrect as well.
>>
>> Thanks,
>> Matt
>>
>> On Thu, May 14, 2009 at 3:16 PM, David Brown <dbrown_at_ucar.edu> wrote:
>>>
>>> Hi Matthew,
>>>
>>> I can explain some aspects of your problem, but there are others that are
>>> a
>>> mystery and seem to indicate problems. It would be good either if you can
>>> tell us where to download a sample file or else if you can upload a
>>> sample
>>> to ftp.cgd.ucar.edu:
>>>
>>> (
>>> ftp ftp.cgd.ucar.edu
>>> log in as anonymous;
>>> cd incoming
>>> binary
>>> put <filename>
>>> and then send email telling us the name of the file.
>>> )
>>>
>>> Here is what I can tell you:
>>> 1) the problem with 5.1.0 is a result of a missing flag in the
>>> compilation
>>> of the NCEP-supplied GRIB 2 low-level library. It causes all GRIB 2 files
>>> to
>>> seem empty. It only affects 64-bit versions of NCL so this diagnosis is
>>> based on the assumption that you are using a 64-bit NCL.
>>> 2) The missing parameter entries are visible in your file as variables
>>>  VAR_3_1_98_P30_GLL1 and VAR_3_1_99_P30_GLL1. Coordinate variables in
>>> NCL's
>>> representation of GRIB data are always generated by NCL. They are not
>>> found
>>> in the code tables and therefore do not have parameter numbers.
>>> 3) The space-view perspective grid is not fully supported yet in NCL.
>>> That
>>> is why there are no coordinate variables associated with dimensions
>>> 'lat_0'
>>> or 'lon_0'. However,
>>> there should have been a warning indicating this fact and the dimension
>>> names are misleading and seems to indicate a bug. They should have 'x'
>>> and
>>> 'y' in their names rather than 'lat' and 'lon'. Implementing coordinates
>>> for
>>> the space-view perspective grid is on the active priority list, and
>>> hopefully will be completed soon.
>>> 4) The Lo1 and La1 attributes for the lat_1, lon_1 coordinates seem to be
>>> incorrect as well.
>>>  -dave
>>>
>>>
>>> On May 14, 2009, at 12:09 PM, Matthew Janiga wrote:
>>>
>>>> I'm having some peculiar problems reading the Meteosat Multi-sensor
>>>> precipitation files in GRIB2.
>>>>
>>>> http://oiswww.eumetsat.int/~idds/html/grib.html (MET-9 files)
>>>>
>>>> I have tried using NCL version 5.0.1 and 5.1.0. NCL_filedump in
>>>> version 5.0.1 is able to display most of the variables...
>>>>
>>>>  Copyright (C) 1995-2008 - All Rights Reserved
>>>>  University Corporation for Atmospheric Research
>>>>  NCAR Command Language Version 5.0.1-beta
>>>>  The use of this software is governed by a License Agreement.
>>>>  See http://www.ncl.ucar.edu/ for more details.
>>>> warning: Entry (98) not found in code table file
>>>> /jm12/carl/ncl-5.0.1-beta/lib/n
>>>> carg/grib2_codetables/ecmwf/4/4.2.3.1.table
>>>> warning: Entry (99) not found in code table file
>>>> /jm12/carl/ncl-5.0.1-beta/lib/n
>>>> carg/grib2_codetables/ecmwf/4/4.2.3.1.table
>>>> Variable: f (file variable)
>>>>
>>>> filename:       MPE_20090513_0000_M9_00
>>>> path:   MPE_20090513_0000_M9_00.grb
>>>>  file global attributes:
>>>>  dimensions:
>>>>    lat_0 = 3712
>>>>    lon_0 = 3712
>>>>    lat_1 = 24
>>>>    lon_1 = 24
>>>>  variables:
>>>>    float INSTRR_P30_GSV0 ( lat_0, lon_0 )
>>>>       center :       EUMETSAT Operation Centre
>>>>       production_status :    Operational test products
>>>>       long_name :    Instantaneous rain rate
>>>>       units :        kg m-2 s-1
>>>>       _FillValue :   -999
>>>>       grid_type :    Space view perspective or orthographic
>>>>       parameter_discipline_and_category :    Space products, Moisture
>>>>       parameter_template_discipline_category_number :        ( 30, 3, 1,
>>>> 1 )
>>>>       initial_time : 05/13/2009 (00:00)
>>>>
>>>>    float VAR_3_1_98_P30_GLL1 ( lat_1, lon_1 )
>>>>       center :       EUMETSAT Operation Centre
>>>>       production_status :    Operational test products
>>>>       long_name :    unknown variable name
>>>>       units :        unknown
>>>>       _FillValue :   -999
>>>>       grid_type :    Latitude/longitude
>>>>       parameter_discipline_and_category :    Space products, Moisture
>>>>       parameter_template_discipline_category_number :        ( 30, 3, 1,
>>>> 98 )
>>>>       initial_time : 05/13/2009 (00:00)
>>>>
>>>>    float VAR_3_1_99_P30_GLL1 ( lat_1, lon_1 )
>>>>       center :       EUMETSAT Operation Centre
>>>>       production_status :    Operational test products
>>>>       long_name :    unknown variable name
>>>>       units :        unknown
>>>>       _FillValue :   -999
>>>>       grid_type :    Latitude/longitude
>>>>       parameter_discipline_and_category :    Space products, Moisture
>>>>       parameter_template_discipline_category_number :        ( 30, 3, 1,
>>>> 99 )
>>>>       initial_time : 05/13/2009 (00:00)
>>>>
>>>>    float lat_1 ( lat_1 )
>>>>       long_name :    latitude
>>>>       grid_type :    Latitude/Longitude
>>>>       units :        degrees_north
>>>>       Dj :   95.97755
>>>>       Di :   2.608696
>>>>       Lo2 :  60
>>>>       La2 :  60
>>>>       Lo1 :  -1e-06
>>>>       La1 :  -2147.484
>>>>
>>>>    float lon_1 ( lon_1 )
>>>>       long_name :    longitude
>>>>       grid_type :    Latitude/Longitude
>>>>       units :        degrees_east
>>>>       Dj :   95.97755
>>>>       Di :   2.608696
>>>>       Lo2 :  60
>>>>       La2 :  60
>>>>       Lo1 :  -1e-06
>>>>       La1 :  -2147.484
>>>>
>>>> However, lat_0 and lon_0 are not displayed I assume they are entry 98
>>>> and 99. I also have tried using NCL_filedump from version 5.1.0 which
>>>> results in the following....
>>>>
>>>>  Copyright (C) 1995-2009 - All Rights Reserved
>>>>  University Corporation for Atmospheric Research
>>>>  NCAR Command Language Version 5.1.0
>>>>  The use of this software is governed by a License Agreement.
>>>>  See http://www.ncl.ucar.edu/ for more details.
>>>> Variable: f (file variable)
>>>>
>>>> filename:       MPE_20090513_1500_M9_00
>>>> path:   MPE_20090513_1500_M9_00.grb
>>>>  file global attributes:
>>>>  dimensions:
>>>>  variables:
>>>>
>>>> Is NCL simply missing the necessary tables? Since I use NCL for most
>>>> image processing it would be quite helpful if I didn't have to convert
>>>> these files into some other format before reading them into NCL.
>>>>
>>>> Much appreciated!
>>>> Matt
>>>>
>>>> --
>>>> **********************************
>>>> Matthew A. Janiga
>>>> Department of Earth and Atmospheric Sciences, ES 330
>>>> University at Albany / State University of New York
>>>> 1400 Washington Avenue
>>>> Albany, NY 12222
>>>> PH: (847) 962-8397
>>>> Email: janiga_at_atmos.albany.edu
>>>> **********************************
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>>
>>
>> --
>> **********************************
>> Matthew A. Janiga
>> Department of Earth and Atmospheric Sciences, ES 330
>> University at Albany / State University of New York
>> 1400 Washington Avenue
>> Albany, NY 12222
>> PH: (847) 962-8397
>> Email: janiga_at_atmos.albany.edu
>> **********************************
>
>

-- 
**********************************
Matthew A. Janiga
Department of Earth and Atmospheric Sciences, ES 330
University at Albany / State University of New York
1400 Washington Avenue
Albany, NY 12222
PH: (847) 962-8397
Email: janiga_at_atmos.albany.edu
**********************************
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 15 2009 - 19:01:12 MDT

This archive was generated by hypermail 2.2.0 : Tue May 19 2009 - 09:17:29 MDT