

You will use the xarray package which requires the netcdf4 package to work with netcdf data.
OPENING CDF FILES PYTHON HOW TO
monthly: These data are aggregated monthly (rather than daily)īelow, you will learn how to open and work with MACA 2 data using open source Python tools.CONUS: These data are for the CONtinental United States boundary.historical: these data are the modeled historical values for the years 1950 - 2005.BNU-ESM: This is the climate (CLM) model used to generate the data.tasmax: Max temperature is the parameter contained within the data.macav2metdata: the data are the MACA version two data which are downsampled to the extent of the continental United S tates.

The file name itself tells you a lot about the data. In this lesson you will work with historic projected MACA 2 data that represents maximum monthly temperature for the Continental United States (CONUS).Īgg_macav2metdata_tasmax_BNU-ESM_r1i1p1_historical_1950_2005_CONUS_monthly HOME, 'earth-analytics', 'data' )) Get Started wtih MACA Version 2 Data Using Open Source Python # accessed lower down in this notebook (the USA state boundary data) set_style ( "white" ) # Optional - set your working directory if you wish to use the data Import xarray as xr import rioxarray as rxr import cartopy.crs as ccrs import cartopy.feature as cfeature import seaborn as sns import geopandas as gpd import earthpy as et # Plotting options Import os import numpy as np import pandas as pd import matplotlib.pyplot as plt # netCDF4 needs to be installed in your environment for this to work
