[ncarg-talk] Easy File Input Output

Anthony Larosa larosaant94 at gmail.com
Sun Aug 21 18:46:11 MDT 2016

Good day all,

Just downloaded an archived GFS data file from NOMADS.


Now I convert it to a NetCDF file by the following command:

~/nclDnS/datasets$ ncl_convert2nc gfs_3_20160814_0000_003.grb

It does its thing and works, good now I want to practice with it. Therefore
I use a script from the FAQ question section:

  grib_file  = addfile("gfs_3_20160814_0000_003.grb","r")  ; Open GRIB file
to read
  ncfile_out = addfile("data.nc","c")             ; Open NetCDF file to

; Write some data to NetCDF file.
  ncfile_out->HGT   = grib_file->HGT_6_SFC
  ncfile_out->A_PCP = grib_file->A_PCP_6_SFC_acc
  ncfile_out->NCPCP = grib_file->NCPCP_6_SFC_acc
  ncfile_out->ACPCP = grib_file->ACPCP_6_SFC_acc
  ncfile_out->CAPE  = grib_file->CAPE_6_SFC


 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:NclGRIB: Unrecognized parameter table (center 7, subcenter 0, table
255), defaulting to NCEP operational table: variable names and units may be
warning:NclGRIB: Unknown grib parameter number detected (255, center 7,
table version 255 grib record 3), using default variable name (VAR_255)
warning:NclGRIB: Unknown grib parameter number detected (191, center 7,
table version 133 grib record 308), using default variable name (VAR_191)
fatal:["Execute.c":6332]:variable (HGT_6_SFC) is not in file (grib_file)
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 7 in file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20160821/3ba06e1a/attachment.html 

More information about the ncarg-talk mailing list