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.
dommsk.F90 in branches/UKMO/dev_r5107_iceshelf_fw_input_coupled_model/NEMOGCM/NEMO/OFF_SRC – NEMO

source: branches/UKMO/dev_r5107_iceshelf_fw_input_coupled_model/NEMOGCM/NEMO/OFF_SRC/dommsk.F90 @ 5511

Last change on this file since 5511 was 5511, checked in by davestorkey, 9 years ago

UKMO/dev_r5107_iceshelf_fw_input_coupled_model branch: clear SVN keywords

File size: 4.4 KB
Line 
1MODULE dommsk
2   !!======================================================================
3   !!                       ***  MODULE dommsk   ***
4   !! Ocean initialization : domain land/sea masks, off-line case
5   !!======================================================================
6   !! History :  3.3  ! 2010-10  (C. Ethe)  adapted from OPA_SRC/DOM/dommsk
7   !!----------------------------------------------------------------------
8
9   !!----------------------------------------------------------------------
10   !!   dom_msk        : compute land/ocean mask
11   !!----------------------------------------------------------------------
12   USE oce             ! ocean dynamics and tracers
13   USE dom_oce         ! ocean space and time domain
14   USE lib_mpp         ! MPP library
15   USE in_out_manager  ! I/O manager
16   USE wrk_nemo 
17
18   IMPLICIT NONE
19   PRIVATE
20
21   PUBLIC   dom_msk    ! routine called by inidom.F90
22
23   REAL(wp)        :: rn_shlat   = 2.   ! type of lateral boundary condition on velocity
24   LOGICAL, PUBLIC :: ln_vorlat  = .false.   !  consistency of vorticity boundary condition
25
26   !! * Substitutions
27#  include "vectopt_loop_substitute.h90"
28   !!----------------------------------------------------------------------
29   !! NEMO/OFF 3.3 , NEMO Consortium (2010)
30   !! $Id$
31   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
32   !!----------------------------------------------------------------------
33CONTAINS
34
35   SUBROUTINE dom_msk
36      !!---------------------------------------------------------------------
37      !!                 ***  ROUTINE dom_msk  ***
38      !!
39      !! ** Purpose :   Off-line case: defines the interior domain T-mask.
40      !!
41      !! ** Method  :   The interior ocean/land mask is computed from tmask
42      !!              setting to zero the duplicated row and lines due to
43      !!              MPP exchange halos, est-west cyclic and north fold
44      !!              boundary conditions.
45      !!
46      !! ** Action :   tmask_i  : interiorland/ocean mask at t-point
47      !!               tpol     : ???
48      !!----------------------------------------------------------------------
49      !
50      INTEGER  ::   ji, jk                   ! dummy loop indices
51      INTEGER  ::   iif, iil, ijf, ijl       ! local integers
52      INTEGER, POINTER, DIMENSION(:,:) ::  imsk 
53      !
54      !!---------------------------------------------------------------------
55     
56      CALL wrk_alloc( jpi, jpj, imsk )
57      !
58      ! Interior domain mask (used for global sum)
59      ! --------------------
60      ssmask(:,:)  = tmask(:,:,1)
61      tmask_i(:,:) = tmask(:,:,1)
62      iif = jpreci                        ! thickness of exchange halos in i-axis
63      iil = nlci - jpreci + 1
64      ijf = jprecj                        ! thickness of exchange halos in j-axis
65      ijl = nlcj - jprecj + 1
66      !
67      tmask_i( 1 :iif,   :   ) = 0._wp    ! first columns
68      tmask_i(iil:jpi,   :   ) = 0._wp    ! last  columns (including mpp extra columns)
69      tmask_i(   :   , 1 :ijf) = 0._wp    ! first rows
70      tmask_i(   :   ,ijl:jpj) = 0._wp    ! last  rows (including mpp extra rows)
71      !
72      !                                   ! north fold mask
73      tpol(1:jpiglo) = 1._wp
74      !                               
75      IF( jperio == 3 .OR. jperio == 4 )   tpol(jpiglo/2+1:jpiglo) = 0._wp    ! T-point pivot
76      IF( jperio == 5 .OR. jperio == 6 )   tpol(     1    :jpiglo) = 0._wp    ! F-point pivot
77      IF( jperio == 3 .OR. jperio == 4 ) THEN      ! T-point pivot: only half of the nlcj-1 row
78         IF( mjg(ijl-1) == jpjglo-1 ) THEN
79            DO ji = iif+1, iil-1
80               tmask_i(ji,ijl-1) = tmask_i(ji,ijl-1) * tpol(mig(ji))
81            END DO
82         ENDIF
83      ENDIF 
84      !
85      IF( nprint == 1 .AND. lwp ) THEN    ! Control print
86         imsk(:,:) = INT( tmask_i(:,:) )
87         WRITE(numout,*) ' tmask_i : '
88         CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1, 1, jpj, 1, 1, numout)
89         WRITE (numout,*)
90         WRITE (numout,*) ' dommsk: tmask for each level'
91         WRITE (numout,*) ' ----------------------------'
92         DO jk = 1, jpk
93            imsk(:,:) = INT( tmask(:,:,jk) )
94            WRITE(numout,*)
95            WRITE(numout,*) ' level = ',jk
96            CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1, 1, jpj, 1, 1, numout)
97         END DO
98      ENDIF
99      !
100      CALL wrk_dealloc( jpi, jpj, imsk )
101      !
102   END SUBROUTINE dom_msk
103   !!======================================================================
104END MODULE dommsk
Note: See TracBrowser for help on using the repository browser.