[13503] | 1 | MODULE usrdef_istate |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE usrdef_istate *** |
---|
| 4 | !! |
---|
[13752] | 5 | !! === SWG configuration === |
---|
[13503] | 6 | !! |
---|
| 7 | !! User defined : set the initial state of a user configuration |
---|
| 8 | !!====================================================================== |
---|
[13599] | 9 | !! History : 4.0 ! 2016-03 (S. Flavoni) Original code |
---|
| 10 | !! - ! 2020-03 (A. Nasser) Shallow Water Eq. configuration |
---|
[13874] | 11 | !! ! 2020-11 (S. Techene, G. Madec) separate tsuv from ssh |
---|
[13503] | 12 | !!---------------------------------------------------------------------- |
---|
| 13 | |
---|
| 14 | !!---------------------------------------------------------------------- |
---|
| 15 | !! usr_def_istate : initial state in Temperature and salinity |
---|
| 16 | !!---------------------------------------------------------------------- |
---|
[13599] | 17 | USE par_oce ! ocean space and time domain master parameters |
---|
[13503] | 18 | USE phycst ! physical constants |
---|
| 19 | ! |
---|
| 20 | USE in_out_manager ! I/O manager |
---|
| 21 | USE lib_mpp ! MPP library |
---|
[13599] | 22 | |
---|
[13503] | 23 | IMPLICIT NONE |
---|
| 24 | PRIVATE |
---|
| 25 | |
---|
[13874] | 26 | PUBLIC usr_def_istate ! called in istate.F90 |
---|
| 27 | PUBLIC usr_def_istate_ssh ! called by domqco.F90 |
---|
[13503] | 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 | |
---|
[13874] | 36 | SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) |
---|
[13503] | 37 | !!---------------------------------------------------------------------- |
---|
| 38 | !! *** ROUTINE usr_def_istate *** |
---|
| 39 | !! |
---|
| 40 | !! ** Purpose : Initialization of the dynamics and tracers |
---|
[13752] | 41 | !! Here SWG configuration example : (double gyre with rotated domain) |
---|
[13503] | 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] |
---|
[13599] | 48 | ! |
---|
[13503] | 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 | ! |
---|
[13599] | 60 | pu (:,:,:) = 0._wp ! ocean at rest |
---|
| 61 | pv (:,:,:) = 0._wp |
---|
[13615] | 62 | pts (:,:,:,:) = 0._wp ! not used in SWE |
---|
[13503] | 63 | |
---|
[13599] | 64 | IF(lwp) WRITE(numout,*) "end istate" |
---|
| 65 | CALL FLUSH(numout) |
---|
[13503] | 66 | ! |
---|
| 67 | END SUBROUTINE usr_def_istate |
---|
| 68 | |
---|
[13762] | 69 | |
---|
[13874] | 70 | SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) |
---|
[13762] | 71 | !!---------------------------------------------------------------------- |
---|
[13874] | 72 | !! *** ROUTINE usr_def_istate_ssh *** |
---|
[13762] | 73 | !! |
---|
| 74 | !! ** Purpose : Initialization of ssh |
---|
| 75 | !! Here SWG configuration |
---|
| 76 | !! |
---|
[13874] | 77 | !! ** Method : set ssh to 0 |
---|
[13762] | 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,*) |
---|
[13874] | 84 | IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : SWG configuration, analytical definition of initial state' |
---|
[13762] | 85 | ! |
---|
| 86 | pssh(:,:) = 0._wp ! ocean at rest |
---|
| 87 | ! |
---|
[13874] | 88 | END SUBROUTINE usr_def_istate_ssh |
---|
[13762] | 89 | |
---|
[13503] | 90 | !!====================================================================== |
---|
| 91 | END MODULE usrdef_istate |
---|