How To Install python-cf on Ubuntu 18.04
Introduction
In this tutorial we learn how to install python-cf
on Ubuntu 18.04.
What is python-cf
python-cf is:
CF is a netCDF convention which is in wide and growing use for the storage of model-generated and observational data relating to the atmosphere, ocean and Earth system.
This package is an implementation of the CF data model, and as such it is an API allows for the full scope of data and metadata interactions described by the CF conventions.
With this package you can:
- Read CF-netCDF files, CFA-netCDF files and UK Met Office fields files and PP files.
- Create CF fields.
- Write fields to CF-netCDF and CFA-netCDF files on disk.
- Aggregate collections of fields into as few multidimensional fields as possible using the CF aggregation rules.
- Create, delete and modify a field’s data and metadata.
- Select and subspace fields according to their metadata.
- Perform broadcastable, metadata-aware arithmetic, comparison and trigonometric operation with fields.
- Collapse fields by statistical operations.
- Sensibly deal with date-time data.
- Allow for cyclic axes.
- Visualize fields the cfplot package.
All of the above use Large Amounts of Massive Arrays (LAMA) functionality, which allows multiple fields larger than the available memory to exist and be manipulated.
This package installs the library for Python 2.
There are three methods to install python-cf
on Ubuntu 18.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install python-cf Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install python-cf
using apt-get
by running the following command:
sudo apt-get -y install python-cf
Install python-cf Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install python-cf
using apt
by running the following command:
sudo apt -y install python-cf
Install python-cf Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install python-cf
using aptitude
by running the following command:
sudo aptitude -y install python-cf
How To Uninstall python-cf on Ubuntu 18.04
To uninstall only the python-cf
package we can use the following command:
sudo apt-get remove python-cf
Uninstall python-cf And Its Dependencies
To uninstall python-cf
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove python-cf
Remove python-cf Configurations and Data
To remove python-cf
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge python-cf
Remove python-cf configuration, data, and all of its dependencies
We can use the following command to remove python-cf
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge python-cf
References
Summary
In this tutorial we learn how to install python-cf
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.