Useful Tools: Difference between revisions

Line 17: Line 17:
=== Extract time(s) from a file ===
=== Extract time(s) from a file ===


To extract a single (or multiple) year from a multi-step file, you can use <tt>selyear</tt>,''year'':
To extract a single (or multiple) year from a multi-step file, you can use <tt>selyear</tt>,''year''. For multiple years, you can either do <tt>cdo '''selyear,1999,2000,2001'''</tt> or <tt>cdo '''selyear,1999/2001'''</tt>.


  $ cdo sinfon pchem.species.CMIP-5.1870-2097.z_91x72.nc4
  $ cdo sinfon pchem.species.CMIP-5.1870-2097.z_91x72.nc4