|
Next: 4. Summary of actions Up: Main page Previous: 2. Harmonization of iterative Subsections
3. Rationalization of the code
3.1 general control of the iterative schemeThe three kinds of iterative schemes will be defined at highest level YOMCT0, since they have impact on array dimensioning. Completely new names will be introduced (for rationalization reasons). This names are given here, but not to confuse the reader, they are not used anywhere else in this paper:
It may seem a "silly and trivial job" to almost invert two existing switches, but it appears that the easiness of understanding and mnemotechnics will really be increased. Moreover, this "silly job" is better to be done while these switches has not yet proliferated too much all around the code: the amount of work is still quite limited and the increased comfort will be increased for years.
3.2 control of the iterationThe total number of iterations is controlled by the module-integer NSITER in all schemes, and this will remain. Beside this, undesirable redundancy of the information on the iteration exists in the current code:
It has been agreed that too subtle use of CDCONF with various characters leads to confusion. This is because the meaning of a given character is usually documented nowhere, and is not of immediate access when reading the code. The CDCONF appears more like an economical but old-fashioned way to transport the relevant information into the data flow. It has been agreed to go towards a generalization of (ii) solution. Hence, it is suggested to use only NCURRENT_ITER as primary source of information. For subroutines under SCAN2MDM this information will be transmitted through logical switches LPC_CORR and LPC_PRED red from module, since this information is sufficient and quite mnemonic. The obsolete switches LSIMPLE_ITER and LSIMPLE_LAST will be removed. Whenever needed (in LPC_OLD scheme), the information will be taken from LPC_CORR and LPC_PRED . Some care should be taken in order to keep in the output the information about the successive sub-steps being performed (currently a CDCONF is printed each sub-step).
3.3 control of interpolationsThe current implementations of iterative schemes have made an extensive use of the NxLAG parameter to manage the way the SL buffers are filled:
This use of NxLAG is abusive, misleading, and uselessly restrictive (for example it makes it impossible to use LPC_TRAJ with only HO interpolations). This misuse has been recognized, and will be eliminated. In the final code, only NxLAG=2 and NxLAG=3 should remain, the specificity of the filling of SL buffer being controlled by the relevant switches ( LFULLIMP , LPC_FULL , NCURRENT_ITER ...). This would allow to maintain a full flexibility about the order of interpolations for all type of iterative scheme.
3.4 control of time-extrapolationThe time extrapolation is currently controled in SI scheme by one switch LSETTLS ( FALSE means the classical Robert's extrapolation). For iterative schemes, an additional control switch is needed to define the non-extrapolating possibility. It has been decided to define a new switch LPC_NESC for Non- Extrapolating SCheme.
3.5 control of pseudo-second-order decenteringThe implementation of a pseudo-second order decentering for iterative schemes requires two additional SL buffers per prognostic variable to be created. These two additional buffers will be allocated (or not, if not needed) in SUDIM , hence a high-level switch for controlling this information is needed higher than SUDYN , hence in YOMCTO . Since this particularity is only for iterative schemes it has been decided to define the switch by LPC_XIDT . A careful management of default values and controls in setup must of course be associated to this choice, in order to avoid possible errors when the SI scheme is employed (since this switch is then not relevant and should be ignored).
3.6 rationalization of LATTEXAs soon as the time-treatment is touched (e.g VESL, XIDT, LSETTLS,...), the LATTEX subroutines suffers of dramatic growth. On top of this, this subroutine does the same kind of work for all the normal prognostic variables (U , V, T, , ), and hence consists in the almost exact repetition of the same code duplicated five times. With appearance of iterative schemes, this subroutine has reached a state for which it would be beneficial to modularize it. The role of the two additional buffers referred to in the previous sub-section will be clearly defined and commented in the code. More generally the computations in this subroutine will be more self-documented (by in-line comments), which will be made possible thanks to its modularization and rationalization. Further rationalization (i.e. merging the code for second- and first-order decentering in a single formulation) should be discussed in more detail since there is no general consensus about it, and hence this will not be retained for the current action.
3.7 Special points to be checkedThe treatment of "non-standard" Coriolis treatment should be examined carefully. Any subroutine possessing similar characteristic as CNT4 should be acrefully examined. This is at least true for EDFI3 (Digital-Filters)
Next: 4. Summary of actions Up: Main page Previous: 2. Harmonization of iterative Pierre BENARD 2002-06-17
|