{
"cells": [
{
"cell_type": "markdown",
"id": "623cbc23-45bf-4dfd-9f49-8d814d0394ba",
"metadata": {
"papermill": {
"duration": 0.002951,
"end_time": "2025-10-28T22:09:17.689065",
"exception": false,
"start_time": "2025-10-28T22:09:17.686114",
"status": "completed"
},
"tags": []
},
"source": [
"# CVDP\n",
"\n",
"A number of plots are provided from CVDP. The full output from the stand-alone CDVP configuration is in the link below.\n",
"\n",
"\n",
"Note that in standalone format (eg, CUPiD run not through CESM workflow), CVDP is currently run by users via ADF with the following process:\n",
"1) Install ADF and activate cupid-analysis\n",
"2) Use the `CUPiD/helper_scripts/generate_adf_config_file.py` script to generate an ADF config file based on a CUPiD configuration file.\n",
" * `cd CUPiD/examples/external_diag_packages`\n",
" * `../../helper_scripts/generate_adf_config_file.py --cupid-config-loc . --adf-template ../../externals/ADF/config_amwg_default_plots.yaml --out-file ADF_config.yaml`\n",
"3) Run ADF with the newly created configuration file.\n",
" * `../../externals/ADF/run_adf_diag ADF_config.yaml`"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "82af7435-3849-4fd1-bb2d-2e062719ec5b",
"metadata": {
"editable": true,
"execution": {
"iopub.execute_input": "2025-10-28T22:09:17.695472Z",
"iopub.status.busy": "2025-10-28T22:09:17.695160Z",
"iopub.status.idle": "2025-10-28T22:09:17.960287Z",
"shell.execute_reply": "2025-10-28T22:09:17.959765Z"
},
"papermill": {
"duration": 0.269955,
"end_time": "2025-10-28T22:09:17.961605",
"exception": false,
"start_time": "2025-10-28T22:09:17.691650",
"status": "completed"
},
"slideshow": {
"slide_type": ""
},
"tags": [
"hide-cell"
]
},
"outputs": [],
"source": [
"import os\n",
"\n",
"from IPython.core.display import HTML, Image\n",
"from IPython.display import display\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "2a759f1b-eca7-4eec-a16a-eede1a6ab36c",
"metadata": {
"editable": true,
"execution": {
"iopub.execute_input": "2025-10-28T22:09:17.967722Z",
"iopub.status.busy": "2025-10-28T22:09:17.967557Z",
"iopub.status.idle": "2025-10-28T22:09:17.971179Z",
"shell.execute_reply": "2025-10-28T22:09:17.970775Z"
},
"papermill": {
"duration": 0.007692,
"end_time": "2025-10-28T22:09:17.972442",
"exception": false,
"start_time": "2025-10-28T22:09:17.964750",
"status": "completed"
},
"slideshow": {
"slide_type": ""
},
"tags": [
"parameters",
"hide-cell"
]
},
"outputs": [],
"source": [
"cvdp_root = \".\"\n",
"case_name = None\n",
"key_plots = None\n",
"# cvdp_root will be external_diag_packages/computed_notebooks/CVDP/"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "57886bb6",
"metadata": {
"execution": {
"iopub.execute_input": "2025-10-28T22:09:17.977897Z",
"iopub.status.busy": "2025-10-28T22:09:17.977791Z",
"iopub.status.idle": "2025-10-28T22:09:17.982401Z",
"shell.execute_reply": "2025-10-28T22:09:17.981956Z"
},
"papermill": {
"duration": 0.007663,
"end_time": "2025-10-28T22:09:17.982952",
"exception": false,
"start_time": "2025-10-28T22:09:17.975289",
"status": "completed"
},
"tags": [
"injected-parameters"
]
},
"outputs": [],
"source": [
"# Parameters\n",
"case_name = \"b.e30_alpha07c_cesm.B1850C_LTso.ne30_t232_wgx3.232\"\n",
"base_case_name = \"b.e30_alpha07c_cesm.B1850C_LTso.ne30_t232_wgx3.228\"\n",
"CESM_output_dir = \"/glade/campaign/cesm/development/cross-wg/diagnostic_framework/CESM_output_for_testing\"\n",
"start_date = \"0001-01-01\"\n",
"end_date = \"0021-01-01\"\n",
"base_start_date = \"0001-01-01\"\n",
"base_end_date = \"0045-01-01\"\n",
"obs_data_dir = (\n",
" \"/glade/campaign/cesm/development/cross-wg/diagnostic_framework/CUPiD_obs_data\"\n",
")\n",
"ts_dir = None\n",
"lc_kwargs = {\"threads_per_worker\": 1}\n",
"serial = False\n",
"cvdp_root = \"../../examples/key_metrics/CVDP_output/\"\n",
"key_plots = [\n",
" \"nino34.spatialcomp.djf1.png\",\n",
" \"nino34.hov.elnino.png\",\n",
" \"nino34.hov.lanina.png\",\n",
" \"sst.stddev.djf.png\",\n",
" \"nino34.monstddev.png\",\n",
"]\n",
"subset_kwargs = {}\n",
"product = \"/glade/work/richling/CUPid_pr_test/CUPiD/examples/key_metrics/computed_notebooks//atm/CVDP.ipynb\"\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "ee0774cc-c68a-4385-b94c-08fa806f28c0",
"metadata": {
"editable": true,
"execution": {
"iopub.execute_input": "2025-10-28T22:09:17.985880Z",
"iopub.status.busy": "2025-10-28T22:09:17.985647Z",
"iopub.status.idle": "2025-10-28T22:09:17.994485Z",
"shell.execute_reply": "2025-10-28T22:09:17.994097Z"
},
"papermill": {
"duration": 0.011339,
"end_time": "2025-10-28T22:09:17.995463",
"exception": false,
"start_time": "2025-10-28T22:09:17.984124",
"status": "completed"
},
"slideshow": {
"slide_type": ""
},
"tags": [
"hide-input"
]
},
"outputs": [
{
"data": {
"text/html": [
"Full CVDP output"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"cvdp_case_name = f\"{case_name}\"\n",
"cvdp_root = os.path.join(cvdp_root, cvdp_case_name, \"output/\")\n",
"display(\n",
" HTML(\n",
" f'Full CVDP output'\n",
" )\n",
")"
]
},