{ "cells": [ { "cell_type": "markdown", "id": "be6cc596-ea4e-4a65-a558-f5d08ede1431", "metadata": {}, "source": [ "# CAM vs Obs\n", "\n", "This will be a simple guided demo of running the ADF with sample data for CAM vs CAM comparison. For an example of CAM simulation vs observations/reanalysis, navigate to this demo\n", "\n", "Use this as a follow along as you work locally for this example ADF run.\n", "\n", "Navigate to where you cloned the ADF:\n", "\n", "- If you followed our instructions earlier, you should have the ADF root directory at: `/glade/work//ADF/`\n", "\n", "\n", "\n", "For this guided demo we will first make a copy of the run-time config file and make some changes in that copy.\n", "\n", "\n", "\n", "### Configure Run-Time yaml file\n", "\n", "###### Introduction\n", "\n", "

Look for the conifuration yaml file that will be used to run the ADF, `config_baseline_example.yaml`\n", "\n", "This is probably the most important file for the ADF. This stores all the necessary information that the ADF needs to run as well as all the relevant information about the case and baseline/observation/cmip runs.

\n", "\n", "Each section of the yaml file represent grouped subsets of information sent to the ADF and each have variable names that get fed into the ADF in a specific fashion.\n", "\n", "We will copy the provided configuration yaml file `config_baseline_example.yaml` and will do small edits to run an example ADF with sample data.\n", "\n", " cp config_baseline_example.yaml config_tutorial_example.yaml\n", "\n", "

\n", "\n", "###### Modify the Copy\n", "\n", "

Next open this new copy in your favorite editor:\n", " \n", " emacs config_tutorial_example.yaml\n", "\n", "Here we will do just a couple of changes for the output paths and cases/climo years\n", "

\n", "\n", "\n", "##### Subsections\n", "\n", "A quick refresher of the different sections on this yaml file\n", "\n", "* diag_basic_info\n", " - Basic overall run variables\n", " \n", "* diag_cam_climo\n", " - Test (experiment) case variables\n", " \n", "* diag_cam_baseline_climo\n", " - Baseline (control) case variables\n", " - Note: these are the same variables as `diag_cam_climo` just for the baseline case\n", " \n", "* diag_cvdp_info\n", " - For running the Climate Variability Diagnostics Package https://www.cesm.ucar.edu/projects/cvdp\n", " - This will run in the background of the ADF\n", " \n", "* time_averaging_scripts\n", " - Climotology file creation\n", " \n", "* regridding_scripts\n", " - Regridding of climo files\n", " \n", "* analysis_scripts\n", " - AMWG statisics tables\n", " \n", "* plotting_scripts\n", " - Various plotting scripts\n", " \n", "* diag_var_list\n", " - List of CAM variables for ADF to run\n", "\n", "
\n", "\n", "\n", "

We will be editing the following sections:

\n", "\n", "*

Global Variables

\n", "*

diag_basic_info

\n", "*

diag_cam_climo

\n", "\n", "
\n", "\n", "


\n", "\n", "###### Global Variables\n", "\n", "In the yaml file, let's set global variables. These variables will be set above all the subsections so that they can be easily called in anywhere in the file.\n", "\n", "Set the user name that will be help set all paths later in the yaml file\n", "

user: richling (YOUR-USER-NAME)

\n", "\n", "Create a new variable `adf_path` for the root ADF path. This will be used to house the different directories for the time series, climo, and regridded files as well as where the plots and websites will go\n", "

adf_path: /glade/scratch/${user}/ADF

\n", "\n", "Also create a variable `hist_path` for the path to the sample history files\n", "

hist_path: /glade/scratch/richling/ADF/tutorials/data

\n", "\n", "
\n", "

Attention

\n", "

This is meerly a suggestion of how to configure the locations of all the files and diagnostic plots. We will stick to this convention for this tutorial, but please feel free to setup your ADF diagnsotics paths/hieracrhy in anyway that makes sense for your actual needs!

\n", "
\n", "\n", "\n", "\n", "###### diag_basic_info\n", "This subsection defines necessary variables for the overall ADF run\n", "\n", "We can change the paths for the regridded data and plot locations\n", "\n", "

cam_regrid_loc: ${adf_path}/regrid

\n", "\n", "

cam_diag_plot_loc: ${adf_path}/plots

\n", "\n", "###### diag_cam_climo\n", "\n", "

cam_case_name: f.cam6_3_106.FLTHIST_v0a.ne30.dcs_non-ogw.001

\n", "\n", "

cam_hist_loc: ${hist_path}/f.cam6_3_106.FLTHIST_v0a.ne30.dcs_effgw_rdg.001

\n", "

cam_climo_loc: ${adf_path}/climo/{diag_cam_climo.cam_case_name}

\n", "

start_year: 1995

\n", "

end_year: 2000

\n", "

cam_ts_loc: ${adf_path}/ts/{diag_cam_climo.cam_case_name}

\n", "\n", "\n", "\n", "---\n", "\n", "

\n", "\n", "\n", "\n", "````{div} full-width\n", "\n", "

With all these variables now set, let's take a quick catalogue of the different paths:

\n", "\n", "\n", "Regridded file location:\n", "
\n", "

/glade/scratch/<user>/ADF/regrid

\n", "\n", "Diagnostic plot location:\n", "\n", "

/glade/scratch/<user>/ADF/plots

\n", "\n", "

   The ADF will output a new directory in the above location named:

\n", "\n", "

    f.cam6_3_106.FLTHIST_v0a.ne30.dcs_non-ogw.001_1995_2000_vs_Obs/

\n", "\n", "Climatology file locations:\n", "\n", "

/glade/scratch/<user>/ADF/climo/f.cam6_3_106.FLTHIST_v0a.ne30.dcs_non-ogw.001

\n", "\n", "\n", "\n", "Timeseries locations:\n", " \n", "

/glade/scratch/<user>/ADF/ts/f.cam6_3_106.FLTHIST_v0a.ne30.dcs_non-ogw.001

\n", "\n", "\n", " \n", "
\n", "\n", "````" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.12" } }, "nbformat": 4, "nbformat_minor": 5 }