Xarray Tips and Tricks
Xarray Tips and Tricks¶
Build a multi-file dataset from an OpenDAP server¶
One thing we love about xarray is the open_mfdataset
function, which combines many netCDF files into a single xarray Dataset.
But what if the files are stored on a remote server and accessed over OpenDAP. An example can be found in NOAA's NCEP Reanalysis catalog.
more ...Assignment 10: Maps with Cartopy
Homework 10: Cartopy¶
1) Plot data from NARR¶
NARR is NCEP's North American Regional Reanalysis, a widely used product for studying the weather and climate of the continental US. The data is available from NOAA's Earth System Research Laboratory via OPeNDAP, meaing that xarray can opent the data "remotely" without downloading a file.
more ...Maps with Cartopy
Maps in Scientific Python¶
Making maps is a fundamental part of geoscience research. Maps differ from regular figures in the following principle ways:
- Maps require a projection of geographic coordinates on the 3D Earth to the 2D space of your figure.
- Maps often include extra decorations besides just our data (e.g. continents, country borders, etc.) more ...
Dask for Parallel Computing and Big Data
Dask for Parallel Computing in Python¶
In past lectures, we learned how to use numpy, pandas, and xarray to analyze various types of geoscience data. In this lecture, we address an incresingly common problem: what happens if the data we wish to analyze is "big data"
Aside: What is "Big Data"?¶
There is a lot of hype around the buzzword "big data" today. Some people may associate "big data" with specific sortware platforms (e.g. "Hadoop", "spark"), while, for others, "big data" means specific machine learning techniques. But I think wikipedia's definition more ...
Assignment 8: Xarray for ENSO
Assignment 8 : Xarray Groupby¶
Here will will calculate the NINO 3.4 index of El Nino variabillity and use it to analyze datasets.
First read this page from NOAA. It tells you the following.
- The Nino 3.4 region is defined as the region between +/- 5 deg. lat, 170 W - 120 W lon. more ...
Intermediate Xarray
Assignment 7: Xarray Fundamentals
Assignment 7 : Xarray¶
In this assignment, we will use Xarray to analyze top-of-atmosphere radiation data from NASA's CERES project.
Public domain, by NASA, from Wikimedia Commons
I have pre-downloaded and subsetted a portion of this dataset for use in our class. You can download it here: http://ldeo.columbia.edu/~rpa/CERES_EBAF-TOA_Edition4.0_200003-201701.condensed.nc. The size of the data file is 702.53 MB. It will take a minute or two to download.
more ...Xarray Fundamentals
Xarray for multidimensional gridded data¶
In last week's lecture, we saw how Pandas provided a way to keep track of additional "metadata" surrounding tabular datasets, including "indexes" for each row and labels for each column. These features, together with Pandas' many useful routines for all kinds of data munging and analysis, have made Pandas one of the most popular python packages in the world.
more ...