
{
"cell_type": "markdown",
"id": "f9234aec-1fe5-4bbf-ad6c-fb565297afbe",
"metadata": {
"papermill": {
"duration": 0.002631,
"end_time": "2025-10-28T22:09:18.000931",
"exception": false,
"start_time": "2025-10-28T22:09:17.998300",
"status": "completed"
},
"tags": []
},
"source": [
"## Key Metrics from CVDP\n",
"\n",
"Some important things to look at from the CVDP:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "f877ed8e-bca3-4256-8010-69aad302bb32",
"metadata": {
"editable": true,
"execution": {
"iopub.execute_input": "2025-10-28T22:09:18.005684Z",
"iopub.status.busy": "2025-10-28T22:09:18.005432Z",
"iopub.status.idle": "2025-10-28T22:09:18.009173Z",
"shell.execute_reply": "2025-10-28T22:09:18.008622Z"
},
"papermill": {
"duration": 0.006269,
"end_time": "2025-10-28T22:09:18.009736",
"exception": false,
"start_time": "2025-10-28T22:09:18.003467",
"status": "completed"
},
"slideshow": {
"slide_type": ""
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"for path_to_key_plot in key_plots:\n",
" full_path = os.path.join(cvdp_root, path_to_key_plot)\n",
" if os.path.isfile(full_path):\n",
" display(Image(full_path))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "cupid-infrastructure",
"language": "python",
"name": "cupid-infrastructure"
},
"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.4"
},
"papermill": {
"duration": 1.113527,
"end_time": "2025-10-28T22:09:18.227611",
"exception": null,
"input_path": "/glade/derecho/scratch/richling/tmp/tmpnb97zwn_.ipynb",
"output_path": "/glade/work/richling/CUPid_pr_test/CUPiD/examples/key_metrics/computed_notebooks/atm/CVDP.ipynb",
"parameters": {
"CESM_output_dir": "/glade/campaign/cesm/development/cross-wg/diagnostic_framework/CESM_output_for_testing",
"base_case_name": "b.e30_alpha07c_cesm.B1850C_LTso.ne30_t232_wgx3.228",
"base_end_date": "0045-01-01",
"base_start_date": "0001-01-01",
"case_name": "b.e30_alpha07c_cesm.B1850C_LTso.ne30_t232_wgx3.232",
"cvdp_root": "../../examples/key_metrics/CVDP_output/",
"end_date": "0021-01-01",
"key_plots": [
"nino34.spatialcomp.djf1.png",
"nino34.hov.elnino.png",
"nino34.hov.lanina.png",
"sst.stddev.djf.png",
"nino34.monstddev.png"
],
"lc_kwargs": {
"threads_per_worker": 1
},
"obs_data_dir": "/glade/campaign/cesm/development/cross-wg/diagnostic_framework/CUPiD_obs_data",
"product": "/glade/work/richling/CUPid_pr_test/CUPiD/examples/key_metrics/computed_notebooks//atm/CVDP.ipynb",
"serial": false,
"start_date": "0001-01-01",
"subset_kwargs": {},
"ts_dir": null
},
"start_time": "2025-10-28T22:09:17.114084"
}
},
"nbformat": 4,
"nbformat_minor": 5
}