-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_file.py
48 lines (35 loc) · 1.09 KB
/
run_file.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# -*- coding: utf-8 -*-
"""
=========================================
run_file.py
=========================================
Run file for FTT Stand alone.
Programme calls the FTT stand-alone model run class, and executes model run.
Run this script from Spyder or VS Code directly, or call it from the command line (or terminal) to run FTT Stand Alone.
Local library imports:
Model Class:
- `ModelRun <model_class.html>`__
Creates a new instance of the ModelRun class
"""
# Local library imports
from SourceCode.model_class import ModelRun
# Instantiate the run
model = ModelRun()
# Fetch ModelRun attributes, for examination
# Titles of the model
titles = model.titles
# Dimensions of model variables
dims = model.dims
# Model inputs
inputs = model.input
# Metadata for inputs of the model
histend = model.histend
# Domains to which variables belong
domain = model.domain
tl = model.timeline
scens = model.scenarios
# Call the 'run' method of the ModelRun class to solve the model
model.run()
# Fetch ModelRun attributes, for examination
# Output of the model
output_all = model.output