[NCO:ncks] extract/select depth level (temp)


I have had a hard time looking for the function which can extract depth from z-axis in temperature file while analyzing climate data (CMIP5)


CDO (1.8.2)(my favorite tool!!!) may have the function “sellevel”, but it seems not ready to use. It just made me waste time with massive unsolved questions.


Besides, NCO provides a very simple method using “ncks”


For extracting 10th depth from temperature data.

> ncks -F -d depth,10 input.nc output.nc

-d depth: find data at “10”th axis from “depth” variable. (you can find the name of depth variable after typing “ncdmp -h filename.nc”)

input.nc: temperature data with depth level.

output.nc: output data at “10”th axis.


So, Simple 🙂







Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.