forked from respec/HSPsquared
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.py
71 lines (60 loc) · 2.53 KB
/
configuration.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
''' Copyright (c) 2020 by RESPEC, INC.
Author: Robert Heaphy, Ph.D.
License: LGPL2
'''
from numpy import zeros
# new activity modules must be added here and in *activites* below
from HSP2.ATEMP import atemp
from HSP2.SNOW import snow
from HSP2.PWATER import pwater
from HSP2.SEDMNT import sedmnt
from HSP2.PSTEMP import pstemp
from HSP2.PWTGAS import pwtgas
from HSP2.PQUAL import pqual
from HSP2.IWATER import iwater
from HSP2.SOLIDS import solids
from HSP2.IWTGAS import iwtgas
from HSP2.IQUAL import iqual
from HSP2.HYDR import hydr, expand_HYDR_masslinks
from HSP2.ADCALC import adcalc
from HSP2.HTRCH import htrch, expand_HTRCH_masslinks
from HSP2.SEDTRN import sedtrn, expand_SEDTRN_masslinks
from HSP2.CONS import cons, expand_CONS_masslinks
from HSP2.GQUAL import gqual, expand_GQUAL_masslinks
from HSP2.RQUAL import rqual
from HSP2.RQUAL import expand_OXRX_masslinks
from HSP2.RQUAL import expand_NUTRX_masslinks
from HSP2.RQUAL import expand_PLANK_masslinks
from HSP2.RQUAL import expand_PHCARB_masslinks
#from HSP2.GENER import gener
from HSP2.COPY import Copy
from HSP2.GENER import Gener
def noop (store, siminfo, ui, ts):
ERRMSGS = []
errors = zeros(len(ERRMSGS), dtype=int)
return errors, ERRMSGS
# Note: This is the ONLY place in HSP2 that defines activity execution order
activities = {
'COPY' : Copy,
'GENER' : Gener,
'PERLND': {'ATEMP':atemp, 'SNOW':snow, 'PWATER':pwater, 'SEDMNT':sedmnt,
'PSTEMP':pstemp, 'PWTGAS':pwtgas, 'PQUAL':pqual, 'MSTLAY':noop, 'PEST':noop,
'NITR':noop, 'PHOS':noop, 'TRACER':noop},
'IMPLND': {'ATEMP':atemp, 'SNOW':snow, 'IWATER':iwater, 'SOLIDS':solids,
'IWTGAS':iwtgas, 'IQUAL':iqual},
'RCHRES': {'HYDR':hydr, 'ADCALC':adcalc, 'CONS':cons, 'HTRCH':htrch,
'SEDTRN':sedtrn, 'RQUAL':rqual, 'GQUAL':gqual, 'OXRX':noop, 'NUTRX':noop, 'PLANK':noop,
'PHCARB':noop}}
def expand_masslinks(flags, uci, dat, recs):
recs = expand_HYDR_masslinks(flags, uci, dat, recs)
recs = expand_HTRCH_masslinks(flags, uci, dat, recs)
recs = expand_CONS_masslinks(flags, uci, dat, recs)
recs = expand_SEDTRN_masslinks(flags, uci, dat, recs)
recs = expand_GQUAL_masslinks(flags, uci, dat, recs)
recs = expand_OXRX_masslinks(flags, uci, dat, recs)
recs = expand_NUTRX_masslinks(flags, uci, dat, recs)
recs = expand_PLANK_masslinks(flags, uci, dat, recs)
recs = expand_PHCARB_masslinks(flags, uci, dat, recs)
return recs
# NOTE: the flowtype (Python set) at the top of utilities.py may need to be
# updated for new types of flows in new or modified HSP2 modules.