Home

Awesome

Welcome to geog0111: Scientific Computing

UCL Geography: Level 7 course, Scientific Computing

Documentation Status

Online Notebooks via Binder:

Run the notebooks on Binder server directly by click on different chaper, it may take some time to start but just wait a bit....

Go to full list of notebooks

Go to individual chapter:

Chapter0_help

Chapter1_Python_introduction

Chapter1_Python_introduction_answers

Chapter2_Numpy_matplotlib

Chapter2_Numpy_matplotlib_answers

Chapter3_0_GDAL

Chapter3_1_GDAL

Chapter3_1_GDAL_answers

Chapter3_2_MODIS_download

Chapter3_2_MODIS_download_answers

Chapter3_3_GDAL_masking

Chapter3_4_GDAL_stacking_and_interpolating

Chapter3_4a_GDAL_stacking_and_interpolating-convolution

Chapter3_5_Movies

Chapter3_6A_GDAL_Reconciling_projections_prerequisites

Chapter3_6_GDAL_Reconciling_projections

Chapter4_Practical_Part1

Chapter5_Linear_models

Chapter5_Modelling_and_optimisation

Chapter6_NonLinear_Model_Fitting

Chapter6_NonLinear_Model_Fitting_Solutions

Chapter7_FittingPhenologyModels

Chapter7_FittingPhenologyModels_Solutions

Chapter8_Practical_Part2

Chapter9_Fire_and_Teleconnections

Chapter9_Fire_and_Teleconnections_Solution

Connection

Course information

Course Convenor

Prof P. Lewis

N.B. 2019-20 Course Convenors: Dr Qingling Wu

Course and Contributing Staff

Prof Philip Lewis

Dr. Jose Gomez-Dans

Dr Qingling Wu

Purpose of this course

This course, geog0111 Scientific Computing, is a term 1 MSc module worth 15 credits (25% of the term 1 credits) that aims to:

It is open to students from a number of MSc courses run by the Department of Geography UCL, but the material should be of wider value to others wishing to make use of scientific computing.

The module will cover:

Learning Outcomes

At the end of the module, students should:

Timetable

The course takes place over 10 weeks in term 1, in the Geography Department Unix Computing Lab (PB110) in the Pearson Building, UCL.

Classes take place from the second week of term to the final week of term, other than Reading week. See UCL term dates for further information.

The timetable is available on the UCL Academic Calendar

Assessment

Assessment is through two pieces of coursework, submitted in both paper form and electronically via Moodle.

See the Moodle page for more details.

Useful links

Course Moodle page

Python

Python is a high level programming language that is freely available, relatively easy to learn and portable across different computing systems. In Python, you can rapidly develop solutions for the sorts of problems you might need to solve in your MSc courses and in the world beyond. Code written in Python is also easy to maintain, is (or should be) self-documented, and can easily be linked to code written in other languages.

Relevant features include:

For further background on Python, look over the material on Advanced Scientific Programming in Python or python.org web sites.

We are assuming that you are new to computing in this course. We will not explicitly go through unix (operating system) notes, but you should make yourself familiar with the basic concepts.

Using the course notes

We will generally use the jupyter notebooks for running interactive Python programs.

You will probably want to run each session and store scripts in your Data (or DATA) directory.

If you are taking this course at UCL, the notes should already have been downloaded to your DATA directory.

If so, then:

cd /directory/to/geog0111
git reset --hard HEAD
git pull

will update the notes (for any changes I make over the sessions).

If you need to download the notes and want to run the session directly in the notebook, you will need to download the course material from github and run the notebook with e.g.:

cd /directory/to/
git clone https://github.com/profLewis/geog0111.git

to obtain the notes.

Using python

We suggest you use the anaconda python distribution. if you are not using the UCL resources (i.e. using your own comnputer), you should download and install an anaconda distribution. If you are using the UCL computers, then it should be there already.

You may also find it of value to have git installed.

Assuming you have a copy of the notes in the directory ('folder') ~/DATA/geog0111 then you can set up a specific 'environment' in which to run these notes:

cd /directory/to/geog0111
conda env create -f environment.yml

If you are updating the notes, and geog0111 already exists, use instead:

cd /directory/to/geog0111
conda env update -f environment.yml

This will create an environment called geog0111 and make sure you have all of the required dependencies.

If you have created the environment, you can activate it with:

conda activate geog0111
python setup.py install

For further advice on checking, setting or deleting conda environments, see the conda help pages.

To go to the directory for the first session:

cd /directory/to/geog0111
jupyter notebook Chapter1_Python_intro.ipynb

You quit an jupyter notebook session with ^C (Control C).

To exectute ('run') blocks of Python code in the notebook, use ^<return> (SHIFT and RETURN keys together).

Alternatively, just run ipython:

cd /directory/to/geog0111
ipython

and type your own commands in at the prompt, following the class or the material on the webpages.

Course Notes

Course notes

Help

Help Connections to the lab