{ "cells": [ { "cell_type": "raw", "id": "45cdd7e5-252d-4786-9403-43117ab27154", "metadata": {}, "source": [ "```{figure} ./amwg_table_subset.png\n", "---\n", "width: 850px\n", "name: directive-fig\n", "---\n", "Here is my figure caption!\n", "```" ] }, { "cell_type": "raw", "id": "a51eb159-ccf9-4a4a-ab86-081bea9b2998", "metadata": {}, "source": [ "\n", "" ] }, { "cell_type": "raw", "id": "7525bddb-c9f8-4243-a587-bf994f3e939a", "metadata": {}, "source": [ "**AMWG** (Atmospheric Model Working Group) **D**iagnostics **F**ramework\n" ] }, { "cell_type": "markdown", "id": "368c3c2a-ba99-413c-a849-bcd7f431f365", "metadata": {}, "source": [ "# Intro to the ADF\n", "\n", "This package is meant to be an update/upgrade to the much used and beloved AMWG diagnostics package used by the atmospheric/chemistry CESM community. It is still under active development and is near it's first major version.\n", "\n", "\n", "### What is it?\n", "\n", "The ADF is an open source, community developed Python-based set of collection of analysis (averaging), re-gridding, and plotting scripts aimed at replacing the old AMWG Diagnostics package (NCL-based). It is designed to be a multipurpose tool and has been built to be somewhat flexible for customization.\n", "\n", "\n", "\n", "### Who is it for?\n", "\n", "The ADF is geared towards users who are running CAM or CAM-like (MPAS) simulations that are looking to compare their runs agains other CAM simulations, observations/reanalysis or model comparison sets (like CMIP/AMIP).\n", "\n", "### Key Features\n", "\n", " Flexible and Open Source\n", "\n", "   - ADF code is completely open to the public
\n", "    - Users can modify their clone of the ADF to fit their needs if desired\n", "\n", " Use of GeoCAT functions (currently limited use)\n", "\n", " Use of YAML configuration files\n", "\n", "   - helps to avoid changing source code\n", "\n", " Option for use of multiple processors\n", "\n", " Installation via Git and Conda package manager\n", "\n", "   - CISL machines are set to run out of the box with required dependencies\n", "\n", " Centralize vertical interpolation\n", "\n", " -> Regridding and vertical interpolation script which interpolates all model variables with a vertical component onto a standard set of pressure levels\n", "\n", " -> Allows 3D model variable comparison against 3D observations\n", "\n", "   - Assuming the observations are also on the same set of pressure levels\n", " \n", " Enable interpolation on MPAS vertical coordinate\n", "\n", " -> Checks for the MPAS height-based vertical coordinate, and if present it will enable pressure-to-pressure vertical interpolation required to get MPAS data onto the standard pressure levels used by the ADF\n", "\n", "\n", "\n", "\n", "### Types of ADF Comparisons\n", "\n", "There are essentially 3 types of comparisons:\n", "\n", "* CAM vs CAM\n", "* CAM vs Observations/Reanalysis\n", "* CAM vs CMIP\n", "\n", " Each of which can be run as:\n", "\n", "\n", "\n", "\n", "Each have their own requirements for the run-time config file. The requirements for each type of comparison will be addressed in their respective sections of this tutorial under the GUIDED EXAMPLES section.\n", "\n", "````{attention}\n", "Depending on how many years, plot types and variables you configure, the more time it takes\n", "\n", "* Rough average for all default plots, 10-20 years for 30 variables is ~45 minutes\n", "\n", "```{note}\n", "This is an active area of development; there are potential ways of cutting time/processes\n", "```\n", "\n", "````\n", "\n", "---" ] }, { "cell_type": "markdown", "id": "4f325cbb-6b87-482b-8b64-98ac2fdaadff", "metadata": {}, "source": [ "## ADF Basics\n", "\n", "Now let's take a quick look at what the ADF actually does and the flow of it.\n", "\n", "\n", "### ADF Flow\n", "\n", "A simple look at the flow of the ADF
\n", " ↳ Create time series files from monthly history files
\n", "  ↳ Create climatology files from either ADF generated or pre-existing time series files (ie CMIP)
\n", "   ↳ Regrid Test case from Baseline case and vice-versa from climatology files
\n", "    ↳ Run Analysis scripts
\n", "     ↳ Run Plotting scripts
\n", "      ↳ Generate Website pages\n", "\n", "\n", "** Most parts of the ADF are optional and can be turned off for your desired need:\n", "\n", "Potential Examples:\n", " \n", "- If you only want regridded data, turn off plotting, analysis, website parts\n", " \n", "- If you want plotting and only need a few plot images, you can turn off the website part\n", " \n", "- If you only want time series files, you can turn off all other parts\n", " \n", "- If you don’t care about the statistics (AMWG) tables, turn off analysis part\n", " \n", "- etc.\n", "\n", "---\n", "\n", "\n", "\n", "### ADF Layout\n", "\n", "A simple look at the structure of the ADF directories\n", "\n", "\n", "\n", "```\n", ".\n", "|-- config_amwg_default_plots.yaml\n", "|-- config_cam_baseline_example.yaml\n", "|-- env\n", "| `-- conda_environment.yaml\n", "|-- jupyter_sample.ipynb\n", "|-- lib\n", "| |-- adf_base.py\n", "| |-- adf_config.py\n", "| |-- adf_diag.py\n", "| |-- adf_info.py\n", "| |-- adf_obs.py\n", "| |-- adf_variable_defaults.yaml\n", "| |-- adf_web.py\n", "| |-- plotting_functions.py\n", "| |-- test\n", "| | |-- pylintrc\n", "| | `-- unit_tests\n", "| | |-- pytest.ini\n", "| | |-- test_adf_base.py\n", "| | |-- test_adf_config.py\n", "| | `-- test_files\n", "| | |-- config_cam_double_nested.yaml\n", "| | |-- config_cam_keywords.yaml\n", "| | `-- config_cam_unset_var.yaml\n", "| `-- website_templates\n", "| |-- adf_diag.css\n", "| |-- NCAR.gif\n", "| |-- template.html\n", "| |-- template_index.html\n", "| |-- template_mean_diag.html\n", "| |-- template_mean_tables.html\n", "| |-- template_multi_case_index.html\n", "| |-- template_table.html\n", "| `-- template_var.html\n", "|-- LICENSE\n", "|-- README.md\n", "|-- run_adf_diag\n", "`-- scripts\n", " |-- analysis\n", " | `-- amwg_table.py\n", " |-- averaging\n", " | `-- create_climo_files.py\n", " |-- plotting\n", " | |-- cam_taylor_diagram.py\n", " | |-- global_latlon_map.py\n", " | |-- global_latlon_vect_map.py\n", " | |-- meridional_mean.py\n", " | |-- polar_map.py\n", " | |-- qbo.py\n", " | |-- regional_map_multicase.py\n", " | `-- zonal_mean.py\n", " `-- regridding\n", " `-- regrid_and_vert_interp.py\n", "```\n", "\n", "\n", "\n", "\n", "\n", "### ADF Setup\n", "\n", "A simple look at the steps for using the ADF\n", "\n", "0. Run CAM/other simulation to get ADF input files
\n", "   history files (ie: h0, h1, etc.)
\n", "   time series files (ie: C/AMIP)\n", "\n", "1. Configure copies of yaml file(s) for the input files
\n", "   config_cam_baseline_example.yaml
\n", "   lib/adf_variable_defaults.yaml \n", "\n", "2. Run the ADF
\n", "   simple command line call: `./run_adf_diag config_myadf.yaml`\n", "   run ADF in Jupyter notebook\n", "\n", "3. View Diagnostics
\n", "   Locally
\n", "   Jupyter/JupyterHub
\n", "   Publish to website\n" ] }, { "cell_type": "code", "execution_count": null, "id": "3c25f4f3-7964-46f5-93ac-ca3e066b5f4d", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python [conda env:jupyter-spell]", "language": "python", "name": "conda-env-jupyter-spell-py" }, "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.11.6" } }, "nbformat": 4, "nbformat_minor": 5 }