Personal tools
User menu

Difference between revisions of "ESE315 Tutorial 2"

From atmoschem

Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=Analyzing 2D and 3D atmospheric (geoscience) datasets with Python=
 
=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 and do a bunch of analyses.  
+
This tutorial shows you how to read 2D or 3D data in NetCDF format into python, plot them, and do a bunch of analyses.  
 +
 
 +
[https://pan.baidu.com/s/1_MXa8qrRgYgZMwXIz21BJw?pwd=roup Tutorial 2 slides]
  
 
[https://www.unidata.ucar.edu/software/netcdf/ 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.
 
[https://www.unidata.ucar.edu/software/netcdf/ 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.
Line 16: Line 18:
  
 
==Tutorial-02-1.ipynb==
 
==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==
 
==Tutorial-02-2.ipynb==
 +
In this tutorial, you will learn to overlay several datasets in one plot.
 +
  
  
 
=Reference=
 
=Reference=
 +
*[https://climatedataguide.ucar.edu/climate-data/atmospheric-reanalysis-overview-comparison-tables Atmospheric reanalysis: overview & comparison tables]
 
*[https://www.unidata.ucar.edu/software/netcdf/ netcdf data format]
 
*[https://www.unidata.ucar.edu/software/netcdf/ netcdf data format]
 
*[http://xarray.pydata.org/en/stable/ Description of the xarray project, with links to tutorials]
 
*[http://xarray.pydata.org/en/stable/ Description of the xarray project, with links to tutorials]
 +
*[http://xarray.pydata.org/en/stable/indexing.html Indexing and selecting data with xarray]
 
*[https://scitools.org.uk/cartopy/docs/latest/ Description of the cartopy project]
 
*[https://scitools.org.uk/cartopy/docs/latest/ Description of the cartopy project]
*
+
*[https://matplotlib.org/3.1.1/index.html Description of matplotlib]
 +
*[https://matplotlib.org/examples/color/colormaps_reference.html Colormaps in matplotlib]

Latest revision as of 09:16, 10 November 2023

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,197 times.