Re: grib2 fie read

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Tue Sep 25 2012 - 14:00:47 MDT

Yes you are right. But that is what I fixed. Here is what the script you posted below produces with the new fix (which will be available in NCL 6.1.0 soon):

ncl testlc.ncl
 Copyright (C) 1995-2012 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.1.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
warning: Entry (3) not found in code table file /usr/local/ncarg/lib/ncarg/grib2_codetables/ncep/4/4.2.2.4.table
(0)
(0) latitude: min=-9.81736 max=79.0161

Variable: lat
Type: float
Total Size: 2987436 bytes
            746859 values
Number of Dimensions: 2
Dimensions and sizes: [ygrid_0 | 723] x [xgrid_0 | 1033]
Coordinates:
Number Of Attributes: 11
  corners : ( 45.7454, 40.18576, -9.817359, -7.761102 )
  long_name : latitude
  grid_type : Lambert Conformal (secant, tangent, conical or bipolar)
  units : degrees_north
  Latin2 : 60
  Latin1 : 20
  Dy : 12
  Dx : 12
  Lov : 264
  Lo1 : 161.7229
  La1 : 45.7454

(0) longitude: min=-179.998 max=179.997

Variable: lon
Type: float
Total Size: 2987436 bytes
            746859 values
Number of Dimensions: 2
Dimensions and sizes: [ygrid_0 | 723] x [xgrid_0 | 1033]
Coordinates:
Number Of Attributes: 11
  corners : ( 161.7229, 9.320208, -49.89021, -138.3654 )
  long_name : longitude
  grid_type : Lambert Conformal (secant, tangent, conical or bipolar)
  units : degrees_east
  Latin2 : 60
  Latin1 : 20
  Dy : 12
  Dx : 12
  Lov : 264
  Lo1 : 161.7229
  La1 : 45.7454

On Sep 25, 2012, at 1:13 PM, Luo, Chao wrote:

> Hi Dave,
>
> I am using ncl-6.1.0-beta too. My concern is that when I print out lat and lon (even used your script):
> (0) latitude: min=36.144 max=1e+12
> (0) longitude: min=-179.995 max=1e+12
>
> The max values of lat and lon are 1e+12, which I think it's not "correct".
>
> Thanks much,
>
> CL
>
> From: "David Brown" <dbrown@ucar.edu>
> To: "Chao Luo" <chao.luo@eas.gatech.edu>
> Cc: "ncl-talk" <ncl-talk@ucar.edu>
> Sent: Tuesday, September 25, 2012 11:10:41 AM
> Subject: Re: grib2 fie read
>
> I am not sure what you mean by "correctly". As I stated below, there is indeed a bug in NCL 6.1.0-beta (and previous versions), that has been fixed. The issue with the parameter number is not fixable in general because neither NCEP nor ECMWF have an entry for parameter 3 in this particular table. All this means is that the variable has unknown units and name. It still will display correctly. If you know what the variable is supposed to represent you could add an entry in your own copy of 4.2.2.4.table. The format should be fairly self explanatory if you look at the entries for some other parameters.
> I am attaching a copy of the plotting output from this data file, using a slightly modified version of the example script lcnative_2.ncl. I'll attach the script as well, though you will not be able to get the same results without NCL 6.1.0. If you need a binary with the fix immediately we can get you one, but the new release is due out very soon now.
> -dave
>
>
>
> On Sep 24, 2012, at 10:06 PM, Luo, Chao wrote:
>
> Hi Dave,
>
> Thanks for your email and help! I was wondering if there is a way to read theses GRIB2 files correctly. I think these GRIB2 files may not be in error.
>
> Thanks much,
>
> CL
>
> From: "David Brown" <dbrown@ucar.edu>
> To: "Chao Luo" <chao.luo@eas.gatech.edu>
> Cc: "ncl-talk" <ncl-talk@ucar.edu>
> Sent: Monday, September 24, 2012 5:54:35 PM
> Subject: Re: grib2 fie read
>
> HI LC,
> The warning message has nothing to do with the problem you encountered with out-of-range coordinate values. The message simply means that NCL cannot find a table entry for the variable. In this case that is because there is no published entry for parameter 3 in table 4.2.2.4. The GRIB file is either in error or is using an unpublished parameter value. I do think there may have been an earlier version of this table that had indexes 1,2, and 3 instead of 0, 1, and 2.
>
> Regarding the out-of-range coordinate values, that turns out to be a bug in NCL's generation of lambert conformal coordinates. This file has the Y coordinates going from north to south, which is rather unusual (for lambert conformal grids at least). Anyway, the problem has now been fixed. The new code will be available in NCL 6.1.0.
> -dave
>
>
> On Sep 21, 2012, at 2:42 PM, Luo, Chao wrote:
>
> Hi,
>
> I am reading biomass burning area of NOAA satellite grib2 data by using ncl-6.1.0. I print out the latitude of the grib2, and found maximum of latitude is 1.e+12, which is wrong. The error message when I reading the file is:
>
> warning: Entry (3) not found in code table file /data11/cluo/GAfire/ncl-
> 6.1.0/lib/ncarg/grib2_codetables/ncep/4/4.2.2.4.table
>
> I was wondering if this the problem caused by this warning. The NCL script I used is very simple:
>
> begin
> f = addfile("../NOAA_HMS/march_april/grib2/burned_area_20120316_18_23_12km.grib2","r")
> lat = f->gridlat_0(:,:)
> lon = f->gridlon_0(:,:)
> area = f->VAR_2_4_3_P31_GLC0(:,:)
> printMinMax (lat, True)
> printVarSummary (lat)
> end
> ~
> and output is :
>
> Variable: lat
> Type: float
> Total Size: 2987436 bytes
> 746859 values
> Number of Dimensions: 2
> Dimensions and sizes: [ygrid_0 | 723] x [xgrid_0 | 1033]
> Coordinates:
> Number Of Attributes: 11
> corners : ( 45.7454, 40.18576, 1e+12, 1e+12 )
> long_name : latitude
> grid_type : Lambert Conformal (secant, tangent, conical or bipolar)
> units : degrees_north
> Latin2 : 60
> Latin1 : 20
> Dy : 12
> Dx : 12
> Lov : 264
> Lo1 : 161.7229
> La1 : 45.7454
> (0)
> (0) latitude: min=36.144 max=1e+12
>
>
> Thanks very much,
>
> CL
> _______________________________________________
> 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
>
>
> _______________________________________________
> 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 Tue Sep 25 14:00:59 2012

This archive was generated by hypermail 2.1.8 : Wed Sep 26 2012 - 13:56:03 MDT