[gradsusr] control file for time as months x years

Andrew Friedman andfried at gmail.com
Mon May 25 13:18:28 EDT 2015


Hi GrADS users,

I’m trying to open a netcdf file where month and year are separate dimensions, rather than 1 dimension of linear time. The ncdump -h output is at bottom.

Do you if it is possible to write a control file for this type of data ordering?

I've tried to write a control file using the following to describe time:
TDEF 96 LINEAR 1Jan2005 1mo

However, GrADS returned an error:

gadxdf error: Missing or invalid dimension size.
  --> The invalid description file record is:
  --> tdef 96 linear 1jan2005 1mo
  The data file was not opened.

Thanks,
Andrew

---------------------------------------------------------------------------------------------------------------------
netcdf HadSLP2r_lowvar_200501-201212 {
dimensions:
	y = 8 ;
	m = 12 ;
	lat = 37 ;
	lon = 72 ;
variables:
	float slp(y, m, lat, lon) ;
		slp:units = "hPa" ;
	float lon(lon) ;
		lon:units = "degrees_east" ;
	float lat(lat) ;
		lat:units = "degrees_north" ;
	int Month(m) ;
	int Years\ since\ 2005(y) ;

// global attributes:
		:history = "Mon May 25 18:57:41 2015: ncatted -a units,lat,m,c,degrees_north HadSLP2r_lowvar_200501-201212.nc\n",
			"Mon May 25 18:56:20 2015: ncatted -a units,lon,m,c,degrees_east HadSLP2r_lowvar_200501-201212.nc\n",
			"Mon May 25 18:09:47 2015: ncpdq --rdr=-lat HadSLP2r_lowvar_200501-201212.nc HadSLP2r_lowvar_200501-201212.nc\n",
			"Mon May 25 18:09:00 2015: ncrename -O -v .Press,slp HadSLP2r_lowvar_200501-201212.nc\n",
			"Mon May 25 18:08:55 2015: ncrename -O -v .Longitude,lon -d .e,lon HadSLP2r_lowvar_200501-201212.nc\n",
			"Mon May 25 18:08:49 2015: ncrename -O -v .Latitude,lat -d .n,lat HadSLP2r_lowvar_200501-201212.nc" ;
		:nco_openmp_thread_number = 1 ;
		:Title = "Monthly mean sea level pressure” ;
---------------------------------------------------------------------------------------------------------------------


More information about the gradsusr mailing list