{"id":48271569,"url":"https://github.com/csdms/diffusion-model","last_synced_at":"2026-04-04T22:17:11.881Z","repository":{"id":270767147,"uuid":"911396002","full_name":"csdms/diffusion-model","owner":"csdms","description":"A diffusion model used for teaching in the CSDMS Roadshow","archived":false,"fork":false,"pushed_at":"2026-02-10T22:12:09.000Z","size":47,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-02-11T01:31:08.426Z","etag":null,"topics":["diffusion","modeling","python"],"latest_commit_sha":null,"homepage":"https://csdms.colorado.edu/wiki/Roadshows","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csdms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-02T23:17:56.000Z","updated_at":"2026-01-23T23:31:23.000Z","dependencies_parsed_at":"2026-01-07T19:05:52.660Z","dependency_job_id":null,"html_url":"https://github.com/csdms/diffusion-model","commit_stats":null,"previous_names":["csdms/roadshow-diffusion","csdms/diffusion-model"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/csdms/diffusion-model","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fdiffusion-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fdiffusion-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fdiffusion-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fdiffusion-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csdms","download_url":"https://codeload.github.com/csdms/diffusion-model/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fdiffusion-model/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31416763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["diffusion","modeling","python"],"created_at":"2026-04-04T22:17:10.688Z","updated_at":"2026-04-04T22:17:11.869Z","avatar_url":"https://github.com/csdms.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# diffusion-model\n\nA numerical model used in the [CSDMS Roadshow](https://csdms.colorado.edu/wiki/Roadshows).\n\n## Overview\n\nWe will develop a one-dimensional numerical model of the physical process of diffusion.\nWe'll use the forward in time, centered in space (FTCS) finite difference method to solve the diffusion equation,\nand we'll apply Dirichlet boundary conditions.\n\nWe'll prototype the model in a Jupyter notebook,\nthen we'll convert the notebook to Python source code--first to a script, then to a packaged module--for more robust use.\n\nAlong the way, we'll use the development of the model to explore:\n\n* concepts in Python (imports, loops, conditionals, arrays, functions)\n* software tools (shell, Git, conda)\n* software development practices (unit testing, refactoring, documentation, packaging)\n\nAlthough the model is simple,\nthe topics we cover in developing it are reusable.\n\n### Development plan\n\nHere are the topics we'll cover to develop our model.\n\n* Project Jupyter ([Reference](https://github.com/csdms/ivy/blob/main/lessons/jupyter/index.md))\n    * JupyterHub: login to the *explore* Hub\n    * JupyterLab: show components\n    * Notebook: add commands in a new notebook\n* Shell (bash) commands ([Reference](https://github.com/csdms/ivy/blob/main/lessons/shell/index.md))\n* Build a diffusion model in a notebook ([Reference](https://github.com/csdms/ivy/blob/main/lessons/python/index.ipynb))\n    * Python libraries\n    * NumPy arrays\n    * Loops\n    * Conditionals\n    * Basic plotting with Matplotlib\n* Version control with Git and GitHub ([Reference](https://github.com/csdms/ivy/blob/main/lessons/git/index.md))\n    * Set up SSH keys\n    * Create a repository for the diffusion model notebook\n    * Clone the repository to the *explore* Hub\n* Export a notebook to Python source code\n* Text editors and IDEs ([Reference](https://github.com/csdms/ivy/blob/main/lessons/editors/index.md))\n* Virtual environments ([Reference](https://github.com/csdms/ivy/blob/main/lessons/conda/environments.ipynb))\n    * Use `conda`\n    * Use `venv` or `virtualenv`\n* Refactor the diffusion model\n    * Modularize model script with functions\n\t* Create a feature branch with Git\n    * Organize changes with a pull request\n* Unit testing ([Reference](https://github.com/csdms/ivy/blob/main/lessons/best-practices/unit-testing.md))\n* Lint the model code\n\t* Use `black` and `flake8`\n* Package the model ([Reference](https://github.com/csdms/ivy/blob/main/lessons/python/modules.md))\n    * Write a basic `pyproject.toml` file\n    * Install model into a virtual environment with `pip`\n\nHere are a few more topics we can cover, given time.\n\n* Use the diffusion model\n    * Import the diffusion model from new package\n    * Try to import someone else's diffusion model\n* Document the model\n    * Docstrings\n    * Sphinx documentation system\n* Visualize model output with Jupyter widgets\n\n## Acknowledgments\n\nThis work is supported by the U.S. National Science Foundation under\nAward No. [2148762](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2148762),\n*Collaborative Research: Facility: CSDMS: Engaging a thriving community of practice in Earth-surface dynamics*.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fdiffusion-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsdms%2Fdiffusion-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fdiffusion-model/lists"}