Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 3.5 KB

README.md

File metadata and controls

33 lines (25 loc) · 3.5 KB

Jupyter notebook demos

These notebooks provide some basic examples for running the PMP metrics modules. They demonstrate how to use both input parameter files and the command line to generate metrics. Parameter files are generated from the *.py.in templates by running the Demo_0_download_data.ipynb notebook.

Environment

PCMDI metrics package should be installed. Consult the documentation for more help.

To run the notebooks directly, the user should install jupyter notebook software. Additionally, the user should clone the PMP to acquire the notebooks: git clone https://github.com/PCMDI/pcmdi_metrics.git

Running the notebooks

From pcmdi_metrics, launch the jupyter notebook server: cd pcmdi_metrics/doc/jupyter/Demo/ jupyter notebook

If the notebook is being run on a remote server, set up an SSH tunnel to view it locally.

The jupyter dashboard will be launched in your browser. From there, navigate to Demo_0_download_data.ipynb. This notebook must be run first because it populates the demo data and parameter files for the later demos. The other notebooks can be run in any order. For more help with running notebooks, consult the documentation.

Copying commands from notebooks

The notebooks listed below contain command line examples that can be copied from the notebook, customized, and run in the terminal. These commands are found in cells with a %%bash header.

What's in the notebooks

  • Demo 0: Set data and output directories. Download sample data and use cdscan to create xml. Generate parameter files.
  • Demo 1a: Learn how to create annual climatology files for running the mean climate driver with custom data.
  • Demo 1b: Run the Mean Climate driver and explore the many options for customization.
  • Demo 2a: Run the Monsoon (Wang) driver and its options.
  • Demo 2b: Run the Monsoon (Sperber) driver with options. Maps the monsoon regions and displays output graphic.
  • Demo 3: Demonstrates the full workflow for running the Diurnal Cycle metrics.
  • Demo 4: Install scipy and eofs in the kernel environment, run the modes of variability driver with the NAM, and view an output image.
  • Demo 5: Run the MJO driver with options and view an output image.
  • Demo 6: Demonstrates how to run the three metrics collections in the ENSO metrics package.
  • Demo 7: Run metric for precipitation variability across time scales.