New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 1601 for trunk/NEMO/OPA_SRC/SOL/solmat.F90 – NEMO

Ignore:
Timestamp:
2009-08-11T12:09:19+02:00 (15 years ago)
Author:
ctlod
Message:

Doctor naming of OPA namelist variables , see ticket: #526

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/SOL/solmat.F90

    r1566 r1601  
    44   !! solver       : construction of the matrix  
    55   !!====================================================================== 
    6    !! History :   1.0  !  88-04  (G. Madec)  Original code 
    7    !!                  !  93-03  (M. Guyon)  symetrical conditions 
    8    !!                  !  93-06  (M. Guyon)  suppress pointers 
    9    !!                  !  96-05  (G. Madec)  merge sor and pcg formulations 
    10    !!                  !  96-11  (A. Weaver)  correction to preconditioning 
    11    !!             8.5  !  02-08  (G. Madec)  F90: Free form 
    12    !!                  !  02-11  (C. Talandier, A-M. Treguier) Free surface & Open boundaries 
    13    !!             9.0  !  05-09  (R. Benshila)  add sol_exd for extra outer halo 
    14    !!             9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    15    !!             9.0  !  06-07  (S. Masson)  distributed restart using iom 
    16    !!---------------------------------------------------------------------- 
    17  
    18    !!---------------------------------------------------------------------- 
    19    !!   sol_mat       : Construction of the matrix of used by the elliptic solvers 
    20    !!   fetsch        : 
    21    !!   fetmat        : 
    22    !!   fetstr        : 
    23    !!---------------------------------------------------------------------- 
    24    !! * Modules used 
     6   !! History :   1.0  ! 1988-04  (G. Madec)  Original code 
     7   !!                  ! 1993-03  (M. Guyon)  symetrical conditions 
     8   !!                  ! 1993-06  (M. Guyon)  suppress pointers 
     9   !!                  ! 1996-05  (G. Madec)  merge sor and pcg formulations 
     10   !!                  ! 1996-11  (A. Weaver)  correction to preconditioning 
     11   !!   NEMO      1.0  ! 1902-08  (G. Madec)  F90: Free form 
     12   !!              -   ! 1902-11  (C. Talandier, A-M. Treguier) Free surface & Open boundaries 
     13   !!             2.0  ! 2005-09  (R. Benshila)  add sol_exd for extra outer halo 
     14   !!              -   ! 2005-11  (V. Garnier) Surface pressure gradient organization 
     15   !!             3.2  ! 2009-06  (S. Masson)  distributed restart using iom 
     16   !!              -   ! 2009-07  (R. Benshila)  suppression of rigid-lid option 
     17   !!---------------------------------------------------------------------- 
     18 
     19   !!---------------------------------------------------------------------- 
     20   !!   sol_mat : Construction of the matrix of used by the elliptic solvers 
     21   !!   sol_exd : 
     22   !!---------------------------------------------------------------------- 
    2523   USE oce             ! ocean dynamics and active tracers 
    2624   USE dom_oce         ! ocean space and time domain 
     
    3533   PRIVATE 
    3634 
    37    !! * Routine accessibility 
    38    PUBLIC sol_mat     ! routine called by inisol.F90 
    39    !!---------------------------------------------------------------------- 
    40    !!   OPA 9.0 , LOCEAN-IPSL (2005)  
     35   PUBLIC   sol_mat    ! routine called by inisol.F90 
     36 
     37   !!---------------------------------------------------------------------- 
     38   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
    4139   !! $Id$  
    4240   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)  
     
    5048      !! 
    5149      !! ** Purpose :   Construction of the matrix of used by the elliptic  
    52       !!      solvers (either sor or pcg methods). 
    53       !! 
    54       !! ** Method  :   
    55       !!      lk_dynspg_flt=T: free surface formulation 
    56       !!      The matrix is built for the divergence of the transport system 
    57       !!      a diagonal preconditioning matrix is also defined. 
     50      !!              solvers (either sor or pcg methods). 
     51      !! 
     52      !! ** Method  :   The matrix is built for the divergence of the transport  
     53      !!              system. a diagonal preconditioning matrix is also defined. 
    5854      !!  
    5955      !! ** Action  : - gcp    : extra-diagonal elements of the matrix 
     
    6157      !!              - gcdprc : inverse of the preconditioning matrix 
    6258      !!---------------------------------------------------------------------- 
    63       !! * Arguments 
    6459      INTEGER, INTENT(in) :: kt 
    65  
    66       !! * Local declarations 
     60      !! 
    6761      INTEGER ::   ji, jj                    ! dummy loop indices 
    6862      REAL(wp) ::   zcoefs, zcoefw, zcoefe, zcoefn  ! temporary scalars 
     
    7367      ! 1. Construction of the matrix 
    7468      ! ----------------------------- 
    75        
    76       ! initialize to zero 
    77       zcoef = 0.e0 
     69      zcoef = 0.e0                          ! initialize to zero 
    7870      gcp(:,:,1) = 0.e0 
    7971      gcp(:,:,2) = 0.e0 
    8072      gcp(:,:,3) = 0.e0 
    8173      gcp(:,:,4) = 0.e0 
    82        
     74      ! 
    8375      gcdprc(:,:) = 0.e0 
    8476      gcdmat(:,:) = 0.e0 
    85        
    86       IF( neuler == 0 .AND. kt == nit000 ) THEN 
    87          z2dt = rdt 
    88       ELSE 
    89          z2dt = 2. * rdt 
     77      ! 
     78      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   z2dt = rdt 
     79      ELSE                                        ;   z2dt = 2. * rdt 
    9080      ENDIF 
    9181 
    9282#if defined key_dynspg_flt && ! defined key_obc 
    93 !!cr      IF( lk_dynspg_flt .AND. .NOT.lk_obc ) THEN   !bug missing lk_dynspg_flt_atsk 
    94  
    95       ! defined the coefficients for free surface elliptic system 
    96  
    97       DO jj = 2, jpjm1 
     83 
     84      DO jj = 2, jpjm1                      ! matrix of free surface elliptic system 
    9885         DO ji = 2, jpim1 
    99             zcoef = z2dt * z2dt * grav * rnu * bmask(ji,jj) 
     86            zcoef = z2dt * z2dt * grav * bmask(ji,jj) 
    10087            zcoefs = -zcoef * hv(ji  ,jj-1) * e1v(ji  ,jj-1) / e2v(ji  ,jj-1)    ! south coefficient 
    10188            zcoefw = -zcoef * hu(ji-1,jj  ) * e2u(ji-1,jj  ) / e1u(ji-1,jj  )    ! west coefficient 
     
    11299       
    113100#  elif defined key_dynspg_flt && defined key_obc 
    114 !!cr      ELSEIF( lk_dynspg_flt .AND. lk_obc ) THEN     !bug missing lk_dynspg_flt_atsk  
    115  
    116       !   defined gcdmat in the case of open boundaries 
    117  
    118       DO jj = 2, jpjm1 
     101 
     102      DO jj = 2, jpjm1                      ! matrix of free surface elliptic system with open boundaries 
    119103         DO ji = 2, jpim1 
    120             zcoef = z2dt * z2dt * grav * rnu * bmask(ji,jj) 
    121             !  south coefficient 
     104            zcoef = z2dt * z2dt * grav * bmask(ji,jj) 
     105            !                                    ! south coefficient 
    122106            IF( lp_obc_south .AND. ( jj == njs0p1 ) ) THEN 
    123107               zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)*(1.-vsmsk(ji,1)) 
     
    126110            END IF 
    127111            gcp(ji,jj,1) = zcoefs 
    128  
    129             !  west coefficient 
     112            ! 
     113            !                                    ! west coefficient 
    130114            IF( lp_obc_west  .AND. ( ji == niw0p1 ) ) THEN 
    131115               zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)*(1.-uwmsk(jj,1)) 
     
    134118            END IF 
    135119            gcp(ji,jj,2) = zcoefw 
    136  
    137             !   east coefficient 
     120            ! 
     121            !                                    ! east coefficient 
    138122            IF( lp_obc_east  .AND. ( ji == nie0 ) ) THEN 
    139123               zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)*(1.-uemsk(jj,1)) 
     
    142126            END IF 
    143127            gcp(ji,jj,3) = zcoefe 
    144  
    145             !   north coefficient 
     128            ! 
     129            !                                    ! north coefficient 
    146130            IF( lp_obc_north .AND. ( jj == njn0 ) ) THEN 
    147131               zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)*(1.-vnmsk(ji,1)) 
     
    150134            END IF 
    151135            gcp(ji,jj,4) = zcoefn 
    152  
    153             ! diagonal coefficient 
    154             gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj) & 
    155                             - zcoefs -zcoefw -zcoefe -zcoefn 
     136            ! 
     137            !                                    ! diagonal coefficient 
     138            gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj)   & 
     139               &            - zcoefs -zcoefw -zcoefe -zcoefn 
    156140         END DO 
    157141      END DO 
    158  
    159 #  else 
    160 !!cr      ELSE 
    161  
    162       !   defined the coefficients for bsf elliptic system 
    163        
    164       DO jj = 2, jpjm1 
    165          DO ji = 2, jpim1 
    166             zcoefs = -hur(ji  ,jj  ) * e1u(ji  ,jj  ) / e2u(ji  ,jj  ) * bmask(ji,jj)   ! south coefficient 
    167             zcoefw = -hvr(ji  ,jj  ) * e2v(ji  ,jj  ) / e1v(ji  ,jj  ) * bmask(ji,jj)   ! west coefficient 
    168             zcoefe = -hvr(ji+1,jj  ) * e2v(ji+1,jj  ) / e1v(ji+1,jj  ) * bmask(ji,jj)   ! east coefficient 
    169             zcoefn = -hur(ji  ,jj+1) * e1u(ji  ,jj+1) / e2u(ji  ,jj+1) * bmask(ji,jj)   ! north coefficient 
    170             gcp(ji,jj,1) = zcoefs 
    171             gcp(ji,jj,2) = zcoefw 
    172             gcp(ji,jj,3) = zcoefe 
    173             gcp(ji,jj,4) = zcoefn 
    174             gcdmat(ji,jj) = -zcoefs -zcoefw -zcoefe -zcoefn                             ! diagonal coefficient 
     142#endif 
     143 
     144#if defined key_agrif 
     145      IF( .NOT.AGRIF_ROOT() ) THEN 
     146         ! 
     147         IF( nbondi == -1 .OR. nbondi == 2 )   bmask(2     ,:     ) = 0.e0 
     148         IF( nbondi ==  1 .OR. nbondi == 2 )   bmask(nlci-1,:     ) = 0.e0 
     149         IF( nbondj == -1 .OR. nbondj == 2 )   bmask(:     ,2     ) = 0.e0 
     150         IF( nbondj ==  1 .OR. nbondj == 2 )   bmask(:     ,nlcj-1) = 0.e0 
     151         ! 
     152         DO jj = 2, jpjm1 
     153            DO ji = 2, jpim1 
     154               zcoef = z2dt * z2dt * grav * bmask(ji,jj) 
     155               !  south coefficient 
     156               IF( ( nbondj == -1 .OR. nbondj == 2 ) .AND. ( jj == 3 ) ) THEN 
     157                  zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)*(1.-vmask(ji,jj-1,1)) 
     158               ELSE 
     159                  zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1) 
     160               END IF 
     161               gcp(ji,jj,1) = zcoefs 
     162               !  
     163               !  west coefficient 
     164               IF( ( nbondi == -1 .OR. nbondi == 2 ) .AND. ( ji == 3 )  ) THEN 
     165                  zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)*(1.-umask(ji-1,jj,1)) 
     166               ELSE 
     167                  zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj) 
     168               END IF 
     169               gcp(ji,jj,2) = zcoefw 
     170               ! 
     171               !   east coefficient 
     172               IF( ( nbondi == 1 .OR. nbondi == 2 ) .AND. ( ji == nlci-2 ) ) THEN 
     173                  zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)*(1.-umask(ji,jj,1)) 
     174               ELSE 
     175                  zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj) 
     176               END IF 
     177               gcp(ji,jj,3) = zcoefe 
     178               ! 
     179               !   north coefficient 
     180               IF( ( nbondj == 1 .OR. nbondj == 2 ) .AND. ( jj == nlcj-2 ) ) THEN 
     181                  zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)*(1.-vmask(ji,jj,1)) 
     182               ELSE 
     183                  zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj) 
     184               END IF 
     185               gcp(ji,jj,4) = zcoefn 
     186               ! 
     187               ! diagonal coefficient 
     188               gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj)   & 
     189                  &            - zcoefs -zcoefw -zcoefe -zcoefn 
     190            END DO 
    175191         END DO 
    176       END DO 
    177        
    178 !!cr  ENDIF 
    179 #endif 
    180 #if defined key_agrif 
    181        IF (.NOT.AGRIF_ROOT()) THEN 
    182         
    183        IF ( (nbondi == -1)  .OR. (nbondi == 2) ) bmask(2,:)=0. 
    184        IF ( (nbondi ==  1)  .OR. (nbondi == 2) ) bmask(nlci-1,:)=0. 
    185        IF ( (nbondj == -1)  .OR. (nbondj == 2) ) bmask(:,2)=0. 
    186        IF ( (nbondj ==  1)  .OR. (nbondj == 2) ) bmask(:,nlcj-1)=0. 
    187  
    188       DO jj = 2, jpjm1 
    189          DO ji = 2, jpim1 
    190             zcoef = z2dt * z2dt * grav * rnu * bmask(ji,jj) 
    191             !  south coefficient 
    192             IF( ((nbondj == -1)  .OR. (nbondj == 2)) .AND. ( jj == 3 ) ) THEN 
    193                zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)*(1.-vmask(ji,jj-1,1)) 
    194             ELSE 
    195                zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1) 
    196             END IF 
    197             gcp(ji,jj,1) = zcoefs 
    198  
    199             !  west coefficient 
    200        IF( ( (nbondi == -1)  .OR. (nbondi == 2) ) .AND. ( ji == 3 )  ) THEN 
    201                zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)*(1.-umask(ji-1,jj,1)) 
    202             ELSE 
    203                zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj) 
    204             END IF 
    205             gcp(ji,jj,2) = zcoefw 
    206  
    207             !   east coefficient 
    208             IF( ((nbondi == 1)  .OR. (nbondi == 2)) .AND. ( ji == nlci-2 ) ) THEN 
    209                zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)*(1.-umask(ji,jj,1)) 
    210             ELSE 
    211                zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj) 
    212             END IF 
    213             gcp(ji,jj,3) = zcoefe 
    214  
    215             !   north coefficient 
    216             IF( ((nbondj == 1)  .OR. (nbondj == 2)) .AND. ( jj == nlcj-2 ) ) THEN 
    217                zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)*(1.-vmask(ji,jj,1)) 
    218             ELSE 
    219                zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj) 
    220             END IF 
    221             gcp(ji,jj,4) = zcoefn 
    222  
    223             ! diagonal coefficient 
    224             gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj) & 
    225                             - zcoefs -zcoefw -zcoefe -zcoefn 
    226          END DO 
    227       END DO 
    228        
    229        ENDIF 
     192         !  
     193      ENDIF 
    230194#endif 
    231195 
     
    244208      ! the diagonal coefficient of the southern grid points must be modify to 
    245209      ! account for the existence of the south symmetric bassin. 
    246        
    247 !!cr      IF( .NOT.lk_dynspg_flt ) THEN   !bug missing lk_dynspg_flt_atsk 
    248 #if ! defined key_dynspg_flt 
    249       IF( nperio == 2 ) THEN 
    250          DO ji = 1, jpi 
    251             IF( bmask(ji,2) /= 0.e0 ) THEN 
    252                zcoefs = - hur(ji,2)*e1u(ji,2)/e2u(ji,2) 
    253                gcdmat(ji,2) = gcdmat(ji,2) - zcoefs 
    254             ENDIF 
    255          END DO 
    256       ENDIF 
    257 !!cr      ENDIF 
    258 #endif 
    259210       
    260211      ! North fold boundary condition 
     
    276227      gcp(:,:,3) = gcp(:,:,3) * gcdprc(:,:) 
    277228      gcp(:,:,4) = gcp(:,:,4) * gcdprc(:,:) 
    278       IF( nsolv == 2 )  gccd(:,:) = sor * gcp(:,:,2) 
    279  
    280       IF( nsolv == 2 .AND. MAX( jpr2di, jpr2dj ) > 0) THEN 
     229      IF( nn_solv == 2 )  gccd(:,:) = rn_sor * gcp(:,:,2) 
     230 
     231      IF( nn_solv == 2 .AND. MAX( jpr2di, jpr2dj ) > 0) THEN 
    281232         CALL lbc_lnk_e( gcp   (:,:,1), c_solver_pt, 1. )   ! lateral boundary conditions 
    282233         CALL lbc_lnk_e( gcp   (:,:,2), c_solver_pt, 1. )   ! lateral boundary conditions 
     
    308259      !!                the total area strictly above the pivot point, 
    309260      !!                and on the semi-row of the pivot point    
    310       !!                 
    311       !! History : 
    312       !!   9.0  !  05-09  (R. Benshila)  original routine 
    313       !!---------------------------------------------------------------------- 
    314       !! * Arguments 
    315       CHARACTER(len=1) , INTENT( in ) ::   & 
    316          cd_type       ! define the nature of pt2d array grid-points 
    317          !             !  = T , U , V , F , W  
    318          !             !  = S : T-point, north fold treatment 
    319          !             !  = G : F-point, north fold treatment 
    320          !             !  = I : sea-ice velocity at F-point with index shift 
    321       REAL(wp), DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4), INTENT( inout ) ::   & 
    322          pt3d          ! 2D array on which the boundary condition is applied 
    323  
    324       !! * Local variables 
    325       INTEGER  ::   ji, jk      ! dummy loop indices 
    326       INTEGER  ::   iloc                ! temporary integers 
    327       REAL(wp), DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4) ::   & 
    328          ztab          ! 2D array on which the boundary condition is applied 
     261      !!---------------------------------------------------------------------- 
     262      CHARACTER(len=1) , INTENT( in ) ::   cd_type   ! define the nature of pt2d array grid-points 
     263         !                                           !  = T , U , V , F , W  
     264         !                                           !  = S : T-point, north fold treatment 
     265         !                                           !  = G : F-point, north fold treatment 
     266         !                                           !  = I : sea-ice velocity at F-point with index shift 
     267      REAL(wp), DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4), INTENT(inout) ::   pt3d   ! 2D field to be treated 
     268      !! 
     269      INTEGER  ::   ji, jk   ! dummy loop indices 
     270      INTEGER  ::   iloc     ! temporary integers 
     271      REAL(wp), DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4) ::   ztab   ! 2D workspace 
    329272      !!---------------------------------------------------------------------- 
    330273 
    331274      ztab = pt3d 
    332275 
    333       ! north fold treatment 
    334       ! ----------------------- 
    335    
    336       SELECT CASE ( npolj ) 
    337           
    338          CASE ( 3 , 4 )   !  T pivot 
     276      SELECT CASE ( npolj )            ! north fold type 
     277      !  
     278      CASE ( 3 , 4 )                        !==  T pivot  ==! 
    339279         iloc = jpiglo/2 +1  
    340              
    341             SELECT CASE ( cd_type ) 
    342    
    343             CASE ( 'T', 'S', 'U', 'W' ) 
    344                DO jk =1, 4 
    345                   DO ji = 1-jpr2di, nlci+jpr2di 
    346                      pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))            
    347                   ENDDO 
    348                ENDDO 
    349  
    350               DO jk =1, 4 
    351                   DO ji = nlci+jpr2di, 1-jpr2di,  -1 
    352                      IF( ( ji .LT. mi0(iloc) .AND. mi0(iloc) /= 1 ) & 
    353                        & .OR. ( mi0(iloc) == jpi+1 ) ) EXIT 
     280         !    
     281         SELECT CASE ( cd_type ) 
     282         !  
     283         CASE ( 'T', 'S', 'U', 'W' ) 
     284            DO jk = 1, 4 
     285               DO ji = 1-jpr2di, nlci+jpr2di 
     286                  pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))            
     287               END DO 
     288            END DO 
     289            DO jk =1, 4 
     290               DO ji = nlci+jpr2di, 1-jpr2di,  -1 
     291                  IF( ( ji .LT. mi0(iloc) .AND. mi0(iloc) /= 1 ) & 
     292                     & .OR. ( mi0(iloc) == jpi+1 ) ) EXIT 
    354293                     pt3d(ji,nlcj-1,jk) = ztab(ji,nlcj-1,jk+3-2*MOD(jk+3,4)) 
    355                   ENDDO 
    356                ENDDO 
    357  
    358             CASE ( 'F' ,'G' , 'I', 'V' ) 
    359                DO jk =1, 4 
    360                   DO ji = 1-jpr2di, nlci+jpr2di 
    361                      pt3d(ji,nlcj-1:nlcj+jpr2dj,jk) = ztab(ji,nlcj-1:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))            
    362                   ENDDO 
    363                ENDDO 
    364  
    365             END SELECT   ! cd_type 
    366    
    367          CASE ( 5 , 6 )                 ! F pivot 
    368           iloc=jpiglo/2 
    369  
    370             SELECT CASE (cd_type ) 
    371  
    372             CASE ( 'T'  ,'S', 'U', 'W') 
    373                DO jk =1, 4 
    374                   DO ji = 1-jpr2di, nlci+jpr2di 
    375                      pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))            
    376                   ENDDO 
    377                ENDDO 
    378  
    379             CASE ( 'F' ,'G' , 'I', 'V' ) 
    380                DO jk =1, 4 
    381                   DO ji = 1-jpr2di, nlci+jpr2di 
    382                      pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))            
    383                   ENDDO 
    384                ENDDO 
    385                DO jk =1, 4 
    386                   DO ji = nlci+jpr2di, 1-jpr2di,  -1 
    387                     IF ( ( ji .LT. mi0(iloc) .AND. mi0(iloc) /= 1 ) & 
    388                        & .OR. ( mi0(iloc) == jpi+1 ) ) EXIT 
     294               END DO 
     295            END DO 
     296            ! 
     297         CASE ( 'F' ,'G' , 'I', 'V' ) 
     298            DO jk =1, 4 
     299               DO ji = 1-jpr2di, nlci+jpr2di 
     300                  pt3d(ji,nlcj-1:nlcj+jpr2dj,jk) = ztab(ji,nlcj-1:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))            
     301               END DO 
     302            END DO 
     303            ! 
     304         END SELECT   ! cd_type 
     305          !  
     306      CASE ( 5 , 6 )                        !==  F pivot  ==! 
     307         iloc=jpiglo/2 
     308         ! 
     309         SELECT CASE (cd_type ) 
     310         ! 
     311         CASE ( 'T'  ,'S', 'U', 'W') 
     312            DO jk =1, 4 
     313               DO ji = 1-jpr2di, nlci+jpr2di 
     314                  pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))            
     315               END DO 
     316            END DO 
     317            ! 
     318         CASE ( 'F' ,'G' , 'I', 'V' ) 
     319            DO jk =1, 4 
     320               DO ji = 1-jpr2di, nlci+jpr2di 
     321                  pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))            
     322               END DO 
     323            END DO 
     324            DO jk =1, 4 
     325               DO ji = nlci+jpr2di, 1-jpr2di,  -1 
     326                  IF( ( ji .LT. mi0(iloc) .AND. mi0(iloc) /= 1 ) .OR. ( mi0(iloc) == jpi+1 ) )   EXIT 
    389327                    pt3d(ji,nlcj-1,jk) = ztab(ji,nlcj-1,jk+3-2*MOD(jk+3,4)) 
    390                   ENDDO 
    391                ENDDO 
    392  
    393             END SELECT   ! cd_type 
    394  
    395          END SELECT   ! npolj 
     328               END DO 
     329            END DO 
     330            ! 
     331         END SELECT   ! cd_type 
     332         ! 
     333      END SELECT   ! npolj 
    396334      !    
    397335   END SUBROUTINE sol_exd 
Note: See TracChangeset for help on using the changeset viewer.