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/branches/UKMO/dev_r12866_HPC-02_Daley_Tiling_trial_extra_halo/src/OCE/USR – NEMO

source: NEMO/branches/UKMO/dev_r12866_HPC-02_Daley_Tiling_trial_extra_halo/src/OCE/USR/usrdef_nam.F90 @ 12958

Last change on this file since 12958 was 12958, checked in by hadcv, 4 years ago

Merge in trunk changes to r12933

  • Property svn:keywords set to Id
File size: 4.7 KB
Line 
1MODULE usrdef_nam
2   !!======================================================================
3   !!                     ***  MODULE usrdef_nam   ***
4   !!
5   !!                     ===  GYRE configuration  ===
6   !!
7   !! User defined : set the domain characteristics of a user configuration
8   !!======================================================================
9   !! History :  4.0  ! 2016-03  (S. Flavoni, G. Madec)  Original code
10   !!----------------------------------------------------------------------
11
12   !!----------------------------------------------------------------------
13   !!   usr_def_nam   : read user defined namelist and set global domain size
14   !!   usr_def_hgr   : initialize the horizontal mesh
15   !!----------------------------------------------------------------------
16   USE par_oce        ! ocean space and time domain
17   USE phycst         ! physical constants
18   !
19   USE in_out_manager ! I/O manager
20   USE lib_mpp        ! MPP library
21   
22   IMPLICIT NONE
23   PRIVATE
24
25   PUBLIC   usr_def_nam   ! called in nemogcm.F90 module
26
27   !                              !!* namusr_def namelist *!!
28   LOGICAL, PUBLIC ::   ln_bench   ! =T benchmark test with gyre: the gridsize is constant (no need to adjust timestep or viscosity)
29   INTEGER, PUBLIC ::   nn_GYRE    ! 1/nn_GYRE = the resolution chosen in degrees and thus defining the horizontal domain size
30
31   !!----------------------------------------------------------------------
32   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
33   !! $Id$
34   !! Software governed by the CeCILL license (see ./LICENSE)
35   !!----------------------------------------------------------------------
36CONTAINS
37
38   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
39      !!----------------------------------------------------------------------
40      !!                     ***  ROUTINE dom_nam  ***
41      !!                   
42      !! ** Purpose :   read user defined namelist and define the domain size
43      !!
44      !! ** Method  :   read in namusr_def containing all the user specific namelist parameter
45      !!
46      !!                Here GYRE configuration
47      !!
48      !! ** input   : - namusr_def namelist found in namelist_cfg
49      !!----------------------------------------------------------------------
50      CHARACTER(len=*), INTENT(out) ::   cd_cfg          ! configuration name
51      INTEGER         , INTENT(out) ::   kk_cfg          ! configuration resolution
52      INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes
53      INTEGER         , INTENT(out) ::   kperio          ! lateral global domain b.c.
54      !
55      INTEGER ::   ios   ! Local integer
56      !!
57      NAMELIST/namusr_def/ nn_GYRE, ln_bench, jpkglo
58      !!----------------------------------------------------------------------
59      !
60      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 )
61902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' )
62      !
63      IF(lwm)   WRITE( numond, namusr_def )
64      !
65      cd_cfg = 'GYRE'               ! name & resolution (not used)
66#if defined key_agrif
67      IF (.NOT.Agrif_root()) nn_GYRE = Agrif_parent(nn_GYRE) * Agrif_irhox()
68#endif
69      kk_cfg = nn_GYRE
70      !
71      kpi = 30 * nn_GYRE + 1       ! Global Domain size
72      kpj = 20 * nn_GYRE + 1
73#if defined key_agrif
74      IF( .NOT. Agrif_Root() ) THEN
75         kpi  = nbcellsx + 2*nbghostcells
76         kpj  = nbcellsy + 2*nbghostcells
77      ENDIF
78#endif
79      kpk = jpkglo
80      !                             ! Set the lateral boundary condition of the global domain
81      kperio = 0                    ! GYRE configuration : closed domain
82      !
83      !                             ! control print
84      IF(lwp) THEN
85         WRITE(numout,*) '   '
86         WRITE(numout,*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg'
87         WRITE(numout,*) '~~~~~~~~~~~ '
88         WRITE(numout,*) '   Namelist namusr_def : GYRE case'
89         WRITE(numout,*) '      GYRE used as Benchmark (=T)                      ln_bench  = ', ln_bench
90         WRITE(numout,*) '      inverse resolution & implied domain size         nn_GYRE   = ', nn_GYRE
91#if defined key_agrif
92         IF( Agrif_Root() ) THEN
93#endif
94         WRITE(numout,*) '      Ni0glo = 30*nn_GYRE                              Ni0glo = ', kpi
95         WRITE(numout,*) '      Nj0glo = 20*nn_GYRE                              Nj0glo = ', kpj
96#if defined key_agrif
97         ENDIF
98#endif
99         WRITE(numout,*) '      number of model levels                           jpkglo = ', kpk
100         WRITE(numout,*) '   '
101         WRITE(numout,*) '   Lateral b.c. of the global domain set to closed     jperio = ', kperio
102      ENDIF
103      !
104   END SUBROUTINE usr_def_nam
105
106   !!======================================================================
107END MODULE usrdef_nam
Note: See TracBrowser for help on using the repository browser.