|
1 | | -## Quickstart |
2 | | - |
3 | | -> [!TIP] |
4 | | -> `build_tsmp2.sh` is a lightweight shell-script calling the CMake-based build-system. During execution of `build_tsmp2.sh`, the executed CMake-command is printed out. For advanced build use-cases, users can modify the outputted CMake command or directly head over to [Building TSMP2 with CMake](#Building-TSMP2-with-CMake). |
5 | | -
|
6 | | -1. Clone this repository. |
7 | | - |
8 | | -```bash |
9 | | -git clone https://github.com/HPSCTerrSys/TSMP2.git |
10 | | -export TSMP2_DIR=$(realpath TSMP2) |
11 | | -cd $TSMP2_DIR |
12 | | -``` |
13 | | - |
14 | | -2. Build model components with TSMP2 framework |
15 | | - |
16 | | -To build a model component one need to activate the component model `--<COMP>`. The options are not case-sensitive and do not need to be in an specific order. |
17 | | - |
18 | | -> [!NOTE] |
19 | | -> The component models (git submodules) are cloned during the execution of `build_tsmp2.sh`. If the component model (`models/<COMP>`) are already exists, the user is asked if the folder should be overwritten or not. If you do want to use the default model component source codes, one can use the option `--<COMP_SRC>`. |
20 | | -
|
21 | | - |
22 | | -```bash |
23 | | -# to see options |
24 | | -./build_tsmp2.sh --help |
25 | | - |
26 | | -# ICON-eCLM-ParFlow |
27 | | -./build_tsmp2.sh --ICON --eCLM --PARFLOW |
28 | | - |
29 | | -# eCLM-ParFlow |
30 | | -./build_tsmp2.sh --eCLM --PARFLOW |
31 | | - |
32 | | -# ICON-eCLM |
33 | | -./build_tsmp2.sh --ICON --eCLM |
34 | | - |
35 | | -# eCLM-PDAF |
36 | | -./build_tsmp2.sh --eCLM --PDAF |
37 | | - |
38 | | -# ICON (with source code) |
39 | | -./build_tsmp2.sh --ICON --ICON_SRC ${ICON_SRC} |
40 | | - |
41 | | -# ParFlow on Marvin (Uni Bonn) |
42 | | -./build_tsmp2.sh --ParFlow --env env/uni-bonn.gnu.openmpi |
43 | | -``` |
44 | | - |
45 | | - |
46 | | -## Building TSMP2 with CMake |
47 | | - |
48 | | -> [!NOTE] |
49 | | -> For experienced users. |
50 | | -> The result of the following commands may be different from the Quickstart above, most notably because the branches/commits in the `git clone` commands are not kept in sync with those in the `build_tsmp2.sh` script. |
51 | | -> The [Quickstart](#Quickstart) is the tested and supported method. |
52 | | -
|
53 | | -1. Clone this repository. |
54 | | - |
55 | | -```bash |
56 | | -git clone https://github.com/HPSCTerrSys/TSMP2.git |
57 | | -export TSMP2_DIR=$(realpath TSMP2) |
58 | | -cd $TSMP2_DIR |
59 | | -``` |
60 | | - |
61 | | -2. Load the environment variables required for the build. |
62 | | - |
63 | | -```bash |
64 | | -source env/jsc.2024_Intel.sh |
65 | | -``` |
66 | | - |
67 | | -3. Specify build and install directories. |
68 | | - |
69 | | -```bash |
70 | | -# Name of the coupled model (e.g. ICON-eCLM, CLM3.5-COSMO-ParFlow, CLM3.5-ParFlow, CLM3.5-ParFlow-PDAF) |
71 | | -MODEL_ID="ICON-eCLM-ParFlow" |
72 | | - |
73 | | -# Build artifacts will be generated in this folder. It can be deleted after build. |
74 | | -BUILD_DIR="./bld/${SYSTEMNAME^^}_${MODEL_ID}" |
75 | | - |
76 | | -# Model executables and libraries will be installed here |
77 | | -INSTALL_DIR="./bin/${SYSTEMNAME^^}_${MODEL_ID}" |
78 | | - |
79 | | -# Create build and install directories |
80 | | -mkdir -p ${BUILD_DIR} ${INSTALL_DIR} |
81 | | -``` |
82 | | - |
83 | | -4. Download the OASIS3-MCT coupling library and the component models |
84 | | -you wish to use. You can check out the supported submodule commits |
85 | | -using |
86 | | - |
87 | | -```bash |
88 | | -# eCLM |
89 | | -git submodule update --init -- models/eCLM |
90 | | - |
91 | | -# ICON |
92 | | -git submodule update --init -- models/icon |
93 | | - |
94 | | -# ParFlow |
95 | | -git submodule update --init -- models/parflow |
96 | | - |
97 | | -# ParFlow (PDAF-patched) |
98 | | -git submodule update --init -- models/parflow_pdaf |
99 | | - |
100 | | -# CLM3.5 |
101 | | -git submodule update --init -- models/CLM3.5 |
| 1 | +# Terrestrial Systems Modeling Platform v2 (TSMP2) |
102 | 2 |
|
103 | | -# COSMO5.01 |
104 | | -git submodule update --init -- models/cosmo5.01_fresh |
| 3 | +[](https://github.com/HPSCTerrSys/TSMP2/actions/workflows/docs.yml) |
| 4 | +[](https://github.com/HPSCTerrSys/TSMP2/actions/workflows/CI.yml) |
| 5 | +[](https://helmholtz.software/software/tsmp2) |
105 | 6 |
|
106 | | -# OASIS3-MCT (required for coupled models) |
107 | | -git submodule update --init -- models/oasis3-mct |
| 7 | +## Introduction |
108 | 8 |
|
109 | | -# PDAF |
110 | | -git submodule update --init -- models/pdaf |
111 | | -``` |
| 9 | +The Terrestrial System Modeling Platform v2 (TSMP2, https://www.terrsysmp.org) is an open source scale-consistent, highly modular, massively parallel regional Earth system model. TSMP essentially consists of an interface which couples dedicated versions of the ICOsahedral Nonhydrostatic ([ICON](https://www.icon-model.org/)) atmospheric model in NWP or climate mode, the encore Community Land Model ([eCLM](https://hpscterrsys.github.io/eCLM)), and the hydrologic model [ParFlow](https://www.parflow.org) through the [OASIS3](https://oasis.cerfacs.fr/en/)-[MCT](https://www.mcs.anl.gov/research/projects/mct/) coupler. |
112 | 10 |
|
113 | | -If you wish to use alternative (possibly unsupported) commits of |
114 | | -component models, clone them explicitly. Then save the full path to |
115 | | -each model source code to `<model-name>_SRC`. Examples are given |
116 | | -below: |
| 11 | +TSMP allows for a physically-based representation of transport processes of mass, energy and momentum and interactions between the different compartments of the geo-ecosystem across scales, explicitly reproducing feedbacks in the hydrological cycle from the groundwater into the atmosphere. |
117 | 12 |
|
118 | | -```bash |
119 | | -## NOTE: Download only the component models that you need! ## |
| 13 | +TSMP-PDAF describes the build commands of TSMP that can introduce data |
| 14 | +assimilation for an ensemble of TSMP simulations using the Parallel |
| 15 | + Data Assimilation Framework |
| 16 | +([PDAF](https://pdaf.awi.de/trac/wiki)). For more information, see the |
| 17 | +[documentation of TSMP-PDAF](https://hpscterrsys.github.io/pdaf). |
120 | 18 |
|
121 | | -# eCLM |
122 | | -git clone -b beta-0.2 https://github.com/HPSCTerrSys/eCLM.git models/eCLM |
123 | | -eCLM_SRC=`realpath models/eCLM` |
| 19 | +TSMP development has been driven by groups within the [Center for High-Performance Scientific Computing in Terrestrial Systems](http://www.hpsc-terrsys.de) (HPSC-TerrSys). |
124 | 20 |
|
125 | | -# ICON |
126 | | -git clone https://icg4geo.icg.kfa-juelich.de/spoll/icon2.6.4_oascoup.git models/icon |
127 | | -ICON_SRC=`realpath models/icon` |
128 | | - |
129 | | -# ParFlow |
130 | | -git clone https://github.com/parflow/parflow.git models/parflow |
131 | | -PARFLOW_SRC=`realpath models/parflow` |
132 | | - |
133 | | -# ParFlow (PDAF-patched) |
134 | | -git clone -b v3.13.0-pdaf https://github.com/HPSCTerrSys/parflow models/parflow_pdaf |
135 | | -PARFLOW_SRC=`realpath models/parflow_pdaf` |
136 | | - |
137 | | -# CLM3.5 |
138 | | -git clone -b tsmp-patches-v0.1 https://github.com/HPSCTerrSys/CLM3.5.git models/CLM3.5 |
139 | | -CLM35_SRC=`realpath models/CLM3.5` |
140 | | - |
141 | | -# COSMO5.01 |
142 | | -git clone -b tsmp-oasis https://icg4geo.icg.kfa-juelich.de/ModelSystems/tsmp_src/cosmo5.01_fresh.git models/cosmo5.01_fresh |
143 | | -COSMO_SRC=`realpath models/cosmo5.01_fresh` |
144 | | - |
145 | | -# OASIS3-MCT (required for coupled models) |
146 | | -git clone -b tsmp-patches-v0.1 https://icg4geo.icg.kfa-juelich.de/ExternalReposPublic/oasis3-mct models/oasis3-mct |
147 | | -OASIS_SRC=`realpath models/oasis3-mct` |
148 | | - |
149 | | -# PDAF |
150 | | -git clone -b PDAF_V2.2.1-tsmp https://github.com/HPSCTerrSys/pdaf.git models/pdaf |
151 | | -PDAF_SRC=`realpath models/pdaf` |
152 | | -``` |
153 | | - |
154 | | -5. Run CMake configure step for the model combination that you wish to build. The |
155 | | - examples below show different CMake configure commands for each model combination. |
156 | | - |
157 | | -```bash |
158 | | -# |
159 | | -# The component source is searched in models/component by default but there is also the possibility to choose the path to the source code of components with -D<COMP>_SRC=${<COMP>_SRC}. OASIS is taken by default when coupled models are chosen. |
160 | | -# |
161 | | - |
162 | | -# ICON-eCLM |
163 | | -cmake -S . -B ${BUILD_DIR} \ |
164 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
165 | | - -DeCLM=ON \ |
166 | | - -DICON=ON |
167 | | - |
168 | | -# eCLM-ParFlow |
169 | | -cmake -S . -B ${BUILD_DIR} \ |
170 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
171 | | - -DeCLM=ON \ |
172 | | - -DPARFLOW_SRC=ON |
173 | | - |
174 | | -# ICON-eCLM-ParFlow |
175 | | -cmake -S . -B ${BUILD_DIR} \ |
176 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
177 | | - -DeCLM=ON \ |
178 | | - -DICON=ON \ |
179 | | - -DPARFLOW=ON |
180 | | - |
181 | | -# CLM3.5-COSMO5.01-ParFlow |
182 | | -cmake -S . -B ${BUILD_DIR} \ |
183 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
184 | | - -DCLM35=ON \ |
185 | | - -DCOSMO=ON \ |
186 | | - -DPARFLOW=ON |
187 | | - |
188 | | -# CLM3.5-ParFlow |
189 | | -cmake -S . -B ${BUILD_DIR} \ |
190 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
191 | | - -DCLM35=ON \ |
192 | | - -DPARFLOW=ON |
193 | | - |
194 | | -# CLM3.5-COSMO5.01 |
195 | | -cmake -S . -B ${BUILD_DIR} \ |
196 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
197 | | - -DCLM35=ON \ |
198 | | - -DCOSMO=ON |
199 | | - |
200 | | -# |
201 | | -# For standalone models |
202 | | -# pass the component model name (i.e. -D<model-name>=ON). |
203 | | -# |
204 | | - |
205 | | -# CLM3.5 standalone |
206 | | -cmake -S . -B ${BUILD_DIR} \ |
207 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
208 | | - -DCLM35=ON |
209 | | - |
210 | | -# eCLM standalone |
211 | | -cmake -S . -B ${BUILD_DIR} \ |
212 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
213 | | - -DeCLM=ON |
214 | | - |
215 | | -# ParFlow standalone |
216 | | -cmake -S . -B ${BUILD_DIR} \ |
217 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
218 | | - -DPARFLOW=ON |
219 | | - |
220 | | -# |
221 | | -# For TSMP-PDAF builds, add -PDAF=ON |
222 | | -# |
223 | | - |
224 | | -# CLM3.5-PDAF |
225 | | -cmake -S . -B ${BUILD_DIR} \ |
226 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
227 | | - -DCLM35=ON \ |
228 | | - -DPDAF=ON |
229 | | - |
230 | | -# CLM3.5-ParFlow-PDAF |
231 | | -cmake -S . -B ${BUILD_DIR} \ |
232 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
233 | | - -DCLM35=ON \ |
234 | | - -DPARFLOW=ON \ |
235 | | - -DPDAF=ON |
236 | | - |
237 | | -# eCLM-PDAF |
238 | | -cmake -S . -B ${BUILD_DIR} \ |
239 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
240 | | - -DeCLM=ON \ |
241 | | - -DPDAF=ON |
242 | | - |
243 | | -# eCLM-ParFlow-PDAF |
244 | | -cmake -S . -B ${BUILD_DIR} \ |
245 | | - -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
246 | | - -DeCLM=ON \ |
247 | | - -DPARFLOW=ON \ |
248 | | - -DPDAF=ON |
249 | | - |
250 | | -``` |
251 | | - |
252 | | -6. Build and install the models. |
253 | | - |
254 | | -```bash |
255 | | -cmake --build ${BUILD_DIR} |
256 | | -cmake --install ${BUILD_DIR} |
257 | | -``` |
258 | | - |
259 | | -### Resuming a failed build |
260 | | - |
261 | | -When the build gets interrupted or fails for some reason, it can be resumed by simply running Step 6: |
262 | | - |
263 | | -```bash |
264 | | -cmake --build ${BUILD_DIR} |
265 | | -cmake --install ${BUILD_DIR} |
266 | | -``` |
267 | | - |
268 | | -Note that this works only if the required environment variables are already set. If you are resuming |
269 | | -the build from a fresh terminal session, first you need to run `source env/jsc.2023_Intel.sh` (Step 2), specify `BUILD_DIR` (Step 3) and set `<model-name>_SRC` (Step 4) before you can run Step 6. |
270 | | - |
271 | | -### Rebuilding specific component models |
272 | | - |
273 | | -TSMP2 can rebuild a specific component model via the `cmake --build ${BUILD_DIR} --target ${MODEL}` command. |
274 | | -This may be useful when you need to recompile a component model that has been modified or updated. |
| 21 | +## Quickstart |
275 | 22 |
|
276 | | -```bash |
277 | | -# Rebuilding examples |
| 23 | +Please see [quickstart section](./docs/users_guide/building_TSMP2/Quickstart.md) for guided steps on how the model can be build. |
278 | 24 |
|
279 | | -cmake --build ${BUILD_DIR} --target eCLM && cmake --install ${BUILD_DIR} # Rebuilds eCLM |
280 | | -cmake --build ${BUILD_DIR} --target ICON && cmake --install ${BUILD_DIR} # Rebuilds ICON |
281 | | -cmake --build ${BUILD_DIR} --clean-first --target ParFlow && cmake --install ${BUILD_DIR} # Does a clean rebuild of ParFlow |
282 | | -``` |
| 25 | +## Usage / Documentation |
283 | 26 |
|
284 | | -Only component models specified during CMake configure step (see Step 5) can be rebuilt. For instance, if you |
285 | | -configured TSMP2 to build `eCLM-ParFlow`, then rebuilding `ICON` would of course be not possible. |
| 27 | +Please check the documentation at https://hpscterrsys.github.io/TSMP2 |
286 | 28 |
|
287 | | -The list below shows all component models supported by TSMP2. To rebuild a component model(s), |
288 | | -run one or more commands below, wait until the build succeeds, then finally run |
289 | | -`cmake --install ${BUILD_DIR}` so that the generated libraries and executables are copied to `${INSTALL_DIR}`. |
| 29 | +## License |
| 30 | +TSMP is open source software and is licensed under the [MIT-License](https://github.com/HPSCTerrSys/TSMP2/blob/master/LICENSE.txt). |
290 | 31 |
|
291 | | -- `cmake --build ${BUILD_DIR} --target eCLM` |
292 | | -- `cmake --build ${BUILD_DIR} --target ParFlow` |
293 | | -- `cmake --build ${BUILD_DIR} --target ICON` |
294 | | -- `cmake --build ${BUILD_DIR} --target OASIS3_MCT` |
295 | | -- `cmake --build ${BUILD_DIR} --target CLM3_5` |
296 | | -- `cmake --build ${BUILD_DIR} --target COSMO5_1` |
0 commit comments