John Bray, Numerical Weather Prediction, UK Met. Office

Prepared for the BCS Fortran Specialist Group AGM, May 2003



OVERVIEW

The Met Office

Variational Data Assimilation project

The Unified Model

Conclusions



THE MET. OFFICE

On the the box every night!

Timescales from hours to centuries

Research done on HP workstations

Production on supercomputers, currently Cray T3Es

Relocation to Exeter, NEC SX-6, Linux workstations

Fortran the key language for forecasting software



VARIATIONAL DATA ASSIMILATION / OBSERVATION PROCESSING

Operational system

Feeds observations into numerical model

Complicated mathematical technique

Large data volumes

CPU and memory intensive

Parellised over up to 200+ processors

MPI, GCOM rather than OpenMP

300k lines of new stand-alone code, 50k lines imported

10 developers

C for IO

Very strong error checking, local failure

Started 1994, operational 1998

USE OF Fortran 90

Free format

Dynamic allocation

Derived data types

Array notation

Modules

Automatic interface blocks - compilation issues

Strong coding standards

Preprocessing avoided wherever possible

HTML in output streams

CODE MANAGEMENT

RCS

One routine per file

Related files INCLUDed in a module

USEd by other routines

Module the basic configured item

F90 features imply code dependancies

Makefile generated automatically

Interface method affects recompilation

HTML documentation generated directly from code

EXPERIENCES

Compilers variable, but generally fine

Optimisations worked as for F77 code

Parallel debugging awkward, especially in batch

Manual trace calls to monitor CPU and memory

Scientists happy with coding style

Fortran 90 definitely the right choice



UNIFIED MODEL (UM)

FORTRAN 77 + extensions, written 1990 onwards

450k lines of code

100+ developers

22k preprocessor lines!

Portable to Unix platforms

C for IO

Alternates between vector and MPP optimisations

9 month release cycle

Automatic documentation created in HTML

WHAT'S WRONG

Fixed format code

Changeset based code management system

Wide variety of coding styles

1D representations of 3D data, etc.

Thousands of compiler warnings ignored. Bug or feature?

DO loops galore

Clutter

Code only reviewed for scientific validity

PROPOSED CHANGES - Non F9x

Technical as well as scientific reviews

Campaign to remove warnings and preprocessing

De-clutter

New CVS based code management

Alternate science/technical release cycles

Only accept new code to house style

PROPOSED CHANGES - F9x

Free format

Dynamic allocation

Derived data types

Array notation

Modules

Closer integration with VAR/OPS

European standards for interfacing climate models

WHY NOTHING CHANGES

Code improvement low priority

Variable management committment

Variable developer commitment

Changeset code management discourages tidying

Code gets scientific reviews, not technical

Long release cycles

2/3 change lines lodged in last week, 20% on last day!

Concerns about optimisation and portability

Relocation



CONCLUSIONS

Fortran 90 very successful for new code

Problems with Fortran 77 code widely recognised

Old development practices discourage change

Limited management committment - constant slippage

European involvement may trigger change - but how deep?

Will Exeter be the promised land?