OOPS: Object Oriented Prediction System The evolution of the IFS code in the coming 2-3 years.

Slides:



Advertisements
Similar presentations
Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Advertisements

Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
Toulouse, Sept 20-22, 2010Aladin/LACE/Hirlam maintenance training workshop IFS code overhaul & Object Oriented Programming: a likely evolution of our codes.
6-1 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer problem-solving process and relate it to Polya’s.
1 CIS601: Object-Oriented Programming in C++ Note: CIS 601 notes were originally developed by H. Zhu for NJIT DL Program. The notes were subsequently revised.
Introduction To System Analysis and Design
Object-Oriented PHP (1)
Object-Oriented Databases v OO systems associated with – graphical user interface (GUI) – powerful modeling techniques – advanced data management capabilities.
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Object-Oriented Databases
Chapter 1 Principles of Programming and Software Engineering.
Visual Basic Introduction IDS 306 from Shelly, Cashman & Repede Microsoft Visual Basic 5: Complete Concepts and Techniques.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Chapter 8: Introduction to High-Level Language Programming Invitation to Computer Science, C++ Version, Fourth Edition.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
C++ fundamentals.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
The chapter will address the following questions:
Fruitful functions. Return values The built-in functions we have used, such as abs, pow, int, max, and range, have produced results. Calling each of these.
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
Introduction to Object-oriented programming and software development Lecture 1.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
BCS 2143 Introduction to Object Oriented and Software Development.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Objects and Components. The adaptive organization The competitive environment of businesses continuously changing, and the pace of that change is increasing.
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Database Design - Lecture 2
Intro to Architecture – Page 1 of 22CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: Introduction Reading: Chapter 1.
File Processing - Database Overview MVNC1 DATABASE SYSTEMS Overview.
CS101 Introduction to Computing Lecture Programming Languages.
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
1 Life Cycle of Software Specification Design –Risk Analysis –Verification Coding Testing –Refining –Production Maintenance.
Software Development. Software Developers Refresher A person or organization that designs software and writes the programs. Software development is the.
CSE 303 – Software Design and Architecture LECTURE 4.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 6 Using Methods.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Definition of Object - Oriented Language.. Object-oriented programming (OOP) is a programming language model organized around "objects" rather than "actions"
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Abstraction ADTs, Information Hiding and Encapsulation.
1 OOP - An Introduction ISQS 6337 John R. Durrett.
Object-Oriented Programming. Objectives Distinguish between object-oriented and procedure-oriented design. Define the terms class and object. Distinguish.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
CSC 480 Software Engineering Test Planning. Test Cases and Test Plans A test case is an explicit set of instructions designed to detect a particular class.
Introduction to OOP CPS235: Introduction.
11 Software Design CSCU 411 Software Engineering.
Slide 1 NEMOVAR-LEFE Workshop 22/ Slide 1 Current status of NEMOVAR Kristian Mogensen.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Basic Characteristics of Object-Oriented Systems
LAM models in the OOPS framework ? Claude FISCHER.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Mr H Kandjimi 2016/01/03Mr Kandjimi1 Week 3 –Modularity in C++
Maitrayee Mukerji. INPUT MEMORY PROCESS OUTPUT DATA INFO.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Programming paradigms
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Presentation transcript:

OOPS: Object Oriented Prediction System The evolution of the IFS code in the coming 2-3 years

Why to re-arrange the IFS code ? The IFS code has reached a very high level of complexity. However, most configurations and options are set up and defined globally from the highest control level down. The maintenance cost has become very high. New cycles take longer and longer to create and debug. There is a long, steep learning curve for new scientists and visitors. It is becoming a barrier to new scientific developments such as long window weak constraints 4D-Var. Some algorithmic limitations: –Entities are not always independent => H^t R−1 H is one piece (jumble) of code. –The nonlinear model M can only be integrated once per execution => algorithms that require several calls to M can only be written at script level.

IFS growth: unfortunately, it’s not an investment: It’s growth of costs, not of benefits.

Modernizing the IFS Re-assess « modularity »: –Define self-sufficient entities that can be composed, that define the scope of their variables (avoid « bug- propagation ») => requires a careful understanding and definition of their interface –Avoid as much as possible global variables –Will require to widen the IFS coding rules and break the « setup/module/namelist » triplet paradigm Information hiding and abstraction The above leads to object-oriented programming

Basics about OO-programming Organize the code around the data, not around the algorithms. The primary mechanism used by object-oriented languages to define and manipulate objects is the class Classes define the properties of objects, including: –The structure of their contents, –The visibility of these contents from outside the object, –The interface between the object and the outside world, –What happens when objects are created and destroyed. Operations, transformations on members of a class: methods

More basics about OO Encapsulation: content+scope of variables+interfaces (operators) put altogether Inheritance: allows more specific classes to be derived from more general ones. It allows sharing of code that is common to the derived classes. Polymorphism: refers to the ability to re-use a piece of code with arguments of different types. Abstraction: refers to the ability to write code that is independent of the detailed implementation of the objects it manipulates.

