1 | MODULE usrdef_istate |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE usrdef_istate *** |
---|
4 | !! |
---|
5 | !! === SWG configuration === |
---|
6 | !! |
---|
7 | !! User defined : set the initial state of a user configuration |
---|
8 | !!====================================================================== |
---|
9 | !! History : 4.0 ! 2016-03 (S. Flavoni) Original code |
---|
10 | !! - ! 2020-03 (A. Nasser) Shallow Water Eq. configuration |
---|
11 | !! ! 2020-11 (S. Techene, G. Madec) separate tsuv from ssh |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | !! usr_def_istate : initial state in Temperature and salinity |
---|
16 | !!---------------------------------------------------------------------- |
---|
17 | USE par_oce ! ocean space and time domain master parameters |
---|
18 | USE phycst ! physical constants |
---|
19 | ! |
---|
20 | USE in_out_manager ! I/O manager |
---|
21 | USE lib_mpp ! MPP library |
---|
22 | |
---|
23 | IMPLICIT NONE |
---|
24 | PRIVATE |
---|
25 | |
---|
26 | PUBLIC usr_def_istate ! called in istate.F90 |
---|
27 | PUBLIC usr_def_istate_ssh ! called by domqco.F90 |
---|
28 | |
---|
29 | !!---------------------------------------------------------------------- |
---|
30 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
31 | !! $Id: usrdef_istate.F90 10069 2018-08-28 14:12:24Z nicolasmartin $ |
---|
32 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
33 | !!---------------------------------------------------------------------- |
---|
34 | CONTAINS |
---|
35 | |
---|
36 | SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) |
---|
37 | !!---------------------------------------------------------------------- |
---|
38 | !! *** ROUTINE usr_def_istate *** |
---|
39 | !! |
---|
40 | !! ** Purpose : Initialization of the dynamics and tracers |
---|
41 | !! Here SWG configuration example : (double gyre with rotated domain) |
---|
42 | !! |
---|
43 | !! ** Method : - set temprature field |
---|
44 | !! - set salinity field |
---|
45 | !!---------------------------------------------------------------------- |
---|
46 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: pdept ! depth of t-point [m] |
---|
47 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: ptmask ! t-point ocean mask [m] |
---|
48 | ! |
---|
49 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT( out) :: pts ! T & S fields [Celsius ; g/kg] |
---|
50 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT( out) :: pu ! i-component of the velocity [m/s] |
---|
51 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT( out) :: pv ! j-component of the velocity [m/s] |
---|
52 | ! |
---|
53 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
54 | !!---------------------------------------------------------------------- |
---|
55 | ! |
---|
56 | IF(lwp) WRITE(numout,*) |
---|
57 | IF(lwp) WRITE(numout,*) 'usr_def_istate : analytical definition of initial state ' |
---|
58 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~ Ocean at rest, with an horizontally uniform T and S profiles' |
---|
59 | ! |
---|
60 | pu (:,:,:) = 0._wp ! ocean at rest |
---|
61 | pv (:,:,:) = 0._wp |
---|
62 | pts (:,:,:,:) = 0._wp ! not used in SWE |
---|
63 | |
---|
64 | IF(lwp) WRITE(numout,*) "end istate" |
---|
65 | CALL FLUSH(numout) |
---|
66 | ! |
---|
67 | END SUBROUTINE usr_def_istate |
---|
68 | |
---|
69 | |
---|
70 | SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) |
---|
71 | !!---------------------------------------------------------------------- |
---|
72 | !! *** ROUTINE usr_def_istate_ssh *** |
---|
73 | !! |
---|
74 | !! ** Purpose : Initialization of ssh |
---|
75 | !! Here SWG configuration |
---|
76 | !! |
---|
77 | !! ** Method : set ssh to 0 |
---|
78 | !!---------------------------------------------------------------------- |
---|
79 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: ptmask ! t-point ocean mask [m] |
---|
80 | REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pssh ! sea-surface height |
---|
81 | !!---------------------------------------------------------------------- |
---|
82 | ! |
---|
83 | IF(lwp) WRITE(numout,*) |
---|
84 | IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : SWG configuration, analytical definition of initial state' |
---|
85 | ! |
---|
86 | pssh(:,:) = 0._wp ! ocean at rest |
---|
87 | ! |
---|
88 | END SUBROUTINE usr_def_istate_ssh |
---|
89 | |
---|
90 | !!====================================================================== |
---|
91 | END MODULE usrdef_istate |
---|