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_environment

When prompted, press y & Enter

Once the CDO_environment is created, activate it by typing:

conda activate CDO_environment

Install the CDO package:

conda install -c conda-forge cdo

To know the CDO version, type:

cdo -V

If you receive a version number, you have successfully installed the CDO package.

To exit the CDO environment, simply type:

conda deactivate

Installing 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_environment

When prompted, press y & Enter

Once the NCL_environment is created, activate it by typing:

conda activate NCL_environment

Install the NCL package:

conda install -c conda-forge ncl

To know the NCL version, type:

ncl -V

If you receive a version number, you have successfully installed the NCL package.

To exit the NCL environment, simply type:

conda deactivate

Installing 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_environment

When prompted, press y & Enter

Once the NCO_environment is created, activate it by typing:

conda activate NCO_environment

Install the NCO package:

conda install -c conda-forge nco

After the installation is completed, exit the NCO environment by typing:

conda deactivate

Now, to use these tools, you can use the conda activate command. For example, to use the CDO package, simply type:

conda activate CDO_environment

When you have completed your work with your CDO, type:

conda deactivate

Follow the same procedure to work with other packages.

Well done! 🥇🥇🥇 Your feedback is greatly appreciated!!!

Leave a Comment