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 @ 13503

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

files copied from dev_r12527_Gurvan_ShallowWater see #2385

File size: 3.1 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   !!----------------------------------------------------------------------
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/OCE 4.0 , NEMO Consortium (2018)
28   !! $Id: usrdef_istate.F90 10069 2018-08-28 14:12:24Z nicolasmartin $
29   !! Software governed by the CeCILL license (see ./LICENSE)
30   !!----------------------------------------------------------------------
31CONTAINS
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 AM98 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!!an   
61       IF(lwp) WRITE(numout,*) "end istate"
62        call flush(numout)
63
64      !   
65   END SUBROUTINE usr_def_istate
66
67   !!======================================================================
68END MODULE usrdef_istate
Note: See TracBrowser for help on using the repository browser.