1 | MODULE usrdef_istate |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE usrdef_istate *** |
---|
4 | !! |
---|
5 | !! === GYRE 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 | !!---------------------------------------------------------------------- |
---|
11 | |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! usr_def_istate : initial state in Temperature and salinity |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | USE par_oce ! ocean space and time domain |
---|
16 | USE phycst ! physical constants |
---|
17 | ! |
---|
18 | USE in_out_manager ! I/O manager |
---|
19 | USE lib_mpp ! MPP library |
---|
20 | |
---|
21 | IMPLICIT NONE |
---|
22 | PRIVATE |
---|
23 | |
---|
24 | PUBLIC usr_def_istate ! called in istate.F90 |
---|
25 | |
---|
26 | !!---------------------------------------------------------------------- |
---|
27 | !! NEMO/OPA 4.0 , NEMO Consortium (2016) |
---|
28 | !! $Id$ |
---|
29 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
30 | !!---------------------------------------------------------------------- |
---|
31 | CONTAINS |
---|
32 | |
---|
33 | SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh ) |
---|
34 | !!---------------------------------------------------------------------- |
---|
35 | !! *** ROUTINE usr_def_istate *** |
---|
36 | !! |
---|
37 | !! ** Purpose : Initialization of the dynamics and tracers |
---|
38 | !! Here GYRE configuration example : (double gyre with rotated domain) |
---|
39 | !! |
---|
40 | !! ** Method : - set temprature field |
---|
41 | !! - set salinity field |
---|
42 | !!---------------------------------------------------------------------- |
---|
43 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: pdept ! depth of t-point [m] |
---|
44 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: ptmask ! t-point ocean mask [m] |
---|
45 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT( out) :: pts ! T & S fields [Celsius ; g/kg] |
---|
46 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT( out) :: pu ! i-component of the velocity [m/s] |
---|
47 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT( out) :: pv ! j-component of the velocity [m/s] |
---|
48 | REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pssh ! sea-surface height |
---|
49 | ! |
---|
50 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
51 | !!---------------------------------------------------------------------- |
---|
52 | ! |
---|
53 | IF(lwp) WRITE(numout,*) |
---|
54 | IF(lwp) WRITE(numout,*) 'usr_def_istate : analytical definition of initial state ' |
---|
55 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~ Ocean at rest, with an horizontally uniform T and S profiles' |
---|
56 | ! |
---|
57 | pu (:,:,:) = 0._wp ! ocean at rest |
---|
58 | pv (:,:,:) = 0._wp |
---|
59 | pssh(:,:) = 0._wp |
---|
60 | ! |
---|
61 | DO jk = 1, jpk ! horizontally uniform T & S profiles |
---|
62 | DO jj = 1, jpj |
---|
63 | DO ji = 1, jpi |
---|
64 | pts(ji,jj,jk,jp_tem) = 20._wp * ptmask(ji,jj,jk) |
---|
65 | pts(ji,jj,jk,jp_sal) = 36.25_wp * ptmask(ji,jj,jk) |
---|
66 | END DO |
---|
67 | END DO |
---|
68 | END DO |
---|
69 | ! |
---|
70 | END SUBROUTINE usr_def_istate |
---|
71 | |
---|
72 | !!====================================================================== |
---|
73 | END MODULE usrdef_istate |
---|