-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 42c720b
Showing
535 changed files
with
179,044 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 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
BIN
+96.4 KB
.doctrees/examples/parallel_coordinate_plot_mean_clim_multiMIPs.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 added
BIN
+90.3 KB
.doctrees/generated/pcmdi_metrics.graphics.parallel_coordinate_plot.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 added
BIN
+10.8 KB
.doctrees/generated/pcmdi_metrics.utils.check_daily_time_axis.doctree
Binary file not shown.
Binary file added
BIN
+12.3 KB
.doctrees/generated/pcmdi_metrics.utils.check_monthly_time_axis.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+11.6 KB
.doctrees/generated/pcmdi_metrics.utils.custom_season_average.doctree
Binary file not shown.
Binary file added
BIN
+11.1 KB
.doctrees/generated/pcmdi_metrics.utils.custom_season_departure.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+12.7 KB
.doctrees/generated/pcmdi_metrics.utils.extract_date_components.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+10.5 KB
.doctrees/generated/pcmdi_metrics.utils.find_overlapping_dates.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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.