Getting error to plot skew-T log-p diagram from NetCDF data generated by MET tool pb2nc

From: <mmkamal_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 21 2014 - 18:04:47 MDT

Hi,

I am trying to plot skew-T log-p diagram for Buffalo (72528), NY, USA
station using the following NCL script
(http://www.ncl.ucar.edu/Support/talk_archives/2012/att-2060/skewt_station.ncl) from MET tool "pb2nc" generated NetCDF data set from "NCEP ADP Global Upper Air and Surface Weather Observations (PREPBUFR format)" but getting the following error message. This is the first time I am trying to deal with "pb2nc" generated NetCDF data set, therefore could not come up with a solution. Any help would be greatly
appreciated!

Thanks
Kamal

==============================================

gpc-f101n084-$ ncl 'ncfile="netcdf.gdas.2002072312.nc"'
'station_icao="KBUF"' 'station_synop="72528"' skewt_station.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.

Variable: where_station
Type: integer
Total Size: 4 bytes
             1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 1
   _FillValue : -2147483647
(0) -2147483647

Variable: count_station
Type: integer
Total Size: 4 bytes
             1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) 1

Variable: obs_arr
Type: float
Total Size: 1128060 bytes
             282015 values
Number of Dimensions: 2
Dimensions and sizes: [nobs | 56403] x [obs_arr_len | 5]
Coordinates:
Number Of Attributes: 8
   long_name : array of observation values
   _fill_value : -9999
   columns : hdr_id gc lvl hgt ob
   hdr_id_long_name : index of matching header data
   gc_long_name : grib code corresponding to the observation type
   lvl_long_name : pressure level (hPa) or accumulation interval (sec)
   hgt_long_name : height in meters above sea level (msl)
   ob_long_name : observation value

Variable: obs
Type: integer
Total Size: 4 bytes
             1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 1
   _FillValue : -2147483647
fatal:Subscript out of range, error in subscript #0
fatal:An error occurred reading hdr_vld
fatal:["Execute.c":7743]:Execute: Error occurred at or near line 78 in
file skewt_station.ncl

===========================================================
Header file for NetCDF file generated by MET tools pb2nc
===========================================================

gpc-f101n084-$
/scinet/gpc/Libraries/netcdf-4.1.3/serial_gcc/bin/ncdump -h
netcdf.gdas.2002072312.nc

netcdf netcdf.gdas.2002072312 {
dimensions:
         mxstr = 16 ;
         hdr_arr_len = 3 ;
         obs_arr_len = 5 ;
         nobs = UNLIMITED ; // (56403 currently)
         nhdr = 9253 ;
variables:
         float obs_arr(nobs, obs_arr_len) ;
                 obs_arr:long_name = "array of observation values" ;
                 obs_arr:_fill_value = -9999.f ;
                 obs_arr:columns = "hdr_id gc lvl hgt ob" ;
                 obs_arr:hdr_id_long_name = "index of matching header data" ;
                 obs_arr:gc_long_name = "grib code corresponding to
the observation type" ;
                 obs_arr:lvl_long_name = "pressure level (hPa) or
accumulation interval (sec)" ;
                 obs_arr:hgt_long_name = "height in meters above sea
level (msl)" ;
                 obs_arr:ob_long_name = "observation value" ;
         char hdr_typ(nhdr, mxstr) ;
                 hdr_typ:long_name = "message type" ;
         char hdr_sid(nhdr, mxstr) ;
                 hdr_sid:long_name = "station identification" ;
         char hdr_vld(nhdr, mxstr) ;
                 hdr_vld:long_name = "valid time" ;
                 hdr_vld:units = "YYYYMMDD_HHMMSS" ;
         float hdr_arr(nhdr, hdr_arr_len) ;
                 hdr_arr:long_name = "array of observation station
header values" ;
                 hdr_arr:_fill_value = -9999.f ;
                 hdr_arr:columns = "lat lon elv" ;
                 hdr_arr:lat_long_name = "latitude" ;
                 hdr_arr:lat_units = "degrees_north" ;
                 hdr_arr:lon_long_name = "longitude" ;
                 hdr_arr:lon_units = "degrees_east" ;
                 hdr_arr:elv_long_name = "elevation" ;
                 hdr_arr:elv_units = "meters above sea level (msl)" ;

// global attributes:
                 :FileOrigins = "File
/scratch/j/jcl/mkamal/METv3.0.1/tutorial/out/pb2nc/gdas.2002072312.nc
generated 20140321_233334 UTC on host gpc-f101n084 by the MET pb2nc
tool" ;
                 :MET_version = "V3.0.1" ;
                 :MET_tool = "pb2nc" ;
}

===========================================================================

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 21 18:05:20 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 31 2014 - 11:47:09 MDT