Re: FullPos Grib files from french model ARPEGE

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Fri, 6 Mar 2009 17:19:47 -0700

Hi Yann,

Oliver is correct that NCL currently is not able to decode gridded
data with complex packing (it does decode spherical harmonic data
with complex packing). I am modifying the code to at least return a
message to that effect. Hopefully we can add this capability before
too long, but you will have to figure out another way to read this
data for the time being.

As far as the "unknown parameter" messages are concerned, if you send
or point us to a table that contains the correct parameter
information, we will incorporate it as a built-in table.
  -dave

On Mar 5, 2009, at 11:56 PM, <Oliver.Fuhrer_at_meteoswiss.ch> wrote:

> Dear Yann,
>
> I am not an expert in ARPEGE, but it seems to me that you will have
> to do two things to get NCL to read your files...
>
> - First, it seems that NCL and wgrib do not support second order
> packed grib files (see http://www.nco.ncep.noaa.gov/pmb/docs/on388/
> table11.html of the grib1 standard, its bit 2 in octet 4 of the
> BDS). You will have to switch off second order packing of your grib
> files. I think for the ARPEGE model this can be controlled with the
> NFPGRIB and NVGRIB switches. I do not know the FullPos software,
> but maybe it has the option to control the coding of the grib files
> once more and you can simply change a namelist switch there.
>
> - Second, you will have to create the grib tables for your model in
> order to avoid the "Unknown parameter number detected" warnings and
> for variable names to show up correctly in NCL. There are
> instructions of how to do that under the topic "User-defined GRIB1
> parameter tables" on the page http://www.ncl.ucar.edu/Document/
> Manuals/Ref_Manual/NclFormatSupport.shtml#GRIB . I would suggest
> you start with one variable in your grib1 files to see if it works.
>
> Hope this helps,
> Oliver
>
> ________________________________________
>
> Oliver Fuhrer
> Numerical Models
>
> Federal Departement of Home Affairs FDHA
> Federal Office of Meteorology and Climatology MeteoSwiss
>
> Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland
>
> Tel. +41 44 256 93 59
> Fax +41 44 256 92 78
> oliver.fuhrer_at_meteoswiss.ch
> www.meteoswiss.ch - First-hand information
>
>
>
>> -----Original Message-----
>> From: ncl-talk-bounces_at_ucar.edu
>> [mailto:ncl-talk-bounces_at_ucar.edu] On Behalf Of Michel Yann
>> Sent: Donnerstag, 5. März 2009 22:16
>> To: ncl-talk_at_ucar.edu
>> Subject: FullPos Grib files from french model ARPEGE
>>
>>
>> Hi NCL talk,
>>
>> I am currently encountering a problem while trying to read
>> grib files from ARPEGE, which is the Meteo-France Global
>> Spectral model. The files are post-process by a software
>> called FullPos that interpolates files in physical space on a
>> regular lat-lon grid and then converts to grib 1 format.
>> http://www.cnrm.meteo.fr/gmapdoc/spip.php?article17
>> http://www.cnrm.meteo.fr/gmapdoc/spip.php?article157
>>
>> I used to work on these files with the ECMWF Metview Software.
>> http://www.ecmwf.int/products/data/software/metview.html
>>
>> Unfortunately, reading these files with ncl proved to be
>> difficut. First, it provides first a warning about unknown
>> variables, e.g.
>> warning:NclGRIB: Unknown grib parameter number detected (153,
>> center 85, table version 1 grib record 3), using default
>> variable name (VAR_153)
>>
>> and then the decoded fields appear to be full of 0 e.g.
>> Variable: PRMSL
>> Type: float
>> Total Size: 290324 bytes
>> 72581 values
>> Number of Dimensions: 2
>> Dimensions and sizes: [g0_lat_0 | 181] x [g0_lon_1 | 401]
>> Coordinates:
>> g0_lat_0: [80..-10]
>> g0_lon_1: [-100..100]
>> Number Of Attributes: 11
>> center : French Weather Service - Toulouse
>> long_name : Pressure reduced to MSL
>> units : Pa
>> _FillValue : -999
>> level_indicator : 102
>> gds_grid_type : 0
>> parameter_table_version : 1
>> parameter_number : 2
>> forecast_time : 36
>> forecast_time_units : hours
>> initial_time : 10/01/2006 (18:00)
>> (0,0) 0
>> (0,1) 0
>> (0,2) 0
>> (0,3) 0
>> (0,4) 0
>> (0,5) 0
>> (0,6) 0
>> (0,7) 0
>> (0,8) 0
>> (0,9) 0
>> (0,10) 0
>> (0,11) 0
>> (0,12) 0
>> (0,13) 0
>> ...
>>
>> The NCEP wgrib
>> (http://www.cpc.ncep.noaa.gov/products/wesley/wgrib.html)
>> software can read the header, but then complains about
>> "complex packing"
>>
>> latlon: lat 80.000000 to -10.000000 by 0.500000 nxny 7043
>> long -100.000000 to 100.000000 by 0.500000, (7043 x
>> 1) scan 0 mode 128 bdsgrid 1
>> *** Cannot decode complex packed fields n=7043***
>>
>> I then decided to try to mail this list as my programming
>> experience in grib is limited.
>> If you happen to need this, an example grib file may be found
>> on elder.mmm.ucar.edu
>> /users/yann/GRIB/62L3_fc_GRIDHSTATOURX05+0036.grb
>>
>> Thanks for help and advice!
>> Best regards,
>>
>> Yann MICHEL
>>
>>
>> NCL provides read-only support for data in GRIB1 and GRIB2
>> formats. To open a file, you only need to know that the file
>> is GRIB. NCL figures out which version of GRIB is in the file
>> and processes the file accordingly. NCL's support for GRIB is
>> an evolving process. As an ever more diverse set of GRIB
>> files have been encountered, NCL has been improved to handle
>> many more features of the GRIB format. However, since GRIB
>> has many features that are obscure enough that they have
>> never been encountered in practice by the NCL developers,
>> there are still some aspects of GRIB that NCL does not handle
>> properly. Generally, the NCL developers try to support
>> features that appear in GRIB files that users are actually
>> using. The best way to help improve the GRIB-decoding
>> capabilities of NCL is to call attention to files that are
>> important to your work but that NCL does not seem to
>> interpret correctly. If you have problems reading a
>> particular set of GRIB files, please send email to
>> ncl-talk_at_ucar.edu. You will need to subscribe
>> <http://mailman.ucar.edu/mailman/listinfo/ncl-talk> first,
>> if you haven't already.
>>
>> PS here is my simple NCL script
>> ;*******************************************************
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>> ;************************************************
>> begin
>> grb_file = addfile("62L3_fc_GRIDHSTATOURX05+0036.grb","r")
>> PRMSL = grb_file->PRMSL_GDS0_MSL
>> print(PRMSL)
>> ;************************************************
>> ; create default plot
>> ;************************************************
>> wks = gsn_open_wks("ps","ers40") ; open a ps file
>> gsn_define_colormap(wks,"BlAqGrYeOrRe") ; choose colormap
>>
>> res = True ; plot mods desired
>> res_at_cnFillOn = True ; turn on color fill
>> res_at_cnLinesOn = False ; turn off
>> contour lines
>> res_at_gsnSpreadColors = True ; use full
>> range of color map
>>
>> plot = gsn_csm_contour_map_ce(wks,PRMSL(:,:),res)
>> end
>>
>>
>>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 06 2009 - 17:19:47 MST

This archive was generated by hypermail 2.2.0 : Mon Mar 09 2009 - 21:47:10 MDT