ALADIN PHASER'S GUIDE

By R. AJJAJI &J. BOUTAHAR (Maroc-Météo) & JF. GELEYN (Météo-France)

June 30, 1998, VERSION 1.1

Contents

Introduction

I. Coding rules

II. How ALADIN Code Maintenance must be done ?

III.Methodology to follow when phasing.

IV. Code validation.

Annex A: Link between the ARPEGE and ALADIN codes.

Annex B: Routines/Decks used in running aladin.

Annex C: Specific problems of ALADIN <<Post-Phaing>> or <<Back-Phasing>>.

Annex D: Workstation version of ALADIN (Anticipated rules of maintenance).


INTRODUCTION


I. CODING RULES:

There are several ways to write a program (or a software) for a given aim, and if all the methods make it possible to obtain correct results (files, listings, ...), they are not equivalent in general according to other criterions.

So it is essential that a program (or a group of programs) should be:

Each module should begin with a set of principal comments. These should contain:

The code of the module should be split into sections and sub-sections. Each section should be separated from the previous by homogeneous numerical labels.

The type of a variable is indicated by the prefix of the variable names (cf : following tables)

PREFIX

TYPE

I,J,K,M,N

L

C

D

Y

ALL OTHER

INTEGER

LOGICAL

CHARACTER

DOUBLE PRECISION

COMPLEX

REAL

The following table defines the prefixes conventions (Clochard, J., 1998, Norme de codage "DOCTOR" pour le projet ARPEGE. Note de travail "ARPEGE" No. 4, and, Gibson, J.K., 1986, Standards for software development and maintenance, Technical memorandum No. 120)

TYPE STATUS OR SCOPE

INTEGER

REAL

LOGICAL

CHARACTER

DOUBLE PRECISION

COMPLEX

MODULE

OR

COMMON

M, N

G,H,O

Q To X

L

but not LP,LD,LL

C

but not CP,CD,CL

D

but not DP,DD,DL

Y

but not YP,YD,YL

DUMMY-

ARGUMENT

K

P

but not PP

LD

CD

DD

YD

LOCAL

VARIABLES

I

Z

LL

CL

DL

YL

LOOP

CONTROL

J

but not JP

_

_

_

_

_

PARAMETER

JP

PP

LP

CP

DP

YP

Once a routine is written or modified, it should be reviewed. And the following should be considered:

The following example illustrates the rules above mentioned :

SUBROUTINE CNT2

!**** *CNT2* - Controls integration job at level 2.

! Purpose.

! --------

! Controls integration job at level 2.

!** Interface.

! ----------

! *CALL* *CNT2

! Explicit arguments :

! --------------------

! None

! Implicit arguments :

! --------------------

! None

! Method.

! -------

! See documentation

! Externals. SU2YOM - initialize level 2 commons

! ---------- CNT3 - controls direct integration on level 3

! Reference.

! ----------

! ECMWF Research Department documentation of the IFS

! Author.

! -------

! Mats Hamrud and Philippe Courtier *ECMWF*

! Modifications.

! --------------

! Original : 87-10-15

! Modified : 91-09-25 Jean-Noel THEPAUT. cleaning of TL and AD.

! Modified : 96-09-25 Florence Rabier. allocation for nconf=801

! ------------------------------------------------------------------

USE YOMCT0 , ONLY : NCONF ,LELAM

IMPLICIT LOGICAL(L)

! ------------------------------------------------------------------

!* 1. Initialization.

!* 1.1 Initialize YOMCT2.

CALL SU2YOM

!* 1.2 ALLOCATE EXTRA SPACE FOR TRAJECTORY.

IF(NCONF/100.EQ.1.OR.NCONF.EQ.801) THEN

CALL SUALLT

IF (LELAM) CALL SUELLT

ENDIF

! ------------------------------------------------------------------

!* 2. Call level 3 control routine.

! -----------------------------

CALL CNT3

! ------------------------------------------------------------------

RETURN

END SUBROUTINE CNT2

------------------------------------------------------------------------------------


II. HOW ALADIN CODE MAINTENANCE MUST BE DONE ?

II.1. GENERALITIES ABOUT IFS / ARPEGE / ALADIN

II.2. THE MAINTENANCE OF ARPEGE/ALADIN SOFTWARE.

II.3. CODE MANAGEMENT (CLEAR CASE)

II.4. NOTION OF CYCLES.

II.4.1 IN IFS/ARPEGE

II.4.2 TYPE OF CYCLES AND THEIR USE.

II.4.3 SPECIFICITIES OF ALADIN CYCLES.

II.5. IMPLICATIONS FOR THE ALADIN «AT DISTANCE» MAINTENANCE.

II.6. WORKSTATION VERSION OF ALADIN .

II.6.1. GENERALITIES.

II.6.2. SOME PRACTICAL ASPECTS.


III. METHODOLOGY TO FOLLOW WHEN PHASING:

First it is the responsibility of ALADIN team to decide which ARPEGE cycle to phase with ALADIN and which components to report into ALADIN.

III.1. What is the composition of a new phased ALADIN cycle?

III.2. Methodology.

III.2.1. Pure ALADIN Modifications:

The Phaser must take them under LELAM and/or LRPLANE keys.

III.2.2. Modifications coming from the new ARPEGE cycle

If ALADIN team decides not to port the new ARPEGE modifications, then the phaser must short-cut them by using .NOT. LELAM and/or .NOT. LRPLANE keys.

In the opposite case:

It is good to keep in mind that comdecks and namelists common with ARPEGE/IFS, could be redefined only if ECMWF authorizes it.


IV. CODE VALIDATION.

IV.1. TYPE OF VALIDATIONS.

IV.2. "MAINTENANCE" VALIDATION.

IV.3. "OPERATIONAL" VALIDATION.

IV.4. BASIC RULES OF VALIDATION.

Basic questions (after successful run):

IV.5. VALIDATION TOOLS.


ANNEX A : LINK BETWEEN THE ARPEGE AND ALADIN CODES


ANNEX B : ROUTINES/DECKS USED IN RUNNING ALADIN.

B.1. THE DIFFERENT TYPES.

B.2. THE SPECIFICITY OF MAINTENANCE FOR EACH ABOVE-DEFINED CATEGORY.

  • when appropriate, to import, inside the conditional LELAM or LRPLANE blocks, the scientific equivalent of the ARPEGE modifications;
  • when needed (because of too complex ARPEGE changes or because of ALADIN new specificities that cannot be treated otherwise), to create new conditional blocks.

  • ANNEX C: SPECIFIC PROBLEMS OF ALADIN «POST-PHASING» OR «BACK-PHASING»

    ARPEGE

    ALADIN

    CY13R5

    AL04

    CY14T3

    AL05

    CY15T2

    AL06 (Bad !)

    CY16T1+cleaning

    AL07

    CY18T1

    AL08

    CY19T1

    AL09 (Hoped !)

    so that CY17 (the «uncleaned» IFS/ARPEGE counterpart of CY18) will have no corresponding ALADIN Cycle!


    ANNEX D: WORKSTATION VERSION OF ALADIN (ANTICIPATED RULES OF MAINTENANCE)

    The first workstation version of ALADIN was built in an ad-hoc way from a blend of post-phasing and back-phasing actions involving Cycles 4 and 5 (with a bit of Cycle 6 being subsequently added). This situation was not satisfying from a long term point of view and it was decided to restart from scratch at the occasion of Cy7. Fortunately progress in portability resulted in a rather easy phasing so that a more consistent approach can be used from now on: