[gradsusr] problems with displaying netcdf files

Jason Snyder jmssnyder at ucdavis.edu
Mon Dec 7 18:33:27 EST 2015


I generated a netcdf file through wgrib2 xxx.grib2 -nc_grads -append
-netcdf xxx.nc

The output of the grib2 file is:

1:0:d=2015120700:WTMP:surface:anl:
2:5211:d=2015120700:WTMP:surface:12 hour fcst:
3:10513:d=2015120700:WTMP:surface:24 hour fcst:
4:15710:d=2015120700:WTMP:surface:36 hour fcst:
5:21031:d=2015120700:WTMP:surface:48 hour fcst:

which means there are multiple time steps.  When I tried to open the netcdf
file in GrADS I get the following error message:

Scanning self-describing file:  OCEAN_2015120700.nc
gadsdf: Error parsing time units in SDF file.


The ncdump of the output file is attached.  Given this information how can
I convert a grib2 file to netcdf so that I can view the netcdf file in
GrADS?

Thank you for your time.

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20151207/8ac007d8/attachment.html 
-------------- next part --------------
netcdf OCEAN_2015120700 {
dimensions:
	latitude = 601 ;
	longitude = 121 ;
	time = UNLIMITED ; // (5 currently)
variables:
	double latitude(latitude) ;
		latitude:units = "degrees_north" ;
		latitude:long_name = "latitude" ;
	double longitude(longitude) ;
		longitude:units = "degrees_east" ;
		longitude:long_name = "longitude" ;
	double time(time) ;
		time:units = "seconds since 1970-01-01 00:00:00.0 0:00" ;
		time:long_name = "verification time generated by wgrib2 function verftime()" ;
		time:reference_time = 1449446400. ;
		time:reference_time_type = 3 ;
		time:reference_date = "2015.12.07 00:00:00 UTC" ;
		time:reference_time_description = "forecasts or accumulated (including analyses), reference date is fixed" ;
		time:time_step_setting = "auto" ;
		time:time_step = 43200. ;
	float WTMP_surface(time, latitude, longitude) ;
		WTMP_surface:_FillValue = 9.999e+20f ;
		WTMP_surface:short_name = "WTMP_surface" ;
		WTMP_surface:long_name = "Water Temperature" ;
		WTMP_surface:level = "surface" ;
		WTMP_surface:units = "K" ;

// global attributes:
		:Conventions = "COARDS" ;
		:History = "created by wgrib2" ;
		:GRIB2_grid_template = 0 ;
data:

 latitude = -90, -89.875, -89.75, -89.625, -89.5, -89.375, -89.25, -89.125, 
    -89, -88.875, -88.75, -88.625, -88.5, -88.375, -88.25, -88.125, -88, 
    -87.875, -87.75, -87.625, -87.5, -87.375, -87.25, -87.125, -87, -86.875, 
    -86.75, -86.625, -86.5, -86.375, -86.25, -86.125, -86, -85.875, -85.75, 
    -85.625, -85.5, -85.375, -85.25, -85.125, -85, -84.875, -84.75, -84.625, 
    -84.5, -84.375, -84.25, -84.125, -84, -83.875, -83.75, -83.625, -83.5, 
    -83.375, -83.25, -83.125, -83, -82.875, -82.75, -82.625, -82.5, -82.375, 
    -82.25, -82.125, -82, -81.875, -81.75, -81.625, -81.5, -81.375, -81.25, 
    -81.125, -81, -80.875, -80.75, -80.625, -80.5, -80.375, -80.25, -80.125, 
    -80, -79.875, -79.75, -79.625, -79.5, -79.375, -79.25, -79.125, -79, 
    -78.875, -78.75, -78.625, -78.5, -78.375, -78.25, -78.125, -78, -77.875, 
    -77.75, -77.625, -77.5, -77.375, -77.25, -77.125, -77, -76.875, -76.75, 
    -76.625, -76.5, -76.375, -76.25, -76.125, -76, -75.875, -75.75, -75.625, 
    -75.5, -75.375, -75.25, -75.125, -75, -74.875, -74.75, -74.625, -74.5, 
    -74.375, -74.25, -74.125, -74, -73.875, -73.75, -73.625, -73.5, -73.375, 
    -73.25, -73.125, -73, -72.875, -72.75, -72.625, -72.5, -72.375, -72.25, 
    -72.125, -72, -71.875, -71.75, -71.625, -71.5, -71.375, -71.25, -71.125, 
    -71, -70.875, -70.75, -70.625, -70.5, -70.375, -70.25, -70.125, -70, 
    -69.875, -69.75, -69.625, -69.5, -69.375, -69.25, -69.125, -69, -68.875, 
    -68.75, -68.625, -68.5, -68.375, -68.25, -68.125, -68, -67.875, -67.75, 
    -67.625, -67.5, -67.375, -67.25, -67.125, -67, -66.875, -66.75, -66.625, 
    -66.5, -66.375, -66.25, -66.125, -66, -65.875, -65.75, -65.625, -65.5, 
    -65.375, -65.25, -65.125, -65, -64.875, -64.75, -64.625, -64.5, -64.375, 
    -64.25, -64.125, -64, -63.875, -63.75, -63.625, -63.5, -63.375, -63.25, 
    -63.125, -63, -62.875, -62.75, -62.625, -62.5, -62.375, -62.25, -62.125, 
    -62, -61.875, -61.75, -61.625, -61.5, -61.375, -61.25, -61.125, -61, 
    -60.875, -60.75, -60.625, -60.5, -60.375, -60.25, -60.125, -60, -59.875, 
    -59.75, -59.625, -59.5, -59.375, -59.25, -59.125, -59, -58.875, -58.75, 
    -58.625, -58.5, -58.375, -58.25, -58.125, -58, -57.875, -57.75, -57.625, 
    -57.5, -57.375, -57.25, -57.125, -57, -56.875, -56.75, -56.625, -56.5, 
    -56.375, -56.25, -56.125, -56, -55.875, -55.75, -55.625, -55.5, -55.375, 
    -55.25, -55.125, -55, -54.875, -54.75, -54.625, -54.5, -54.375, -54.25, 
    -54.125, -54, -53.875, -53.75, -53.625, -53.5, -53.375, -53.25, -53.125, 
    -53, -52.875, -52.75, -52.625, -52.5, -52.375, -52.25, -52.125, -52, 
    -51.875, -51.75, -51.625, -51.5, -51.375, -51.25, -51.125, -51, -50.875, 
    -50.75, -50.625, -50.5, -50.375, -50.25, -50.125, -50, -49.875, -49.75, 
    -49.625, -49.5, -49.375, -49.25, -49.125, -49, -48.875, -48.75, -48.625, 
    -48.5, -48.375, -48.25, -48.125, -48, -47.875, -47.75, -47.625, -47.5, 
    -47.375, -47.25, -47.125, -47, -46.875, -46.75, -46.625, -46.5, -46.375, 
    -46.25, -46.125, -46, -45.875, -45.75, -45.625, -45.5, -45.375, -45.25, 
    -45.125, -45, -44.875, -44.75, -44.625, -44.5, -44.375, -44.25, -44.125, 
    -44, -43.875, -43.75, -43.625, -43.5, -43.375, -43.25, -43.125, -43, 
    -42.875, -42.75, -42.625, -42.5, -42.375, -42.25, -42.125, -42, -41.875, 
    -41.75, -41.625, -41.5, -41.375, -41.25, -41.125, -41, -40.875, -40.75, 
    -40.625, -40.5, -40.375, -40.25, -40.125, -40, -39.875, -39.75, -39.625, 
    -39.5, -39.375, -39.25, -39.125, -39, -38.875, -38.75, -38.625, -38.5, 
    -38.375, -38.25, -38.125, -38, -37.875, -37.75, -37.625, -37.5, -37.375, 
    -37.25, -37.125, -37, -36.875, -36.75, -36.625, -36.5, -36.375, -36.25, 
    -36.125, -36, -35.875, -35.75, -35.625, -35.5, -35.375, -35.25, -35.125, 
    -35, -34.875, -34.75, -34.625, -34.5, -34.375, -34.25, -34.125, -34, 
    -33.875, -33.75, -33.625, -33.5, -33.375, -33.25, -33.125, -33, -32.875, 
    -32.75, -32.625, -32.5, -32.375, -32.25, -32.125, -32, -31.875, -31.75, 
    -31.625, -31.5, -31.375, -31.25, -31.125, -31, -30.875, -30.75, -30.625, 
    -30.5, -30.375, -30.25, -30.125, -30, -29.875, -29.75, -29.625, -29.5, 
    -29.375, -29.25, -29.125, -29, -28.875, -28.75, -28.625, -28.5, -28.375, 
    -28.25, -28.125, -28, -27.875, -27.75, -27.625, -27.5, -27.375, -27.25, 
    -27.125, -27, -26.875, -26.75, -26.625, -26.5, -26.375, -26.25, -26.125, 
    -26, -25.875, -25.75, -25.625, -25.5, -25.375, -25.25, -25.125, -25, 
    -24.875, -24.75, -24.625, -24.5, -24.375, -24.25, -24.125, -24, -23.875, 
    -23.75, -23.625, -23.5, -23.375, -23.25, -23.125, -23, -22.875, -22.75, 
    -22.625, -22.5, -22.375, -22.25, -22.125, -22, -21.875, -21.75, -21.625, 
    -21.5, -21.375, -21.25, -21.125, -21, -20.875, -20.75, -20.625, -20.5, 
    -20.375, -20.25, -20.125, -20, -19.875, -19.75, -19.625, -19.5, -19.375, 
    -19.25, -19.125, -19, -18.875, -18.75, -18.625, -18.5, -18.375, -18.25, 
    -18.125, -18, -17.875, -17.75, -17.625, -17.5, -17.375, -17.25, -17.125, 
    -17, -16.875, -16.75, -16.625, -16.5, -16.375, -16.25, -16.125, -16, 
    -15.875, -15.75, -15.625, -15.5, -15.375, -15.25, -15.125, -15 ;

 longitude = 15, 15.125, 15.25, 15.375, 15.5, 15.625, 15.75, 15.875, 16, 
    16.125, 16.25, 16.375, 16.5, 16.625, 16.75, 16.875, 17, 17.125, 17.25, 
    17.375, 17.5, 17.625, 17.75, 17.875, 18, 18.125, 18.25, 18.375, 18.5, 
    18.625, 18.75, 18.875, 19, 19.125, 19.25, 19.375, 19.5, 19.625, 19.75, 
    19.875, 20, 20.125, 20.25, 20.375, 20.5, 20.625, 20.75, 20.875, 21, 
    21.125, 21.25, 21.375, 21.5, 21.625, 21.75, 21.875, 22, 22.125, 22.25, 
    22.375, 22.5, 22.625, 22.75, 22.875, 23, 23.125, 23.25, 23.375, 23.5, 
    23.625, 23.75, 23.875, 24, 24.125, 24.25, 24.375, 24.5, 24.625, 24.75, 
    24.875, 25, 25.125, 25.25, 25.375, 25.5, 25.625, 25.75, 25.875, 26, 
    26.125, 26.25, 26.375, 26.5, 26.625, 26.75, 26.875, 27, 27.125, 27.25, 
    27.375, 27.5, 27.625, 27.75, 27.875, 28, 28.125, 28.25, 28.375, 28.5, 
    28.625, 28.75, 28.875, 29, 29.125, 29.25, 29.375, 29.5, 29.625, 29.75, 
    29.875, 30 ;

 time = 1449446400, 1449489600, 1449532800, 1449576000, 1449619200 ;
}


More information about the gradsusr mailing list