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_r13723_KERNEL-01_Amy_Mike_newHPGschemes/tests/ISOMIP/MY_SRC – NEMO

source: NEMO/branches/2020/dev_r13723_KERNEL-01_Amy_Mike_newHPGschemes/tests/ISOMIP/MY_SRC/usrdef_istate.F90 @ 14058

Last change on this file since 14058 was 14058, checked in by ayoung, 3 years ago

Updating to trunk revision 14057. No conflicts since last sette test. Ticket #2480.

  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1MODULE 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   !!                 ! 2020-11 (S. Techene, G. Madec) separate tsuv from ssh
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
27   PUBLIC   usr_def_istate       ! called by istate.F90
28   PUBLIC   usr_def_istate_ssh   ! called by domqco.F90
29
30   !!----------------------------------------------------------------------
31   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
32   !! $Id$
33   !! Software governed by the CeCILL license (see ./LICENSE)
34   !!----------------------------------------------------------------------
35CONTAINS
36 
37   SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv )
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
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
86   !!======================================================================
87END MODULE usrdef_istate
Note: See TracBrowser for help on using the repository browser.