Project

General

Profile

Using cdo for changing file metadata

Added by Ciara O'Hara about 10 years ago

Hi,

I have 100 NetCDF files (generated by someone else) that have the year 2000 saved as 2001 in the metadata. Does anyone know a way that I can change this? Any plot I generate isn't correct.

Also I have run splitmon and timavg on the files so that I have an average monthly temperature, but the metadata Date information is given as 2001-01-31, for example. How do I get cdo to drop the year and day data, as it is irrelevant, and just show the year, so that plots are nicer?

Any help would be appreciated,

Regards,
Ciara


Replies (2)

RE: Using cdo for changing file metadata - Added by Jaison-Thomas Ambadan about 10 years ago

Hi,

that have the year 2000 saved as 2001 in the metadata. Does anyone know a way that I can change this?

you may use the settaxis operator to correct the time axis. Pleas have a look at the SETTIME operators in CDO doc section 2.6.2 here: https://code.zmaw.de/projects/cdo/embedded/current/cdo.html#x1-1620002.6.2

How do I get cdo to drop the year and day data

just select the time steps that you want, using either seltimestep or seldate operators. Have a look at the CDO doc section 2.3.3 here: https://code.zmaw.de/projects/cdo/embedded/current/cdo.html#x1-1160002.3.3

Cheers,
J.

RE: Using cdo for changing file metadata - Added by Ciara O'Hara about 10 years ago

Hi J,

Thanks very much!

Sorry for the late reply!

Ciara

    (1-2/2)