Toy OOPS ‘Toy’ data assimilation system to try out Object- Oriented programming for IFS Abstract Part –Code the algorithm in terms of base classes which serve to define interfaces to the data structures & functions can be compiled separately Implementations (“Instantiation”) –Code Lorenz and QG models in terms of derived classes from the base classes which define data structures and functions without change of abstract part

Toy OOPS implementations State Increment incrementalAlgorithm Observation Departure x y δxδx y-H(x) Base Classes: Derived Classes: BkgErrCov ObsErrCov B R LorenzState QgState LorenzObservation QgObservation LorenzBkgErrCov QgBkgErrCov LorenzIncrement QgIncrement LorenzDeparture QgDeparture LorenzObsErrCov QgObsErrCov LorenzMain QgMain

Abstraction: Incremental 4D-Var on One Slide!

 IFS : a ‘F90 / C++ sandwich’ Main program: master.F90 calls mpl_init etc. Control layer in C++ : IFS_main Abstract part: IncrementalAlgorithm.cpp, Stepo.cpp, Hop.cpp, State.cpp, Increment.cpp, etc. IFS specific: IFS_State.cpp, IFS_Increment.cpp, etc. Computational parts in F90: cpg.F90, callpar.F90, rttov.F90 etc.

Polymorphism ODB retrievals in H (hop.F90), H (hoptl.F90), H T (hopad.F90) depend on the observation type (see ctxinitdb.F90) OpenMP loop over observation type and each operator has a behavior depending on the observation type SSMI H ATOVS SATOB REO3 RADAR HTHT H SATOB SATOB observation observation distribute H H SATOB departure departure HHTHT H HTHT SATOB ObsErrCov ObsErrCov R R ATOVS ATOVS observation observation distribute H H ATOVS departure departure HHTHT H HTHT ATOVS ObsErrCov ObsErrCov R R SSMI SSMI observation observation distribute H H SSMI departure departure HHTHT H HTHT SSMI ObsErrCov ObsErrCov R R distribute

Transition from IFS to OOPS The main idea is to keep the computational parts of the existing code and reuse them in a re-designed structure => this can be achieved by a top-down and bottom-up approach. From the top: Develop a new modern, flexible structure => Expand the existing toy system. From the bottom: Move setup, namelists, data and code together. –Propose new coding guidelines to that effect, –Everybody participates by applying it to the part of the code they know. –Create self-contained units of code. C++/F95 breaking levels: STEPO and COBS/HOP Put the two together: Extract self-contained parts of the IFS and plug them into OOPS => this step should be quick enough for versions not to diverge.

User considerations: User interface: –Xml files: incremental rather than full-default; no more namelists after OOPS !!! –Must preserve the facility to read in model parameters from a model input file (like with « FA » files; for LAM at least) Documentation: needs to remain at a reasonable level (clean code is « auto-documentary »)

Preliminary coding considerations: At which level to split OO and standard F ? How far should OO go into the IFS ?: –Start with D.A. control; assess the interior of the forecast model(s) later (NL, TL, AD) => timestep organization, externalize physics ?, phys/dyn interface, timestep 1 specificity –Break STEPO, make GP buffers the natural vehicle for initializing and passing model data at OO-level (spectral transforms and data become an « optional » entity within the models) –Later on, define grids and interpolators as Objects (both « base objects » and « instantiated objects ») High-level entities: ocean v/s atmospheric model, EPS and singular vector computation, EnsDA For « bottom-to-top » approach: write guidelines for helping developers to identify their entities

Opportunity v/s risks Opportunity: –Move towards a more “modern” code, sharing more concepts with other system/I.T. codes –Guidelines for the bottom-to-top approach will force a general and rather drastic review of the existing code (and options in the code) => some rarely used Research options may disappear ! –Develop new configurations of the assimilation at the OO-level: NL cost function, hybrid, filters, … –Review of the obs operator interfacing, based on a scientific identification of the operators, while totally hiding the ODB database structuring (at the scientific level of the code) Risks: –Long-lasting effort that may never end in practice ? –Some bets are implicit: future of Fortran programming in Met’ HPC code –A rather tricky transition period to be organized, but the switch would be “at once” with no backward compatibility (of code) => Research developments will need to be separately adapted –Impact on MF and Partner’s applications: especially LAM code

Impact on MF&Harmonie applications: a first glance LAM: re-organization of LELAM key MF’s own 4D-VAR multi-incremental sequence: adaptations of Arpège specifities & question of shared C++ assimilation control level adaptation of Full-Pos/e927 with a well-defined interface for OOPS (2-3 possible strategies, to be further decided) => ideally, one should be able to almost code the sequence « global forecast + e927 + LAM forecast » within one C++ piece of code Keep the possibility to set up the model parameters by reading from a model input file (923, (e)927, Arpège and LAM forecasts) DFI code: Jc-DFI but also regular D.F. initialization in global or LAM models (state vector is both input and output) CANARI Other options …

Starting efforts at MF … & partners ? Get familiar with OO & C++ Implement and learn the toy Play with the toy Do your own exercise: –Multiple geometry, LAM versus global –Small ensemble –Extra term (« à la Jk ») –… Tutorials to come: at ECMWF (next NWP training seminar) and at MF (by EC staff, June)