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.
usrdef_nam.F90 in NEMO/trunk/tests/BENCH/MY_SRC – NEMO

source: NEMO/trunk/tests/BENCH/MY_SRC/usrdef_nam.F90 @ 12377

Last change on this file since 12377 was 12377, checked in by acc, 4 years 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.

File size: 5.3 KB
Line 
1MODULE usrdef_nam
2   !!======================================================================
3   !!                       ***  MODULE  usrdef_nam  ***
4   !!
5   !!                      ===  BENCH configuration  ===
6   !!
7   !! User defined : set the domain characteristics of a user configuration
8   !!======================================================================
9   !! History :  NEMO !
10   !!----------------------------------------------------------------------
11
12   !!----------------------------------------------------------------------
13   !!   usr_def_nam   : read user defined namelist and set global domain size
14   !!----------------------------------------------------------------------
15   USE par_oce        ! ocean space and time domain
16   USE in_out_manager ! I/O manager
17   USE lib_mpp        ! to get ctl_nam
18   
19   IMPLICIT NONE
20   PRIVATE
21
22   PUBLIC   usr_def_nam   ! called by nemogcm.F90
23   
24   !!----------------------------------------------------------------------
25   !! NEMO/OPA 4.0 , NEMO Consortium (2016)
26   !! $Id$
27   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
28   !!----------------------------------------------------------------------
29CONTAINS
30
31   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
32      !!----------------------------------------------------------------------
33      !!                     ***  ROUTINE dom_nam  ***
34      !!                   
35      !! ** Purpose :   read user defined namelist and define the domain size
36      !!
37      !! ** Method  :   read in namusr_def containing all the user specific namelist parameter
38      !!
39      !!                Here EW_CANAL configuration
40      !!
41      !! ** input   : - namusr_def namelist found in namelist_cfg
42      !!----------------------------------------------------------------------
43      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
44      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
45      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes
46      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.
47      !
48      !
49      INTEGER ::   ios         ! Local integer
50      !                              !!* namusr_def namelist *!!
51      INTEGER ::   nn_isize    ! number of point in i-direction of global(local) domain if >0 (<0) 
52      INTEGER ::   nn_jsize    ! number of point in j-direction of global(local) domain if >0 (<0) 
53      INTEGER ::   nn_ksize    ! total number of point in k-direction
54      INTEGER ::   nn_perio    ! periodicity
55      !                              !!* nammpp namelist *!!
56      INTEGER          ::   jpni, jpnj
57      LOGICAL          ::   ln_nnogather
58      !!
59      NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, nn_perio
60      NAMELIST/nammpp/ jpni, jpnj, ln_nnogather
61      !!----------------------------------------------------------------------     
62      !
63      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 903 )
64903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' )
65      !
66      IF(lwm)   WRITE( numond, namusr_def )     
67      !
68      cd_cfg = 'BENCH'             ! name & resolution (not used)
69      kk_cfg = 0
70      !
71      IF( nn_isize < 0 .AND. nn_jsize < 0 ) THEN
72      !
73         READ  ( numnam_ref, nammpp, IOSTAT = ios, ERR = 901)
74901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'nammpp in reference namelist' )
75         !
76         READ  ( numnam_cfg, nammpp, IOSTAT = ios, ERR = 902 )
77902      IF( ios >  0 )   CALL ctl_nam ( ios , 'nammpp in configuration namelist' )
78
79         kpi = ( -nn_isize - 2*nn_hls ) * jpni + 2*nn_hls
80         kpj = ( -nn_jsize - 2*nn_hls ) * jpnj + 2*nn_hls
81      ELSE
82         kpi = nn_isize
83         kpj = nn_jsize
84      ENDIF
85      !
86      kpk = nn_ksize
87      kperio = nn_perio
88      !                             ! control print
89      IF(lwp) THEN
90         WRITE(numout,*) '   '
91         WRITE(numout,*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg'
92         WRITE(numout,*) '~~~~~~~~~~~ '
93         WRITE(numout,*) '   Namelist namusr_def : BENCH test case'
94         IF( nn_isize > 0 ) THEN
95            WRITE(numout,*) '      global domain size-x            nn_isize = ',  nn_isize
96         ELSE
97            WRITE(numout,*) '                                          jpni = ', jpni
98            WRITE(numout,*) '       local domain size-x           -nn_isize = ', -nn_isize
99            WRITE(numout,*) '      global domain size-x                 kpi = ', kpi
100         ENDIF
101         IF( nn_jsize > 0 ) THEN
102            WRITE(numout,*) '      global domain size-y            nn_jsize = ', nn_jsize
103         ELSE
104            WRITE(numout,*) '                                          jpnj = ', jpnj
105            WRITE(numout,*) '       local domain size-y           -nn_jsize = ', -nn_jsize
106            WRITE(numout,*) '      global domain size-y                 kpj = ', kpj
107         ENDIF
108         WRITE(numout,*) '      global domain size-z            nn_ksize = ', nn_ksize
109         WRITE(numout,*) '      LBC of the global domain          kperio = ', kperio
110      ENDIF
111      !
112   END SUBROUTINE usr_def_nam
113
114   !!======================================================================
115END MODULE usrdef_nam
Note: See TracBrowser for help on using the repository browser.