Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Calculate Surface Ocean Heat using CESM2 LENS data


Overview

  • This notebook is an adpation of a workflow in the NCAR gallery of the Pangeo collection

  • This notebook illustrates how to compute surface ocean heat content using potential temperature data from CESM2 Large Ensemble Dataset (Community Earth System Model 2) hosted on NCAR’s GDEX.

  • This data is open access and is accessed via OSDF using the pelicanFS package and demonstrates how you can stream data from NCAR’s GDEX

  • Please refer to the first chapter of this cookbook to learn more about OSDF, pelican or pelicanFS

Prerequisites

ConceptsImportanceNotes
Intro to Intake-ESMNecessaryUsed for searching CMIP6 data
Understanding of ZarrHelpfulFamiliarity with metadata structure
MatplotlibHelpfulPackage used for plotting
PelicanFSNecessaryThe python package used to stream data in this notebook
OSDFHelpfulOSDF is used to stream data in this notebook
  • Time to learn: 20 mins


Imports

Set up local dask cluster

Before we do any computation let us first set up a local cluster using dask

Loading...

Data Loading

Load CESM2 LENS data from NCAR’s GDEX

Loading...
Loading...
array(['osdf:///ncar-gdex/d010092/ocn/monthly/cesm2LE-historical-cmip6-TEMP.zarr', 'osdf:///ncar-gdex/d010092/ocn/monthly/cesm2LE-ssp370-cmip6-TEMP.zarr', 'osdf:///ncar-gdex/d010092/ocn/monthly/cesm2LE-ssp370-smbb-TEMP.zarr'], dtype=object)

--> The keys in the returned dictionary of datasets are constructed as follows:
	'component.experiment.frequency.forcing_variant'
Loading...
Loading...
dict_keys(['ocn.historical.monthly.cmip6', 'ocn.ssp370.monthly.cmip6', 'ocn.ssp370.monthly.smbb'])

Change units

Unit('centimeters')
Loading...
Loading...
  • Compute depth level deltas using the difference of z_t levels

Loading...

Compute Ocean Heat content for ocean surface

  • Ocean surface is considered to be the top 100m

  • The formula for this is:

    H=ρC∫0zT(z)dzH = \rho C \int_0^z T(z) dz

Where H is ocean heat content, the value we are trying to calculate,

ρ\rho is the density of sea water, 1026kg/m31026 kg/m^3 ,

CC is the specific heat of sea water, 3990J/(kgK)3990 J/(kg K) ,

zz is the depth limit of the calculation in meters,

and T(z)T(z) is the temperature at each depth in degrees Kelvin.

Loading...
Loading...
Loading...

Plot Ocean Heat

CPU times: user 419 ms, sys: 47 ms, total: 466 ms
Wall time: 454 ms
Loading...
CPU times: user 7.89 s, sys: 1.53 s, total: 9.41 s
Wall time: 1min 24s
<Figure size 640x480 with 2 Axes>

Indeed! The surface ocean is trapping heat as the globe warms!


Summary

In this notebook we used sea temperature data from the Community Earth System Model (CESM2) Large Ensemble dataset to compute surface ocean heat and convince ourselves that the surface ocean is trapping extra heat as the globe warms. We used an intake-ESM catalog backed by pelican links to stream data from NCAR’s Geoscience Data Exchange via NCAR’s OSDF origin!

What’s next?

In the next notebook, we will see how to load data from multiple OSDF origins into a workflow. We will stream CMIP6 model data from AWS and observational data from NCAR’s GDEX.

Resources and references