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 6140 for trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90 – NEMO

Ignore:
Timestamp:
2015-12-21T12:35:23+01:00 (9 years ago)
Author:
timgraham
Message:

Merge of branches/2015/dev_merge_2015 back into trunk. Merge excludes NEMOGCM/TOOLS/OBSTOOLS/ for now due to issues with the change of file type. Will sort these manually with further commits.

Branch merged as follows:
In the working copy of branch ran:
svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk@HEAD
Small conflicts due to bug fixes applied to trunk since the dev_merge_2015 was copied. Bug fixes were applied to the branch as well so these were easy to resolve.
Branch committed at this stage

In working copy run:
svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
to switch working copy

Run:
svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2015/dev_merge_2015
to merge the branch into the trunk and then commit - no conflicts at this stage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90

    r6125 r6140  
    77   !!            6.0  ! 1993-03  (M. Guyon)  symetrical conditions (M. Guyon) 
    88   !!            7.0  ! 1996-01  (G. Madec)  suppression of common work arrays 
    9    !!             -   ! 1996-05  (G. Madec)  mask computed from tmask and sup- 
    10    !!                 !                      pression of the double computation of bmask 
     9   !!             -   ! 1996-05  (G. Madec)  mask computed from tmask 
    1110   !!            8.0  ! 1997-02  (G. Madec)  mesh information put in domhgr.F 
    1211   !!            8.1  ! 1997-07  (G. Madec)  modification of mbathy and fmask 
     
    2524   USE oce             ! ocean dynamics and tracers 
    2625   USE dom_oce         ! ocean space and time domain 
     26   ! 
    2727   USE in_out_manager  ! I/O manager 
    2828   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    29    USE lib_mpp 
     29   USE lib_mpp         ! 
    3030   USE wrk_nemo        ! Memory allocation 
    3131   USE timing          ! Timing 
     
    3434   PRIVATE 
    3535 
    36    PUBLIC   dom_msk         ! routine called by inidom.F90 
     36   PUBLIC   dom_msk    ! routine called by inidom.F90 
    3737 
    3838   !                            !!* Namelist namlbc : lateral boundary condition * 
     
    171171      ! -------------------- 
    172172      tmask_i(:,:) = ssmask(:,:)            ! (ISH) tmask_i = 1 even on the ice shelf 
     173 
     174      tmask_h(:,:) = 1._wp                 ! 0 on the halo and 1 elsewhere 
    173175      iif = jpreci                         ! ??? 
    174176      iil = nlci - jpreci + 1 
     
    176178      ijl = nlcj - jprecj + 1 
    177179 
    178       tmask_i( 1 :iif,   :   ) = 0._wp      ! first columns 
    179       tmask_i(iil:jpi,   :   ) = 0._wp      ! last  columns (including mpp extra columns) 
    180       tmask_i(   :   , 1 :ijf) = 0._wp      ! first rows 
    181       tmask_i(   :   ,ijl:jpj) = 0._wp      ! last  rows (including mpp extra rows) 
     180      tmask_h( 1 :iif,   :   ) = 0._wp      ! first columns 
     181      tmask_h(iil:jpi,   :   ) = 0._wp      ! last  columns (including mpp extra columns) 
     182      tmask_h(   :   , 1 :ijf) = 0._wp      ! first rows 
     183      tmask_h(   :   ,ijl:jpj) = 0._wp      ! last  rows (including mpp extra rows) 
    182184 
    183185      ! north fold mask 
     
    190192         IF( mjg(nlej) == jpjglo ) THEN                  ! only half of the nlcj-1 row 
    191193            DO ji = iif+1, iil-1 
    192                tmask_i(ji,nlej-1) = tmask_i(ji,nlej-1) * tpol(mig(ji)) 
     194               tmask_h(ji,nlej-1) = tmask_h(ji,nlej-1) * tpol(mig(ji)) 
    193195            END DO 
    194196         ENDIF 
    195197      ENDIF 
     198      
     199      tmask_i(:,:) = tmask_i(:,:) * tmask_h(:,:) 
     200 
    196201      IF( jperio == 5 .OR. jperio == 6 ) THEN      ! F-point pivot 
    197202         tpol(     1    :jpiglo) = 0._wp 
     
    213218         END DO 
    214219      END DO 
    215       ! (ISF) MIN(1,SUM(umask)) is here to check if you have effectively at least 1 wet u point 
     220      ! (ISF) MIN(1,SUM(umask)) is here to check if you have effectively at least 1 wet cell at u point 
    216221      DO jj = 1, jpjm1 
    217222         DO ji = 1, fs_jpim1   ! vector loop 
    218             umask_i(ji,jj)  = ssmask(ji,jj) * ssmask(ji+1,jj  )  * MIN(1._wp,SUM(umask(ji,jj,:))) 
    219             vmask_i(ji,jj)  = ssmask(ji,jj) * ssmask(ji  ,jj+1)  * MIN(1._wp,SUM(vmask(ji,jj,:))) 
     223            ssumask(ji,jj)  = ssmask(ji,jj) * ssmask(ji+1,jj  )  * MIN(1._wp,SUM(umask(ji,jj,:))) 
     224            ssvmask(ji,jj)  = ssmask(ji,jj) * ssmask(ji  ,jj+1)  * MIN(1._wp,SUM(vmask(ji,jj,:))) 
    220225         END DO 
    221226         DO ji = 1, jpim1      ! NO vector opt. 
    222             fmask_i(ji,jj) =  ssmask(ji,jj  ) * ssmask(ji+1,jj  )   & 
     227            ssfmask(ji,jj) =  ssmask(ji,jj  ) * ssmask(ji+1,jj  )   & 
    223228               &            * ssmask(ji,jj+1) * ssmask(ji+1,jj+1) * MIN(1._wp,SUM(fmask(ji,jj,:))) 
    224229         END DO 
    225230      END DO 
    226       CALL lbc_lnk( umask, 'U', 1._wp )      ! Lateral boundary conditions 
    227       CALL lbc_lnk( vmask, 'V', 1._wp ) 
    228       CALL lbc_lnk( fmask, 'F', 1._wp ) 
    229       CALL lbc_lnk( umask_i, 'U', 1._wp )      ! Lateral boundary conditions 
    230       CALL lbc_lnk( vmask_i, 'V', 1._wp ) 
    231       CALL lbc_lnk( fmask_i, 'F', 1._wp ) 
     231      CALL lbc_lnk( umask  , 'U', 1._wp )      ! Lateral boundary conditions 
     232      CALL lbc_lnk( vmask  , 'V', 1._wp ) 
     233      CALL lbc_lnk( fmask  , 'F', 1._wp ) 
     234      CALL lbc_lnk( ssumask, 'U', 1._wp )      ! Lateral boundary conditions 
     235      CALL lbc_lnk( ssvmask, 'V', 1._wp ) 
     236      CALL lbc_lnk( ssfmask, 'F', 1._wp ) 
    232237 
    233238      ! 3. Ocean/land mask at wu-, wv- and w points  
     
    341346      ! 
    342347      CALL lbc_lnk( fmask, 'F', 1._wp )      ! Lateral boundary conditions on fmask 
    343  
     348      ! 
    344349      ! CAUTION : The fmask may be further modified in dyn_vor_init ( dynvor.F90 ) 
    345              
    346       IF( nprint == 1 .AND. lwp ) THEN      ! Control print 
    347          imsk(:,:) = INT( tmask_i(:,:) ) 
    348          WRITE(numout,*) ' tmask_i : ' 
    349          CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1,   & 
    350                &                           1, jpj, 1, 1, numout) 
    351          WRITE (numout,*) 
    352          WRITE (numout,*) ' dommsk: tmask for each level' 
    353          WRITE (numout,*) ' ----------------------------' 
    354          DO jk = 1, jpk 
    355             imsk(:,:) = INT( tmask(:,:,jk) ) 
    356  
    357             WRITE(numout,*) 
    358             WRITE(numout,*) ' level = ',jk 
    359             CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1,   & 
    360                &                              1, jpj, 1, 1, numout) 
    361          END DO 
    362          WRITE(numout,*) 
    363          WRITE(numout,*) ' dom_msk: vmask for each level' 
    364          WRITE(numout,*) ' -----------------------------' 
    365          DO jk = 1, jpk 
    366             imsk(:,:) = INT( vmask(:,:,jk) ) 
    367             WRITE(numout,*) 
    368             WRITE(numout,*) ' level = ',jk 
    369             CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1,   & 
    370                &                              1, jpj, 1, 1, numout) 
    371          END DO 
    372          WRITE(numout,*) 
    373          WRITE(numout,*) ' dom_msk: fmask for each level' 
    374          WRITE(numout,*) ' -----------------------------' 
    375          DO jk = 1, jpk 
    376             imsk(:,:) = INT( fmask(:,:,jk) ) 
    377             WRITE(numout,*) 
    378             WRITE(numout,*) ' level = ',jk 
    379             CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1,   & 
    380                &                              1, jpj, 1, 1, numout ) 
    381          END DO 
    382       ENDIF 
    383350      ! 
    384351      CALL wrk_dealloc( jpi, jpj, imsk ) 
Note: See TracChangeset for help on using the changeset viewer.