Skip to content

Commit

Permalink
Add link_to_ADF notebook
Browse files Browse the repository at this point in the history
This notebook should inject a link to the actual ADF output webpage into the
jupyter book
  • Loading branch information
mnlevy1981 committed Oct 10, 2024
1 parent 30e3cb9 commit 8f1653b
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/external_diag_packages/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,11 @@ compute_notebooks:
none: {}

atm:
nmse_PSL:
link_to_ADF:
kernel_name: cupid-dev
parameter_groups:
none:
regridded_output: False # it looks like output is already on f09 grid, didn't need to regrid time-series file
base_regridded_output: True
validation_path: '/glade/campaign/cesm/development/cross-wg/diagnostic_framework/nmse_validation/fv0.9x1.25'
html_link: computed_notebooks/ADF_webpage

# glc:
# LIWG_SMB_diagnostic:
Expand Down Expand Up @@ -191,7 +190,7 @@ book_toc:

- caption: Atmosphere
chapters:
- file: atm/nmse_PSL
- file: atm/link_to_ADF

# - caption: Ocean
# chapters:
Expand Down
80 changes: 80 additions & 0 deletions examples/nblibrary/atm/link_to_ADF.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "623cbc23-45bf-4dfd-9f49-8d814d0394ba",
"metadata": {},
"source": [
"# Link to ADF output\n",
"\n",
"The output from the stand-alone ADF configuration is in the link below"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "2a759f1b-eca7-4eec-a16a-eede1a6ab36c",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": [
"parameters",
"hide-cell"
]
},
"outputs": [],
"source": [
"html_link='../'"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "dded352a-71da-4074-b213-85125e989efa",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": [
"hide-input"
]
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<a href=\"\">ADF output</a>\n"
]
}
],
"source": [
"print(f'<a href=\"{html_link}\">ADF output</a>')"
]
}
],
"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.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit 8f1653b

Please sign in to comment.