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 15289 – NEMO

Changeset 15289


Ignore:
Timestamp:
2021-09-24T18:02:10+02:00 (3 years ago)
Author:
smasson
Message:

trunk: make bdy fully (hopefully) compatible with nn_hls = 2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/BDY/bdyini.F90

    r15014 r15289  
    549549                     ! 
    550550                     icount = icount  + 1 
    551                      idx_bdy(ib_bdy)%nbi(icount,igrd)   = nbidta(ib,igrd,ib_bdy)- mig(1)+1   ! global to local indexes 
    552                      idx_bdy(ib_bdy)%nbj(icount,igrd)   = nbjdta(ib,igrd,ib_bdy)- mjg(1)+1   ! global to local indexes 
     551                     idx_bdy(ib_bdy)%nbi(icount,igrd)   = nbidta(ib,igrd,ib_bdy) - mig(1) + 1   ! global to local indexes 
     552                     idx_bdy(ib_bdy)%nbj(icount,igrd)   = nbjdta(ib,igrd,ib_bdy) - mjg(1) + 1   ! global to local indexes 
    553553                     idx_bdy(ib_bdy)%nbr(icount,igrd)   = nbrdta(ib,igrd,ib_bdy) 
    554554                     idx_bdy(ib_bdy)%nbmap(icount,igrd) = ib 
     
    577577               ! check if point has to be sent     to   a neighbour 
    578578               ! W neighbour and on the inner left  side 
    579                IF( ii == 2    .AND. mpiSnei(nn_hls,jpwe) > -1 )   lsend_bdy(ib_bdy,igrd,jpwe,ir) = .TRUE. 
     579               IF( ii >= Nis0 .AND. ii < Nis0 + nn_hls .AND. mpiSnei(nn_hls,jpwe) > -1 )   lsend_bdy(ib_bdy,igrd,jpwe,ir) = .TRUE. 
    580580               ! E neighbour and on the inner right side 
    581                IF( ii == jpi-1 .AND. mpiSnei(nn_hls,jpea) > -1 )   lsend_bdy(ib_bdy,igrd,jpea,ir) = .TRUE. 
     581               IF( ii <= Nie0 .AND. ii > Nie0 - nn_hls .AND. mpiSnei(nn_hls,jpea) > -1 )   lsend_bdy(ib_bdy,igrd,jpea,ir) = .TRUE. 
    582582               ! S neighbour and on the inner down side 
    583                IF( ij == 2    .AND. mpiSnei(nn_hls,jpso) > -1 )   lsend_bdy(ib_bdy,igrd,jpso,ir) = .TRUE. 
     583               IF( ij >= Njs0 .AND. ij < Njs0 + nn_hls .AND. mpiSnei(nn_hls,jpso) > -1 )   lsend_bdy(ib_bdy,igrd,jpso,ir) = .TRUE. 
    584584               ! N neighbour and on the inner up   side 
    585                IF( ij == jpj-1 .AND. mpiSnei(nn_hls,jpno) > -1 )   lsend_bdy(ib_bdy,igrd,jpno,ir) = .TRUE. 
     585               IF( ij <= Nje0 .AND. ij > Nje0 - nn_hls .AND. mpiSnei(nn_hls,jpno) > -1 )   lsend_bdy(ib_bdy,igrd,jpno,ir) = .TRUE. 
    586586               ! 
    587587               ! check if point has to be received from a neighbour 
    588588               ! W neighbour and on the outter left  side 
    589                IF( ii == 1     .AND. mpiRnei(nn_hls,jpwe) > -1 )   lrecv_bdy(ib_bdy,igrd,jpwe,ir) = .TRUE. 
     589               IF( ii  < Nis0                          .AND. mpiRnei(nn_hls,jpwe) > -1 )   lrecv_bdy(ib_bdy,igrd,jpwe,ir) = .TRUE. 
    590590               ! E neighbour and on the outter right side 
    591                IF( ii == jpi   .AND. mpiRnei(nn_hls,jpea) > -1 )   lrecv_bdy(ib_bdy,igrd,jpea,ir) = .TRUE. 
     591               IF( ii  > Nie0                          .AND. mpiRnei(nn_hls,jpea) > -1 )   lrecv_bdy(ib_bdy,igrd,jpea,ir) = .TRUE. 
    592592               ! S neighbour and on the outter down side 
    593                IF( ij == 1     .AND. mpiRnei(nn_hls,jpso) > -1 )   lrecv_bdy(ib_bdy,igrd,jpso,ir) = .TRUE. 
     593               IF( ij  < Njs0                          .AND. mpiRnei(nn_hls,jpso) > -1 )   lrecv_bdy(ib_bdy,igrd,jpso,ir) = .TRUE. 
    594594               ! N neighbour and on the outter up   side 
    595                IF( ij == jpj   .AND. mpiRnei(nn_hls,jpno) > -1 )   lrecv_bdy(ib_bdy,igrd,jpno,ir) = .TRUE. 
     595               IF( ij  > Nje0                          .AND. mpiRnei(nn_hls,jpno) > -1 )   lrecv_bdy(ib_bdy,igrd,jpno,ir) = .TRUE. 
    596596               ! 
    597597            END DO 
     
    642642      ! Read global 2D mask at T-points: bdytmask 
    643643      ! ----------------------------------------- 
    644       ! bdytmask = 1  on the computational domain AND on open boundaries 
     644      ! bdytmask = 1  on the computational domain but not on open boundaries 
    645645      !          = 0  elsewhere    
    646646 
     
    732732               ! 
    733733               ! search neighbour in the  west/east  direction 
    734                ! Rim is on the halo and computed ocean is towards exterior of mpi domain   
     734               ! 
     735               ! Rim is on the halo and computed ocean is towards exterior of mpi domain : 
    735736               !      <--    (o exterior)     -->   
    736737               ! (1)  o|x         OR    (2)   x|o 
    737738               !       |___                 ___| 
     739               ! ==> cannot compute the point x -> need to receive it 
    738740               IF( iibi==0     .OR. ii1==0     .OR. ii2==0     .OR. ii3==0     )   lrecv_bdyint(ib_bdy,igrd,jpwe,ir) = .TRUE. 
    739741               IF( iibi==jpi+1 .OR. ii1==jpi+1 .OR. ii2==jpi+1 .OR. ii3==jpi+1 )   lrecv_bdyint(ib_bdy,igrd,jpea,ir) = .TRUE.   
    740742               IF( iibe==0                                                     )   lrecv_bdyext(ib_bdy,igrd,jpwe,ir) = .TRUE. 
    741743               IF( iibe==jpi+1                                                 )   lrecv_bdyext(ib_bdy,igrd,jpea,ir) = .TRUE.   
    742                ! Check if neighbour has its rim parallel to its mpi subdomain border and located next to its halo 
     744               ! Check if neighbour has its rim parallel to its mpi subdomain border and located next to its halo. 
    743745               ! :¨¨¨¨¨|¨¨-->    |                                             |    <--¨¨|¨¨¨¨¨:  
    744746               ! :     |  x:o    |    neighbour limited by ... would need o    |    o:x  |     : 
    745747               ! :.....|_._:_____|   (1) W neighbour         E neighbour (2)   |_____:_._|.....: 
    746                IF( ii==2     .AND. mpiSnei(nn_hls,jpwe) > -1 .AND. & 
    747                   & ( iibi==3     .OR. ii1==3     .OR. ii2==3     .OR. ii3==3    ) )   lsend_bdyint(ib_bdy,igrd,jpwe,ir) = .TRUE. 
    748                IF( ii==jpi-1 .AND. mpiSnei(nn_hls,jpea) > -1 .AND. & 
    749                   & ( iibi==jpi-2 .OR. ii1==jpi-2 .OR. ii2==jpi-2 .OR. ii3==jpi-2) )   lsend_bdyint(ib_bdy,igrd,jpea,ir) = .TRUE. 
    750                IF( ii==2     .AND. mpiSnei(nn_hls,jpwe) > -1 .AND. iibe==3     )   lsend_bdyext(ib_bdy,igrd,jpwe,ir) = .TRUE. 
    751                IF( ii==jpi-1 .AND. mpiSnei(nn_hls,jpea) > -1 .AND. iibe==jpi-2 )   lsend_bdyext(ib_bdy,igrd,jpea,ir) = .TRUE. 
     748               ! ==> the neighbour cannot compute the point x -> need to send it 
     749               IF( ii==nn_hls+1   .AND. mpiSnei(nn_hls,jpwe) > -1 .AND. & 
     750                  &     ( iibi==ii+1 .OR. ii1==ii+1 .OR. ii2==ii+1 .OR. ii3==ii+1) )   lsend_bdyint(ib_bdy,igrd,jpwe,ir) = .TRUE. 
     751               IF( ii==jpi-nn_hls .AND. mpiSnei(nn_hls,jpea) > -1 .AND. & 
     752                  &     ( iibi==ii-1 .OR. ii1==ii-1 .OR. ii2==ii-1 .OR. ii3==ii-1) )   lsend_bdyint(ib_bdy,igrd,jpea,ir) = .TRUE. 
     753               IF( ii==nn_hls+1   .AND. mpiSnei(nn_hls,jpwe) > -1 .AND. iibe==ii+1 )   lsend_bdyext(ib_bdy,igrd,jpwe,ir) = .TRUE. 
     754               IF( ii==jpi-nn_hls .AND. mpiSnei(nn_hls,jpea) > -1 .AND. iibe==ii-1 )   lsend_bdyext(ib_bdy,igrd,jpea,ir) = .TRUE. 
    752755               ! 
    753756               ! search neighbour in the north/south direction    
     757               ! 
    754758               ! Rim is on the halo and computed ocean is towards exterior of mpi domain 
     759               ! ==> cannot compute the point x -> need to receive it 
    755760               !(3)   |       |         ^   ___o___      
    756761               !  |   |___x___|   OR    |  |   x   | 
     
    764769               !   |  |¨¨¨¨x¨¨¨¨|   neighbour limited by ... would need o     |  |....x....| 
    765770               !      :_________:  (3) S neighbour          N neighbour (4)   v  |    o    |    
    766                IF( ij==2     .AND. mpiSnei(nn_hls,jpso) > -1 .AND. & 
    767                   & ( ijbi==3     .OR. ij1==3     .OR. ij2==3     .OR. ij3==3    ) )   lsend_bdyint(ib_bdy,igrd,jpso,ir) = .TRUE. 
    768                IF( ij==jpj-1 .AND. mpiSnei(nn_hls,jpno) > -1 .AND. & 
    769                   & ( ijbi==jpj-2 .OR. ij1==jpj-2 .OR. ij2==jpj-2 .OR. ij3==jpj-2) )   lsend_bdyint(ib_bdy,igrd,jpno,ir) = .TRUE. 
    770                IF( ij==2     .AND. mpiSnei(nn_hls,jpso) > -1 .AND. ijbe==3     )   lsend_bdyext(ib_bdy,igrd,jpso,ir) = .TRUE. 
    771                IF( ij==jpj-1 .AND. mpiSnei(nn_hls,jpno) > -1 .AND. ijbe==jpj-2 )   lsend_bdyext(ib_bdy,igrd,jpno,ir) = .TRUE. 
     771               ! ==> the neighbour cannot compute the point x -> need to send it 
     772               IF( ij==nn_hls+1   .AND. mpiSnei(nn_hls,jpso) > -1 .AND. & 
     773                  &     ( ijbi==ij+1 .OR. ij1==ij+1 .OR. ij2==ij+1 .OR. ij3==ij+1) )   lsend_bdyint(ib_bdy,igrd,jpso,ir) = .TRUE. 
     774               IF( ij==jpj-nn_hls .AND. mpiSnei(nn_hls,jpno) > -1 .AND. & 
     775                  &     ( ijbi==ij-1 .OR. ij1==ij-1 .OR. ij2==ij-1 .OR. ij3==ij-1) )   lsend_bdyint(ib_bdy,igrd,jpno,ir) = .TRUE. 
     776               IF( ij==nn_hls+1   .AND. mpiSnei(nn_hls,jpso) > -1 .AND. ijbe==ij+1 )   lsend_bdyext(ib_bdy,igrd,jpso,ir) = .TRUE. 
     777               IF( ij==jpj-nn_hls .AND. mpiSnei(nn_hls,jpno) > -1 .AND. ijbe==ij-1 )   lsend_bdyext(ib_bdy,igrd,jpno,ir) = .TRUE. 
    772778            END DO 
    773779         END DO 
     
    813819      !!                - and look at the ocean neighbours to compute ntreat 
    814820      !!---------------------------------------------------------------------- 
    815       REAL(wp), TARGET, DIMENSION(jpi,jpj), INTENT (in   ) :: pfmask   ! temporary fmask excluding coastal boundary condition (shlat) 
    816       REAL(wp), TARGET, DIMENSION(jpi,jpj), INTENT (in   ) :: pumask, pvmask   ! temporary t/u/v mask array 
    817       LOGICAL                             , INTENT (in   ) :: lrim0    ! .true. -> rim 0   .false. -> rim 1 
     821      REAL(wp), TARGET, DIMENSION(jpi,jpj), INTENT (in   ) :: pumask, pvmask   ! temporary u/v mask array 
     822      REAL(wp), TARGET, DIMENSION(jpi,jpj), INTENT (in   ) :: pfmask           ! temporary fmask excluding coastal boundary condition (shlat) 
     823      LOGICAL                             , INTENT (in   ) :: lrim0            ! .true. -> rim 0   .false. -> rim 1 
    818824      INTEGER  ::   ib_bdy, ii, ij, igrd, ib, icount       ! dummy loop indices 
    819825      INTEGER  ::   i_offset, j_offset, inn                ! local integer 
     
    830836      DO ib_bdy = 1, nb_bdy       ! Indices and directions of rim velocity components 
    831837 
    832          ! Calculate relationship of U direction to the local orientation of the boundary 
    833          ! flagu = -1 : u component is normal to the dynamical boundary and its direction is outward 
    834          ! flagu =  0 : u is tangential 
    835          ! flagu =  1 : u is normal to the boundary and is direction is inward 
    836          DO igrd = 1, jpbgrd  
    837             SELECT CASE( igrd ) 
    838                CASE( 1 )   ;   zmask => pumask     ;   i_offset = 0 
    839                CASE( 2 )   ;   zmask => bdytmask   ;   i_offset = 1 
    840                CASE( 3 )   ;   zmask => pfmask     ;   i_offset = 0 
    841             END SELECT  
    842             icount = 0 
    843             ztmp(:,:) = -999._wp 
     838         DO igrd = 1, jpbgrd 
     839             
    844840            IF( lrim0 ) THEN   ! extent of rim 0 
    845841               ibeg = 1                                     ;   iend = idx_bdy(ib_bdy)%nblenrim0(igrd) 
     
    847843               ibeg = idx_bdy(ib_bdy)%nblenrim0(igrd) + 1   ;   iend = idx_bdy(ib_bdy)%nblenrim(igrd) 
    848844            END IF 
     845 
     846            ! Calculate relationship of U direction to the local orientation of the boundary 
     847            ! flagu = -1 : u component is normal to the dynamical boundary and its direction is outward 
     848            ! flagu =  0 : u is tangential 
     849            ! flagu =  1 : u is normal to the boundary and is direction is inward 
     850            SELECT CASE( igrd ) 
     851               CASE( 1 )   ;   zmask => pumask     ;   i_offset = 0   ! U(i-1)   T(i)   U(i  ) 
     852               CASE( 2 )   ;   zmask => bdytmask   ;   i_offset = 1   ! T(i  )   U(i)   T(i+1) 
     853               CASE( 3 )   ;   zmask => pfmask     ;   i_offset = 0   ! F(i-1)   V(i)   F(i  ) 
     854            END SELECT  
     855            icount = 0 
     856            ztmp(:,:) = -999._wp 
    849857            DO ib = ibeg, iend  
    850858               ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
    851859               ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 
    852                IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj )  CYCLE 
     860               IF( ii < Nis0 .OR. ii > Nie0 .OR. ij < Njs0 .OR. ij > Nje0 )  CYCLE   ! call lbc_lnk -> no need to compute these pts 
    853861               zwfl = zmask(ii+i_offset-1,ij) 
    854862               zefl = zmask(ii+i_offset  ,ij) 
    855                ! This error check only works if you are using the bdyXmask arrays 
    856                IF( i_offset == 1 .and. zefl + zwfl == 2. ) THEN 
     863               ! This error check only works if you are using the bdyXmask arrays (which are set to 0 on rims) 
     864               IF( i_offset == 1 .and. zefl + zwfl == 2._wp ) THEN 
    857865                  icount = icount + 1 
    858866                  IF(lwp) WRITE(numout,*) 'Problem with igrd = ',igrd,' at (global) nbi, nbj : ',mig(ii),mjg(ij) 
     
    876884               idx_bdy(ib_bdy)%flagu(ib,igrd) = ztmp(ii,ij) 
    877885            END DO 
    878          END DO 
    879  
    880          ! Calculate relationship of V direction to the local orientation of the boundary 
    881          ! flagv = -1 : v component is normal to the dynamical boundary but its direction is outward 
    882          ! flagv =  0 : v is tangential 
    883          ! flagv =  1 : v is normal to the boundary and is direction is inward 
    884          DO igrd = 1, jpbgrd  
     886             
     887            ! Calculate relationship of V direction to the local orientation of the boundary 
     888            ! flagv = -1 : v component is normal to the dynamical boundary but its direction is outward 
     889            ! flagv =  0 : v is tangential 
     890            ! flagv =  1 : v is normal to the boundary and is direction is inward 
    885891            SELECT CASE( igrd ) 
    886892               CASE( 1 )   ;   zmask => pvmask     ;   j_offset = 0 
     
    890896            icount = 0 
    891897            ztmp(:,:) = -999._wp 
    892             IF( lrim0 ) THEN   ! extent of rim 0 
    893                ibeg = 1                                     ;   iend = idx_bdy(ib_bdy)%nblenrim0(igrd) 
    894             ELSE               ! extent of rim 1 
    895                ibeg = idx_bdy(ib_bdy)%nblenrim0(igrd) + 1   ;   iend = idx_bdy(ib_bdy)%nblenrim(igrd) 
    896             END IF 
    897898            DO ib = ibeg, iend 
    898899               ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
    899900               ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 
    900                IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj )  CYCLE 
     901               IF( ii < Nis0 .OR. ii > Nie0 .OR. ij < Njs0 .OR. ij > Nje0 )  CYCLE   ! call lbc_lnk -> no need to compute these pts 
    901902               zsfl = zmask(ii,ij+j_offset-1) 
    902903               znfl = zmask(ii,ij+j_offset  ) 
    903                ! This error check only works if you are using the bdyXmask arrays 
    904                IF( j_offset == 1 .and. znfl + zsfl == 2. ) THEN 
     904               ! This error check only works if you are using the bdyXmask arrays (which are set to 0 on rims) 
     905               IF( j_offset == 1 .and. znfl + zsfl == 2._wp ) THEN 
    905906                  IF(lwp) WRITE(numout,*) 'Problem with igrd = ',igrd,' at (global) nbi, nbj : ',mig(ii),mjg(ij) 
    906907                  icount = icount + 1 
     
    924925               idx_bdy(ib_bdy)%flagv(ib,igrd) = ztmp(ii,ij) 
    925926            END DO 
    926          END DO 
    927          ! 
    928       END DO ! ib_bdy 
    929927       
    930       DO ib_bdy = 1, nb_bdy 
    931          DO igrd = 1, jpbgrd 
     928            ! Calculate ntreat 
    932929            SELECT CASE( igrd ) 
    933930               CASE( 1 )   ;   zmask => bdytmask  
     
    936933            END SELECT 
    937934            ztmp(:,:) = -999._wp 
    938             IF( lrim0 ) THEN   ! extent of rim 0 
    939                ibeg = 1                                     ;   iend = idx_bdy(ib_bdy)%nblenrim0(igrd) 
    940             ELSE               ! extent of rim 1 
    941                ibeg = idx_bdy(ib_bdy)%nblenrim0(igrd) + 1   ;   iend = idx_bdy(ib_bdy)%nblenrim(igrd) 
    942             END IF 
    943935            DO ib = ibeg, iend 
    944936               ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
    945937               ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 
    946                IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj )   CYCLE 
    947                llnon = zmask(ii  ,ij+1) == 1.   
    948                llson = zmask(ii  ,ij-1) == 1.  
    949                llean = zmask(ii+1,ij  ) == 1.  
    950                llwen = zmask(ii-1,ij  ) == 1.  
     938               IF( ii < Nis0 .OR. ii > Nie0 .OR. ij < Njs0 .OR. ij > Nje0 )  CYCLE   ! call lbc_lnk -> no need to compute these pts 
     939               llnon = zmask(ii  ,ij+1) == 1._wp   
     940               llson = zmask(ii  ,ij-1) == 1._wp  
     941               llean = zmask(ii+1,ij  ) == 1._wp  
     942               llwen = zmask(ii-1,ij  ) == 1._wp  
    951943               inn  = COUNT( (/ llnon, llson, llean, llwen /) ) 
    952944               IF( inn == 0 ) THEN   ! no neighbours -> interior of a corner  or  cluster of rim points 
     
    954946                  !  1 |   o      !  2  o   |    !  3 | x        !  4     x |   !      |   |   -> error 
    955947                  !    |_x_ _     !    _ _x_|    !    |   o      !      o   |   !      |x_x| 
    956                   IF(     zmask(ii+1,ij+1) == 1. ) THEN   ;   ztmp(ii,ij) = 1. 
    957                   ELSEIF( zmask(ii-1,ij+1) == 1. ) THEN   ;   ztmp(ii,ij) = 2. 
    958                   ELSEIF( zmask(ii+1,ij-1) == 1. ) THEN   ;   ztmp(ii,ij) = 3. 
    959                   ELSEIF( zmask(ii-1,ij-1) == 1. ) THEN   ;   ztmp(ii,ij) = 4. 
    960                   ELSE                                    ;   ztmp(ii,ij) = -1. 
     948                  IF(     zmask(ii+1,ij+1) == 1._wp ) THEN   ;   ztmp(ii,ij) = 1._wp 
     949                  ELSEIF( zmask(ii-1,ij+1) == 1._wp ) THEN   ;   ztmp(ii,ij) = 2._wp 
     950                  ELSEIF( zmask(ii+1,ij-1) == 1._wp ) THEN   ;   ztmp(ii,ij) = 3._wp 
     951                  ELSEIF( zmask(ii-1,ij-1) == 1._wp ) THEN   ;   ztmp(ii,ij) = 4._wp 
     952                  ELSE                                       ;   ztmp(ii,ij) = -1._wp 
    961953                     WRITE(ctmp1,*) 'Problem with  ',cgrid(igrd) ,' grid point', ii, ij,   & 
    962954                       ' on boundary set ', ib_bdy, ' has no free ocean neighbour' 
     
    973965                  ! 5  | x o     ! 6   o x |   ! 7  __x__   ! 8    x 
    974966                  !    |         !         |   !            !      o 
    975                   IF( llean )   ztmp(ii,ij) = 5. 
    976                   IF( llwen )   ztmp(ii,ij) = 6. 
    977                   IF( llnon )   ztmp(ii,ij) = 7. 
    978                   IF( llson )   ztmp(ii,ij) = 8. 
     967                  IF( llean )   ztmp(ii,ij) = 5._wp 
     968                  IF( llwen )   ztmp(ii,ij) = 6._wp 
     969                  IF( llnon )   ztmp(ii,ij) = 7._wp 
     970                  IF( llson )   ztmp(ii,ij) = 8._wp 
    979971               END IF 
    980972               IF( inn == 2 ) THEN   ! exterior of a corner 
     
    982974                  !  9 ____x o    ! 10   o x___   ! 11     x o      ! 12   o x       
    983975                  !         |     !       |       !        o        !        o  
    984                   IF( llnon .AND. llean )   ztmp(ii,ij) =  9. 
    985                   IF( llnon .AND. llwen )   ztmp(ii,ij) = 10. 
    986                   IF( llson .AND. llean )   ztmp(ii,ij) = 11. 
    987                   IF( llson .AND. llwen )   ztmp(ii,ij) = 12. 
     976                  IF( llnon .AND. llean )   ztmp(ii,ij) =  9._wp 
     977                  IF( llnon .AND. llwen )   ztmp(ii,ij) = 10._wp 
     978                  IF( llson .AND. llean )   ztmp(ii,ij) = 11._wp 
     979                  IF( llson .AND. llwen )   ztmp(ii,ij) = 12._wp 
    988980               END IF 
    989981               IF( inn == 3 ) THEN   ! 3 neighbours     __   __ 
     
    991983                  ! 13  _| x o    ! 14   o x |_   ! 15   o x o    ! 16  o x o        
    992984                  !    |   o      !        o   |  !        o      !    __|¨|__     
    993                   IF( llnon .AND. llean .AND. llson )   ztmp(ii,ij) = 13. 
    994                   IF( llnon .AND. llwen .AND. llson )   ztmp(ii,ij) = 14. 
    995                   IF( llwen .AND. llson .AND. llean )   ztmp(ii,ij) = 15. 
    996                   IF( llwen .AND. llnon .AND. llean )   ztmp(ii,ij) = 16. 
     985                  IF( llnon .AND. llean .AND. llson )   ztmp(ii,ij) = 13._wp 
     986                  IF( llnon .AND. llwen .AND. llson )   ztmp(ii,ij) = 14._wp 
     987                  IF( llwen .AND. llson .AND. llean )   ztmp(ii,ij) = 15._wp 
     988                  IF( llwen .AND. llnon .AND. llean )   ztmp(ii,ij) = 16._wp 
    997989               END IF 
    998990               IF( inn == 4 ) THEN 
     
    10121004               idx_bdy(ib_bdy)%ntreat(ib,igrd) = NINT(ztmp(ii,ij)) 
    10131005            END DO 
    1014          END DO 
    1015       END DO 
     1006            ! 
     1007         END DO   ! jpbgrd 
     1008         ! 
     1009      END DO   ! ib_bdy 
    10161010 
    10171011    END SUBROUTINE bdy_rim_treat 
Note: See TracChangeset for help on using the changeset viewer.