CCR logo

Nelson Home | UW Home | My UW | Map

click to support CCR

Get the latest on UW-Madison's COVID-19 Response
View updates to campus operations, information, and planning: Learn more

ABOUT
  • About CCR
  • Mission
  • Bryson Scholarship
  • Support CCR
  • Affiliated Institutions
  • Contact
PEOPLE
  • Meet the Director
  • Faculty, Scientists and Researchers
  • Administrators
  • Postdoctoral Scientists
  • Students
  • Affiliates
  • Climate Change Experts
  • Emeritus
NEWS
  • News Archive
  • Research Spotlight
EVENTS
  • CPEP Seminars
  • Climate Change Symposium
  • AOS Colloquium Series
  • Weston Roundtable Series
  • Past Events
CPEP
  • CPEP Seminars
  • Bryson Professors
  • Postdoctoral Fellows and Students
  • Seed Grants
RESEARCH
  • Publications
  • Carbon Cycling
  • Climate Impacts and Vulnerability
  • Climate Dynamics
  • Oceanography and Limnology
  • Past Climates
  • Surface-Atmosphere Feedbacks
RESOURCES
  • Visualization and Tools
  • Data
  • Scripts
  • Facilities and Equipment
  • Climate Jobs
click to toggle subnavRELATED LINKS
RESOURCES
Visualizations and Tools »
Data »
Scripts »
Facilities and Equipment »
Climate Jobs »

NCO

NCKS

NCEA | NCRCAT | NCKS | NCDIFF | NCRENAME | NCRCAT | NCDTRND | ORO

Ncks - or nc kitchen sink - is probably the most useful of the NCO operators. You can use it to extract a variable from a file, or to extract multiple variables, or to get variables at certain times or geographical areas. It's especially helpful for when you are moving files from NCAR to CCR. You can extract just the variables you want, making the file sizes much smaller and more manageable.

EXAMPLE:

Extract a single variable from a netCDF file:
ncks -v PRECTMM,PSLEVMB,CLOUD GEN2AGCM-CONB-MONE0509.nc GEN2AGCM-CONB-SEAE0509.3vars.nc

EXAMPLE:

Extract a single variable from a netCDF file for the month of June from a mone file.

Note: NCO counts from zero. To count from one, use the -F flag in any operation.
ncks -d time,5 -v PRECTMM GEN2AGCM-CONB-MONE0509.nc GEN2AGCM-CONB-MONE0509.prectmm.may.nc

You would get the same result using the following:
ncks -F -d time,6 -v PRECTMM GEN2AGCM-CONB-MONE0509.nc GEN2AGCM-CONB-MONE0509.prectmm.may.nc

click to visit the Nelson website
click to visit Nelson on Facebook click to visit Nelson on Twitter

CONTACT US:


Nelson Institute Center for Climatic Research
University of Wisconsin-Madison
1225 W. Dayton St.
Madison, WI 53706 USA
(608) 262-2839
(608) 263-4190 (FAX)

PARTNERSHIPS



  • Support CCR
  • CCR affiliates
University of Wisconsin Madison logo
Copyright © 2021 The Board of Regents of the University of Wisconsin System. Feedback, questions or accessibility issues: