Awesome
Welcome to geog0111: Scientific Computing
UCL Geography: Level 7 course, Scientific Computing
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 individual chapter:
Chapter1_Python_introduction_answers
Chapter2_Numpy_matplotlib_answers
Chapter3_2_MODIS_download_answers
Chapter3_4_GDAL_stacking_and_interpolating
Chapter3_4a_GDAL_stacking_and_interpolating-convolution
Chapter3_6A_GDAL_Reconciling_projections_prerequisites
Chapter3_6_GDAL_Reconciling_projections
Chapter5_Modelling_and_optimisation
Chapter6_NonLinear_Model_Fitting
Chapter6_NonLinear_Model_Fitting_Solutions
Chapter7_FittingPhenologyModels
Chapter7_FittingPhenologyModels_Solutions
Chapter9_Fire_and_Teleconnections
Chapter9_Fire_and_Teleconnections_Solution
Course information
Course Convenor
N.B. 2019-20 Course Convenors: Dr Qingling Wu
Course and Contributing Staff
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:
- impart an understanding of scientific computing
- give students a grounding in the basic principles of algorithm development and program construction
- to introduce principles of computer-based image analysis and model development
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:
- Computing in Python
- Computing for image analysis
- Computing for environmental modelling
- Data visualisation for scientific applications
Learning Outcomes
At the end of the module, students should:
- have an understanding of the Python programmibng language and experience of its use
- have an understanding of algorithm development and be able to use widely used scientific computing software to manipulate datasets and accomplish analytical tasks
- have an understanding of the technical issues specific to image-based analysis, model implementation and scientific visualisation
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
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:
- it is automatically compiled and executed
- code is portable provided you have the appropriate Python modules.
- for compute intensive tasks, you can easily make calls to methods written in (faster) lower-level languages such as C or FORTRAN
- there is an active user and development community, which means that new capabilities appear over time and there are many existing extensions and enhancements easily available to you.
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.