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/2019/dev_r11351_fldread_with_XIOS/tests/ICE_ADV1D/MY_SRC – NEMO

source: NEMO/branches/2019/dev_r11351_fldread_with_XIOS/tests/ICE_ADV1D/MY_SRC/usrdef_nam.F90 @ 13463

Last change on this file since 13463 was 13463, checked in by andmirek, 4 years ago

Ticket #2195:update to trunk 13461

File size: 5.0 KB
Line 
1MODULE usrdef_nam
2   !!======================================================================
3   !!                       ***  MODULE  usrdef_nam  ***
4   !!
5   !!                      ===  ICE_ADV1D configuration  ===
6   !!
7   !! User defined : set the domain characteristics of a user configuration
8   !!======================================================================
9   !! History :  NEMO ! 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   USE timing         ! Timing
22   
23   IMPLICIT NONE
24   PRIVATE
25
26   PUBLIC   usr_def_nam   ! called by nemogcm.F90
27
28   !                               !!* namusr_def namelist *!!
29   REAL(wp), PUBLIC ::   rn_dx      ! resolution in meters defining the horizontal domain size
30   REAL(wp), PUBLIC ::   rn_dy      ! resolution in meters defining the horizontal domain size
31   REAL(wp), PUBLIC ::   rn_ppgphi0 ! reference latitude for beta-plane
32   LOGICAL , PUBLIC ::   ln_corio   ! set coriolis at 0 (ln_corio=F) or not
33
34   !!----------------------------------------------------------------------
35   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
36   !! $Id: usrdef_nam.F90 10074 2018-08-28 16:15:49Z nicolasmartin $
37   !! Software governed by the CeCILL license (see ./LICENSE)
38   !!----------------------------------------------------------------------
39CONTAINS
40
41   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
42      !!----------------------------------------------------------------------
43      !!                     ***  ROUTINE dom_nam  ***
44      !!                   
45      !! ** Purpose :   read user defined namelist and define the domain size
46      !!
47      !! ** Method  :   read in namusr_def containing all the user specific namelist parameter
48      !!
49      !!                Here ICE_ADV1D configuration
50      !!
51      !! ** input   : - namusr_def namelist found in namelist_cfg
52      !!----------------------------------------------------------------------
53      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
54      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
55      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes
56      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.
57      !
58      INTEGER ::   ios       ! Local integer
59      REAL(wp)::   zlx, zly  ! Local scalars
60      !!
61      NAMELIST/namusr_def/ rn_dx, rn_dy, ln_corio, rn_ppgphi0
62      !!----------------------------------------------------------------------
63      !
64      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 )
65902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' )
66      !
67      IF(lwm)   WRITE( numond, namusr_def )
68      !
69      cd_cfg = 'ICE_ADV1D'           ! name & resolution (not used)
70      kk_cfg = INT( rn_dx )
71      !
72      ! Global Domain size:  ICE_ADV1D domain is  480 m x 480 m x 10 m
73      kpi = INT( 480.*0.5 / rn_dx ) -1
74      kpj = INT( 480.*0.5 / rn_dy ) -1
75      kpk = 1
76      !
77      zlx = kpi*rn_dx*1.e-3
78      zly = kpj*rn_dy*1.e-3
79      !                             ! Set the lateral boundary condition of the global domain
80      kperio = 0                    ! ICE_ADV1D configuration : bi-periodic basin
81      !                             ! control print
82      IF(lwp) THEN
83         WRITE(numout,*) '   '
84         WRITE(numout,*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg'
85         WRITE(numout,*) '~~~~~~~~~~~ '
86         WRITE(numout,*) '   Namelist namusr_def : ICE_ADV1D test case'
87         WRITE(numout,*) '      horizontal resolution                    rn_dx  = ', rn_dx, ' meters'
88         WRITE(numout,*) '      horizontal resolution                    rn_dy  = ', rn_dy, ' meters'
89         WRITE(numout,*) '      ICE_ADV1D domain  '
90         WRITE(numout,*) '         LX [km]: ', zlx
91         WRITE(numout,*) '         LY [km]: ', zly
92         WRITE(numout,*) '         resulting global domain size :        Ni0glo = ', kpi
93         WRITE(numout,*) '                                               Nj0glo = ', kpj
94         WRITE(numout,*) '                                               jpkglo = ', kpk
95         WRITE(numout,*) '         Coriolis:', ln_corio
96         WRITE(numout,*) '   '
97         WRITE(numout,*) '   Lateral boundary condition of the global domain'
98         WRITE(numout,*) '      ICE_ADV1D : closed basin                 jperio = ', kperio
99      ENDIF
100      !
101   END SUBROUTINE usr_def_nam
102
103   !!======================================================================
104END MODULE usrdef_nam
Note: See TracBrowser for help on using the repository browser.