From 57f1f172f507f3ee5497f82ab8853fa8454ab056 Mon Sep 17 00:00:00 2001 From: Sijia Wang Date: Mon, 2 Dec 2024 16:42:15 -0500 Subject: [PATCH] example notebook to set up model folder --- notebooks/setup-model.ipynb | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 notebooks/setup-model.ipynb diff --git a/notebooks/setup-model.ipynb b/notebooks/setup-model.ipynb new file mode 100644 index 00000000..37d8061e --- /dev/null +++ b/notebooks/setup-model.ipynb @@ -0,0 +1,70 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Notebook to demo how to run setup model to create a model folder from scratch and assemble input files" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "from tm2py.setup_model.setup import SetupModel" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "# The toml file for setup model, \n", + "# it specifies the model folder location and name, and where to copy different inputs and model configs from.\n", + "setup_model_config_file = \"../examples/setup_config.toml\"" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "setup_model = SetupModel(config_file=setup_model_config_file)\n", + "setup_model.run_setup()\n", + "\n", + "# user should find a setup_log.log in the model folder that has been created." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.7.6 ('tm2py')", + "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.7.6" + }, + "orig_nbformat": 4, + "vscode": { + "interpreter": { + "hash": "b564c90b96fe6e457cba1c3990ed677d35aa24e533fdcc9c0c68c20bb9920f1f" + } + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}