Objectives generalities about phasing and The phasing roadmap
Objectives & generalities about phasing and The phasing roadmap Claude Fischer
Content: n Software interaction IFS-Arpège // LAM n n n n General overview and motivation Rules Phasing Validation Code management The phasing roadmap Appendices: n Technical stuff (about VAR) Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Software interaction IFS-Arpège // LAM n General view & motivation: n n IFS evolution forces a continuous, sometimes drastic, code optimisation and cleaning IFS provides powerful state-of-the-art software, both scientific and technological In detail, for the LAM: observation operators are IFS, basic configurations, singular vectors, CONGRAD etc… Sometimes, ideas are first tested in the LAM: NH model, digital filters n Yet, not every development is easily transfered from the IFS to the LAM n This « marriage » creates rights and duties Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Software interaction IFS-Arpège // LAM n Rules or practice: n n n IF (LELAM) THEN; CALL ETOTO; ELSE; CALL TOTO; ENDIF LAM-specific routines go into a separate fortran library, unseen from ECMWF No LELAM key below the level of gridpoint scan (SCAN 2 MDM/TL/AD) => LRPLANE Duplicated code must be avoided !! The issue(s) for modularity: with respect to a functionality or a desired degree of freedom, not with respect to IFS v/s LAM n Any configuration which does have a sense for both global and LAM should not be coded as a by-product of LELAM ! Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Software interaction IFS-Arpège // LAM n Scientific « feeling » : apply basic logic ! n Spectral space differences almost everywhere: n n n Mean wind vector (SPUB, SPVB) since (m=0, n=0) is not defined in bi-Fourier space Allocations, pointers, do-loop indexes all are to be re-defined for the LAM -> most spectral routines are differentiated (eg: SUJBCOV/SUEJBCOV, SPCM/ESPCM) Gridpoint space: more subtle: n n Existence of lateral boundaries (eg: search of origin point in SL – ELARCHE) Plane geometry projection and associated map factor (eg: SL interpolation weights – ELASCAW) Existence of the E-zone (Extension zone for biperiodisation) Rotation of geographical North/South and East/West with respect to model grid N/S Aladin/LACE/Hirlam and E/W Maintenance Toulouse, Sept. 20 -22, 2010 training workshop
Phasing (1): practical matters n When and how long ? : n n n How many phasers ? : n n n Twice per year (dates pending ECMWF/Météo-France discussions) 3 -6 weeks (visits), but in practice 2 -3 months for completion in Toulouse 4 -6 initial phasers (= visitors from partner countries), plus 2 -3 additional « late » phasers a ~ bigger investment of GMAP staff Phaser stays are financially supported by MF, LACE or HIRLAM Phasing is not very popular, and depends heavily on the people’s willingness to leave home … for a sacrifice Separate with/without observations (assimilation usually comes after forecast configurations) Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Phasing (2) n Principles: n n At the very beginning: check and understand the modifications in a new IFS/Arpège cycle Perform code and scientific analysis, and then adapt to LAM setup and/or LELAM keyed code when needed (sometimes trivial … or not) Recode some Aladin at identical scientific content for code compliancy with Arpège Analyze and « uncode » code clashes Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Phasing (3) Phasing examples: SUBROUTINE TOTO(ZTAB, K) <<changed into>> SUBROUTINE TOTO(ZTAB, K 1, K 2) REAL ZTAB(K) <<changed into>> REAL ZTAB(K 1, K 2) CALL TITI(ZTAB) <<unchanged>> n SUBROUTINE ETOTO(ZTAB, K) <<changed into>> SUBROUTINE ETOTO(ZTAB, K 1, K 2) REAL ZTAB(K) <<changed into>> REAL ZTAB(K 1, K 2) CALL TITI(ZTAB) Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Phasing (4) Phasing examples: N is total wavenumber (Arpège) function FKSTAR(N, M) (Aladin/LAM) SUBROUTINE TOTO WEIGHT=1. +MIN(1, M) <<inserted>> Y=X/S(N) <<changed into>> Y=WEIGHT*X/S(N) n SUBROUTINE ETOTO WEIGHT=2**MIN(1, N) * 2**MIN(1, M) <<inserted>> Y=X/S(FKSTAR(N, M)) <<changed into>> Y=WEIGHT*X/S(FKSTAR(N, M)) Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Validation n Arpège and LAM sanity-check validation is done for both at the same time : n n n Systematic validation of all model configurations, which do not use observation handling, is performed by the « mitraillette » tool for LAM’s: automatic launching of a number of configurations (forecast e 001, TL and AD tests, fullpos, NH model, 2 D plane vertical model, adiabatic or with physics, multi-processor etc…) Basic validation of screening and 3 D-VAR minimisation, ideally at the same time as Arpège 4 D-VAR (needs the observation handling to be validated before) Quality assurance (QA) tests: n n After the core phasing period, since this requires again ~2 months of work (run long assimilation experiments, test various operational versions) => both at MF and in partner centers (HIRLAM, LACE) Not all cycles are QA ! Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Code management n n n Source code repository in Toulouse: clearcase Arpège and LAM cycle numbers: CYxx. Ty IFS has its own cycles in Reading (CYxx. Rz) Support team for maintenance of cycles and libraries, and interfacing with operations: « GCO » -> 3 persons (2 involved in code and conf management) User-friendly compilation environment on the high performance platforms ( « gmkpack » ) Export versions are defined and made available for the Aladin/Hirlam partners (mostly for QA cycles) Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
The phasing roadmap for a common IFS-Arpège cycle n n … is a Word document (check on the Aladin website or ask for it !) Lists the sequences of tasks during phasing: n n n n Pre-phasing coordination (list the input contributions and fine-tune the dates) Installation of all codes under SCM and initial source code phasing; possibly some local porting of IFS version First compilations, validations, debugging Phasing of LAM code w/r to IFS changes After first validations are successful, start some porting to other platforms; resume validation Porting to ECMWF computer (usually with Hirlam) Send new (pre-)cycle to ECMWF; check numerical performances; prepare some reporting of phasing work Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Technical stuff Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Global // LAM code interfacing for VAR n Architecture: obshortl Slightly different code: LELAM key coupling Completely different code Fully shared dataflow between IFS and Aladin (especially in gridpoint space), but quite separate dimensioning and addressing in spectral buffers (spherical versus bi-Fourier). Coupling code is of course only LAM. Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
Global // LAM code interfacing for VAR n Simulator and model: obshortl obsvtl ecoupl 1 dx=B 1/2. cpgtl H. dx einv_trans edir_trans espcmtl Toulouse, Sept. 20 -22, 2010 Jb= ; Jb=2 Minimisation Var inner loop J=Jb+Jo; J H. dx (SIM 4 D) Grad. Jo=H*. R-1. (y-H(x)-H. dx) Aladin/LACE/Hirlam Maintenance training workshop Jo=B 1/2. Grad. Jo
Global // LAM code interfacing for VAR n Change of variable: chavarin cvar 2 in sqrtbin cvaru 3 i jgcori jgnrsi cvargptl ebalstat ebalvert spa 1=ylvazx%lamcv*tmeanuver addbgs Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop cv 2 spa ejgvcori ejghcori etransinv_jb etransdir_jb
Phasing of LAM 3 D-VAR n n ODB & bator need to work (almost same as Arpège, plus LAMFLAG) At every new cycle with IFS, a careful inspection of Bmatrix setup and change of variable routines, SPECTRAL_FIELDS and CONTROL_VECTOR structures, specific observation-related code is needed (~ 1 week of work). Additionally, TL and AD LAM code may need to be checked. LAM 3 D-VAR does not use multi-incremental I/O prepared for IFS-Arpège: no WRMLPPADM/RDFPINC, no SAVMINI/GETMINI, NUPTRA>1, « traj » recomputation of innovations Toulouse, Sept. 20 -22, 2010 Aladin/LACE/Hirlam Maintenance training workshop
- Slides: 17