https://github.com/computationalgeography/giscience2023
Repository for the GIScience 2023 workshop
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 9 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.1%) to scientific vocabulary
Repository
Repository for the GIScience 2023 workshop
Basic Info
- Host: GitHub
- Owner: computationalgeography
- Language: Jupyter Notebook
- Default Branch: main
- Size: 3.06 MB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Data models and scripting languages for field-agent based modelling
This repository holds a Jupyter notebook demonstrating the Daisyworld model implementation in Campo, a YAML file to create the Python environment required to run the model, and necessary scripts for pre- and postprocessing.
You can run the Jupyter notebook locally on your own computer.
More information will be given in the GIScience 2023 workshop.
Running on your machine
How to install
A few steps are required to run the Jupyter notebook. General information on Jupyter notebooks and manuals can be found here. The user guide and short reference on Conda can be found here.
You will need a working Python environment, we recommend to install Miniconda. Follow their instructions given at:
Open a terminal (Linux/macOS) or Miniconda command prompt (Windows) and browse to a location where you want to store the course contents.
Clone this repository, or download and uncompress the zip file. Afterwards change to the
giscience2023folder.Create the required Python environment:
Linux/macOS:
conda env create -f environment/environment.yamlWindows:
conda env create -f environment\environment.yaml
The environment file will create a environment named giscience2023 using Python 3.11. In case you prefer a different name or Python version you need to edit the environment file.
How to run
Activate the environment in the command prompt:
conda activate giscience2023
Then change to the notebook folder.
You can now start the Jupyter notebook from the command prompt. The notebook will open in your browser:
jupyter lab daisyworld.ipynb
Running the LUE model
You can download the model script and input data here. The model script can be executed e.g. with
python ./model.py --hpx:threads=4 --write "50,50" input_path output_path
For output_path create an output folder first, e.g. output
In case of crashes on Linux systems you can run like
LD_PRELOAD=$(find $CONDA_PREFIX -name libtcmalloc_minimal.so.4) python ./model.py --hpx:threads=4 --write "50,50" input_path output_path
Output visualisation
You can display the output as raster timeseries with aguila. First, change the lines 224-225 in model.py into
python
self.write_raster(discharge, f"discharge_{timestep}.tif")
self.write_raster(self.snow, f"snow_{timestep}.tif")
re-run the model and display the output with
aguila --timesteps=[1,365] output/discharge
Further reading
Background on DaisyWorld:
https://en.wikipedia.org/wiki/Daisyworld
Scientific literature about Campo and LUE:
M.P. de Bakker, K. de Jong, O. Schmitz, D. Karssenberg (2017). Design and demonstration of a data model to integrate agent-based and field-based modelling. Environmental Modelling & Software, 89, 172-189, DOI: 10.1016/j.envsoft.2016.11.016.
K. de Jong, D. Karssenberg (2019). A physical data model for spatio-temporal objects. Environmental Modelling & Software, 122, 104553, DOI: 10.1016/j.envsoft.2019.104553.
K. de Jong, D. Panja, M. van Kreveld, D. Karssenberg (2021). An environmental modelling framework based on asynchronous many-tasks: Scalability and usability. Environmental Modelling & Software, 139, 104998, DOI: 10.1016/j.envsoft.2021.104998.
Owner
- Name: Computational Geography
- Login: computationalgeography
- Kind: organization
- Email: d.karssenberg@uu.nl
- Website: https://www.computationalgeography.org
- Repositories: 4
- Profile: https://github.com/computationalgeography
Computational Geography R&D team of the Department of Physical Geography at Utrecht University in the Netherlands