1 | MODULE usrdef_nam |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE usrdef_nam *** |
---|
4 | !! |
---|
5 | !! === ISOMIP 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 | !! ! 2017-02 (P. Mathiot, S. Flavoni) Adapt code to ISOMIP case |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | !! usr_def_nam : read user defined namelist and set global domain size |
---|
15 | !! usr_def_hgr : initialize the horizontal mesh |
---|
16 | !!---------------------------------------------------------------------- |
---|
17 | USE dom_oce , ONLY: ln_zco, ln_zps, ln_sco ! flag of type of coordinate |
---|
18 | USE par_oce ! ocean space and time domain |
---|
19 | USE phycst ! physical constants |
---|
20 | ! |
---|
21 | USE in_out_manager ! I/O manager |
---|
22 | USE lib_mpp ! MPP library |
---|
23 | USE timing ! Timing |
---|
24 | |
---|
25 | IMPLICIT NONE |
---|
26 | PRIVATE |
---|
27 | |
---|
28 | PUBLIC usr_def_nam ! called by nemogcm.F90 |
---|
29 | |
---|
30 | ! !!* namusr_def namelist *!! |
---|
31 | REAL(wp), PUBLIC :: rn_e1deg, rn_e2deg !: horizontal resolution [degrees] |
---|
32 | REAL(wp), PUBLIC :: rn_e3 !: vertical resolution [m] |
---|
33 | |
---|
34 | REAL(wp), PARAMETER, PUBLIC :: rbathy = 900._wp !: depth of the seafloor [m] |
---|
35 | |
---|
36 | !!---------------------------------------------------------------------- |
---|
37 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
38 | !! $Id$ |
---|
39 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
40 | !!---------------------------------------------------------------------- |
---|
41 | CONTAINS |
---|
42 | |
---|
43 | SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) |
---|
44 | !!---------------------------------------------------------------------- |
---|
45 | !! *** ROUTINE dom_nam *** |
---|
46 | !! |
---|
47 | !! ** Purpose : read user defined namelist and define the domain size |
---|
48 | !! |
---|
49 | !! ** Method : read in namusr_def containing all the user specific namelist parameter |
---|
50 | !! |
---|
51 | !! Here ISOMIP configuration |
---|
52 | !! |
---|
53 | !! ** input : - namusr_def namelist found in namelist_cfg |
---|
54 | !!---------------------------------------------------------------------- |
---|
55 | CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name |
---|
56 | INTEGER , INTENT(out) :: kk_cfg ! configuration resolution |
---|
57 | INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes |
---|
58 | INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. |
---|
59 | ! |
---|
60 | INTEGER :: ios ! Local integer |
---|
61 | !! |
---|
62 | NAMELIST/namusr_def/ ln_zco, ln_zps, ln_sco, rn_e1deg, rn_e2deg, rn_e3 |
---|
63 | !!---------------------------------------------------------------------- |
---|
64 | ! |
---|
65 | READ ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) |
---|
66 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) |
---|
67 | ! |
---|
68 | IF(lwm) WRITE( numond, namusr_def ) |
---|
69 | ! |
---|
70 | cd_cfg = 'ISOMIP' ! name & resolution (not used) |
---|
71 | kk_cfg = INT( rn_e3 ) |
---|
72 | ! |
---|
73 | ! Global Domain size: ISOMIP domain is 15° x 10° x 900 m |
---|
74 | kpi = INT( 15.0 / rn_e1deg ) + 2 ! add 2 for t-point in the east & west coasts |
---|
75 | kpj = INT( 10.0 / rn_e2deg ) + 2 ! - - north & south - |
---|
76 | kpk = INT( rbathy / rn_e3 ) + 1 ! add 1 for t-point in the seafloor |
---|
77 | ! |
---|
78 | ! ! Set the lateral boundary condition of the global domain |
---|
79 | kperio = 0 ! ISOMIP configuration : close basin |
---|
80 | ! |
---|
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 : ISOMIP test case' |
---|
87 | WRITE(numout,*) ' type of vertical coordinate : ' |
---|
88 | WRITE(numout,*) ' z-coordinate flag ln_zco = ', ln_zco |
---|
89 | WRITE(numout,*) ' z-partial-step coordinate flag ln_zps = ', ln_zps |
---|
90 | WRITE(numout,*) ' s-coordinate flag ln_sco = ', ln_sco |
---|
91 | WRITE(numout,*) ' resolution' |
---|
92 | WRITE(numout,*) ' zonal resolution rn_e1deg = ', rn_e1deg, ' degrees' |
---|
93 | WRITE(numout,*) ' meridional resolution rn_e1deg = ', rn_e1deg, ' degrees' |
---|
94 | WRITE(numout,*) ' vertical resolution rn_e3 = ', rn_e3 , ' meters' |
---|
95 | WRITE(numout,*) ' ISOMIP domain = 15° x 10° x 900 m' |
---|
96 | WRITE(numout,*) ' resulting global domain size : Ni0glo = ', kpi |
---|
97 | WRITE(numout,*) ' Nj0glo = ', kpj |
---|
98 | WRITE(numout,*) ' jpkglo = ', kpk |
---|
99 | WRITE(numout,*) ' ' |
---|
100 | WRITE(numout,*) ' Lateral boundary condition of the global domain' |
---|
101 | WRITE(numout,*) ' ISOMIP : closed basin jperio = ', kperio |
---|
102 | ENDIF |
---|
103 | ! |
---|
104 | END SUBROUTINE usr_def_nam |
---|
105 | |
---|
106 | !!====================================================================== |
---|
107 | END MODULE usrdef_nam |
---|