CDO, NCL, & NCO Installation

This tutorial demonstrates how to use the conda package manager to easily install Climate Data Operator (CDO), NCAR Command Language (NCL), & netCDF Operators (NCO) climate data processing tools. If you want to process, manipulate, & generate high-quality plots from climate & weather data, you need to familiarize yourself with these tools.
The main advantage of installing these packages with the conda package manager is that it separates environments, which prevents conflicting dependencies between different libraries & versions. First, you need to install Anaconda or Miniconda on your system. If you haven’t already installed these package & environmental managers, you can do so by following the instructions in my previous post.
Installing CDO
CDO is a collection of command line operators for manipulating & analyzing climate model & observational data. It supports importing & exporting files in a variety of formats, including GRIB1/2, netCDF 3/4, SERVICE, EXTRA, & IEG. It’s also equipped with over 600 operators that are vital for climate studies.
To install CDO, launch the Ubuntu terminal or Anaconda prompt & run the following commands:
Add a new environmental variable named CDO_environment:
conda create --name CDO_environmentWhen prompted, press y & Enter
Once the CDO_environment is created, activate it by typing:
conda activate CDO_environmentInstall the CDO package:
conda install -c conda-forge cdoTo know the CDO version, type:
cdo -VIf you receive a version number, you have successfully installed the CDO package.
To exit the CDO environment, simply type:
conda deactivateInstalling NCL
NCL is an interpreted language developed by National Center for Atmospheric Research for the analysis & visualization of climate & weather data. It supports importing & exporting files in a variety of formats, including netCDF, GRIB, HDF, HDF-EOS, & shapefiles. It is also capable of producing high-quality plots.
To install NCL, launch the Ubuntu terminal or Anaconda prompt & run the following commands:
Add a new environmental variable named NCL_environment:
conda create --name NCL_environmentWhen prompted, press y & Enter
Once the NCL_environment is created, activate it by typing:
conda activate NCL_environmentInstall the NCL package:
conda install -c conda-forge nclTo know the NCL version, type:
ncl -VIf you receive a version number, you have successfully installed the NCL package.
To exit the NCL environment, simply type:
conda deactivateInstalling NCO
NCO is a set of open source command-line tools for analyzing, processing, viewing, & manipulating netCDF files. It was developed by atmospheric scientists at UC-Irvine.
To install NCO, launch the Ubuntu terminal or Anaconda prompt & run the following commands:
Add a new environmental variable named NCO_environment:
conda create --name NCO_environmentWhen prompted, press y & Enter
Once the NCO_environment is created, activate it by typing:
conda activate NCO_environmentInstall the NCO package:
conda install -c conda-forge ncoAfter the installation is completed, exit the NCO environment by typing:
conda deactivateNow, to use these tools, you can use the conda activate command. For example, to use the CDO package, simply type:
conda activate CDO_environmentWhen you have completed your work with your CDO, type:
conda deactivateFollow the same procedure to work with other packages.
Well done! 🥇🥇🥇 Your feedback is greatly appreciated!!!

Leave a Comment