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 12807 for NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DOM/dommsk.F90 – NEMO

Ignore:
Timestamp:
2020-04-23T15:14:45+02:00 (4 years ago)
Author:
smasson
Message:

Extra_Halo: input file only over inner domain + new variables names, see #2366

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DOM/dommsk.F90

    r12738 r12807  
    2525   USE oce            ! ocean dynamics and tracers 
    2626   USE dom_oce        ! ocean space and time domain 
     27   USE domutl         !  
    2728   USE usrdef_fmask   ! user defined fmask 
    2829   USE bdy_oce        ! open boundary 
     
    8889      ! 
    8990      INTEGER  ::   ji, jj, jk     ! dummy loop indices 
    90       INTEGER  ::   iif, iil       ! local integers 
    91       INTEGER  ::   ijf, ijl       !   -       - 
    9291      INTEGER  ::   iktop, ikbot   !   -       - 
    9392      INTEGER  ::   ios, inum 
     
    131130      ! 
    132131      tmask(:,:,:) = 0._wp 
    133       DO_2D_11_11 
     132      DO_2D_00_00 
    134133         iktop = k_top(ji,jj) 
    135134         ikbot = k_bot(ji,jj) 
    136135         IF( iktop /= 0 ) THEN       ! water in the column 
    137             tmask(ji,jj,iktop:ikbot  ) = 1._wp 
     136            tmask(ji,jj,iktop:ikbot) = 1._wp 
    138137         ENDIF 
    139138      END_2D 
    140139      ! 
    141       ! the following call is mandatory 
     140      ! the following is mandatory 
    142141      ! it masks boundaries (bathy=0) where needed depending on the configuration (closed, periodic...)   
    143       CALL lbc_lnk( 'dommsk', tmask  , 'T', 1._wp )      ! Lateral boundary conditions 
     142      IF( .NOT. (nbondj == 1 .OR. nbondj == 0 .OR. l_Jperio) ) THEN 
     143         tmask(mi0(  1 ):mi1(jpiglo),mj0(Njs0):mj1(Njs0  ),:) = 0._wp   ! line   number Njs0 at 0 
     144      ENDIF 
     145      IF( .NOT. (nbondi == 1 .OR. nbondi == 0 .OR. l_Iperio) ) THEN 
     146         tmask(mi0(Nis0):mi1(  Nis0),mj0(  1 ):mj1(jpjglo),:) = 0._wp   ! column number Nis0 at 0 
     147      ENDIF 
     148      CALL lbc_lnk( 'dommsk', tmask, 'T', 1._wp )      ! Lateral boundary conditions 
    144149 
    145150     ! Mask corrections for bdy (read in mppini2) 
     
    186191      END DO 
    187192 
    188  
    189193      ! Ocean/land column mask at t-, u-, and v-points   (i.e. at least 1 wet cell in the vertical) 
    190194      ! ---------------------------------------------- 
     
    193197      ssvmask(:,:) = MAXVAL( vmask(:,:,:), DIM=3 ) 
    194198 
    195  
    196199      ! Interior domain mask  (used for global sum) 
    197200      ! -------------------- 
    198201      ! 
    199       iif = nn_hls   ;   iil = nlci - nn_hls + 1 
    200       ijf = nn_hls   ;   ijl = nlcj - nn_hls + 1 
    201       ! 
    202       !                          ! halo mask : 0 on the halo and 1 elsewhere 
    203       tmask_h(:,:) = 1._wp                   
    204       tmask_h( 1 :iif,   :   ) = 0._wp      ! first columns 
    205       tmask_h(iil:jpi,   :   ) = 0._wp      ! last  columns (including mpp extra columns) 
    206       tmask_h(   :   , 1 :ijf) = 0._wp      ! first rows 
    207       tmask_h(   :   ,ijl:jpj) = 0._wp      ! last  rows (including mpp extra rows) 
    208       ! 
    209       !                          ! north fold mask 
    210       tpol(1:jpiglo) = 1._wp  
    211       fpol(1:jpiglo) = 1._wp 
    212       IF( jperio == 3 .OR. jperio == 4 ) THEN      ! T-point pivot 
    213          tpol(jpiglo/2+1:jpiglo) = 0._wp 
    214          fpol(     1    :jpiglo) = 0._wp 
    215          IF( mjg(nlej) == jpjglo ) THEN                  ! only half of the nlcj-1 row for tmask_h 
    216             DO ji = iif+1, iil-1 
    217                tmask_h(ji,nlej-1) = tmask_h(ji,nlej-1) * tpol(mig(ji)) 
    218             END DO 
    219          ENDIF 
    220       ENDIF 
    221       ! 
    222       IF( jperio == 5 .OR. jperio == 6 ) THEN      ! F-point pivot 
    223          tpol(     1    :jpiglo) = 0._wp 
    224          fpol(jpiglo/2+1:jpiglo) = 0._wp 
    225       ENDIF 
     202      CALL dom_uniq( tmask_h, 'T' ) 
    226203      ! 
    227204      !                          ! interior mask : 2D ocean mask x halo mask  
    228205      tmask_i(:,:) = ssmask(:,:) * tmask_h(:,:) 
    229  
    230206 
    231207      ! Lateral boundary conditions on velocity (modify fmask) 
     
    261237#if defined key_agrif  
    262238            IF( .NOT. AGRIF_Root() ) THEN  
    263                IF ((nbondi ==  1).OR.(nbondi == 2)) fmask(nlci-1 , :     ,jk) = 0.e0      ! east  
    264                IF ((nbondi == -1).OR.(nbondi == 2)) fmask(1      , :     ,jk) = 0.e0      ! west  
    265                IF ((nbondj ==  1).OR.(nbondj == 2)) fmask(:      ,nlcj-1 ,jk) = 0.e0      ! north  
    266                IF ((nbondj == -1).OR.(nbondj == 2)) fmask(:      ,1      ,jk) = 0.e0      ! south  
     239               IF ((nbondi ==  1).OR.(nbondi == 2)) fmask(jpi-1, :   ,jk) = 0.e0      ! east  
     240               IF ((nbondi == -1).OR.(nbondi == 2)) fmask(1    , :   ,jk) = 0.e0      ! west  
     241               IF ((nbondj ==  1).OR.(nbondj == 2)) fmask(:    ,jpj-1,jk) = 0.e0      ! north  
     242               IF ((nbondj == -1).OR.(nbondj == 2)) fmask(:    ,1    ,jk) = 0.e0      ! south  
    267243            ENDIF  
    268244#endif  
Note: See TracChangeset for help on using the changeset viewer.