|
4 | 4 | "cell_type": "markdown", |
5 | 5 | "metadata": {}, |
6 | 6 | "source": [ |
7 | | - "# Quick start guide to model building and running with SPyice" |
| 7 | + "# Model building and running with SPyice for heat-salt transport system" |
8 | 8 | ] |
9 | 9 | }, |
10 | 10 | { |
11 | 11 | "cell_type": "markdown", |
12 | 12 | "metadata": {}, |
13 | 13 | "source": [ |
14 | | - "Demonstrates a simple example for a freezing sea ice model for a simple heat diffusion setup with default settings of initial conditions of 265K at the top boundary and Salinity of 34ppt choosing constant fixed Dirichlet boundary conditions. For the one phase distinct interface system where sea water is at melt temperature of 271.25K. " |
| 14 | + "Demonstrates a simple example for a freezing sea ice model heat-salt transport setup with default settings of initial conditions of 265K at the top boundary and Salinity of 34ppt choosing constant fixed Dirichlet boundary conditions. For the one phase distinct interface system where sea water is at melt temperature of 271.25K.\n" |
15 | 15 | ] |
16 | 16 | }, |
17 | 17 | { |
|
30 | 30 | "import os\n", |
31 | 31 | "from pathlib import Path\n", |
32 | 32 | "import matplotlib.pyplot as plt\n", |
| 33 | + "from datetime import datetime\n", |
33 | 34 | "\n", |
34 | 35 | "%matplotlib inline\n", |
35 | 36 | "from omegaconf import OmegaConf\n", |
|
55 | 56 | "outputs": [], |
56 | 57 | "source": [ |
57 | 58 | "# creates a OmegaConf object from a dictionary for fast testing only for parameters: constants, dt, S_IC, iter_max, dz\n", |
| 59 | + "# make sure to change userinput_data data class values if any parameters in constants_dict is changed!\n", |
58 | 60 | "constants_dict = {\n", |
59 | 61 | " \"constants\": {\"constants\": \"real\"},\n", |
60 | 62 | " \"dt\": {\"dt\": 47},\n", |
|
68 | 70 | "# choose your output directory\n", |
69 | 71 | "base_dir = Path.cwd()\n", |
70 | 72 | "output_base_dir = Path(base_dir, \"output\")\n", |
| 73 | + "# Current date-time string\n", |
| 74 | + "timestamp = datetime.now().strftime(\"%Y%m%d_%H%M%S\")\n", |
| 75 | + "output_base_dir = create_output_directory(output_base_dir, timestamp)\n", |
71 | 76 | "wo_hydra_dir = Path(output_base_dir, \"without_hydra\")\n", |
72 | 77 | "out_dir_final = create_output_directory(wo_hydra_dir, config.initial_salinity.S_IC, \"2\", \"0.01\", \"47\", \"1500\", \"example\")" |
73 | 78 | ] |
|
119 | 124 | "outputs": [], |
120 | 125 | "source": [ |
121 | 126 | "# choose the diffusion only equation for heat diffusion without the influence of salinity and physical properties\n", |
122 | | - "userinput_data.is_diffusiononly_equation = True" |
| 127 | + "userinput_data.is_diffusiononly_equation = True\n", |
| 128 | + "userinput_data.is_salinity_equation = True" |
| 129 | + ] |
| 130 | + }, |
| 131 | + { |
| 132 | + "cell_type": "code", |
| 133 | + "execution_count": null, |
| 134 | + "metadata": {}, |
| 135 | + "outputs": [], |
| 136 | + "source": [ |
| 137 | + "preprocess_data = PreProcess.update_preprocess_dataclass(preprocess_data, userinput_data)" |
123 | 138 | ] |
124 | 139 | }, |
125 | 140 | { |
|
0 commit comments