user308827
user308827

Reputation: 21981

Modify and add to netcdf attributes

I have a netCDF file with the foll. information on one of the dimensions:

int time(time=100);
  :units = "calendar_year as %Y";
  :_ChunkSizes = 1048576; // int

Are there any tools available e.g. nco that can modify the attributes like so:

int time(time=100);
   :units = "year as %Y.%f" ;
   :calendar = "proleptic_gregorian" ;
   :_ChunkSizes = 1048576; // int

Upvotes: 0

Views: 2206

Answers (1)

Charlie Zender
Charlie Zender

Reputation: 6352

@user308827 is right...

ncatted -a 'units,time,o,c,"year as %Y.%f"' -a 'calendar,time,o,c,"proleptic_gregorian"' in.nc out.nc

Upvotes: 3

Related Questions