source: NEMO/trunk/tests/ICE_AGRIF/MY_SRC/usrdef_zgr.F90 @ 12377

Last change on this file since 12377 was 12377, checked in by acc, 8 months ago

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge —ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The —ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

  • Property svn:keywords set to Id
File size: 5.1 KB
Line 
1MODULE usrdef_zgr
2   !!======================================================================
3   !!                   ***  MODULE  usrdef_zgr  ***
4   !!
5   !!                   ===      ICE_AGRIF case     ===
6   !!
7   !! Ocean domain : user defined vertical coordinate system
8   !!======================================================================
9   !! History :  4.0  ! 2016-08  (G. Madec, S. Flavoni)  Original code
10   !!----------------------------------------------------------------------
11
12   !!----------------------------------------------------------------------
13   !!   usr_def_zgr   : user defined vertical coordinate system (required)
14   !!---------------------------------------------------------------------
15   USE oce            ! ocean variables
16   USE usrdef_nam     ! User defined : namelist variables
17   !
18   USE in_out_manager ! I/O manager
19   USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
20   USE lib_mpp        ! distributed memory computing library
21
22   IMPLICIT NONE
23   PRIVATE
24
25   PUBLIC   usr_def_zgr   ! called by domzgr.F90
26
27   !!----------------------------------------------------------------------
28   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
29   !! $Id$
30   !! Software governed by the CeCILL license (see ./LICENSE)
31   !!----------------------------------------------------------------------
32CONTAINS             
33
34   SUBROUTINE usr_def_zgr( ld_zco  , ld_zps  , ld_sco  , ld_isfcav,    &   ! type of vertical coordinate
35      &                    pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d  ,    &   ! 1D reference vertical coordinate
36      &                    pdept , pdepw ,                             &   ! 3D t & w-points depth
37      &                    pe3t  , pe3u  , pe3v , pe3f ,               &   ! vertical scale factors
38      &                    pe3w  , pe3uw , pe3vw,                      &   !     -      -      -
39      &                    k_top  , k_bot    )                             ! top & bottom ocean level
40      !!---------------------------------------------------------------------
41      !!              ***  ROUTINE usr_def_zgr  ***
42      !!
43      !! ** Purpose :   User defined the vertical coordinates
44      !!
45      !!----------------------------------------------------------------------
46      LOGICAL                   , INTENT(out) ::   ld_zco, ld_zps, ld_sco      ! vertical coordinate flags
47      LOGICAL                   , INTENT(out) ::   ld_isfcav                   ! under iceshelf cavity flag
48      REAL(wp), DIMENSION(:)    , INTENT(out) ::   pdept_1d, pdepw_1d          ! 1D grid-point depth     [m]
49      REAL(wp), DIMENSION(:)    , INTENT(out) ::   pe3t_1d , pe3w_1d           ! 1D grid-point depth     [m]
50      REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pdept, pdepw                ! grid-point depth        [m]
51      REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pe3t , pe3u , pe3v , pe3f   ! vertical scale factors  [m]
52      REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pe3w , pe3uw, pe3vw         ! i-scale factors
53      INTEGER , DIMENSION(:,:)  , INTENT(out) ::   k_top, k_bot                ! first & last ocean level
54      !
55      INTEGER  ::   jk, k_dz  ! dummy indices
56      !!----------------------------------------------------------------------
57      !
58      IF(lwp) WRITE(numout,*)
59      IF(lwp) WRITE(numout,*) 'usr_def_zgr : ICE_AGRIF configuration '
60      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   (slab ocean - advection of an ice patch in a biperiodic square box domain)'
61      !
62      !
63      ! type of vertical coordinate  ==>>>   here ICE_AGRIF : slab ocean always
64      ! ---------------------------
65      ld_zco    = .TRUE.       ! z-full-step coordinate
66      ld_zps    = .FALSE.      ! z-partial-step coordinate
67      ld_sco    = .FALSE.      ! s-coordinate
68      ld_isfcav = .FALSE.      ! ISF Ice Shelves Flag
69      !
70      !
71      ! Build the vertical coordinate system
72      ! ------------------------------------
73      !
74      !                       !==  UNmasked meter bathymetry  ==!
75      !
76      !
77      k_dz = 1
78      DO jk = 1, jpk
79         pdepw_1d(jk) =    k_dz
80         pdept_1d(jk) =    k_dz
81         pe3w_1d (jk) =    k_dz
82         pe3t_1d (jk) =    k_dz
83      END DO
84      !                       !==  top masked level bathymetry  ==!  (all coordinates)
85      !
86      ! no ocean cavities : top ocean level is ONE, except over land
87      k_top(:,:) = 1
88      !
89      !                       !==  z-coordinate  ==!   (step-like topography)
90      !                                !* bottom ocean compute from the depth of grid-points
91      jpkm1 = jpk
92      k_bot(:,:) = 1    ! here use k_top as a land mask
93      !                                !* horizontally uniform coordinate (reference z-co everywhere)
94      DO jk = 1, jpk
95         pdept(:,:,jk) = pdept_1d(jk)
96         pdepw(:,:,jk) = pdepw_1d(jk)
97         pe3t (:,:,jk) = pe3t_1d (jk)
98         pe3u (:,:,jk) = pe3t_1d (jk)
99         pe3v (:,:,jk) = pe3t_1d (jk)
100         pe3f (:,:,jk) = pe3t_1d (jk)
101         pe3w (:,:,jk) = pe3w_1d (jk)
102         pe3uw(:,:,jk) = pe3w_1d (jk)
103         pe3vw(:,:,jk) = pe3w_1d (jk)
104      END DO
105      !
106   END SUBROUTINE usr_def_zgr
107
108   !!======================================================================
109END MODULE usrdef_zgr
Note: See TracBrowser for help on using the repository browser.