{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "GAMCR in practice: A brief overview\n", "==============================" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Typical File Structure for GAMCR\n", "\n", "```plaintext\n", "GAMCR/\n", "├── experiments/\n", "│ ├── check_data.ipynb\n", "│ ├── save_data_batch.py\n", "│ ├── train_models.py\n", "│ ├── compute_statistics.py\n", "│ └── mysite/\n", "│ ├── results/\n", "│ │ ├── detailedresults/\n", "│ │ ├── groups.csv\n", "│ │ ├── NRF_RRD.csv\n", "│ │ └── streamflow.csv\n", "│ ├── data/\n", "│ │ ├── transfer.npy\n", "│ │ ├── lst_transfer.npy\n", "│ │ ├── y_0.npy\n", "│ │ └── ...\n", "│ ├── data_mysite.txt\n", "│ └── mysite_best_model.pkl\n", "```\n", " \n", "\n", "### Folder Structure for Using the GAMCR Package\n", "\n", "To properly use the GAMCR package, you should have a folder for each site with the following structure:\n", "\n", "- You can name the folder as per your preference. For example: `mysite`.\n", "- Inside this folder, you should have a file named `data_{mysite}.txt`. \n", " This file can be created by running the notebook `check_data.ipynb`.\n", "- Two subfolders will be created and used by GAMCR:\n", " - **`data/`**: \n", " This subfolder will store the preprocessed data, created when running the script `save_data_batch.py`. \n", " - For simulated data: \n", " - If the true transfer functions have been computed, they are saved in a matrix in the file `transfer.npy`. \n", " - The indices corresponding to each precipitation event used to compute the true transfer functions are saved in the file `lst_transfer.npy`.\n", " - **`results/`**: \n", " This subfolder will store various statistics on the results of a trained model, created when running the script `compute_statistics.py`. Specifically, the following files will be generated:\n", " - `groups.csv`: Describes the precipitation and/or antecedent wetness ranges for each group of data points used to compute averages.\n", " - `NRF_RRD.csv`: Contains NRF, RRD, and weighted average RRD computed for the different groups of data points.\n", " - `streamflow.csv`: Includes observed and predicted streamflow time series.\n", "- GAMCR will also save the models you train for that site in this folder. \n", " By running the script `train_models.py`, a file named `{mysite}_best_model.pkl` will be generated.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "![Screen shot of an example of simulated data.](../../_static/gamcr_readme.png)" ] } ], "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.10.12" } }, "nbformat": 4, "nbformat_minor": 4 }