1 | MODULE usrdef_istate |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE usrdef_istate *** |
---|
4 | !! |
---|
5 | !! === ISOMIP configuration === |
---|
6 | !! |
---|
7 | !! User defined : set the initial state of a user configuration |
---|
8 | !!====================================================================== |
---|
9 | !! History : NEMO ! 2016-11 (S. Flavoni) Original code |
---|
10 | !! ! 2017-02 (P. Mathiot, S. Flavoni) Adapt code to ISOMIP case |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | !! usr_def_istate : initial state in Temperature and salinity |
---|
15 | !!---------------------------------------------------------------------- |
---|
16 | USE par_oce ! ocean space and time domain |
---|
17 | USE dom_oce |
---|
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 by istate.F90 |
---|
27 | |
---|
28 | !!---------------------------------------------------------------------- |
---|
29 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
30 | !! $Id: usrdef_istate.F90 10074 2018-08-28 16:15:49Z nicolasmartin $ |
---|
31 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
32 | !!---------------------------------------------------------------------- |
---|
33 | CONTAINS |
---|
34 | |
---|
35 | SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh ) |
---|
36 | !!---------------------------------------------------------------------- |
---|
37 | !! *** ROUTINE usr_def_istate *** |
---|
38 | !! |
---|
39 | !! ** Purpose : Initialization of the dynamics and tracers |
---|
40 | !! Here ISOMIP configuration |
---|
41 | !! |
---|
42 | !! ** Method : - set temperature field |
---|
43 | !! - set salinity field |
---|
44 | !!---------------------------------------------------------------------- |
---|
45 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: pdept ! depth of t-point [m] |
---|
46 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: ptmask ! t-point ocean mask [m] |
---|
47 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT( out) :: pts ! T & S fields [Celsius ; g/kg] |
---|
48 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT( out) :: pu ! i-component of the velocity [m/s] |
---|
49 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT( out) :: pv ! j-component of the velocity [m/s] |
---|
50 | REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pssh ! sea-surface height |
---|
51 | ! |
---|
52 | INTEGER :: jk ! dummy loop indices |
---|
53 | !!---------------------------------------------------------------------- |
---|
54 | ! |
---|
55 | IF(lwp) WRITE(numout,*) |
---|
56 | IF(lwp) WRITE(numout,*) 'usr_def_istate : ISOMIP configuration, analytical definition of initial state' |
---|
57 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~ Ocean at rest, with a constant salinity and temperature. ' |
---|
58 | pu (:,:,:) = 1._wp * umask(:,:,:) ! ocean at rest |
---|
59 | pv (:,:,:) = 0._wp * vmask(:,:,:) |
---|
60 | pu (:,:,3:jpkm1) = 0._wp * umask(:,:,3:jpkm1) ! ocean at rest |
---|
61 | pv (:,:,3:jpkm1) = 1._wp * vmask(:,:,3:jpkm1) |
---|
62 | pssh(:,:) = 0._wp |
---|
63 | ! |
---|
64 | ! ! T & S profiles |
---|
65 | pts(:,:,:,jp_tem) = 2 * ptmask(:,:,:) ! ISOMIP configuration : start from constant T+S fields |
---|
66 | pts(:,:,:,jp_sal) = 34 * ptmask(:,:,:) |
---|
67 | |
---|
68 | pts(:,:,3:jpkm1,jp_tem) = 1 * ptmask(:,:,3:jpkm1) ! ISOMIP configuration : start from constant T+S fields |
---|
69 | ! |
---|
70 | END SUBROUTINE usr_def_istate |
---|
71 | |
---|
72 | !!====================================================================== |
---|
73 | END MODULE usrdef_istate |
---|