New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
usrdef_istate.F90 in NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/tests/AM98/MY_SRC – NEMO

source: NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/tests/AM98/MY_SRC/usrdef_istate.F90 @ 13599

Last change on this file since 13599 was 13599, checked in by techene, 4 years ago

#2385 add some comments and cleaning

File size: 3.3 KB
Line 
1MODULE usrdef_istate
2   !!======================================================================
3   !!                   ***  MODULE  usrdef_istate   ***
4   !!
5   !!                     ===  AM98 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   !!----------------------------------------------------------------------
12
13   !!----------------------------------------------------------------------
14   !!  usr_def_istate : initial state in Temperature and salinity
15   !!----------------------------------------------------------------------
16   USE par_oce        ! ocean space and time domain master parameters
17   USE phycst         ! physical constants
18   !
19   USE in_out_manager ! I/O manager
20   USE lib_mpp        ! MPP library
21
22   IMPLICIT NONE
23   PRIVATE
24
25   PUBLIC   usr_def_istate   ! called in istate.F90
26
27   !!----------------------------------------------------------------------
28   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
29   !! $Id: usrdef_istate.F90 10069 2018-08-28 14:12:24Z nicolasmartin $
30   !! Software governed by the CeCILL license (see ./LICENSE)
31   !!----------------------------------------------------------------------
32CONTAINS
33 
34   SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh )
35      !!----------------------------------------------------------------------
36      !!                   ***  ROUTINE usr_def_istate  ***
37      !!
38      !! ** Purpose :   Initialization of the dynamics and tracers
39      !!                Here AM98 configuration example : (double gyre with rotated domain)
40      !!
41      !! ** Method  : - set temprature field
42      !!              - set salinity   field
43      !!----------------------------------------------------------------------
44      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   pdept   ! depth of t-point               [m]
45      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   ptmask  ! t-point ocean mask             [m]
46      !
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 :: ji, jj, jk  ! dummy loop indices
53      !!----------------------------------------------------------------------
54      !
55      IF(lwp) WRITE(numout,*)
56      IF(lwp) WRITE(numout,*) 'usr_def_istate : analytical definition of initial state '
57      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~   Ocean at rest, with an horizontally uniform T and S profiles'
58      !
59      pu  (:,:,:)   = 0._wp        ! ocean at rest
60      pv  (:,:,:)   = 0._wp
61      pssh(:,:)     = 0._wp
62      ts  (:,:,:,:) = 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   !!======================================================================
70END MODULE usrdef_istate
Note: See TracBrowser for help on using the repository browser.