Home

Quick Start

Data

Python

Courseware

Lecture Graphics

Problems

Solutions

Bibliography


Example Scripts

 

Overview

Here you will find the set of Python scripts I have written for use with the text, along with instructions for installation and a guide to usage. These scripts are used in the Workbook problems, they allow the reader to reproduce essentially all the calculations and figures in the text, and they provide a basic toolkit for original research. Before delving into this material, you should first take care of a basic Python installation and obtain some familiarity with the language

For an quick summary of what you need, see Quick Start. For most users, Quick Start will be sufficient. The material below covers the same territory in more detail. A tarfile of the complete collection of courseware is here. Eventually I will also provide access to a Git repository on GitHub. (N.B.  I haven't yet updaed the Quick Start to reflect Second Edition Changes)

The Second Edtion of Principles of Planetary Climate  is well underway now, and I am catching up on updating the courseware for Python 3, and for taking advantage of the Jupyter Notebook interface. I will be posting the new versions as I finish and validate them. 

Courseware Modules: Second Edition

Chapter Scripts: Second Edition

Courseware Modules: First Edition

These are utilities used throughout the courseware. They should be put in a search path where Python can find them regardless of which directory you are working from. The utility routine setpath.py included below takes care of the chore of setting things up so that Python will find the modules; see the Python portal page for a more extensive discussion of where Python looks for modules. These courseware modules are not really meant to be modified by the student, but one can always make a personal copy and customize if desired. Wherever they are put, the student will be able to read them and see how they work. Freedom to Tinker Rules!

The complete documentation of the courseware modules ClimateUtilities.py, phys.py and planets.py is given in the form of a JuPyter (formerly iPython) notebook here. Download it and run it in a JuPyter notebook server window. (So far, only the ClimateUtilities part is complete, but the rest will follow soon). For information on reading and using JuPyter notbooks, consult the Instant Notebooks page.

 

Chapter Scripts: First Edition

Each student should have a personal copy of these, in their own home directory. They are meant to be run and modified, to reproduce figures in the text, for further explorations, and for aid in doing the Workbook problems. There are a few Chapter Scripts that are used by chapter scripts in other chapter directories, and you will need to do something to make those available (see the Quick Start page for now). Some chapter scripts access data in the Workbook Datasets. The datapath variable in such scripts needs to be customized to specify where the datasets reside on the system you are using.

Documentation of what each script does is found in the comments embedded in the scripts, and the use of many of these scripts is described in the Workbook problems that need them. Eventually I will provide a comprehensive list of the scripts, their usage, and the figures (and other results) in the text which they were used to produce, as a complement to information of this sort that is already embedded in the individual scripts.