@swmmrs/swmmrs 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +264 -264
- package/dist/README.md +264 -264
- package/dist/serial/README.md +264 -264
- package/dist/serial/swmmrs_bg.wasm +0 -0
- package/dist/swmmrs.d.ts +4 -4
- package/dist/swmmrs.js +13 -13
- package/dist/swmmrs_bg.wasm +0 -0
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +53 -33
- package/src/swmmrs/client.ts +76 -76
- package/src/swmmrs/enums.ts +73 -73
- package/src/swmmrs/exceptions.ts +120 -120
- package/src/swmmrs/index.ts +79 -79
- package/src/swmmrs/objects/amm.ts +113 -113
- package/src/swmmrs/objects/collections.ts +153 -153
- package/src/swmmrs/objects/definitions.ts +246 -246
- package/src/swmmrs/objects/lids.ts +487 -487
- package/src/swmmrs/objects/links.ts +626 -626
- package/src/swmmrs/objects/nodes.ts +504 -504
- package/src/swmmrs/objects/options.ts +114 -114
- package/src/swmmrs/objects/rtk.ts +79 -79
- package/src/swmmrs/objects/subcatchments.ts +650 -650
- package/src/swmmrs/output.ts +798 -798
- package/src/swmmrs/protocol.ts +62 -62
- package/src/swmmrs/runtime.ts +188 -188
- package/src/swmmrs/scenarios.ts +40 -40
- package/src/swmmrs/simulation.ts +406 -406
- package/src/swmmrs/snapshots.ts +199 -199
- package/src/swmmrs/worker.ts +233 -233
- package/worker-node.js +142 -142
- package/worker.js +1 -1
|
@@ -1,246 +1,246 @@
|
|
|
1
|
-
import type { Call } from "../protocol.js";
|
|
2
|
-
|
|
3
|
-
/** Operations used by definition handles. Main extends the worker protocol with these entries. */
|
|
4
|
-
export interface DefinitionOperations {
|
|
5
|
-
aquiferConfiguration: { args: [string]; result: AquiferConfiguration };
|
|
6
|
-
configureAquifer: { args: [string, AquiferPatch]; result: void };
|
|
7
|
-
snowmeltConfiguration: { args: [string]; result: SnowmeltParameterSetConfiguration };
|
|
8
|
-
configureSnowmelt: { args: [string, SnowmeltParameterSetPatch]; result: void };
|
|
9
|
-
snowmeltSurfaceConfiguration: { args: [string, SnowmeltSurfaceName]; result: SnowmeltSurfaceConfiguration };
|
|
10
|
-
configureSnowmeltSurface: {
|
|
11
|
-
args: [string, SnowmeltSurfaceName, SnowmeltSurfacePatch];
|
|
12
|
-
result: void;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/** Read-only identity for a configured definition. Generic handles do not expose editable curve/time-series data. */
|
|
17
|
-
export class Definition {
|
|
18
|
-
/** Canonical configured definition ID. */
|
|
19
|
-
readonly id: string;
|
|
20
|
-
protected readonly call: Call;
|
|
21
|
-
|
|
22
|
-
protected constructor(id: string, call: Call) {
|
|
23
|
-
this.id = id;
|
|
24
|
-
this.call = call;
|
|
25
|
-
Object.freeze(this);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/** @internal */
|
|
29
|
-
static create(id: string, call: Call): Definition { return new Definition(id, call); }
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** Read-only pollutant identity handle. */
|
|
33
|
-
export type Pollutant = Definition;
|
|
34
|
-
/** Read-only land-use identity handle. */
|
|
35
|
-
export type LandUse = Definition;
|
|
36
|
-
/** Read-only time-pattern identity handle. */
|
|
37
|
-
export type TimePattern = Definition;
|
|
38
|
-
/** Read-only curve identity handle. */
|
|
39
|
-
export type Curve = Definition;
|
|
40
|
-
/** Read-only time-series identity handle. */
|
|
41
|
-
export type TimeSeries = Definition;
|
|
42
|
-
/** Read-only control-rule identity handle. */
|
|
43
|
-
export type ControlRule = Definition;
|
|
44
|
-
/** Read-only transect identity handle. */
|
|
45
|
-
export type Transect = Definition;
|
|
46
|
-
/** Read-only custom-shape identity handle. */
|
|
47
|
-
export type CustomShape = Definition;
|
|
48
|
-
/** Read-only street identity handle. */
|
|
49
|
-
export type Street = Definition;
|
|
50
|
-
/** Read-only inlet-design identity handle. */
|
|
51
|
-
export type InletDesign = Definition;
|
|
52
|
-
|
|
53
|
-
/** Detached aquifer declarations in configured project units. */
|
|
54
|
-
export interface AquiferConfiguration {
|
|
55
|
-
/** Soil porosity fraction. */
|
|
56
|
-
readonly porosity: number;
|
|
57
|
-
/** Wilting-point moisture fraction. */
|
|
58
|
-
readonly wiltingPoint: number;
|
|
59
|
-
/** Field-capacity moisture fraction. */
|
|
60
|
-
readonly fieldCapacity: number;
|
|
61
|
-
/** Saturated hydraulic conductivity in project rainfall-rate units. */
|
|
62
|
-
readonly hydraulicConductivity: number;
|
|
63
|
-
/** Native conductivity-response slope. */
|
|
64
|
-
readonly conductivitySlope: number;
|
|
65
|
-
/** Tension-response slope in project length units (ft or m). */
|
|
66
|
-
readonly tensionSlope: number;
|
|
67
|
-
/** Fraction of evaporation drawn from the upper zone. */
|
|
68
|
-
readonly upperEvaporationFraction: number;
|
|
69
|
-
/** Lower-zone evaporation depth in project length units. */
|
|
70
|
-
readonly lowerEvaporationDepth: number;
|
|
71
|
-
/** Lower-zone loss coefficient in in/h or mm/h. */
|
|
72
|
-
readonly lowerLossCoefficient: number;
|
|
73
|
-
/** Aquifer bottom elevation in ft or m. */
|
|
74
|
-
readonly bottomElevation: number;
|
|
75
|
-
/** Initial water-table elevation in ft or m. */
|
|
76
|
-
readonly waterTableElevation: number;
|
|
77
|
-
/** Initial upper-zone moisture fraction. */
|
|
78
|
-
readonly upperMoisture: number;
|
|
79
|
-
/** Canonical upper-evaporation time-pattern ID, or null. */
|
|
80
|
-
readonly upperEvaporationPattern: string | null;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/** Sparse aquifer update; omitted fields retain their values. */
|
|
84
|
-
export interface AquiferPatch {
|
|
85
|
-
/** {@inheritDoc AquiferConfiguration.porosity} */
|
|
86
|
-
porosity?: number;
|
|
87
|
-
/** {@inheritDoc AquiferConfiguration.wiltingPoint} */
|
|
88
|
-
wiltingPoint?: number;
|
|
89
|
-
/** {@inheritDoc AquiferConfiguration.fieldCapacity} */
|
|
90
|
-
fieldCapacity?: number;
|
|
91
|
-
/** {@inheritDoc AquiferConfiguration.hydraulicConductivity} */
|
|
92
|
-
hydraulicConductivity?: number;
|
|
93
|
-
/** {@inheritDoc AquiferConfiguration.conductivitySlope} */
|
|
94
|
-
conductivitySlope?: number;
|
|
95
|
-
/** {@inheritDoc AquiferConfiguration.tensionSlope} */
|
|
96
|
-
tensionSlope?: number;
|
|
97
|
-
/** {@inheritDoc AquiferConfiguration.upperEvaporationFraction} */
|
|
98
|
-
upperEvaporationFraction?: number;
|
|
99
|
-
/** {@inheritDoc AquiferConfiguration.lowerEvaporationDepth} */
|
|
100
|
-
lowerEvaporationDepth?: number;
|
|
101
|
-
/** {@inheritDoc AquiferConfiguration.lowerLossCoefficient} */
|
|
102
|
-
lowerLossCoefficient?: number;
|
|
103
|
-
/** {@inheritDoc AquiferConfiguration.bottomElevation} */
|
|
104
|
-
bottomElevation?: number;
|
|
105
|
-
/** {@inheritDoc AquiferConfiguration.waterTableElevation} */
|
|
106
|
-
waterTableElevation?: number;
|
|
107
|
-
/** {@inheritDoc AquiferConfiguration.upperMoisture} */
|
|
108
|
-
upperMoisture?: number;
|
|
109
|
-
/** Clear with null; omission retains the current relationship. */
|
|
110
|
-
upperEvaporationPattern?: string | null;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/** Editable aquifer handle obtained from `simulation.aquifers`. */
|
|
114
|
-
export class Aquifer extends Definition {
|
|
115
|
-
private constructor(id: string, call: Call) { super(id, call); }
|
|
116
|
-
|
|
117
|
-
/** @internal */
|
|
118
|
-
static create(id: string, call: Call): Aquifer { return new Aquifer(id, call); }
|
|
119
|
-
|
|
120
|
-
/** Read aquifer declarations in any healthy owner state.
|
|
121
|
-
* @returns Detached aquifer configuration in project units.
|
|
122
|
-
*/
|
|
123
|
-
configuration(): Promise<AquiferConfiguration> {
|
|
124
|
-
return this.call("aquiferConfiguration", this.id);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/** Atomically update aquifer declarations in `open` or `ended`; accepted edits return the owner to `open`.
|
|
128
|
-
* @param patch - Sparse field values; null clears the optional time-pattern relationship.
|
|
129
|
-
* @returns Resolves after all fields are accepted.
|
|
130
|
-
*/
|
|
131
|
-
configure(patch: AquiferPatch): Promise<void> {
|
|
132
|
-
return this.call("configureAquifer", this.id, patch);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/** Snowmelt surface selector within a parameter set. */
|
|
137
|
-
export type SnowmeltSurfaceName = "plowable" | "impervious" | "pervious";
|
|
138
|
-
|
|
139
|
-
/** Detached snowmelt-surface declarations. */
|
|
140
|
-
export interface SnowmeltSurfaceConfiguration {
|
|
141
|
-
/** Minimum melt coefficient in in/(h·°F) for US projects or mm/(h·°C) for SI projects. */
|
|
142
|
-
readonly minimumMeltCoefficient: number;
|
|
143
|
-
/** Maximum melt coefficient in in/(h·°F) for US projects or mm/(h·°C) for SI projects. */
|
|
144
|
-
readonly maximumMeltCoefficient: number;
|
|
145
|
-
/** Base melt temperature in °F for US projects or °C for SI projects. */
|
|
146
|
-
readonly baseTemperature: number;
|
|
147
|
-
/** Free-water holding-capacity fraction. */
|
|
148
|
-
readonly freeWaterFraction: number;
|
|
149
|
-
/** Initial snow water-equivalent depth in in or mm. */
|
|
150
|
-
readonly initialSnowDepth: number;
|
|
151
|
-
/** Initial free-water depth in in or mm. */
|
|
152
|
-
readonly initialFreeWater: number;
|
|
153
|
-
/** Snow water-equivalent depth for full coverage in in or mm. */
|
|
154
|
-
readonly snowDepthForFullCoverage: number;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/** Sparse snowmelt-surface update; omission retains a field. */
|
|
158
|
-
export interface SnowmeltSurfacePatch {
|
|
159
|
-
/** {@inheritDoc SnowmeltSurfaceConfiguration.minimumMeltCoefficient} */
|
|
160
|
-
minimumMeltCoefficient?: number;
|
|
161
|
-
/** {@inheritDoc SnowmeltSurfaceConfiguration.maximumMeltCoefficient} */
|
|
162
|
-
maximumMeltCoefficient?: number;
|
|
163
|
-
/** {@inheritDoc SnowmeltSurfaceConfiguration.baseTemperature} */
|
|
164
|
-
baseTemperature?: number;
|
|
165
|
-
/** {@inheritDoc SnowmeltSurfaceConfiguration.freeWaterFraction} */
|
|
166
|
-
freeWaterFraction?: number;
|
|
167
|
-
/** {@inheritDoc SnowmeltSurfaceConfiguration.initialSnowDepth} */
|
|
168
|
-
initialSnowDepth?: number;
|
|
169
|
-
/** {@inheritDoc SnowmeltSurfaceConfiguration.initialFreeWater} */
|
|
170
|
-
initialFreeWater?: number;
|
|
171
|
-
/** {@inheritDoc SnowmeltSurfaceConfiguration.snowDepthForFullCoverage} */
|
|
172
|
-
snowDepthForFullCoverage?: number;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/** Detached snowmelt parameter set with all three surface records. */
|
|
176
|
-
export interface SnowmeltParameterSetConfiguration {
|
|
177
|
-
/** Plowable fraction of impervious area. */
|
|
178
|
-
readonly plowableFraction: number;
|
|
179
|
-
/** Plowable-surface melt parameters. */
|
|
180
|
-
readonly plowable: SnowmeltSurfaceConfiguration;
|
|
181
|
-
/** Impervious-surface melt parameters. */
|
|
182
|
-
readonly impervious: SnowmeltSurfaceConfiguration;
|
|
183
|
-
/** Pervious-surface melt parameters. */
|
|
184
|
-
readonly pervious: SnowmeltSurfaceConfiguration;
|
|
185
|
-
/** Snow water-equivalent depth triggering plowing, in in or mm. */
|
|
186
|
-
readonly plowDepth: number;
|
|
187
|
-
/** Five removal fractions in native solver destination order. */
|
|
188
|
-
readonly removalFractions: readonly [number, number, number, number, number];
|
|
189
|
-
/** Canonical receiving subcatchment ID, or null. */
|
|
190
|
-
readonly removalSubcatchment: string | null;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/** Sparse parameter-set update; use `configureSurface` for individual surface parameters. */
|
|
194
|
-
export interface SnowmeltParameterSetPatch {
|
|
195
|
-
/** {@inheritDoc SnowmeltParameterSetConfiguration.plowableFraction} */
|
|
196
|
-
plowableFraction?: number;
|
|
197
|
-
/** {@inheritDoc SnowmeltParameterSetConfiguration.plowDepth} */
|
|
198
|
-
plowDepth?: number;
|
|
199
|
-
/** {@inheritDoc SnowmeltParameterSetConfiguration.removalFractions} */
|
|
200
|
-
removalFractions?: readonly [number, number, number, number, number];
|
|
201
|
-
/** Clear with null; omission retains the current relationship. */
|
|
202
|
-
removalSubcatchment?: string | null;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/** Editable snowmelt parameter-set identity handle. */
|
|
206
|
-
export class SnowmeltParameterSet extends Definition {
|
|
207
|
-
private constructor(id: string, call: Call) { super(id, call); }
|
|
208
|
-
|
|
209
|
-
/** @internal */
|
|
210
|
-
static create(id: string, call: Call): SnowmeltParameterSet {
|
|
211
|
-
return new SnowmeltParameterSet(id, call);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/** Read all parameter-set declarations in a healthy owner state.
|
|
215
|
-
* @returns Detached parameter set with three surface records.
|
|
216
|
-
*/
|
|
217
|
-
configuration(): Promise<SnowmeltParameterSetConfiguration> {
|
|
218
|
-
return this.call("snowmeltConfiguration", this.id);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/** Atomically update set-level declarations in `open` or `ended`; accepted edits return the owner to `open`.
|
|
222
|
-
* @param patch - Sparse set fields; null clears the optional receiving-subcatchment relation.
|
|
223
|
-
* @returns Resolves after the update is accepted.
|
|
224
|
-
*/
|
|
225
|
-
configure(patch: SnowmeltParameterSetPatch): Promise<void> {
|
|
226
|
-
return this.call("configureSnowmelt", this.id, patch);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/** Read one surface in a healthy owner state.
|
|
230
|
-
* @param surface - Plowable, impervious, or pervious surface selector.
|
|
231
|
-
* @returns Detached surface parameters.
|
|
232
|
-
*/
|
|
233
|
-
surfaceConfiguration(surface: SnowmeltSurfaceName): Promise<SnowmeltSurfaceConfiguration> {
|
|
234
|
-
return this.call("snowmeltSurfaceConfiguration", this.id, surface);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/** Atomically update one surface in `open` or `ended`; accepted edits return the owner to `open`.
|
|
238
|
-
* @param surface - Surface to update.
|
|
239
|
-
* @param patch - Sparse surface values; omitted fields retain their values.
|
|
240
|
-
* @returns Resolves after all supplied fields are accepted.
|
|
241
|
-
*/
|
|
242
|
-
configureSurface(surface: SnowmeltSurfaceName, patch: SnowmeltSurfacePatch): Promise<void> {
|
|
243
|
-
return this.call("configureSnowmeltSurface", this.id, surface, patch);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
1
|
+
import type { Call } from "../protocol.js";
|
|
2
|
+
|
|
3
|
+
/** Operations used by definition handles. Main extends the worker protocol with these entries. */
|
|
4
|
+
export interface DefinitionOperations {
|
|
5
|
+
aquiferConfiguration: { args: [string]; result: AquiferConfiguration };
|
|
6
|
+
configureAquifer: { args: [string, AquiferPatch]; result: void };
|
|
7
|
+
snowmeltConfiguration: { args: [string]; result: SnowmeltParameterSetConfiguration };
|
|
8
|
+
configureSnowmelt: { args: [string, SnowmeltParameterSetPatch]; result: void };
|
|
9
|
+
snowmeltSurfaceConfiguration: { args: [string, SnowmeltSurfaceName]; result: SnowmeltSurfaceConfiguration };
|
|
10
|
+
configureSnowmeltSurface: {
|
|
11
|
+
args: [string, SnowmeltSurfaceName, SnowmeltSurfacePatch];
|
|
12
|
+
result: void;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Read-only identity for a configured definition. Generic handles do not expose editable curve/time-series data. */
|
|
17
|
+
export class Definition {
|
|
18
|
+
/** Canonical configured definition ID. */
|
|
19
|
+
readonly id: string;
|
|
20
|
+
protected readonly call: Call;
|
|
21
|
+
|
|
22
|
+
protected constructor(id: string, call: Call) {
|
|
23
|
+
this.id = id;
|
|
24
|
+
this.call = call;
|
|
25
|
+
Object.freeze(this);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
static create(id: string, call: Call): Definition { return new Definition(id, call); }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Read-only pollutant identity handle. */
|
|
33
|
+
export type Pollutant = Definition;
|
|
34
|
+
/** Read-only land-use identity handle. */
|
|
35
|
+
export type LandUse = Definition;
|
|
36
|
+
/** Read-only time-pattern identity handle. */
|
|
37
|
+
export type TimePattern = Definition;
|
|
38
|
+
/** Read-only curve identity handle. */
|
|
39
|
+
export type Curve = Definition;
|
|
40
|
+
/** Read-only time-series identity handle. */
|
|
41
|
+
export type TimeSeries = Definition;
|
|
42
|
+
/** Read-only control-rule identity handle. */
|
|
43
|
+
export type ControlRule = Definition;
|
|
44
|
+
/** Read-only transect identity handle. */
|
|
45
|
+
export type Transect = Definition;
|
|
46
|
+
/** Read-only custom-shape identity handle. */
|
|
47
|
+
export type CustomShape = Definition;
|
|
48
|
+
/** Read-only street identity handle. */
|
|
49
|
+
export type Street = Definition;
|
|
50
|
+
/** Read-only inlet-design identity handle. */
|
|
51
|
+
export type InletDesign = Definition;
|
|
52
|
+
|
|
53
|
+
/** Detached aquifer declarations in configured project units. */
|
|
54
|
+
export interface AquiferConfiguration {
|
|
55
|
+
/** Soil porosity fraction. */
|
|
56
|
+
readonly porosity: number;
|
|
57
|
+
/** Wilting-point moisture fraction. */
|
|
58
|
+
readonly wiltingPoint: number;
|
|
59
|
+
/** Field-capacity moisture fraction. */
|
|
60
|
+
readonly fieldCapacity: number;
|
|
61
|
+
/** Saturated hydraulic conductivity in project rainfall-rate units. */
|
|
62
|
+
readonly hydraulicConductivity: number;
|
|
63
|
+
/** Native conductivity-response slope. */
|
|
64
|
+
readonly conductivitySlope: number;
|
|
65
|
+
/** Tension-response slope in project length units (ft or m). */
|
|
66
|
+
readonly tensionSlope: number;
|
|
67
|
+
/** Fraction of evaporation drawn from the upper zone. */
|
|
68
|
+
readonly upperEvaporationFraction: number;
|
|
69
|
+
/** Lower-zone evaporation depth in project length units. */
|
|
70
|
+
readonly lowerEvaporationDepth: number;
|
|
71
|
+
/** Lower-zone loss coefficient in in/h or mm/h. */
|
|
72
|
+
readonly lowerLossCoefficient: number;
|
|
73
|
+
/** Aquifer bottom elevation in ft or m. */
|
|
74
|
+
readonly bottomElevation: number;
|
|
75
|
+
/** Initial water-table elevation in ft or m. */
|
|
76
|
+
readonly waterTableElevation: number;
|
|
77
|
+
/** Initial upper-zone moisture fraction. */
|
|
78
|
+
readonly upperMoisture: number;
|
|
79
|
+
/** Canonical upper-evaporation time-pattern ID, or null. */
|
|
80
|
+
readonly upperEvaporationPattern: string | null;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Sparse aquifer update; omitted fields retain their values. */
|
|
84
|
+
export interface AquiferPatch {
|
|
85
|
+
/** {@inheritDoc AquiferConfiguration.porosity} */
|
|
86
|
+
porosity?: number;
|
|
87
|
+
/** {@inheritDoc AquiferConfiguration.wiltingPoint} */
|
|
88
|
+
wiltingPoint?: number;
|
|
89
|
+
/** {@inheritDoc AquiferConfiguration.fieldCapacity} */
|
|
90
|
+
fieldCapacity?: number;
|
|
91
|
+
/** {@inheritDoc AquiferConfiguration.hydraulicConductivity} */
|
|
92
|
+
hydraulicConductivity?: number;
|
|
93
|
+
/** {@inheritDoc AquiferConfiguration.conductivitySlope} */
|
|
94
|
+
conductivitySlope?: number;
|
|
95
|
+
/** {@inheritDoc AquiferConfiguration.tensionSlope} */
|
|
96
|
+
tensionSlope?: number;
|
|
97
|
+
/** {@inheritDoc AquiferConfiguration.upperEvaporationFraction} */
|
|
98
|
+
upperEvaporationFraction?: number;
|
|
99
|
+
/** {@inheritDoc AquiferConfiguration.lowerEvaporationDepth} */
|
|
100
|
+
lowerEvaporationDepth?: number;
|
|
101
|
+
/** {@inheritDoc AquiferConfiguration.lowerLossCoefficient} */
|
|
102
|
+
lowerLossCoefficient?: number;
|
|
103
|
+
/** {@inheritDoc AquiferConfiguration.bottomElevation} */
|
|
104
|
+
bottomElevation?: number;
|
|
105
|
+
/** {@inheritDoc AquiferConfiguration.waterTableElevation} */
|
|
106
|
+
waterTableElevation?: number;
|
|
107
|
+
/** {@inheritDoc AquiferConfiguration.upperMoisture} */
|
|
108
|
+
upperMoisture?: number;
|
|
109
|
+
/** Clear with null; omission retains the current relationship. */
|
|
110
|
+
upperEvaporationPattern?: string | null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** Editable aquifer handle obtained from `simulation.aquifers`. */
|
|
114
|
+
export class Aquifer extends Definition {
|
|
115
|
+
private constructor(id: string, call: Call) { super(id, call); }
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
static create(id: string, call: Call): Aquifer { return new Aquifer(id, call); }
|
|
119
|
+
|
|
120
|
+
/** Read aquifer declarations in any healthy owner state.
|
|
121
|
+
* @returns Detached aquifer configuration in project units.
|
|
122
|
+
*/
|
|
123
|
+
configuration(): Promise<AquiferConfiguration> {
|
|
124
|
+
return this.call("aquiferConfiguration", this.id);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Atomically update aquifer declarations in `open` or `ended`; accepted edits return the owner to `open`.
|
|
128
|
+
* @param patch - Sparse field values; null clears the optional time-pattern relationship.
|
|
129
|
+
* @returns Resolves after all fields are accepted.
|
|
130
|
+
*/
|
|
131
|
+
configure(patch: AquiferPatch): Promise<void> {
|
|
132
|
+
return this.call("configureAquifer", this.id, patch);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Snowmelt surface selector within a parameter set. */
|
|
137
|
+
export type SnowmeltSurfaceName = "plowable" | "impervious" | "pervious";
|
|
138
|
+
|
|
139
|
+
/** Detached snowmelt-surface declarations. */
|
|
140
|
+
export interface SnowmeltSurfaceConfiguration {
|
|
141
|
+
/** Minimum melt coefficient in in/(h·°F) for US projects or mm/(h·°C) for SI projects. */
|
|
142
|
+
readonly minimumMeltCoefficient: number;
|
|
143
|
+
/** Maximum melt coefficient in in/(h·°F) for US projects or mm/(h·°C) for SI projects. */
|
|
144
|
+
readonly maximumMeltCoefficient: number;
|
|
145
|
+
/** Base melt temperature in °F for US projects or °C for SI projects. */
|
|
146
|
+
readonly baseTemperature: number;
|
|
147
|
+
/** Free-water holding-capacity fraction. */
|
|
148
|
+
readonly freeWaterFraction: number;
|
|
149
|
+
/** Initial snow water-equivalent depth in in or mm. */
|
|
150
|
+
readonly initialSnowDepth: number;
|
|
151
|
+
/** Initial free-water depth in in or mm. */
|
|
152
|
+
readonly initialFreeWater: number;
|
|
153
|
+
/** Snow water-equivalent depth for full coverage in in or mm. */
|
|
154
|
+
readonly snowDepthForFullCoverage: number;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** Sparse snowmelt-surface update; omission retains a field. */
|
|
158
|
+
export interface SnowmeltSurfacePatch {
|
|
159
|
+
/** {@inheritDoc SnowmeltSurfaceConfiguration.minimumMeltCoefficient} */
|
|
160
|
+
minimumMeltCoefficient?: number;
|
|
161
|
+
/** {@inheritDoc SnowmeltSurfaceConfiguration.maximumMeltCoefficient} */
|
|
162
|
+
maximumMeltCoefficient?: number;
|
|
163
|
+
/** {@inheritDoc SnowmeltSurfaceConfiguration.baseTemperature} */
|
|
164
|
+
baseTemperature?: number;
|
|
165
|
+
/** {@inheritDoc SnowmeltSurfaceConfiguration.freeWaterFraction} */
|
|
166
|
+
freeWaterFraction?: number;
|
|
167
|
+
/** {@inheritDoc SnowmeltSurfaceConfiguration.initialSnowDepth} */
|
|
168
|
+
initialSnowDepth?: number;
|
|
169
|
+
/** {@inheritDoc SnowmeltSurfaceConfiguration.initialFreeWater} */
|
|
170
|
+
initialFreeWater?: number;
|
|
171
|
+
/** {@inheritDoc SnowmeltSurfaceConfiguration.snowDepthForFullCoverage} */
|
|
172
|
+
snowDepthForFullCoverage?: number;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** Detached snowmelt parameter set with all three surface records. */
|
|
176
|
+
export interface SnowmeltParameterSetConfiguration {
|
|
177
|
+
/** Plowable fraction of impervious area. */
|
|
178
|
+
readonly plowableFraction: number;
|
|
179
|
+
/** Plowable-surface melt parameters. */
|
|
180
|
+
readonly plowable: SnowmeltSurfaceConfiguration;
|
|
181
|
+
/** Impervious-surface melt parameters. */
|
|
182
|
+
readonly impervious: SnowmeltSurfaceConfiguration;
|
|
183
|
+
/** Pervious-surface melt parameters. */
|
|
184
|
+
readonly pervious: SnowmeltSurfaceConfiguration;
|
|
185
|
+
/** Snow water-equivalent depth triggering plowing, in in or mm. */
|
|
186
|
+
readonly plowDepth: number;
|
|
187
|
+
/** Five removal fractions in native solver destination order. */
|
|
188
|
+
readonly removalFractions: readonly [number, number, number, number, number];
|
|
189
|
+
/** Canonical receiving subcatchment ID, or null. */
|
|
190
|
+
readonly removalSubcatchment: string | null;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** Sparse parameter-set update; use `configureSurface` for individual surface parameters. */
|
|
194
|
+
export interface SnowmeltParameterSetPatch {
|
|
195
|
+
/** {@inheritDoc SnowmeltParameterSetConfiguration.plowableFraction} */
|
|
196
|
+
plowableFraction?: number;
|
|
197
|
+
/** {@inheritDoc SnowmeltParameterSetConfiguration.plowDepth} */
|
|
198
|
+
plowDepth?: number;
|
|
199
|
+
/** {@inheritDoc SnowmeltParameterSetConfiguration.removalFractions} */
|
|
200
|
+
removalFractions?: readonly [number, number, number, number, number];
|
|
201
|
+
/** Clear with null; omission retains the current relationship. */
|
|
202
|
+
removalSubcatchment?: string | null;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** Editable snowmelt parameter-set identity handle. */
|
|
206
|
+
export class SnowmeltParameterSet extends Definition {
|
|
207
|
+
private constructor(id: string, call: Call) { super(id, call); }
|
|
208
|
+
|
|
209
|
+
/** @internal */
|
|
210
|
+
static create(id: string, call: Call): SnowmeltParameterSet {
|
|
211
|
+
return new SnowmeltParameterSet(id, call);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** Read all parameter-set declarations in a healthy owner state.
|
|
215
|
+
* @returns Detached parameter set with three surface records.
|
|
216
|
+
*/
|
|
217
|
+
configuration(): Promise<SnowmeltParameterSetConfiguration> {
|
|
218
|
+
return this.call("snowmeltConfiguration", this.id);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** Atomically update set-level declarations in `open` or `ended`; accepted edits return the owner to `open`.
|
|
222
|
+
* @param patch - Sparse set fields; null clears the optional receiving-subcatchment relation.
|
|
223
|
+
* @returns Resolves after the update is accepted.
|
|
224
|
+
*/
|
|
225
|
+
configure(patch: SnowmeltParameterSetPatch): Promise<void> {
|
|
226
|
+
return this.call("configureSnowmelt", this.id, patch);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** Read one surface in a healthy owner state.
|
|
230
|
+
* @param surface - Plowable, impervious, or pervious surface selector.
|
|
231
|
+
* @returns Detached surface parameters.
|
|
232
|
+
*/
|
|
233
|
+
surfaceConfiguration(surface: SnowmeltSurfaceName): Promise<SnowmeltSurfaceConfiguration> {
|
|
234
|
+
return this.call("snowmeltSurfaceConfiguration", this.id, surface);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** Atomically update one surface in `open` or `ended`; accepted edits return the owner to `open`.
|
|
238
|
+
* @param surface - Surface to update.
|
|
239
|
+
* @param patch - Sparse surface values; omitted fields retain their values.
|
|
240
|
+
* @returns Resolves after all supplied fields are accepted.
|
|
241
|
+
*/
|
|
242
|
+
configureSurface(surface: SnowmeltSurfaceName, patch: SnowmeltSurfacePatch): Promise<void> {
|
|
243
|
+
return this.call("configureSnowmeltSurface", this.id, surface, patch);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|