Skip to content

Commit af128c9

Browse files
committed
Pass inlet_idx to BRIE update via BrieCoupler update function
1 parent 7de65f1 commit af128c9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cascade/brie_coupler.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ def batchB3D(subB3D):
5858
sub_x_t_dt = (subB3D.x_t_TS[-1] - subB3D.x_t_TS[-2]) * 10
5959
sub_x_s_dt = (subB3D.x_s_TS[-1] - subB3D.x_s_TS[-2]) * 10
6060
sub_h_b_dt = (subB3D.h_b_TS[-1] - subB3D.h_b_TS[-2]) * 10
61+
drowned_barrier_dt = subB3D.drown_break == 1
6162

62-
return sub_x_t_dt, sub_x_s_dt, sub_h_b_dt, subB3D
63+
return sub_x_t_dt, sub_x_s_dt, sub_h_b_dt, subB3D, drowned_barrier_dt
6364

6465

6566
def initialize_equal(
@@ -312,7 +313,7 @@ def __init__(
312313
save_spacing=dtsave,
313314
) # initialize class
314315

315-
def update_ast(self, barrier3d, x_t_dt, x_s_dt, h_b_dt):
316+
def update(self, barrier3d, x_t_dt, x_s_dt, h_b_dt, inlet_idx=None):
316317
"""Pass shoreline and shoreface values from B3D subdomains to brie for use
317318
in second time step
318319
@@ -334,7 +335,7 @@ def update_ast(self, barrier3d, x_t_dt, x_s_dt, h_b_dt):
334335
self._brie.h_b_dt = h_b_dt
335336

336337
# update brie one time step (this is time_index = 2 at start of loop)
337-
self._brie.update()
338+
self._brie.update(inlet_idx)
338339

339340
for iB3D in range(self._brie.ny):
340341
# pass shoreline position back to B3D from Brie (convert from m to dam)

0 commit comments

Comments
 (0)