Skip to content

Commit

Permalink
Initial commit of energy balance model
Browse files Browse the repository at this point in the history
  • Loading branch information
atedstone committed May 9, 2018
0 parents commit 83c6f5e
Show file tree
Hide file tree
Showing 6 changed files with 765 additions and 0 deletions.
104 changes: 104 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# EB_AUTO - Python Release

This repository forms a Python implementation of the EB_AUTO Spreadsheet Energy Balance Model published by Brock and Arnold (2000). No changes have been made.

The model calculates each component of the surface energy balance and then, optionally, the amount of melting caused by each SEB component.

## Requirements

* Python >= 2.7
* NumPy

Additionally, to use the example `run_ebmodel_Samplmet.py`, you will need:

* Pandas
* Openpyxl

These dependencies will be met by all up-to-date releases of Anaconda Python.


## Installation and running the example

Either `git clone` to your local environment or:
* download as a zip file
* extract it
* in a terminal window, change to the directory of the extracted zip file
* `python run_ebmodel_demo.py`


## Structure

The model is called using two main functions contained within the `ebmodel` module.

* `ebmodel.calculate_seb` returns the net shortwave, net longwave, sensible heat flux and latent heat flux components for the specified meteorology.
* `ebmodel.calculate_melt` returns the corresponding melt fluxes in millimetres water equivalent (mm w.e.).

Each of these main functions contains calls to several other functions defined in `ebmodel`.


## Making modifications and extensions

You may create your own driver scripts for your own purposes. For example, one of the reasons for porting the model to Python was to couple this model to an albedo model, thereby solving for time-evolving albedo.


## Referencing

This module implements the point-based glacier surface energy balance model
originally developed as a spreadsheet application by:

Brock, B. W., and Arnold, N. (2000) Technical Communication: A spreadsheet-
based (Microsoft Excel) point surface energy balance model for glacier and
snow melt studies. Earth Surface Processes and Landforms, 25, p 649-658.

Use of this model in a publication should be accompanied by a citation to
the aforementioned reference and to this repository.







Binary file added Samplmet.xls
Binary file not shown.
Loading

0 comments on commit 83c6f5e

Please sign in to comment.