Skip to content

Commit aee02cb

Browse files
committed
Removed code from main that is now included in the callback function
1 parent c0d0fda commit aee02cb

3 files changed

Lines changed: 3 additions & 92 deletions

File tree

aeolis/bed.py

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -227,82 +227,6 @@ def wet_supply(s, p):
227227
ix = s['TWL'] > (s['zb'])
228228
s['zb'][ix] += (s['zb0'][ix] - s['zb'][ix]) * Tbedreset
229229

230-
# if p['process_wet_supply']:
231-
232-
# if p['method_wet_supply'] == 'vertical_beach_growth':
233-
# beach_inc = p['shoreline_change_rate']*math.cos((math.pi/2)-math.atan(p['beach_slope']))
234-
# vrate = (beach_inc*(1/365.25/24/3600))*p['dt'] #(m/timestep)
235-
# ny, nx = s['zb'].shape
236-
237-
# for iy in range(ny):
238-
# x_all = s['x'][iy,:]
239-
# zb_all = s['zb'][iy,:]
240-
# xi = (zb_all < p['dune_toe_elevation'])
241-
# beach_z = zb_all[xi]
242-
# b = beach_z[0] + vrate
243-
# x = x_all[xi]
244-
# slope = p['beach_slope']
245-
# new_beach = slope*x + b
246-
# s['zb'][iy,xi] = new_beach
247-
248-
# if p['method_wet_supply'] == 'constant_SCR_constant_tanB':
249-
250-
# beach_inc = p['shoreline_change_rate']*math.cos((math.pi/2)-math.atan(p['beach_slope']))
251-
# vrate = (beach_inc/(365.25*24*3600))*p['dt'] #(m/timestep)
252-
# ny, nx = s['zb'].shape
253-
254-
# for iy in range(ny):
255-
256-
# x_all = s['x'][iy,:]
257-
# zb_all = s['zb'][iy,:]
258-
259-
# xi = zb_all < p['dune_toe_elevation']
260-
# beach_z = zb_all[xi]
261-
# x = x_all[xi]
262-
263-
# xi3 = np.where(beach_z > p['zshoreline'])
264-
# xi3 = xi3[0][0]
265-
# b = beach_z[xi3] + vrate
266-
267-
# new_temp_beach = p['beach_slope']*(x-x[xi3]) + b
268-
269-
# xi2 = new_temp_beach <= np.min(zb_all)
270-
# new_temp_beach[xi2] = np.min(zb_all)
271-
272-
# s['zb'][iy,xi]= new_temp_beach
273-
274-
# if p['method_wet_supply'] == 'constant_SCR_variable_tanB':
275-
# beach_inc = p['shoreline_change_rate']*math.cos((math.pi/2)-math.atan(p['beach_slope']))
276-
# vrate = (beach_inc/(365.25*24*3600))*p['dt'] #(m/timestep)
277-
# hrate = (p['shoreline_change_rate']/(365.25*24*3600))*p['dt'] #(m/timestep)
278-
# ny, nx = s['zb'].shape
279-
280-
# for iy in range(ny):
281-
# x_all = s['x'][iy,:]
282-
# zb_all = s['zb'][iy,:]
283-
284-
# xi = zb_all <= p['dune_toe_elevation']
285-
# beach_z = zb_all[xi]
286-
287-
# x = x_all[xi]
288-
289-
# xi3 = np.where(beach_z > p['zshoreline'])
290-
# xi3 = xi3[0][0]
291-
# beach_x = x-x[xi3]
292-
293-
# xy1 = ((np.min(x[xi3])),np.min(beach_z[xi3]))
294-
# xy2 = (np.max(x), np.max(beach_z))
295-
296-
# new_slope = (xy2[1]-xy1[1])/(xy2[0]-(xy1[0]))
297-
# b = np.min(beach_z[xi3]) + vrate
298-
# new_temp_beach = new_slope*(beach_x) + b
299-
300-
# xi2 = new_temp_beach <= np.min(zb_all)
301-
# new_temp_beach[xi2] = np.min(zb_all)
302-
303-
# xi4 = new_temp_beach > p['dune_toe_elevation']
304-
# new_temp_beach[xi4] = p['dune_toe_elevation']
305-
# s['zb'][iy,xi]= new_temp_beach
306230
return s
307231

308232

aeolis/vegetation.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -218,20 +218,7 @@ def grow (s, p): #DURAN 2006
218218

219219
if p['process_tide']:
220220

221-
elev_dry = s['zb']>=s['TWL']
222-
223-
try:
224-
if elev_dry.flat[0] and s['TWL'].flat[0] < p['veg_min_elevation']:
225-
#exception if TWL is below bathymetry & no intersection
226-
limit = 0
227-
else:
228-
limit = int(np.where(np.diff(elev_dry))[1][0]) # finds most seaward intersection of TWL and zb
229-
ix_flooded1 = (s['zb'][:,:limit] < s['TWL'][:,:limit]) # identifies flooded area before limit
230-
rest = np.full((3, (len(s['TWL'][0])-limit)), False, dtype=bool) # creates a False array to fill in the rest of the profile
231-
ix_flooded = np.concatenate((ix_flooded1, rest), axis=1) # adds the arrays together
232-
except:
233-
ix_flooded = (s['zb'] < s['TWL'])
234-
221+
ix_flooded = (s['zb'] < s['TWL'])
235222
s['rhoveg'][ix_flooded] = 0.
236223
s['hveg'][ix_flooded] = 0.
237224
s['vegetated'][ix_flooded] = False

docs/user/model.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ be specified by the user, for example through the BMI interface.
753753

754754
Beach evolution parameters
755755
---------------
756-
The description of implementation of beach sediment supply function is based on :cite:`Heminway2025`:.
756+
The description of implementation of beach sediment supply function is based on :cite:`Heminway2026`:.
757757

758758
Beach shape and size contributes to the overall sediment supply available
759759
for aeolian sediment transport. AeoLiS includes numerous approaches to
@@ -765,7 +765,7 @@ and avoid the need to couple model interfaces with external tools. For the
765765
purposes of this beach sediment supply function, the shoreline is defined as
766766
the seaward boundary of the beach profile (default xshoreline and zshoreline
767767
are 0 m; e.g., Figure 1e-f)) and shoreline change rate (SCR) is the rate of
768-
change at the 0 m contour. Four specific methods, specified in the input file
768+
change at the 0 m contour. Four specific methods, usable in a callback function and specified in the input file
769769
as `method_sed_supply`, are implemented, as follows below:
770770

771771
`wet_bed_reset`maintains stability of the bed by assuming any beach volume

0 commit comments

Comments
 (0)