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

NCRCAT

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

Ncrcat concatenates (glues together) files across the record dimension, which is usually time. It can be used to create files that contain multiple years of the same month or season, such as "anni" or "juli" files. It may also be used to glue individual year files into a single file, thus creating a "moni" file.

Creating a "moni" file

EXAMPLE:

You have five files, each of which have twelve months of data in them (Jan-Dec). You want to glue them together to create a single file that will contain all the months for five years - a "moni" file. Therefore instead of having five files with twelve months each, you will end up with a file with 60 time steps (5 years of 12 months = 60 months).

Using the files from the previous example, the command would be:
ncrcat -n 5,5,1 ha.F1.PBC_TPBOX.00510.nc ha.F1.PBC_TPBOX.moni.nc

The '-n 5,5,1' convention is the same as for ncea listed above. If you're curious, you can download and look at the new file, ha.F1.PBC_TPBOX.moni.nc, or view the header information for the file.

EXAMPLE:

You have five files, each of which have twelve months of data in them (Jan-Dec). You want to create files that contain 5 years of January, 5 years of February... 5 years of December (i.e., jani,febi,...deci files). You also want to create an "anni" file (5 years of annual average). First we create the individual months files, then the anni file. Using the same files as the above example, the command to create the january individual year file (jani-we call it "moni01") is:

ncrcat -F -d time,1,,12 -n 5,5,1 ha.F1.PBC_TPBOX.00510.nc moni01.nc

To create the febi ("moni02") file, you would change the increment of time to 2:
ncrcat -F -d time,2,,12 -n 5,5,1 ha.F1.PBC_TPBOX.00510.nc moni02.nc

Creating an anni file

And so on. Once you have made the twelve individual files, (moni01.nc through moni12.nc), you can create an anni file using the ncea command:
ncea -p -n 12,2,1 moni01.nc anni.nc

Notice that the file input command "-n 12,2,1" has changed, since we now have 12 input files (moni01-mon12), and each file name has two digits (moni01.nc-moni12.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: