-
Notifications
You must be signed in to change notification settings - Fork 31
Long term dune growth (by Selwyn) #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
b617b80
1f469f7
208d045
5db83bb
eb5d66b
68c0463
1e30b5a
09d912d
ab0b10d
7ee680c
c0d0fda
aee02cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "folders": [ | ||
| { | ||
| "path": "../.." | ||
| } | ||
| ], | ||
| "settings": {} | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ | |
| import aeolis.gridparams | ||
| from matplotlib import pyplot as plt | ||
| from numba import njit | ||
| import math | ||
|
|
||
| # package modules | ||
| from aeolis.utils import * | ||
|
|
@@ -125,7 +126,7 @@ def initialize(s, p): | |
| # initialize threshold | ||
| if p['threshold_file'] is not None: | ||
| s['uth'] = p['threshold_file'][:,:,np.newaxis].repeat(nf, axis=-1) | ||
|
|
||
| return s | ||
|
|
||
|
|
||
|
|
@@ -197,14 +198,11 @@ def mixtoplayer(s, p): | |
|
|
||
|
|
||
| s['mass'][ix] = mass[ix] | ||
|
|
||
| return s | ||
|
|
||
|
|
||
| def wet_bed_reset(s, p): | ||
| ''' Reset wet bed to initial bed level if the total water level is above the bed level. | ||
|
|
||
|
|
||
| def wet_supply(s, p): | ||
| ''' Increase elevation of beach topography. ELABORATE ON THIS | ||
|
|
||
| Parameters | ||
| ---------- | ||
|
|
@@ -219,19 +217,21 @@ def wet_bed_reset(s, p): | |
| Spatial grids | ||
|
|
||
| ''' | ||
|
|
||
| if p['process_wet_bed_reset']: | ||
|
|
||
| Tbedreset = p['dt_opt'] / p['Tbedreset'] | ||
|
|
||
| ix = s['TWL'] > (s['zb']) | ||
| s['zb'][ix] += (s['zb0'][ix] - s['zb'][ix]) * Tbedreset | ||
| # Original wet-bed-reset function; basic resetting of the bed when inundated | ||
| if p['process_wet_supply'] or p['process_wet_bed_reset']: | ||
|
|
||
| if p['method_wet_supply'] == 'wet_bed_reset': | ||
| Tbedreset = p['dt_opt'] / p['Tbedreset'] # []s | ||
|
|
||
| return s | ||
| ix = s['TWL'] > (s['zb']) | ||
| s['zb'][ix] += (s['zb0'][ix] - s['zb'][ix]) * Tbedreset | ||
|
|
||
| return s | ||
|
Comment on lines
204
to
+230
|
||
|
|
||
|
|
||
| def update(s, p): | ||
|
|
||
| '''Update bathymetry and bed composition | ||
|
|
||
| Update bed composition by moving sediment fractions between bed | ||
|
|
@@ -346,7 +346,7 @@ def update(s, p): | |
| s['zb'] += dz | ||
| if p['process_tide']: | ||
| s['zs'] += dz #??? | ||
|
|
||
| return s | ||
|
|
||
|
|
||
|
|
@@ -496,13 +496,12 @@ def average_change(l, s, p): | |
| if p['_time'] < p['avg_time']: | ||
| s['dzbveg'] *= 0. | ||
|
|
||
|
|
||
| return s | ||
|
|
||
| @njit | ||
| def arrange_layers(m,dm,d,nl,ix_ero,ix_dep): | ||
| '''Arranges mass redistrubution between layers. | ||
| This function is called in the bed.update fucntion to speed up code using numba | ||
| '''Arranges mass redistribution between layers. | ||
| This function is called in the bed.update function to speed up code using numba | ||
|
|
||
|
|
||
|
|
||
|
|
@@ -511,7 +510,7 @@ def arrange_layers(m,dm,d,nl,ix_ero,ix_dep): | |
| m : array | ||
| mass in layers | ||
| dm : array | ||
| total mass exchanged between layers derrived from pickup | ||
| total mass exchanged between layers derived from pickup | ||
| d : array | ||
| normalized mass in layers | ||
| nl : int | ||
|
|
@@ -535,5 +534,5 @@ def arrange_layers(m,dm,d,nl,ix_ero,ix_dep): | |
| m[ix_dep,-1,:] -= dm[ix_dep,:] * d[ix_dep,-1,:] | ||
|
|
||
| return m | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -174,6 +174,7 @@ | |||||
| 'process_moist' : False, # Enable the process of moist | ||||||
| 'process_mixtoplayer' : False, # Enable the process of mixing | ||||||
| 'process_wet_bed_reset' : False, # Enable the process of bed-reset in the intertidal zone | ||||||
| 'process_wet_supply' : False, # Enable the process of beach sediment supply | ||||||
| 'process_meteo' : False, # Enable the process of meteo | ||||||
| 'process_salt' : False, # Enable the process of salt | ||||||
| 'process_humidity' : False, # Enable the process of humidity | ||||||
|
|
@@ -340,6 +341,10 @@ | |||||
| 'rhoveg_max' : 0.5, #maximum vegetation density, only used in duran and moore 14 formulation | ||||||
| 't_veg' : 3, #time scale of vegetation growth (days), only used in duran and moore 14 formulation | ||||||
| 'v_gam' : 1, # only used in duran and moore 14 formulation | ||||||
| 'method_wet_supply' :'wet_bed_reset', # Name of method to comput sediment supply (wet_bed_reset, vertical_beach_growth, constant_SCR_constant_tanB, constant_SCR_variable_tanB) | ||||||
|
||||||
| 'method_wet_supply' :'wet_bed_reset', # Name of method to comput sediment supply (wet_bed_reset, vertical_beach_growth, constant_SCR_constant_tanB, constant_SCR_variable_tanB) | |
| 'method_sed_supply' :'wet_bed_reset', # Name of method to comput sediment supply (wet_bed_reset, vertical_beach_growth, constant_SCR_constant_tanB, constant_SCR_variable_tanB) |
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The closing brace is missing for the dictionary in constants.py. Line 347 has a closing brace in a comment (# ... }) which suggests it was accidentally commented out. This will cause a syntax error. Uncomment or add the proper closing brace.
| 'xshoreline' : 0, # Cross-shore position where beach profile ends and shoreline change rate is applied } | |
| 'xshoreline' : 0, # Cross-shore position where beach profile ends and shoreline change rate is applied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming inconsistency between process flags is confusing. The constants file defines
process_wet_supply(line 177), but the configuration file usesprocess_sediment_supply(line 49 in aeolis.txt). The function checks bothp['process_wet_supply']andp['process_wet_bed_reset'], but the configuration doesn't defineprocess_wet_supply. This inconsistency will likely cause the feature not to work as expected. Use consistent naming throughout.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved in newest commit