diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..25a75d79 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,25 @@ +FROM continuumio/miniconda3 + +# Set the working directory + +# WORKDIR /workspace + +# Install Python +RUN conda install python -y + +# Copy the project files +# COPY . . + +# Install the necessary packages + +# RUN pip install . + +# Clean up +RUN conda clean -afy + +# Set the default command +CMD ["bash"] + +# print a message to indicate that the container is ready +RUN echo "The container is ready to use but you need to install aeolis manualy. You can run 'pip instal . -e' to run in editable mode." + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..04ece7b0 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,7 @@ +{ + "name": "AEOLIS Development Container", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + } +} diff --git a/CITATION.cff b/CITATION.cff index 958be39f..7f77b222 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -69,5 +69,5 @@ keywords: - sediment license: GPL-3.0 commit: 0adaedfc8015f18b3b551bed1dda38d630cd8c95 -version: 3.0.0.rc3 -date-released: '2023-10-18' +version: 3.0.1 +date-released: '2025-07-11' diff --git a/README.md b/README.md index fef06dae..f6d87982 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Read our [Contribution Guidelines](CONTRIBUTING.md) to know how you can help to Please, cite this software as follows: -*de Vries, S., Hallin, C., van IJzendoorn, C., van Westen, B., Cohn, N., Strypsteen, G., Skaden, J., Agrawal, N., & Garcia Alvarez, M. (2023). AeoLiS (Version 3.0.0.rc2) [Computer software]. https://github.com/openearth/aeolis-python* +*de Vries, S., Hallin, C., van IJzendoorn, C., van Westen, B., Cohn, N., Strypsteen, G., Skaden, J., Agrawal, N., & Garcia Alvarez, M. (2023). AeoLiS (Version 3.0.1) [Computer software]. https://github.com/openearth/aeolis-python* ## Acknowlegdements diff --git a/aeolis/constants.py b/aeolis/constants.py index 137f64be..4f8a7b62 100644 --- a/aeolis/constants.py +++ b/aeolis/constants.py @@ -300,7 +300,6 @@ 'hveg_max' : 1., # [m] Max height of vegetation 'dzb_opt' : 0., # [m/year] Sediment burial for optimal growth 'V_ver' : 0., # [m/year] Vertical growth potential - 'V_lat' : 0., # [m/year] Lateral growth 'germinate' : 0., # [1/year] Possibility of germination per year 'lateral' : 0., # [1/year] Posibility of lateral expension per year 'veg_gamma' : 1., # [-] Constant on influence of sediment burial @@ -332,7 +331,7 @@ 'alfa' : 0, # [deg] Real-world grid cell orientation wrt the North (clockwise) 'dune_toe_elevation' : 3, # Choose dune toe elevation, only used in the PH12 dune erosion solver 'beach_slope' : 0.1, # Define the beach slope, only used in the PH12 dune erosion solver - 'veg_min_elevation' : 3, # Choose the minimum elevation where vegetation can grow + 'veg_min_elevation' : -10., # Minimum elevation (m) where vegetation can grow; default -10 disables restriction (allows vegetation everywhere). Set to a higher value to enforce a minimum elevation for vegetation growth. 'vegshear_type' : 'raupach', # Choose the Raupach grid based solver (1D or 2D) or the Okin approach (1D only) 'okin_c1_veg' : 0.48, #x/h spatial reduction factor in Okin model for use with vegetation 'okin_c1_fence' : 0.48, #x/h spatial reduction factor in Okin model for use with sand fence module diff --git a/aeolis/inout.py b/aeolis/inout.py index 9331407c..a79cd3ad 100644 --- a/aeolis/inout.py +++ b/aeolis/inout.py @@ -117,6 +117,13 @@ def read_configfile(configfile, parse_files=True, load_defaults=True): # set default for nsavetimes, if not given if 'nsavetimes' in p and not p['nsavetimes']: p['nsavetimes'] = int(p['dzb_interval']/p['dt']) + + # catch some incompatible parameter combinations. + if (p['ne_file'] is None) and (p['process_avalanche'] == True): + print('Please provide a valid ne_file path in the configuration file when using Avalanching.') + print('Code does not proceed until this is provided.') + print('Hint: If you do not have a ne_file, you can create one with all zeros, with the same dimensions as your grid.') + exit("Exiting due to error") return p @@ -603,4 +610,4 @@ def output_sedtrails(s, p): savemat(os.path.join('sedtrails_output', str(int(time)).zfill(12) + '.mat'), mdic) else: mdic = {'us': us, 'un': un, 'dzb': dzb, 'pickup': pickup} - savemat(os.path.join('sedtrails_output', str(int(time)).zfill(12) + '.mat'), mdic) \ No newline at end of file + savemat(os.path.join('sedtrails_output', str(int(time)).zfill(12) + '.mat'), mdic) diff --git a/aeolis/vegetation.py b/aeolis/vegetation.py index 809c6a86..f8afd0f0 100644 --- a/aeolis/vegetation.py +++ b/aeolis/vegetation.py @@ -28,23 +28,13 @@ import logging from scipy import ndimage, misc import numpy as np -import math -#import matplotlib.pyplot as plt from aeolis.wind import * import aeolis.rotation # package modules import aeolis.wind -#from aeolis.utils import * import numpy as np -from scipy.integrate import quad -from scipy.integrate import romberg -from scipy.optimize import root_scalar -from scipy.signal import convolve -from scipy.special import sici -from scipy.special import erfi -import matplotlib.pyplot as plt # initialize logger logger = logging.getLogger(__name__) diff --git a/aeolis/wind.py b/aeolis/wind.py index 0ea51ffc..43ad78a2 100644 --- a/aeolis/wind.py +++ b/aeolis/wind.py @@ -28,18 +28,9 @@ import numpy as np import logging -import operator -#import scipy.special -#import scipy.interpolate -from scipy import ndimage, misc -import matplotlib.pyplot as plt -from scipy.integrate import quad -from scipy.integrate import romberg + +from scipy import ndimage from scipy.optimize import root_scalar -from scipy.signal import convolve -from scipy.special import sici -from scipy.special import erfi -from scipy.interpolate import griddata # package modules diff --git a/docs/user/installation.rst b/docs/user/installation.rst index c12fe309..9d226ec6 100644 --- a/docs/user/installation.rst +++ b/docs/user/installation.rst @@ -8,18 +8,19 @@ AeoLiS is a Python package that can be installed from PyPI or from source. For t Requirements ------------ -- Python 3.8 or newer +- Python 3.9 or newer - pip 22.0 or newer - netCDF4 Dependencies """""""""""" -- docopt==0.6.1 +- docopt +- typer - bmi-python - netCDF4 - scipy -- numpy<1.24,>=1.18 +- numpy - matplotlib - numba @@ -59,8 +60,8 @@ Example from command line: .. code:: shell - aeolis params.txt + aeolis run params.txt .. note:: - Model parameters and other configuration is passed in a `params.txt`. See the :ref:`default settings` for more details. \ No newline at end of file + Model parameters and other configuration is passed in a `params.txt`. See the :ref:`default settings` for more details. diff --git a/pyproject.toml b/pyproject.toml index 8e7782e4..297f1c27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ exclude = [ [project] name = "aeolis" -version = "3.0.0.rc3" +version = "3.0.1" authors = [ { name="Sierd de Vries", email="sierd.devries@tudelft.nl" }, ] @@ -31,7 +31,7 @@ dependencies = [ "bmi-python", "netCDF4", "scipy", - "numpy<1.24,>=1.18", + "numpy", "matplotlib", "numba", ]