Skip to content

Commit 95c5d6d

Browse files
authored
Merge pull request #2 from WrenRaming/main
Updating structure
2 parents 5b90f03 + 25c7e5f commit 95c5d6d

File tree

11 files changed

+95
-30
lines changed

11 files changed

+95
-30
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ This repository hosts the setup for executing a single point model of the [Happy
44

55
## The structure of this repository is as follows:
66
### data
7-
Contains all the necessary data to run tRIBS at Happy Jack and includes Snotel and SWANN data as a calibration/validation set.
7+
Contains all the necessary data to run tRIBS at Happy Jack and includes Snotel and SWANN data as a calibration/validation set.
88
### doc
9-
Contains relevant documentation to running this specific benchmark case and other information regarding working with this repository, including requirements.
9+
Contains relevant documentation for running this specific benchmark case and other information regarding working with this repository, including requirements and instructions for building tRIBS.
1010
### src
11-
Contains two shell scripts: one (*runall.sh*) to execute the model and generate a log of the relevant model runs and the other(*summarize.sh*)a script that summarizes the results from the model run. This directory also contains two sub-directories: [inFile](/src/inFile) whic holds the .in files used to execute tRIBS and another, [scripts](/src/scripts) that contains subroutines for (*runall.sh*) and (*summarize.sh*).
11+
Is designed to contain source code for for the tRIBS executable, which can be obtained [here](https://github.com/tribshms/tribs_sub2020).
1212
### bin
13-
Directory for the tRIBS executable, which can be obtained and built from [here](https://github.com/tribshms/tribs_sub2020).
13+
Directory for building and storing tRIBS executable, with instructions [here](doc/CMake.md).
1414
### results
1515
Directory for results from the Happy Jack point tRIBS simulation.
1616

bin/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

bin/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Build and store tRIBS executable here

data/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Store tRIBS forcing and inputs here

doc/CMake.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# CMake
2+
3+
## instructions for compiling tRIBS on your machine using CMake
4+
5+
Note: these instructions are for using CMake via terminal, there is additional documentation [here](https://cmake.org/cmake/help/latest/guide/user-interaction/index.html#guide:User%20Interaction%20Guide) for using the CMake gui.
6+
7+
1) Use [Homebrew](https://formulae.brew.sh/formula/cmake)to install CMake, alternatively you can download [CMake](https://cmake.org/download/), but Homebrew is preferred as it will catch additional dependencies.
8+
9+
2) You can check to see if CMake is on your path, by typing cmake into the command line. If it says its not found then you will need to set cmake to your path. For example if you downloaded CMake and its now in your application folder you can use:
10+
11+
```bash
12+
sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
13+
```
14+
3) Next obtain the tRIBS source code from [here](https://github.com/tribshms/tribs_sub2020) and store in src.
15+
16+
4) Then execute the following code in the terminal, assuming you are in the root directory of HJ_Benchmark
17+
18+
```bash
19+
cmake -S src/tribs_sub2020 . -B bin/build
20+
cmake --build bin/build --target all
21+
```
22+
The first command tells CMake to generate the make files for tribs in a folder called build in bin. Followed by the second line which effectively compiles the code.
23+
24+
5) After you can check to see that the executable was made by using.
25+
```bash
26+
ls bin/build/
27+
```
28+
The executable will have a name specifed in the CMakeList.txt file. Currently it is set to tRIBS.
29+
30+
## Content of CMakeFile.txt
31+
32+
In some instance you may want to modify the CMakeFile.txt, for example if you want to change the name of the executable, or change compilation parallel mode to serial, or add additional compiler flags. This section will be updated with more detail to demonstrate how this is possible here, but the CMakeFile.txt is documented with where these changes can be made.
33+
34+
35+
## Return to [README](./README.md)

results/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

results/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Store tRIBS results, notes, and model execution scripts here

src/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Store tRIBS sourc code and pre and post processing scripts here

src/inFile/HJ_BENCH.in renamed to src/Template.in

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ OPTSNOW: Option for single layer snow model
3434
1
3535

3636
OUTFILENAME: Base name of the tMesh and variable output or HJ_results_off_
37-
Output/Results/Voi/HJ_results_on_
37+
results/HJ_results
3838

3939
OUTHYDROFILENAME: Base name for hydrograph output
40-
Output/Results/Hyd/HJ_results_on_
40+
results/HJ_results
4141

4242
GAUGESTATIONS: Rain Gauge station file (*.sdf) HJR_GF_2002-2018.sdf HJR_2002_AugEvent.sdf
43-
Rain/HJR_GF_2002-2018.sdf
43+
data/HJR_GF_2002-2018.sdf
4444

4545
GAUGECONVERT: Rain Gauge data conversion file (*.mdi)
4646

4747

4848
GAUGEBASENAME: Rain Gauge data BASE name (*.mdf) HJR_GF_2002-2018.mdf HJR_2002_AugEvent.mdf
49-
Rain/HJR_GF_2002-2018.mdf
49+
data/HJR_GF_2002-2018.mdf
5050

5151

5252

@@ -257,33 +257,33 @@ ARCINFOFILENAME: tMesh input file base name Arc files
257257

258258

259259
POINTFILENAME: tMesh input file name Points files
260-
Input/HappyJack.points
260+
data/HappyJack.points
261261

262262

263263
## Resampling Grids
264264
## -----------------
265265

266266

267267
SOILTABLENAME: Soil parameter reference table (*.sdt)
268-
Input/HJ_Soil_Table.sdt
268+
data/HJ_Soil_Table.sdt
269269

270270
SOILMAPNAME: Soil texture ASCII grid (*.soi)
271-
Input/HJ_Soil_Map.soi
271+
data/HJ_Soil_Map.soi
272272

273273
LANDTABLENAME: Land use parameter reference table (*.ldt)
274-
Input/HJ_Veg_Table.ldt
274+
data/HJ_Veg_Table.ldt
275275

276276
LANDMAPNAME: Land use ASCII grid (*.lan)
277-
Input/HJ_Veg_Map.lan
277+
data/HJ_Veg_Map.lan
278278

279279
GWATERFILE: Ground water ASCII grid (*.iwt)
280-
Input/HJ_Water_Table_Map.iwt
280+
data/HJ_Water_Table_Map.iwt
281281

282282
DEMFILE: DEM ASCII grid for sky and land view factors (*.dem)
283-
Input/Sheltering_DEM.dem
283+
data/Sheltering_DEM.dem
284284

285285
RAINFILE: Base name of the radar ASCII grid
286-
Rain/
286+
data/
287287

288288
RAINEXTENSION: Extension for the radar ASCII grid
289289
txt
@@ -292,10 +292,10 @@ DEPTHTOBEDROCK: Uniform depth to bedrock (meters)
292292
15
293293

294294
BEDROCKFILE: Bedrock depth ASCII grid (*.brd)
295-
Input/
295+
data/
296296

297297
LUGRID: Land cover grid data file (*.gdf)
298-
Input/Dynamic_Veg_Grid_Data.gdf
298+
data/Dynamic_Veg_Grid_Data.gdf
299299

300300

301301
## Meteorological Variables
@@ -323,7 +323,7 @@ PRECLAPSE: Precipitation lapse rate
323323

324324

325325
HYDROMETSTATIONS: Hydrometeorological station file (*.sdf)
326-
Weather/HJW_GF_2002-2018.sdf
326+
data/HJW_GF_2002-2018.sdf
327327

328328
HYDROMETGRID: Hydrometeorological grid data file (*.gdf)
329329

@@ -332,7 +332,7 @@ HYDROMETCONVERT: Hydrometeorological data conversion file (*.mdi)
332332

333333

334334
HYDROMETBASENAME: Hydrometeorological data BASE name (*.mdf)
335-
Weather/HJW_GF_2002-2018.mdf
335+
data/HJW_GF_2002-2018.mdf
336336

337337

338338

@@ -347,13 +347,13 @@ RIBSHYDOUTPUT: Compatibility with RIBS User Interphase
347347
0
348348

349349
NODEOUTPUTLIST: Filename with Nodes for Dynamic Output (*.nol)
350-
Input/Nodes/pNodes.dat
350+
data/Nodes/pNodes.dat
351351

352352
HYDRONODELIST: Filename with Nodes for HydroModel Output (*.nol)
353-
Input/Nodes/hNodes.dat
353+
data/Nodes/hNodes.dat
354354

355355
OUTLETNODELIST: Filename with Interior Nodes for Output (*.nol)
356-
Input/Nodes/oNodes.dat
356+
data/Nodes/oNodes.dat
357357

358358
##=========================================================================
359359
##
@@ -394,7 +394,7 @@ FORECASTLENGTH: Forecast Window Length (hours)
394394
0
395395

396396
FORECASTFILE: Base name of the radar QPF grids
397-
Rain/
397+
data/
398398

399399
CLIMATOLOGY: Rainfall climatology (mm/hr)
400400
0
@@ -457,7 +457,7 @@ RESTARTINTRVL: Time set for restart output (hours)
457457
12
458458

459459
RESTARTDIR: Path of directory for restart output
460-
Restart/
460+
data/
461461

462462
RESTARTFILE: Actual file to restart a run
463463
tRIBS_Rstrt_00012

0 commit comments

Comments
 (0)