{ "cells": [ { "cell_type": "markdown", "id": "6834b397-d190-4214-a0d4-b91b202517eb", "metadata": {}, "source": [ "# Creating Visualizations of Intake-ESM Catalogs" ] }, { "cell_type": "markdown", "id": "88f5fad0-c002-4e58-858a-378af84fa961", "metadata": {}, "source": [ "A common initial task when working with a new dataset is figuring out what data is available. This is especially true when working with climate ensembles with several components and time-frequency output (ex. Community Earth System Model Large Ensemble, CESM-LE). Here, we will examine different methods of investigating this catalog" ] }, { "cell_type": "markdown", "id": "d244a6a4-dea7-4872-b2ae-ee9ce82fcdd4", "metadata": {}, "source": [ "## Imports\n", "\n", "Here, we will use [intake-esm](https://intake-esm.readthedocs.io/en/latest/) and [graphviz](https://graphviz.readthedocs.io/en/stable/manual.html), which can be installed using the following (including jupyterlab too!)\n", "\n", "```\n", "conda install -c conda-forge jupyterlab intake-esm graphviz\n", "```\n", "\n", "Once you install these packages, open jupyterlab!" ] }, { "cell_type": "code", "execution_count": 1, "id": "234fbcdc-68d3-48e1-ac7d-3719b87fd95d", "metadata": {}, "outputs": [], "source": [ "import intake\n", "from graphviz import Digraph" ] }, { "cell_type": "markdown", "id": "feef9176-0cee-4879-8a64-5eab032de164", "metadata": {}, "source": [ "## Read in intake-esm catalog" ] }, { "cell_type": "code", "execution_count": 2, "id": "909babf1-c9dc-4e43-b2cf-cd0f15e455ca", "metadata": {}, "outputs": [], "source": [ "col = intake.open_esm_datastore(\n", " 'https://raw.githubusercontent.com/NCAR/cesm-lens-aws/master/intake-catalogs/aws-cesm1-le.json'\n", ")" ] }, { "cell_type": "markdown", "id": "da14d8ea-06c0-4992-9a0a-e44c971779aa", "metadata": {}, "source": [ "Typically, the process is to read in the dataframe containing the metadata, but this can be tough to read/understand what data is all there" ] }, { "cell_type": "code", "execution_count": 3, "id": "cefeb1cb-79a8-4b31-bf8b-89de56818841", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
variablelong_namecomponentexperimentfrequencyvertical_levelsspatial_domainunitsstart_timeend_timepath
0FLNSnet longwave flux at surfaceatm20Cdaily1.0globalW/m21920-01-01 12:00:002005-12-31 12:00:00s3://ncar-cesm-lens/atm/daily/cesmLE-20C-FLNS....
1FLNSCclearsky net longwave flux at surfaceatm20Cdaily1.0globalW/m21920-01-01 12:00:002005-12-31 12:00:00s3://ncar-cesm-lens/atm/daily/cesmLE-20C-FLNSC...
2FLUTupwelling longwave flux at top of modelatm20Cdaily1.0globalW/m21920-01-01 12:00:002005-12-31 12:00:00s3://ncar-cesm-lens/atm/daily/cesmLE-20C-FLUT....
3FSNSnet solar flux at surfaceatm20Cdaily1.0globalW/m21920-01-01 12:00:002005-12-31 12:00:00s3://ncar-cesm-lens/atm/daily/cesmLE-20C-FSNS....
4FSNSCclearsky net solar flux at surfaceatm20Cdaily1.0globalW/m21920-01-01 12:00:002005-12-31 12:00:00s3://ncar-cesm-lens/atm/daily/cesmLE-20C-FSNSC...
....................................
430WVELvertical velocityocnRCP85monthly60.0global_oceancentimeter/s2006-01-16 12:00:002100-12-16 12:00:00s3://ncar-cesm-lens/ocn/monthly/cesmLE-RCP85-W...
431NaNNaNocnCTRLstaticNaNglobal_oceanNaNNaNNaNs3://ncar-cesm-lens/ocn/static/grid.zarr
432NaNNaNocnHISTstaticNaNglobal_oceanNaNNaNNaNs3://ncar-cesm-lens/ocn/static/grid.zarr
433NaNNaNocnRCP85staticNaNglobal_oceanNaNNaNNaNs3://ncar-cesm-lens/ocn/static/grid.zarr
434NaNNaNocn20CstaticNaNglobal_oceanNaNNaNNaNs3://ncar-cesm-lens/ocn/static/grid.zarr
\n", "

435 rows × 11 columns

\n", "
" ], "text/plain": [ " variable long_name component experiment \\\n", "0 FLNS net longwave flux at surface atm 20C \n", "1 FLNSC clearsky net longwave flux at surface atm 20C \n", "2 FLUT upwelling longwave flux at top of model atm 20C \n", "3 FSNS net solar flux at surface atm 20C \n", "4 FSNSC clearsky net solar flux at surface atm 20C \n", ".. ... ... ... ... \n", "430 WVEL vertical velocity ocn RCP85 \n", "431 NaN NaN ocn CTRL \n", "432 NaN NaN ocn HIST \n", "433 NaN NaN ocn RCP85 \n", "434 NaN NaN ocn 20C \n", "\n", " frequency vertical_levels spatial_domain units \\\n", "0 daily 1.0 global W/m2 \n", "1 daily 1.0 global W/m2 \n", "2 daily 1.0 global W/m2 \n", "3 daily 1.0 global W/m2 \n", "4 daily 1.0 global W/m2 \n", ".. ... ... ... ... \n", "430 monthly 60.0 global_ocean centimeter/s \n", "431 static NaN global_ocean NaN \n", "432 static NaN global_ocean NaN \n", "433 static NaN global_ocean NaN \n", "434 static NaN global_ocean NaN \n", "\n", " start_time end_time \\\n", "0 1920-01-01 12:00:00 2005-12-31 12:00:00 \n", "1 1920-01-01 12:00:00 2005-12-31 12:00:00 \n", "2 1920-01-01 12:00:00 2005-12-31 12:00:00 \n", "3 1920-01-01 12:00:00 2005-12-31 12:00:00 \n", "4 1920-01-01 12:00:00 2005-12-31 12:00:00 \n", ".. ... ... \n", "430 2006-01-16 12:00:00 2100-12-16 12:00:00 \n", "431 NaN NaN \n", "432 NaN NaN \n", "433 NaN NaN \n", "434 NaN NaN \n", "\n", " path \n", "0 s3://ncar-cesm-lens/atm/daily/cesmLE-20C-FLNS.... \n", "1 s3://ncar-cesm-lens/atm/daily/cesmLE-20C-FLNSC... \n", "2 s3://ncar-cesm-lens/atm/daily/cesmLE-20C-FLUT.... \n", "3 s3://ncar-cesm-lens/atm/daily/cesmLE-20C-FSNS.... \n", "4 s3://ncar-cesm-lens/atm/daily/cesmLE-20C-FSNSC... \n", ".. ... \n", "430 s3://ncar-cesm-lens/ocn/monthly/cesmLE-RCP85-W... \n", "431 s3://ncar-cesm-lens/ocn/static/grid.zarr \n", "432 s3://ncar-cesm-lens/ocn/static/grid.zarr \n", "433 s3://ncar-cesm-lens/ocn/static/grid.zarr \n", "434 s3://ncar-cesm-lens/ocn/static/grid.zarr \n", "\n", "[435 rows x 11 columns]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "col.df" ] }, { "cell_type": "markdown", "id": "5288fa3a-d226-4254-98c4-37e6f01e8aa0", "metadata": {}, "source": [ "You can search via intake-esm, using the following syntax" ] }, { "cell_type": "code", "execution_count": 4, "id": "8381f59a-13c0-412f-adb9-2a7a1bf991bd", "metadata": {}, "outputs": [], "source": [ "cat = col.search(experiment='20C', frequency='monthly')" ] }, { "cell_type": "markdown", "id": "0508624e-9815-4d98-a985-9ec93aa567a1", "metadata": {}, "source": [ "Here again, it is tough to see everything that is here, also it requires knowing which experiments are in the dataset, and which frequency you are looking for" ] }, { "cell_type": "code", "execution_count": 5, "id": "8257f661-747d-47c9-95fb-4bfc140f2a7e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
variablelong_namecomponentexperimentfrequencyvertical_levelsspatial_domainunitsstart_timeend_timepath
0FLNSnet longwave flux at surfaceatm20Cmonthly1.0globalW/m21920-01-16 12:00:002005-12-16 12:00:00s3://ncar-cesm-lens/atm/monthly/cesmLE-20C-FLN...
1FLNSCclearsky net longwave flux at surfaceatm20Cmonthly1.0globalW/m21920-01-16 12:00:002005-12-16 12:00:00s3://ncar-cesm-lens/atm/monthly/cesmLE-20C-FLN...
2FLUTupwelling longwave flux at top of modelatm20Cmonthly1.0globalW/m21920-01-16 12:00:002005-12-16 12:00:00s3://ncar-cesm-lens/atm/monthly/cesmLE-20C-FLU...
3FSNSnet solar flux at surfaceatm20Cmonthly1.0globalW/m21920-01-16 12:00:002005-12-16 12:00:00s3://ncar-cesm-lens/atm/monthly/cesmLE-20C-FSN...
4FSNSCclearsky net solar flux at surfaceatm20Cmonthly1.0globalW/m21920-01-16 12:00:002005-12-16 12:00:00s3://ncar-cesm-lens/atm/monthly/cesmLE-20C-FSN...
....................................
60VNTflux of heat in grid-y directionocn20Cmonthly60.0global_oceandegC/s1920-01-16 12:00:002005-12-16 12:00:00s3://ncar-cesm-lens/ocn/monthly/cesmLE-20C-VNT...
61VVELvelocity in grid-y directionocn20Cmonthly60.0global_oceancentimeter/s1920-01-16 12:00:002005-12-16 12:00:00s3://ncar-cesm-lens/ocn/monthly/cesmLE-20C-VVE...
62WTSsalt flux across top faceocn20Cmonthly60.0global_oceangram/kilogram/s1920-01-16 12:00:002005-12-16 12:00:00s3://ncar-cesm-lens/ocn/monthly/cesmLE-20C-WTS...
63WTTheat flux across top faceocn20Cmonthly60.0global_oceandegC/s1920-01-16 12:00:002005-12-16 12:00:00s3://ncar-cesm-lens/ocn/monthly/cesmLE-20C-WTT...
64WVELvertical velocityocn20Cmonthly60.0global_oceancentimeter/s1920-01-16 12:00:002005-12-16 12:00:00s3://ncar-cesm-lens/ocn/monthly/cesmLE-20C-WVE...
\n", "

65 rows × 11 columns

\n", "
" ], "text/plain": [ " variable long_name component experiment \\\n", "0 FLNS net longwave flux at surface atm 20C \n", "1 FLNSC clearsky net longwave flux at surface atm 20C \n", "2 FLUT upwelling longwave flux at top of model atm 20C \n", "3 FSNS net solar flux at surface atm 20C \n", "4 FSNSC clearsky net solar flux at surface atm 20C \n", ".. ... ... ... ... \n", "60 VNT flux of heat in grid-y direction ocn 20C \n", "61 VVEL velocity in grid-y direction ocn 20C \n", "62 WTS salt flux across top face ocn 20C \n", "63 WTT heat flux across top face ocn 20C \n", "64 WVEL vertical velocity ocn 20C \n", "\n", " frequency vertical_levels spatial_domain units \\\n", "0 monthly 1.0 global W/m2 \n", "1 monthly 1.0 global W/m2 \n", "2 monthly 1.0 global W/m2 \n", "3 monthly 1.0 global W/m2 \n", "4 monthly 1.0 global W/m2 \n", ".. ... ... ... ... \n", "60 monthly 60.0 global_ocean degC/s \n", "61 monthly 60.0 global_ocean centimeter/s \n", "62 monthly 60.0 global_ocean gram/kilogram/s \n", "63 monthly 60.0 global_ocean degC/s \n", "64 monthly 60.0 global_ocean centimeter/s \n", "\n", " start_time end_time \\\n", "0 1920-01-16 12:00:00 2005-12-16 12:00:00 \n", "1 1920-01-16 12:00:00 2005-12-16 12:00:00 \n", "2 1920-01-16 12:00:00 2005-12-16 12:00:00 \n", "3 1920-01-16 12:00:00 2005-12-16 12:00:00 \n", "4 1920-01-16 12:00:00 2005-12-16 12:00:00 \n", ".. ... ... \n", "60 1920-01-16 12:00:00 2005-12-16 12:00:00 \n", "61 1920-01-16 12:00:00 2005-12-16 12:00:00 \n", "62 1920-01-16 12:00:00 2005-12-16 12:00:00 \n", "63 1920-01-16 12:00:00 2005-12-16 12:00:00 \n", "64 1920-01-16 12:00:00 2005-12-16 12:00:00 \n", "\n", " path \n", "0 s3://ncar-cesm-lens/atm/monthly/cesmLE-20C-FLN... \n", "1 s3://ncar-cesm-lens/atm/monthly/cesmLE-20C-FLN... \n", "2 s3://ncar-cesm-lens/atm/monthly/cesmLE-20C-FLU... \n", "3 s3://ncar-cesm-lens/atm/monthly/cesmLE-20C-FSN... \n", "4 s3://ncar-cesm-lens/atm/monthly/cesmLE-20C-FSN... \n", ".. ... \n", "60 s3://ncar-cesm-lens/ocn/monthly/cesmLE-20C-VNT... \n", "61 s3://ncar-cesm-lens/ocn/monthly/cesmLE-20C-VVE... \n", "62 s3://ncar-cesm-lens/ocn/monthly/cesmLE-20C-WTS... \n", "63 s3://ncar-cesm-lens/ocn/monthly/cesmLE-20C-WTT... \n", "64 s3://ncar-cesm-lens/ocn/monthly/cesmLE-20C-WVE... \n", "\n", "[65 rows x 11 columns]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cat.df" ] }, { "cell_type": "markdown", "id": "6ebcf22f-3ce9-4d65-82d4-4f1405fcf100", "metadata": {}, "source": [ "## Using Graphviz in a Jupyter Notebook\n", "\n", "[Graphviz](https://graphviz.readthedocs.io/en/stable/manual.html) offers an interface to create network graphs\n", "\n", "### Main \"components\" of [Graphviz](https://graphviz.readthedocs.io/en/stable/manual.html)\n", "* Digraph class\n", " * This is the main class that is used to build the visualization - typically assign to a variable `dot`, but you can use any variable you like! \n", "* Node\n", " * The \"bubbles\" which contain a numbered label (ex. '1') and a label (ex. 'HIST')\n", " * These can be connected together - the **numbered label must be a unique integer**\n", "* Edge\n", " * Edges connect the different nodes, using the numbered indices (ex. `.edge('1', '3')` would connect the first and third nodes" ] }, { "cell_type": "markdown", "id": "de2bee88-ecc5-4d3b-8233-5edd6e6d7879", "metadata": {}, "source": [ "### Example of case visualization" ] }, { "cell_type": "code", "execution_count": 6, "id": "ff030012-2a8c-4eef-be01-e5bb5c4a4ac6", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "1\n", "\n", "HIST\n", "\n", "\n", "\n", "2\n", "\n", "ocn\n", "\n", "\n", "\n", "1->2\n", "\n", "\n", "\n", "\n", "\n", "5\n", "\n", "atm\n", "\n", "\n", "\n", "1->5\n", "\n", "\n", "\n", "\n", "\n", "3\n", "\n", "monthly\n", "\n", "\n", "\n", "2->3\n", "\n", "\n", "\n", "\n", "\n", "4\n", "\n", "daily\n", "\n", "\n", "\n", "2->4\n", "\n", "\n", "\n", "\n", "\n", "6\n", "\n", "monthly\n", "\n", "\n", "\n", "5->6\n", "\n", "\n", "\n", "\n", "\n", "7\n", "\n", "weekly\n", "\n", "\n", "\n", "5->7\n", "\n", "\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Create Digraph object\n", "dot = Digraph()\n", "\n", "# Create the first node which serves as the main parent\n", "dot.node('1', label='HIST')\n", "\n", "dot.node('2', label='ocn')\n", "dot.edge('1', '2')\n", "\n", "# Add a monthly child from the ocn component parent\n", "dot.node('3', label='monthly')\n", "dot.edge('2', '3')\n", "\n", "# Add a daily child from the ocn component parent\n", "dot.node('4', label='daily')\n", "dot.edge('2', '4')\n", "\n", "# Add an atm component node and connect to experiment parent\n", "dot.node('5', label='atm')\n", "dot.edge('1', '5')\n", "\n", "# Add a monthly child from the atm component parent\n", "dot.node('6', label='monthly')\n", "dot.edge('5', '6')\n", "\n", "# Add a weekly child from the atm component parent\n", "dot.node('7', label='weekly')\n", "dot.edge('5', '7')\n", "\n", "# Visualize the graph\n", "dot" ] }, { "cell_type": "markdown", "id": "990b2f8c-aaf2-43d3-99c0-fd8298d6a61a", "metadata": {}, "source": [ "### Looping through the CESM-LE catalog" ] }, { "cell_type": "markdown", "id": "c84eb005-b283-49e5-bb6b-52b33d73f1f1", "metadata": {}, "source": [ "Let's apply this to our data catalog, assigning the dataframe with dataset attributes to `df`" ] }, { "cell_type": "code", "execution_count": 7, "id": "0fdc759e-9f3a-488d-8c95-40ccbe6938e4", "metadata": {}, "outputs": [], "source": [ "df = col.df" ] }, { "cell_type": "code", "execution_count": 8, "id": "3dd39b0a-bac1-4104-a0fd-d4762dcabd93", "metadata": {}, "outputs": [], "source": [ "# Create Digraph object - use the left to right orientation instead of vertical\n", "dot = Digraph(graph_attr={'rankdir': 'LR'})\n", "\n", "# Start counting at one for node numbers\n", "num_node = 1\n", "\n", "# Loop through the different experiments\n", "for experiment in df.experiment.unique():\n", " exp_i = num_node\n", " dot.node(str(exp_i), label=experiment)\n", " num_node += 1\n", "\n", " # Loop through the different components in each experiment\n", " for component in df.loc[df.experiment == experiment].component.unique():\n", " comp_i = num_node\n", " dot.node(str(comp_i), label=component)\n", " dot.edge(str(exp_i), str(comp_i))\n", " num_node += 1\n", "\n", " # Loop through the frequency in each component within each experiment\n", " for frequency in df.loc[\n", " (df.experiment == experiment) & (df.component == component)\n", " ].frequency.unique():\n", " freq_i = num_node\n", " dot.node(str(freq_i), label=frequency)\n", " dot.edge(str(comp_i), str(freq_i))\n", " num_node += 1\n", " comp_i += 1\n", " exp_i += 1" ] }, { "cell_type": "code", "execution_count": 9, "id": "b6de404f-1160-4c8a-8b23-585330c3489b", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "1\n", "\n", "20C\n", "\n", "\n", "\n", "2\n", "\n", "atm\n", "\n", "\n", "\n", "1->2\n", "\n", "\n", "\n", "\n", "\n", "7\n", "\n", "ice_nh\n", "\n", "\n", "\n", "1->7\n", "\n", "\n", "\n", "\n", "\n", "10\n", "\n", "ice_sh\n", "\n", "\n", "\n", "1->10\n", "\n", "\n", "\n", "\n", "\n", "13\n", "\n", "lnd\n", "\n", "\n", "\n", "1->13\n", "\n", "\n", "\n", "\n", "\n", "16\n", "\n", "ocn\n", "\n", "\n", "\n", "1->16\n", "\n", "\n", "\n", "\n", "\n", "3\n", "\n", "daily\n", "\n", "\n", "\n", "2->3\n", "\n", "\n", "\n", "\n", "\n", "4\n", "\n", "hourly6-1990-2005\n", "\n", "\n", "\n", "2->4\n", "\n", "\n", "\n", "\n", "\n", "5\n", "\n", "monthly\n", "\n", "\n", "\n", "2->5\n", "\n", "\n", "\n", "\n", "\n", "6\n", "\n", "static\n", "\n", "\n", "\n", "2->6\n", "\n", "\n", "\n", "\n", "\n", "8\n", "\n", "monthly\n", "\n", "\n", "\n", "7->8\n", "\n", "\n", "\n", "\n", "\n", "9\n", "\n", "static\n", "\n", "\n", "\n", "7->9\n", "\n", "\n", "\n", "\n", "\n", "11\n", "\n", "monthly\n", "\n", "\n", "\n", "10->11\n", "\n", "\n", "\n", "\n", "\n", "12\n", "\n", "static\n", "\n", "\n", "\n", "10->12\n", "\n", "\n", "\n", "\n", "\n", "14\n", "\n", "monthly\n", "\n", "\n", "\n", "13->14\n", "\n", "\n", "\n", "\n", "\n", "15\n", "\n", "static\n", "\n", "\n", "\n", "13->15\n", "\n", "\n", "\n", "\n", "\n", "17\n", "\n", "monthly\n", "\n", "\n", "\n", "16->17\n", "\n", "\n", "\n", "\n", "\n", "18\n", "\n", "static\n", "\n", "\n", "\n", "16->18\n", "\n", "\n", "\n", "\n", "\n", "19\n", "\n", "CTRL\n", "\n", "\n", "\n", "20\n", "\n", "atm\n", "\n", "\n", "\n", "19->20\n", "\n", "\n", "\n", "\n", "\n", "24\n", "\n", "ice_nh\n", "\n", "\n", "\n", "19->24\n", "\n", "\n", "\n", "\n", "\n", "28\n", "\n", "ice_sh\n", "\n", "\n", "\n", "19->28\n", "\n", "\n", "\n", "\n", "\n", "32\n", "\n", "lnd\n", "\n", "\n", "\n", "19->32\n", "\n", "\n", "\n", "\n", "\n", "36\n", "\n", "ocn\n", "\n", "\n", "\n", "19->36\n", "\n", "\n", "\n", "\n", "\n", "21\n", "\n", "daily\n", "\n", "\n", "\n", "20->21\n", "\n", "\n", "\n", "\n", "\n", "22\n", "\n", "monthly\n", "\n", "\n", "\n", "20->22\n", "\n", "\n", "\n", "\n", "\n", "23\n", "\n", "static\n", "\n", "\n", "\n", "20->23\n", "\n", "\n", "\n", "\n", "\n", "25\n", "\n", "daily\n", "\n", "\n", "\n", "24->25\n", "\n", "\n", "\n", "\n", "\n", "26\n", "\n", "monthly\n", "\n", "\n", "\n", "24->26\n", "\n", "\n", "\n", "\n", "\n", "27\n", "\n", "static\n", "\n", "\n", "\n", "24->27\n", "\n", "\n", "\n", "\n", "\n", "29\n", "\n", "daily\n", "\n", "\n", "\n", "28->29\n", "\n", "\n", "\n", "\n", "\n", "30\n", "\n", "monthly\n", "\n", "\n", "\n", "28->30\n", "\n", "\n", "\n", "\n", "\n", "31\n", "\n", "static\n", "\n", "\n", "\n", "28->31\n", "\n", "\n", "\n", "\n", "\n", "33\n", "\n", "daily\n", "\n", "\n", "\n", "32->33\n", "\n", "\n", "\n", "\n", "\n", "34\n", "\n", "monthly\n", "\n", "\n", "\n", "32->34\n", "\n", "\n", "\n", "\n", "\n", "35\n", "\n", "static\n", "\n", "\n", "\n", "32->35\n", "\n", "\n", "\n", "\n", "\n", "37\n", "\n", "monthly\n", "\n", "\n", "\n", "36->37\n", "\n", "\n", "\n", "\n", "\n", "38\n", "\n", "static\n", "\n", "\n", "\n", "36->38\n", "\n", "\n", "\n", "\n", "\n", "39\n", "\n", "HIST\n", "\n", "\n", "\n", "40\n", "\n", "atm\n", "\n", "\n", "\n", "39->40\n", "\n", "\n", "\n", "\n", "\n", "44\n", "\n", "ice_nh\n", "\n", "\n", "\n", "39->44\n", "\n", "\n", "\n", "\n", "\n", "48\n", "\n", "ice_sh\n", "\n", "\n", "\n", "39->48\n", "\n", "\n", "\n", "\n", "\n", "52\n", "\n", "lnd\n", "\n", "\n", "\n", "39->52\n", "\n", "\n", "\n", "\n", "\n", "56\n", "\n", "ocn\n", "\n", "\n", "\n", "39->56\n", "\n", "\n", "\n", "\n", "\n", "41\n", "\n", "daily\n", "\n", "\n", "\n", "40->41\n", "\n", "\n", "\n", "\n", "\n", "42\n", "\n", "monthly\n", "\n", "\n", "\n", "40->42\n", "\n", "\n", "\n", "\n", "\n", "43\n", "\n", "static\n", "\n", "\n", "\n", "40->43\n", "\n", "\n", "\n", "\n", "\n", "45\n", "\n", "daily\n", "\n", "\n", "\n", "44->45\n", "\n", "\n", "\n", "\n", "\n", "46\n", "\n", "monthly\n", "\n", "\n", "\n", "44->46\n", "\n", "\n", "\n", "\n", "\n", "47\n", "\n", "static\n", "\n", "\n", "\n", "44->47\n", "\n", "\n", "\n", "\n", "\n", "49\n", "\n", "daily\n", "\n", "\n", "\n", "48->49\n", "\n", "\n", "\n", "\n", "\n", "50\n", "\n", "monthly\n", "\n", "\n", "\n", "48->50\n", "\n", "\n", "\n", "\n", "\n", "51\n", "\n", "static\n", "\n", "\n", "\n", "48->51\n", "\n", "\n", "\n", "\n", "\n", "53\n", "\n", "daily\n", "\n", "\n", "\n", "52->53\n", "\n", "\n", "\n", "\n", "\n", "54\n", "\n", "monthly\n", "\n", "\n", "\n", "52->54\n", "\n", "\n", "\n", "\n", "\n", "55\n", "\n", "static\n", "\n", "\n", "\n", "52->55\n", "\n", "\n", "\n", "\n", "\n", "57\n", "\n", "monthly\n", "\n", "\n", "\n", "56->57\n", "\n", "\n", "\n", "\n", "\n", "58\n", "\n", "static\n", "\n", "\n", "\n", "56->58\n", "\n", "\n", "\n", "\n", "\n", "59\n", "\n", "RCP85\n", "\n", "\n", "\n", "60\n", "\n", "atm\n", "\n", "\n", "\n", "59->60\n", "\n", "\n", "\n", "\n", "\n", "66\n", "\n", "ice_nh\n", "\n", "\n", "\n", "59->66\n", "\n", "\n", "\n", "\n", "\n", "70\n", "\n", "ice_sh\n", "\n", "\n", "\n", "59->70\n", "\n", "\n", "\n", "\n", "\n", "74\n", "\n", "lnd\n", "\n", "\n", "\n", "59->74\n", "\n", "\n", "\n", "\n", "\n", "78\n", "\n", "ocn\n", "\n", "\n", "\n", "59->78\n", "\n", "\n", "\n", "\n", "\n", "61\n", "\n", "daily\n", "\n", "\n", "\n", "60->61\n", "\n", "\n", "\n", "\n", "\n", "62\n", "\n", "hourly6-2026-2035\n", "\n", "\n", "\n", "60->62\n", "\n", "\n", "\n", "\n", "\n", "63\n", "\n", "hourly6-2071-2080\n", "\n", "\n", "\n", "60->63\n", "\n", "\n", "\n", "\n", "\n", "64\n", "\n", "monthly\n", "\n", "\n", "\n", "60->64\n", "\n", "\n", "\n", "\n", "\n", "65\n", "\n", "static\n", "\n", "\n", "\n", "60->65\n", "\n", "\n", "\n", "\n", "\n", "67\n", "\n", "daily\n", "\n", "\n", "\n", "66->67\n", "\n", "\n", "\n", "\n", "\n", "68\n", "\n", "monthly\n", "\n", "\n", "\n", "66->68\n", "\n", "\n", "\n", "\n", "\n", "69\n", "\n", "static\n", "\n", "\n", "\n", "66->69\n", "\n", "\n", "\n", "\n", "\n", "71\n", "\n", "daily\n", "\n", "\n", "\n", "70->71\n", "\n", "\n", "\n", "\n", "\n", "72\n", "\n", "monthly\n", "\n", "\n", "\n", "70->72\n", "\n", "\n", "\n", "\n", "\n", "73\n", "\n", "static\n", "\n", "\n", "\n", "70->73\n", "\n", "\n", "\n", "\n", "\n", "75\n", "\n", "daily\n", "\n", "\n", "\n", "74->75\n", "\n", "\n", "\n", "\n", "\n", "76\n", "\n", "monthly\n", "\n", "\n", "\n", "74->76\n", "\n", "\n", "\n", "\n", "\n", "77\n", "\n", "static\n", "\n", "\n", "\n", "74->77\n", "\n", "\n", "\n", "\n", "\n", "79\n", "\n", "monthly\n", "\n", "\n", "\n", "78->79\n", "\n", "\n", "\n", "\n", "\n", "80\n", "\n", "static\n", "\n", "\n", "\n", "78->80\n", "\n", "\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dot" ] }, { "cell_type": "markdown", "id": "34fbf1b7-7d1d-4e0e-8b33-523df9bd10cb", "metadata": {}, "source": [ "## Conclusion\n", "[Graphviz](https://graphviz.readthedocs.io/en/stable/manual.html) can be a helpful tool when visualizing what data is within your data catalog - I hope this provides a good starting point in terms of using this with [intake-esm](https://intake-esm.readthedocs.io/en/latest/) catalogs!" ] } ], "metadata": { "author": "Max Grover", "date": "2021-06-11", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.4" }, "tags": "visualization,intake,cesm", "title": "Creating Visualizations of Intake-ESM Catalogs" }, "nbformat": 4, "nbformat_minor": 5 }