[7715] | 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 |
---|
[14053] | 11 | !! ! 2020-11 (S. Techene, G. Madec) separate tsuv from ssh |
---|
[7715] | 12 | !!---------------------------------------------------------------------- |
---|
| 13 | |
---|
| 14 | !!---------------------------------------------------------------------- |
---|
| 15 | !! usr_def_istate : initial state in Temperature and salinity |
---|
| 16 | !!---------------------------------------------------------------------- |
---|
| 17 | USE par_oce ! ocean space and time domain |
---|
| 18 | USE dom_oce , ONLY : glamt |
---|
| 19 | USE phycst ! physical constants |
---|
| 20 | ! |
---|
| 21 | USE in_out_manager ! I/O manager |
---|
| 22 | USE lib_mpp ! MPP library |
---|
| 23 | |
---|
| 24 | IMPLICIT NONE |
---|
| 25 | PRIVATE |
---|
| 26 | |
---|
[14053] | 27 | PUBLIC usr_def_istate ! called by istate.F90 |
---|
| 28 | PUBLIC usr_def_istate_ssh ! called by domqco.F90 |
---|
[7715] | 29 | |
---|
| 30 | !!---------------------------------------------------------------------- |
---|
[10073] | 31 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
[7715] | 32 | !! $Id$ |
---|
[10073] | 33 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[7715] | 34 | !!---------------------------------------------------------------------- |
---|
| 35 | CONTAINS |
---|
| 36 | |
---|
[14053] | 37 | SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) |
---|
[7715] | 38 | !!---------------------------------------------------------------------- |
---|
| 39 | !! *** ROUTINE usr_def_istate *** |
---|
| 40 | !! |
---|
| 41 | !! ** Purpose : Initialization of the dynamics and tracers |
---|
| 42 | !! Here ISOMIP configuration |
---|
| 43 | !! |
---|
| 44 | !! ** Method : - set temperature field |
---|
| 45 | !! - set salinity field |
---|
| 46 | !!---------------------------------------------------------------------- |
---|
| 47 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: pdept ! depth of t-point [m] |
---|
| 48 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: ptmask ! t-point ocean mask [m] |
---|
| 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 | ! |
---|
| 54 | IF(lwp) WRITE(numout,*) |
---|
| 55 | IF(lwp) WRITE(numout,*) 'usr_def_istate : ISOMIP configuration, analytical definition of initial state' |
---|
| 56 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~ Ocean at rest, with a constant salinity and temperature. ' |
---|
| 57 | pu (:,:,:) = 0._wp ! ocean at rest |
---|
| 58 | pv (:,:,:) = 0._wp |
---|
| 59 | ! ! T & S profiles |
---|
| 60 | pts(:,:,:,jp_tem) = - 1.9 * ptmask(:,:,:) ! ISOMIP configuration : start from constant T+S fields |
---|
| 61 | pts(:,:,:,jp_sal) = 34.4 * ptmask(:,:,:) |
---|
| 62 | ! |
---|
| 63 | END SUBROUTINE usr_def_istate |
---|
| 64 | |
---|
[14053] | 65 | |
---|
| 66 | SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) |
---|
| 67 | !!---------------------------------------------------------------------- |
---|
| 68 | !! *** ROUTINE usr_def_istate_ssh *** |
---|
| 69 | !! |
---|
| 70 | !! ** Purpose : Initialization of ssh |
---|
| 71 | !! Here ISOMIP configuration |
---|
| 72 | !! |
---|
| 73 | !! ** Method : set ssh to 0 |
---|
| 74 | !!---------------------------------------------------------------------- |
---|
| 75 | REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT(in ) :: ptmask ! t-point ocean mask [m] |
---|
| 76 | REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pssh ! sea-surface height [m] |
---|
| 77 | !!---------------------------------------------------------------------- |
---|
| 78 | ! |
---|
| 79 | IF(lwp) WRITE(numout,*) |
---|
| 80 | IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : ISOMIP configuration, analytical definition of initial state' |
---|
| 81 | ! |
---|
| 82 | pssh(:,:) = 0._wp |
---|
| 83 | ! |
---|
| 84 | END SUBROUTINE usr_def_istate_ssh |
---|
| 85 | |
---|
[7715] | 86 | !!====================================================================== |
---|
| 87 | END MODULE usrdef_istate |
---|