[ncl-talk] problem encountered when converting grib to nc

David Brown dbrown at ucar.edu
Wed Apr 15 11:28:55 MDT 2015


The file you are looking at has numerous level coordinates with
different numbers of elements. The GrADS tool that creates the
ctl file apparently picked a different level to use as the the zdef
definition. Here's a list of the dimensions output by NCL for a GRIB2
version of the file:

 lv_ISBL0 = 26
 lv_AMSL1 = 3
 lv_DBLL2 = 4
 lv_PVL3 = 2
 lv_ISBL4 = 21
 lv_SIGL5 = 4
 lv_ISBL6 = 2
 lv_ISBL7 = 6

GrADS seems to have picked what NCL calls lv_ISBL7 rather than
lv_ISBL0 for zdef. You would have to ask a GrADS person to learn how
to control which level coordinate is used for zdef.
 -dave


On Wed, Apr 15, 2015 at 6:19 AM, HAVENER, KEVIN F GS-12 USAF ACC 14
WS/WXED <kevin.havener at us.af.mil> wrote:
> I use ncl_convert2nc all the time in my job.  If ncl_filedump of the grib and resulting nc files give the same information then nothing is wrong with the conversion.  Given the complete "usualness" of NCEP FNL, I suspect a GrADS problem, not an NCL problem.  Can't help you there, not a GrADS user.
>
> Kevin Havener
>
> -----Original Message-----
> From: ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] On Behalf Of LI Qi
> Sent: Wednesday, April 15, 2015 7:45 AM
> To: ncl-talk
> Subject: [ncl-talk] problem encountered when converting grib to nc
>
> Dear NCL Community,
>
> I use ncl_convert2nc to convert grib formatted NCEP FNL analysis to netcdf file.
>
> Then I open the nc data in GrADS, but its descriptor file is different from the initial grib-formatted one (attached are the two data descriptions). What was wrong?
>
> -------------------------------
> description of the grib data
> -------------------------------
>
> dset D:\fnl\20110613\fnl_2011%m2%d2_%h2_00_c
> index D:\fnl\20110613\fnl_20110613_06_00_c.idx
> undef 9.999E+20
> title D:\fnl\20110613\fnl_20110613_06_00_c
> *  produced by grib2ctl v0.9.12.5p39c
> dtype grib 3
> options template
> options yrev
> ydef 181 linear -90.000000 1
> xdef 360 linear 0.000000 1.000000
> tdef 1 linear 06Z13jun2011 6hr
> *  z has 26 levels, for prs
> zdef 26 levels
> 1000 975 950 925 900 850 800 750 700 650 600 550 500 450 400 350 300 250 200 150 100 70 50 30 20 10 vars 137 no4LFTXsfc  0 132,1,0  ** surface Best (4-layer) lifted index [K] no5WAVA500mb  0 230,100,500 ** 500 mb 5-wave geopot. height anomaly [gpm] no5WAVH500mb  0 222,100,500 ** 500 mb 5-wave geopotential height [gpm] ABSVprs 26 41,100,0 ** (profile) Absolute vorticity [/s] ACPCPsfc  0 63,1,0  ** surface Convective precipitation [kg/m^2] ALBDOsfc  0 84,1,0  ** surface Albedo [%] ...
> -------------------------------
> description of the converted nc data
> -------------------------------
> dset D:\fnl\20110613\fnl_20110613_06_00_c.nc
> title NCL: convert-GRIB-to-netCDF
> undef 1e+20
> dtype netcdf
> xdef 360 linear 0 1
> ydef 181 linear -90 1
> zdef 6 levels 100 70 50 30 20 10
> tdef 1 linear 00Z01JAN0001 1mn
> vars 95
> PRES_3_SFC=>pres_3_sfc  0  y,x  Pressure PRES_3_MWSL=>pres_3_mwsl  0  y,x  Pressure PRES_3_TRO=>pres_3_tro  0  y,x  Pressure PRES_3_MSL=>pres_3_msl  0  y,x  Pressure PRES_3_LCBL_ave=>pres_3_lcbl_ave  0  y,x  Pressure PRES_3_LCTL_ave=>pres_3_lctl_ave  0  y,x  Pressure PRES_3_MCBL_ave=>pres_3_mcbl_ave  0  y,x  Pressure PRES_3_MCTL_ave=>pres_3_mctl_ave  0  y,x  Pressure PRES_3_HCBL_ave=>pres_3_hcbl_ave  0  y,x  Pressure PRES_3_HCTL_ave=>pres_3_hctl_ave  0  y,x  Pressure PRMSL_3_MSL=>prmsl_3_msl  0  y,x  Pressure reduced to MSL ...
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk


More information about the ncl-talk mailing list