Skip to content

Commit

Permalink
Merging branch oop into master. Major reorganization of climlab code.
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-rose committed Feb 24, 2015
2 parents 021632a + c284977 commit 060710e
Show file tree
Hide file tree
Showing 58 changed files with 5,370 additions and 1,258 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Brian E. J. Rose
Copyright (c) 2015 Brian E. J. Rose

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include README
include README.rst
include LICENSE
include climlab/orbit91
include courseware/*.ipynb
include courseware/README
include courseware/README.rst
29 changes: 0 additions & 29 deletions README

This file was deleted.

73 changes: 73 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
================
climlab
================
----------
Python package for process-oriented climate modeling
----------

Author
--------------
| **Brian E. J. Rose**
| Department of Atmospheric and Environmental Sciences
| University at Albany
| brose@albany.edu
Installation
----------------
``python setup.py``

or, if you are developing new code

``python setup.py develop``


About climlab
--------------
``climlab`` is a flexible engine for process-oriented climate modeling.
It is based on a very general concept of a model as a collection of individual,
interacting processes. ``climlab`` defines a base class called ``Process``, which
can contain an arbitrarily complex tree of sub-processes (each also some
sub-class of ``Process``). Every climate process (radiative, dynamical,
physical, turbulent, convective, chemical, etc.) can be simulated as a stand-alone
process model given appropriate input, or as a sub-process of a more complex model.
New classes of model can easily be defined and run interactively by putting together an
appropriate collection of sub-processes.

Most of the actual computation uses vectorized ``numpy`` array functions.
It should run out-of-the-box on a standard scientific Python distribution.
Future versions of ``climlab`` will provide hooks to compiled Fortran code for
more numerically intensive processes.

Currently, ``climlab`` has out-of-the-box support and documented examples for

- 1D grey-radiation and radiative-convective single column models
- 1D diffusive energy balance models
- Seasonal and steady-state models
- orbital / insolation calculations.

Example usage
------------------
The directory ``climlab/courseware/`` contains a collection of IPython notebooks (*.ipynb)
used for teaching some basics of climate science,
and documenting use of the ``climlab`` package.
These are self-describing, and should all run out-of-the-box once the package is installed, e.g:
``ipython notebook Insolation.ipynb``

History
----------------------
The first versions of the code and notebooks were originally developed in winter / spring 2014
in support of an undergraduate course at the University at Albany.
See the original course webpage at
http://www.atmos.albany.edu/facstaff/brose/classes/ENV480_Spring2014/

The package and its API was completely redesigned around a truly object-oriented
modeling framework in January 2015.

It will be used extensively for a graduate-level climate modeling course in Spring 2015:
http://www.atmos.albany.edu/facstaff/brose/classes/ATM623_Spring2015/

License
---------------
This code is freely available under the MIT license.
See the accompanying LICENSE file.
29 changes: 25 additions & 4 deletions climlab/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
__version__ = '0.2'

# This list defines all the modules that will be loaded if a user invokes
# from ClimLab import *
__all__ = ["constants", "thermo", "orbital_table",
"long_orbital_table", "insolation", "ebm",
"column", "convadj"]
# from climLab import *

# totally out of date!

#__all__ = ["constants", "thermo", "orbital_table",
# "long_orbital_table", "insolation", "ebm",
# "column", "convadj"]

# this should ensure that we can still import constants.py as climlab.constants
from climlab.utils import constants
from climlab.utils import thermo, legendre
# some more useful shorcuts
from climlab.model import ebm, column
from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel
from climlab.model.ebm import EBM, EBM_annual, EBM_seasonal
from climlab.domain import domain
from climlab.domain.field import Field, global_mean
from climlab.domain.axis import Axis
from climlab.process.process import Process, process_like, get_axes
from climlab.process.time_dependent_process import TimeDependentProcess
from climlab.process.implicit import ImplicitProcess
from climlab.process.diagnostic import DiagnosticProcess
from climlab.process.energy_budget import EnergyBudget
185 changes: 0 additions & 185 deletions climlab/column.py

This file was deleted.

Empty file added climlab/convection/__init__.py
Empty file.

0 comments on commit 060710e

Please sign in to comment.