| layout | title | zenodo_link | questions | objectives | time_estimation | key_points | contributors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tutorial_hands_on |
Visualize Climate data with Panoply netCDF viewer |
|
|
1H |
|
|
Introduction
{:.no_toc}
{% icon comment %} Comment
This tutorial is significantly based on the Panoply documentation "Quick View Data with Panoply" section.
{: .comment}
The practical aims at familiarzing you with the Panoply Galaxy interactive environment. Panoply is among the most popular tool to visualize geo-referenced data stored in Network Common Data Form (netCDF). It provides a graphical interface for inspecting (show metadata) and visualizing netCDF data. It supports many features to customize your plots and we will introduce some of them in this lesson.
In this tutorial, you will learn to:
- Plot geo-referenced latitude-longitude, latitude-vertical, longitude-vertical, time-latitude or time-vertical arrays.
- Use any of numerous color tables for the scale colorbar
- Save plots to GIF, JPEG, PNG or TIFF bitmap images or as PDF or PostScript graphics files.
- Export animations as MOV or AVI videos
Agenda
In this tutorial, we will cover:
- TOC {:toc}
{: .agenda}
{% icon comment %} Background
There are many online services to get climate data, and it is often difficult to know which ones are up-to date and which resources to trust. Different services provide different Application Programming Interfaces (API), use different terminologies, different file formats etc., which make it difficult for new users to master them all. Therefore in this tutorial, we will be focusing on the usage of Climate data in Network Common data Form (netCDF) because it is the most common data format for storing Climate data. We will be using a freely available dataset containing Essential Climate Variables (sea ice area fraction, surface temperature) from Copernicus Climate Data Store. We will learn to use panoply to visualize the sea ice area fraction over the poles (southern and northern poles) and surface temperatures for two different years (1979 and 2018). {: .comment}
NetCDF format
NetCDF data format is a binary format and to be able to read or visualize it, we would need to use dedicated software or libraries that can handle this "special" format. It is self-describing and machine-independent data format that supports the creation, access, and sharing of array-oriented scientific data. NetCDF files usually have the extension .nc or .netcdf.
For climate and forecast data stored in NetCDF format there are (non-mandatory) conventions on metadata (CF Convention).
In this tutorial, we will be using data from the Copernicus Climate Data Store and more precisely a reanalysis ERA5-Land monthly averaged dataset for 2019. Data from Copernicus Climate Data Store is freely available but may require free registration and license agreement.
Get data
{% icon hands_on %} Hands-on: Data upload
Create a new history for this tutorial. If you are not inspired, you can name it Panoply for example... {% include snippets/create_new_history.md %}
Import the file from Zenodo or from the shared data library
https://zenodo.org/record/3697454/files/ecv_1979.nc https://zenodo.org/record/3697454/files/ecv_2018.nc{% include snippets/import_via_link.md %} {% include snippets/import_from_data_library.md %}
Check that the datatype is netcdf
Files you uploaded are in netcdf format. In Galaxy, Datatypes are, by default, automatically guessed. Here, as necdf is a derivative of the h5 format, Galaxy automatically affect the h5 datatype to netcdf files. To cope with that, one can change the datatype manually, once datasets uploaded (as shown below) OR you can directly specify datatype on the upload tool form so Galaxy will not try to automatically guess it.
{% include snippets/change_datatype.md datatype="datatypes" %}
Rename Datasets
As "https://zenodo.org/record/3697454/files/ecv_1979.nc" is not a beautiful name and can give errors for some tools, it is a good practice to change the dataset name by something more meaningfull. For example by removing
https://zenodo.org/record/3697454/files/to obtainecv_1979.ncandecv_2018.nc, respectively.{% include snippets/rename_dataset.md %}
Add a tag to the dataset corresponding to
copernicus{% include snippets/add_tag.md %}
{: .hands_on}
Panoply
Opening up Panoply
{% icon hands_on %} Hands-on: Launch Panoply
Panoply is available as a Galaxy interactive environment and may not be available on all Galaxy servers.
{% icon tip %} Tip: Launch Panoply in Galaxy
Currently Panoply in Galaxy is available on useGalaxy.eu instance, on the "Interactive tools" tool panel section or, as all interactive tools, from the dedicated usGalaxy.eu subdomain: Live.useGalaxy.eu
- Open the Panoply tool {% icon tool %} by clicking here{:target="_blank"}
- Check ecv_1979.nc dataset selected in the netcdf input field
- Click Execute
- The tool will start running and will stay running permanently
- Click on the "User" menu at the top and go to "Active Interactive Tools" and locate the Panoply instance you started.
- Click on your Panoply instance
- Click on ecv_1979.nc dataset {: .tip} {: .hands_on}
Inspect metadata
{% icon hands_on %} Hands-on: Inspect dataset
Inspect dataset content
Here you can look at the dataset (ecv_1979.nc) and related variables (
latitude,longitude,number,siconc, etc){% icon question %} Question
what is the unit of the
sea ice area fractionvariable (siconc) variable?{% icon solution %} Solution
The unit of siconc is (0-1) e.g. a real value between 0 (no ice) and 1 (fully coverted by ice). {: .solution} {: .question}
Inspect the surface temperature (t2m) variable
{% icon question %} Question
what is the unit of this variable and its shape?
{% icon solution %} Solution
The unit of t2m is Kelvin (K). t2m is a 3D array (time, latitude, longitude). {: .solution} {: .question}
{: .hands_on}
Create Geo-referenced Longitude-Latitude plot
{% icon hands_on %} Hands-on: geographical map
Double click on the variable t2m and click on Create
{% icon question %} Question
- What does it show?
- What is the date of the generated plot?
- Can you plot other dates?
{% icon solution %} Solution
The plot represent the surface temperature over the entire world.
The date of the default plot is 1st January 1979 at 00:00:00.
To plot another date, change either:
- Initial time of forecast (give a value between 1 and 12, corresponding to each month of year 1979.
- Click on the date and scroll down to select the date of your choice. {: .solution} {: .question}
Save your plot
- Click on the tab File (from your plot window) to store your plot by selecting Save Image As
- Double click on the folder outputs to enter this folder and save your plot. You need to make sure to save all your plot in the outputs folder otherwise you can loose all your plots once to close panoply.
Change colormap Always make sure you use color blind friendly palettes.
- To change the default colormap, click on tab "Scale" (bottom of your plot wind) and select another "Color Table" (you can scroll down to go through all the different available colormap).
- Save your plot using Save Image As and make sure to choose another name to avoid overwritting your preceding plot.
{: .hands_on}
Changing map projection
{% icon hands_on %} Hands-on: Change projection
From your previous plot window, click on Tab Map and change Projection. Try a few of them and save each of your plot with File --> Save Image As.
Create another plot window for sea ice area fraction (siconc) and make a new geo-referenced map
{% icon question %} Question
- What kind of colormap could you use to highlight the extent of sea-ice?
- What projection would be best to use for showing the extent of sea-ice over the two poles?
{% icon solution %} Solution
- Any colormap that shows low values (close to 0) in light color so we can focus on values that are close to 1. For instance, CP_PuBu_08.cpt.
- Using Orthographic projection is best for showing the northern and southern poles. One advantage is that you can choose to center the plot over 90 degrees latitude. To have both the northern and southern poles at the same time, choose Stereographic (Two hemispheres).
Export Animation
{% icon hands_on %} Hands-on: Export animation
- From your previous plot window, click on File and select Export Animation. Save your plot using either MOV or AVI format. It goes through each plot e.g. for each month and create an animation where you can see the evolution of sea-ice extent from January 1979 to December 1979. You will be able to download the resulting movie from Galaxy once you quit Panoply. {: .hands_on}
Create timeseries
{% icon hands_on %} Hands-on: Create 1D plot
Double click on the variable t2m, click on Create and select Create horizontal line plot along time axis (make sure to switch to time).
{% icon question %} Question
- What was the maximum temperature in Oslo (latitude: 60 degrees North, longitude: 10.75 East) in 1979?
- Which month was the warmest in Oslo?
{% icon solution %} Solution
Quit Panoply
{% icon hands_on %} Hands-on: Quit Panoply to keep your plots
{: .hands_on}
Conclusion
{:.no_toc}
We have now learnt how to analyze climate data using Panoply. We only use one of the two datasets so we strongly encourage you to do the same exercises with the second dataset ecv_2018.nc. Please note that when comparing surface temperature or sea-ice area fraction from 1979 and 2018, you would not be able to conclude anything regarding climate change. For any climate studies, long term timeseries (between 20 to 30 years) are necessary to establish climate trends.









