I've been trying to change the time dimension back to unlimited in a NetCDF file and haven't been successful. I made a new file and appended everything together:
dimensions:
lon = UNLIMITED ; // (71 currently)
lat = 36 ;
expver = 2 ;
time = 1000 ;
variables:
double lon(lon) ;
lon:standard_name = "longitude" ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
lon:axis = "X" ;
double lat(lat) ;
lat:standard_name = "latitude" ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
lat:axis = "Y" ;
int expver(expver) ;
expver:long_name = "expver" ;
expver:axis = "Z" ;
int time(time) ;
time:standard_name = "time" ;
time:long_name = "time" ;
time:units = "hours since 1900-01-01 00:00:00.0" ;
time:calendar = "gregorian" ;
time:axis = "T" ;
short t2m(lon, lat, expver, time) ;
t2m:long_name = "2 metre temperature" ;
t2m:units = "K" ;
t2m:add_offset = 256.094308687104 ;
t2m:scale_factor = 0.00181231329107926 ;
t2m:_FillValue = -32767s ;
t2m:missing_value = -32767s ;
After changing the order of the variables in t2m (from time,lon,lat,expver to lon,lat,expver,time) as needed in the program I'm running on Linux, it changes the lon dimension to unlimited and the time to fixed.
I've tried re-appending, lots of ncks commands, and really any combination that gives me time as unlimited. Once I have to put everything together, the time variable always goes to fixed.
I've taken the first four variables out, put them into a new file, taken t2m out, put them into a new file, and then tried to append it all together, which I get this error:
ERROR: nco_def_var() failed to nc_def_var() variable "t2m" nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_def_var() nco_err_exit(): ERROR Error code is -47. Translation into English with nc_strerror(-47) is "NetCDF: NC_UNLIMITED in the wrong index" nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)
Does anyone know how I can just change time back to unlimited and lon to fixed without changing the order of anything?