Personal tools
User menu

ESE315 Tutorial 2

From atmoschem

Jump to: navigation, search

Analyzing 2D and 3D atmospheric (geoscience) datasets with Python

This tutorial shows you how to read 2D or 3D data in NetCDF format into python, plot them, and do a bunch of analyses.

Tutorial 2 slides

NetCDF (network Common Data Form) is a set of interfaces for array-oriented data access and a freely distributed collection of data access libraries for C, Fortran, C++, Java, and other languages. The netCDF libraries support a machine-independent format for representing scientific data. Together, the interfaces, libraries, and format support the creation, access, and sharing of scientific data.

NetCDF data is:

  • Self-Describing. A netCDF file includes information about the data it contains.
  • Portable. A netCDF file can be accessed by computers with different ways of storing integers, characters, and floating-point numbers.
  • Scalable. A small subset of a large dataset may be accessed efficiently.
  • Appendable. Data may be appended to a properly structured netCDF file without copying the dataset or redefining its structure.
  • Sharable. One writer and multiple readers may simultaneously access the same netCDF file.
  • Archivable. Access to all earlier forms of netCDF data will be supported by current and future versions of the software.

If you work in earth or environmental sciences, you will inevitably run into datasets in NetCDF format. However, you do not need to know all the functionality of NetCDF in order to start working with it. As with anything else in research, start playing with the data and look up resources along the way.


Tutorial-02-1.ipynb

In this tutorial, you will learn to read a NetCDF file containing a full year of daily surface air temperature data. You will learn to extract a time slice from this 3D array and make a global plot of this 2D data. You will also learn to calculate time averages (or zonal averages, area averages, etc.)


Tutorial-02-2.ipynb

In this tutorial, you will learn to overlay several datasets in one plot.


Reference

  • This page was last modified on 10 November 2023, at 09:16.
  • This page has been accessed 4,269 times.