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.


Overview

The carbon cycle is a key part of ocean biogeochemistry and, more broadly, Earth’s climate system. Here we learn how to make maps of some key variables modeled by CESM related to the marine carbon cycle.

  1. General setup

  2. Subsetting

  3. Processing data

  4. Making maps

Prerequisites

ConceptsImportanceNotes
MatplotlibNecessary
Intro to CartopyNecessary
Dask CookbookHelpful
Intro to XarrayHelpful
  • Time to learn: 15 min


Imports

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 7
      3 import numpy as np
      4 import matplotlib.pyplot as plt
      5 import cartopy
      6 import cartopy.crs as ccrs
----> 7 import pop_tools
      8 from dask.distributed import LocalCluster
      9 import dask
     10 import distributed

File ~/micromamba/envs/ocean-bgc-cookbook-dev/lib/python3.14/site-packages/pop_tools/__init__.py:4
      1 """Top-level module for pop_tools"""
----> 4 from pkg_resources import DistributionNotFound, get_distribution
      6 from .calc import cfc11sol, cfc12sol
      7 from .datasets import DATASETS

ModuleNotFoundError: No module named 'pkg_resources'

General setup (see intro notebooks for explanations)

Connect to cluster

Bring in POP grid utilities

Load the data

Subsetting

Processing - means in time and space

Pull in the function we defined in the nutrients notebook...

We also define a new function to take global mean in space.

Take the long-term mean of our data set. We process monthly to annual with our custom function, then use xarray’s built-in .mean() function to process from annual data to a single mean over time, since each year is the same length.

Do some global integrals, to check if our values look reasonable

We can compare these values to some observationally derived values. Each of these is calculated in a different way with combinations of data and models--please reference each linked paper for detailed discussion. Takahashi et al., 2002 estimate global air-sea CO2_2 flux to be 2.2 (+22% or −19%) Pg C yr−1^{−1}. Our value (shown above as FG_CO2) is 2.779 Pg C yr−1^{−1}. This value is outside of these bounds, but still on the same order of magnitude. We note that these values are calculated over different time periods, so we also don’t expect them to be an exact comparison. photoC_TOT_zint represents global vertically-integrated NPP; Behrenfeld and Falkowski, 1997 estimate this value to be 43.5 Pg C yr−1^{−1}. Our value is 53.26 Pg C yr−1^{−1}, which is within 22% of the observationally derived value. POC_FLUX_100m represents the particulate organic carbon flux at 100 m depth. DeVries and Weber, 2017 calculated this flux integrated over the entire euphotic zone to be 9.1 ± 0.2 Pg C yr−1^{−1}. Since the depth ranges are different, this isn’t an exact comparison, but the orders of magnitude are similar. This first-pass analysis tells us that CESM is on the right track for these values.

Make some maps

First, convert from mmol/m3 cm/s to mmol/m2/day.

Then, make a few maps of key carbon-related variables.

And close the Dask cluster we spun up at the beginning.


Summary

You’ve learned how to make maps of some key quantities related to oceanic carbon.

References
  1. Takahashi, T., Sutherland, S. C., Sweeney, C., Poisson, A., Metzl, N., Tilbrook, B., Bates, N., Wanninkhof, R., Feely, R. A., Sabine, C., Olafsson, J., & Nojiri, Y. (2002). Global sea–air CO2 flux based on climatological surface ocean pCO2, and seasonal biological and temperature effects. Deep Sea Research Part II: Topical Studies in Oceanography, 49(9–10), 1601–1622. 10.1016/s0967-0645(02)00003-6
  2. Behrenfeld, M. J., & Falkowski, P. G. (1997). Photosynthetic rates derived from satellite‐based chlorophyll concentration. Limnology and Oceanography, 42(1), 1–20. 10.4319/lo.1997.42.1.0001
  3. DeVries, T., & Weber, T. (2017). The export and fate of organic matter in the ocean: New constraints from combining satellite and oceanographic tracer observations. Global Biogeochemical Cycles, 31(3), 535–555. 10.1002/2016gb005551
  4. (2013). In Ocean Biogeochemical Dynamics (pp. 318–358). Princeton University Press. 10.2307/j.ctt3fgxqx.12