Course Overview
This 5-day course provides a comprehensive introduction to the key features of modern Fortran including the Fortran base types, arithmetic, precision, arrays and whole array features, I/O, control structures, intrinsic and user defined functions, subroutines, modules, pointers and simple data structuring.
The course is a mixture of lectures and practical sessions and on completion delegates should be able to work with most existing codes.
Pre-requisites
Course details
Introduction to problem solving
Introduction to programming languages
Introduction to programming
Introduction to arithmetic
Real and Integer data types
Rules for computer arithmetic
Finite precision and implications for computer arithmetic
Arrays
basic array syntax
one and multidimensional arrays
dynamic arrays - allocatable attribute
whole array processing
array sections
array element ordering
I/O
Files
file access - open and close statements
speed of access - text versus binary files
records
handling errors
Functions
the first of the two fundamental Fortran building blocks
intrinsic functions
user defined functions
scope of variable
internal functions
pure and elemental functions
functions and modules
Control Structures
complete coverage of Fortran control structures
Character variables
character/ text data in Fortran
Fortran's character functions
Fortran's other basic data types
complex
logical
Introduction to derived types
Introduction to pointers
Subroutines
Fortran's remaining building block
modules and subroutines
passing parameters in Fortran
passing scalar and array parameters
automatic and allocatable arrays
keyword and optional arguments
internal subroutines and scope
commercial numerical and statistical subroutine libraries
Modules
Fortran's code organisation mechanism
basic module syntax
modules for global data
modules for precision specification and constant definition
modules for derived types
implicit and explicit interfaces
Introduction to data structuring with examples
singly linked list: reading an unknown amount of data
reading in an arbitrary number of reals using a linked list and copying to an array
ragged arrays
ragged arrays and variable sized data sets
perfectly balanced tree
date class
date data type with USA and ISO support
Course material
The course is based on Introduction to programming with Fortran (4th edition)