Re: [netcdfgroup] Converting record dimension to non-record dimension

Joe,

Here is another method if NCO doesn't get it done. This is a trick to remove the "unlimited" characteristic on a named dimension. This method is relatively slow, but it has the advantage of simplicity and nothing new to install. This is in the general class of:

  ncdump in.nc | user hack | ncgen -o out.nc

Here is a specific example to remove unlimited. Change the dim name and integer value to match your file. C shell syntax:

  set str1 = 'time = UNLIMITED ; // (24350 currently)'
  set str2 = 'time = 24350 ;'
  ncdump in.nc | sed -e "s#^.$str1# $str2#" | ncgen -o out.nc

By the way, the whole file must *always* be rewritten at least once when changing "unlimited". Due to the internal structure of Netcdf 3 files, it is impossible to switch the unlimited characteristic on or off in place.

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)

Joe Sirott wrote:
Does anyone know of a utility that will convert a large netCDF file that has a record dimension to a file that contains no record dimension at all?

--Joe
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/



  • 2007 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: