[ncl-talk] ncl_convert2nc trouble

David Brown dbrown at ucar.edu
Fri Nov 4 12:09:31 MDT 2016


The main issue that is causing ncl_convert2nc to fail is that the
output file is too big to use the standard NetCDF3 format. You need to
try either writing to the large file format using the -L option, or if
that doesn't work writing a NetCDF4 classic file with the -nc4c
option.
The other messages are just warnings about individual records that
cannot be fully decoded. Records like the ones that wgrib2 is
reporting like this:
9:1069021:d=2016082900:var discipline=0 master_table=2 parmcat=1
parm=100:1 hybrid level:anl:
10:1099041:d=2016082900:var discipline=0 center=59 local_table=1
parmcat=13 parm=193:1 hybrid level:anl:
11:1736905:d=2016082900:var discipline=0 center=59 local_table=1
parmcat=13 parm=192:1 hybrid level:anl:

You can see that here that wgrib2 does not have tables that contain
these entries so it just lists the values found in the record that
point to where the entry should be if it did exist.
The tables are updated irregularly and NCL 6.3.0 has a snapshot view
of them from sometime before the 6.3.0 release. wgrib2 also has tables
that were current before its latest release. In this case there are
some entries in this file that are still not in the NCEP tables so
they cannot be decoded even if you had the latest tables. NCL warns
about entries like these, but it still in most cases gives you the
data. It will just be given a name that starts with VAR and includes
the discipline, category and parameter number as part of the name.
FYI, GRIB record 9, which causes the first warning in the series
"Entry (100) not found"... , is decoded completely in the current
development version of NCL.
 -dave



On Fri, Nov 4, 2016 at 11:06 AM, M P <mzp3769 at gmail.com> wrote:
> Hello,
> I am trying to use ncl_convert2nc to convert a grib2 file to netcdf and am
> getting these errors.
> Can you help with this problem?
> Thanks,
> Mark
>
> %wgrib2 $file | more
> 1:0:d=2016082900:PRES:1 hybrid level:anl:
> 2:941642:d=2016082900:CLWMR:1 hybrid level:anl:
> 3:949193:d=2016082900:CICE:1 hybrid level:anl:
> 4:949381:d=2016082900:RWMR:1 hybrid level:anl:
> 5:1058056:d=2016082900:SNMR:1 hybrid level:anl:
> 6:1058788:d=2016082900:GRLE:1 hybrid level:anl:
> 7:1059760:d=2016082900:NCONCD:1 hybrid level:anl:
> 8:1068833:d=2016082900:NCCICE:1 hybrid level:anl:
> 9:1069021:d=2016082900:var discipline=0 master_table=2 parmcat=1 parm=100:1
> hybrid level:anl:
> 10:1099041:d=2016082900:var discipline=0 center=59 local_table=1 parmcat=13
> parm=193:1 hybrid level:anl:
> 11:1736905:d=2016082900:var discipline=0 center=59 local_table=1 parmcat=13
> parm=192:1 hybrid level:anl:
> 12:2275680:d=2016082900:TCDC:1 hybrid level:anl:
> 13:2275868:d=2016082900:FRACCC:1 hybrid level:anl:
> 14:2276056:d=2016082900:HGT:1 hybrid level:anl:
> 15:5043461:d=2016082900:TMP:1 hybrid level:anl:
> 16:6261256:d=2016082900:SPFH:1 hybrid level:anl:
> 17:7107101:d=2016082900:UGRD:1 hybrid level:anl:
> 18:8268863:d=2016082900:VGRD:1 hybrid level:anl:
> 19:9404738:d=2016082900:VVEL:1 hybrid level:anl:
> ....
> 100:48575991:d=2016082900:TCDC:5 hybrid level:anl:
> 101:48576179:d=2016082900:FRACCC:5 hybrid level:anl:
> ...
>
>
> %ncl_convert2nc $file
> Processing file: wrfnat_hrconus_00.grib2...
>  Copyright (C) 1995-2015 - All Rights Reserved
>  University Corporation for Atmospheric Research
>  NCAR Command Language Version 6.3.0
>  The use of this software is governed by a License Agreement.
>  See http://www.ncl.ucar.edu/ for more details.
> warning: Entry (100) not found in code table file
> /apps/ncl/6.3.0-nodap_gcc447/lib/ncarg/grib2_codetables/ncep/4/4.2.0.1.table
> warning: NclGRIB2: codetable file
> "/apps/ncl/6.3.0-nodap_gcc447/lib/ncarg/grib2_codetables/ncep/4/4.2.0.11.table"
> not a valid GRIB2 code table.
> warning: Entry (0) not found in code table file
> /apps/ncl/6.3.0-nodap_gcc447/lib/ncarg/grib2_codetables/ncep/4/4.2.table
> warning: Entry (62011) not found in code table file
> /apps/ncl/6.3.0-nodap_gcc447/lib/ncarg/grib2_codetables/ncep/4/4.3.table
> warning: Entry (62010) not found in code table file
> /apps/ncl/6.3.0-nodap_gcc447/lib/ncarg/grib2_codetables/ncep/4/4.3.table
> ncendef: ncid 65536: NetCDF: One or more variable sizes violate format
> constraints
> fatal:NetCDF: Operation not allowed in define mode: error attempting to
> write variable (TMP_P0_L1_GLC0) to file
> (/scratch3/BMC/wrf-chem/pagowski/hrrr_smoke/wrfout/wrfnat_hrconus_00.nc)
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 628 in file
> /tmp/tmp133855-581cbe37.ncl
>
> ncclose: ncid 65536: NetCDF: One or more variable sizes violate format
> constraints
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


More information about the ncl-talk mailing list