Use earthkit-plots to make visualizations of temperature data stored in a NetCDF file.
import earthkit
We have downloaded a NetCDF file from the “ERA5-Land monthly averaged data from 1950 to present” dataset on the Climate Data Store. The file contains the mean temperature at 2m for February 2025 and we can load it with earthkit-data:
file = "../data/era5-land-temperature-2m-monthly-mean-feb-2025.nc"
temperature = earthkit.data.from_source("file", file)
The quickest way to get started with earthkit-plots is with the quickplot function, which will take your data and attempt to generate something appropriate:
earthkit.plots.quickplot(temperature)
<earthkit.plots.components.figures.Figure at 0x20fa6d18c20>

We see a global map with temperatures is in kelvin. If we want to switch to celcius and focus on Africa we can add some parameters:
earthkit.plots.quickplot(temperature, units="celsius", domain="Africa")
<earthkit.plots.components.figures.Figure at 0x20fa770d590>

The Map class gives you more control and provides various methods for plotting and enhancing visualisations. Below is an example of how to create a map, add title and legend, and overlay coastlines, borders and cities.
map = earthkit.plots.Map(domain="Ethiopia")
map.quickplot(temperature, units="celsius")
map.legend(label="{variable_name} ({units})")
map.title("ERA5-Land mean {variable_name} in {time:%B %Y}")
map.coastlines()
map.borders()
map.cities()
map.show()
c:\Users\karimba\AppData\Local\miniconda3\envs\climate-tools-new\Lib\site-packages\cartopy\io\__init__.py:242: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/110m_cultural/ne_110m_admin_0_map_units.zip
warnings.warn(f'Downloading: {url}', DownloadWarning)
c:\Users\karimba\AppData\Local\miniconda3\envs\climate-tools-new\Lib\site-packages\cartopy\io\__init__.py:242: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/50m_cultural/ne_50m_admin_0_boundary_lines_land.zip
warnings.warn(f'Downloading: {url}', DownloadWarning)
c:\Users\karimba\AppData\Local\miniconda3\envs\climate-tools-new\Lib\site-packages\cartopy\io\__init__.py:242: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/50m_cultural/ne_50m_populated_places.zip
warnings.warn(f'Downloading: {url}', DownloadWarning)
