Skip to content

Commit

Permalink
deploy: 4a9b79d
Browse files Browse the repository at this point in the history
  • Loading branch information
lee1043 committed Dec 23, 2024
0 parents commit 42c720b
Show file tree
Hide file tree
Showing 535 changed files with 179,044 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 5ae6a20d2703d34bdad28f79f8da80dc
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/api.doctree
Binary file not shown.
Binary file added .doctrees/contributing.doctree
Binary file not shown.
Binary file added .doctrees/demo-notebooks.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/examples/Demo_0_download_data.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/examples/Demo_1b_mean_climate.doctree
Binary file not shown.
Binary file added .doctrees/examples/Demo_2a_monsoon_wang.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/examples/Demo_3_diurnal_cycle.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/examples/Demo_5_mjo_metrics.doctree
Binary file not shown.
Binary file added .doctrees/examples/Demo_6_ENSO.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/examples/Demo_8_extremes.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/examples/portrait_plot_example.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/examples/taylor_diagram_example.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/install.doctree
Binary file not shown.
Binary file added .doctrees/metrics.doctree
Binary file not shown.
Binary file added .doctrees/metrics_enso.doctree
Binary file not shown.
Binary file added .doctrees/metrics_ext.doctree
Binary file not shown.
Binary file added .doctrees/metrics_mean-clim.doctree
Binary file not shown.
Binary file added .doctrees/metrics_mjo.doctree
Binary file not shown.
Binary file added .doctrees/metrics_monsoon.doctree
Binary file not shown.
Binary file added .doctrees/metrics_mov.doctree
Binary file not shown.
Binary file added .doctrees/metrics_precip-distribution.doctree
Binary file not shown.
Binary file added .doctrees/metrics_precip-variability.doctree
Binary file not shown.
Binary file added .doctrees/metrics_sea_ice.doctree
Binary file not shown.
Binary file added .doctrees/metrics_subdaily-precipitation.doctree
Binary file not shown.
156 changes: 156 additions & 0 deletions .doctrees/nbsphinx/examples/Demo_0_download_data.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 0. Prepare Demos\n",
"\n",
"Download sample data and set up parameter files\n",
"\n",
"This Notebook sets up the data for the other demos. It is recommended that you run this and other demos in a conda environment with **xcdat** and **pcmdi_metrics** installed. The files to download are listed in https://pcmdiweb.llnl.gov/pss/pmpdata/pmp_tutorial_files.v20240201.txt."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# Lets get the file containing the data needed for this demo\n",
"import requests\n",
"r = requests.get(\"https://pcmdiweb.llnl.gov/pss/pmpdata/pmp_tutorial_files.v20240201.txt\")\n",
"with open(\"data_files.txt\",\"wb\") as f:\n",
" f.write(r.content)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now let's retrieve these sample files locally. Please edit the following to match a good location on your system:\n",
"\n",
"`demo_data_directory` is a path where you would like to download our demo data \n",
"`demo_output_directory` is a path where you would like the demos output to be dumped. \n",
" \n",
"The last cell in this notebook automatically sets up the parameter files for the other demos to use your chosen demo_data and demo_output directories."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# This is where you will be downloading the sample_data\n",
"demo_data_directory = \"demo_data_tmp\"\n",
"# this line is where your output will be stored\n",
"demo_output_directory = \"demo_output_tmp\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In below cell, you are going to download sample input files from PCMDI server. The total size of dataset is about 2 GB, and so please be aware that downloading will take some time to complete."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"All files downloaded\n"
]
}
],
"source": [
"# Let's download the files\n",
"from pcmdi_metrics.io.base import download_sample_data_files\n",
"try:\n",
" download_sample_data_files(\"data_files.txt\", demo_data_directory)\n",
" print(\"All files downloaded\")\n",
"except Exception:\n",
" print(\"Download failed\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The final step is to generate parameter files from templates, using the demo_data_directory and demo_output_directory variables set above."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Preparing parameter file: basic_mjo_param.py\n",
"Preparing parameter file: basic_mov_param_sst.py\n",
"Preparing parameter file: basic_diurnal_composite.py\n",
"Preparing parameter file: basic_param.py\n",
"Preparing parameter file: basic_diurnal_compute_daily_mean.py\n",
"Preparing parameter file: basic_monsoon_sperber_param.py\n",
"Preparing parameter file: basic_diurnal_std_daily_mean.py\n",
"Preparing parameter file: basic_monsoon_wang_param.py\n",
"Preparing parameter file: basic_diurnal_fourier.py\n",
"Preparing parameter file: basic_enso_param.py\n",
"Preparing parameter file: basic_annual_cycle_param.py\n",
"Preparing parameter file: basic_extremes_param.py\n",
"Preparing parameter file: basic_diurnal_std_hourly_mean.py\n",
"Preparing parameter file: basic_diurnal_fourierAllGrid.py\n",
"Preparing parameter file: basic_mov_param.py\n",
"Preparing parameter file: basic_precip_variability_param.py\n",
"Saving User Choices\n"
]
}
],
"source": [
"from download_sample_data import generate_parameter_files\n",
"generate_parameter_files(demo_data_directory, demo_output_directory)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You're done!\n",
"Please proceed to the next tutorial"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "pmp_devel_20241202",
"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.10.10"
},
"selected_variables": [],
"vcdat_file_path": "",
"vcdat_loaded_variables": [],
"vcdat_variable_info": {}
},
"nbformat": 4,
"nbformat_minor": 4
}
Loading

0 comments on commit 42c720b

Please sign in to comment.