source: trunk/NEMO/OPA_SRC/LDF/ldfdyn_c1d.h90 @ 1152

Last change on this file since 1152 was 1152, checked in by rblod, 12 years ago

Convert cvs header to svn Id, step II

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1   !!----------------------------------------------------------------------
2   !!                     ***  ldfdyn_c1d.h90  ***
3   !!----------------------------------------------------------------------
4
5   !!----------------------------------------------------------------------
6   !!   OPA 9.0 , LOCEAN-IPSL (2005)
7   !! $Id$
8   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
9   !!----------------------------------------------------------------------
10
11   SUBROUTINE ldf_dyn_c1d( ld_print )
12      !!----------------------------------------------------------------------
13      !!                  ***  ROUTINE ldf_dyn_c1d  ***
14      !!                   
15      !! ** Purpose :   initializations of the horizontal ocean physics
16      !!
17      !! ** Method  :   1D eddy viscosity coefficients ( depth )
18      !!      ahm3, ahm4 never used
19      !!      biharmonic or harmonic operator : ahm1=ahm2 defined at T-level
20      !!      isopycnal or geopotential harmonic operator
21      !!                                      : ahm1 defined at T-level
22      !!                                      : ahm2 defined at w-level
23      !!
24      !!----------------------------------------------------------------------
25      !! * Arguments
26      LOGICAL, INTENT (in) :: ld_print   ! If true, output arrays on numout
27
28      !! * Local variables
29      REAL(wp) ::   zdam, zwam, zm00, zm01, zmhf, zmhs
30      REAL(wp) ::   zahmf, zahms
31      !!----------------------------------------------------------------------
32
33      IF(lwp) WRITE(numout,*)
34      IF(lwp) WRITE(numout,*) 'inildf: 1D eddy viscosity coefficient'
35      IF(lwp) WRITE(numout,*) '~~~~~~  --'
36      IF(lwp) WRITE(numout,*)
37
38      ! Set ahm1=ahm2   (always at t-level)
39      ! =============
40      ! (USER: modify ahm1 following your desiderata)
41
42      ! initialization of the profile
43      ! ahms, ahmf: surface and bottom values
44      zahms = ahm0
45      zahmf = ahm0/4.
46      ! zdam, zwam: depth of the inflection pt and width of inflection
47      zdam  = -300.
48      zwam  =  300.
49      ! computation coefficients
50      zm00 = TANH( (0-zdam)/zwam )
51      zm01 = TANH( (-fsdept(1,1,jpk)-zdam)/zwam )
52      zmhf = (zahms-zahmf)/(zm00-zm01)
53      zmhs = zahms-zmhf * zm00
54
55      ! set ahm1=ahm2 at T-level
56      DO jk = 1, jpk
57         ahm1(jk) = zmhs + zmhf * TANH( (-fsdept(1,1,jk)-zdam) / zwam )
58         ahm2(jk) = ahm1(jk)
59      END DO
60
61      ! Control print
62      IF(lwp .AND. ld_print ) THEN
63         WRITE(numout,*)
64         WRITE(numout,*) '         ahm profile : '
65         WRITE(numout,*)
66         WRITE(numout,9100)
67         DO jk = 1, jpk
68            WRITE(numout,9110) jk, ahm1(jk), fsdept(1,1,jk)
69         END DO
70      ENDIF
71 9100 FORMAT('  jk      ahm       ','  depth t-level ' )
72 9110 FORMAT(i6,2f12.4,3x,2f12.4)
73
74
75      ! Set ahm3=ahm4   (always defined at w-level)
76      ! =============
77
78      ! define ahm3 from the same vertical profile used for ahm4
79      ! (always defined at w-level)
80      ! (USER: modify ahm1 following your desiderata)
81
82      DO jk = 1, jpk
83         ahm3(jk) = zmhs + zmhf * TANH( (-fsdepw(1,1,jk)-zdam) / zwam )
84         ahm4(jk) = ahm3(jk)
85      END DO
86
87      ! Control print
88      IF(lwp .AND. ld_print ) THEN
89         WRITE(numout,*)
90         WRITE(numout,*) '         ahm3=ahm4 profile : '
91         WRITE(numout,*)
92         WRITE(numout,9120)
93         DO jk = 1, jpk
94            WRITE(numout,9110) jk, ahm3(jk), fsdepw(1,1,jk)
95         END DO
96      ENDIF
97 9120 FORMAT('  jk      ahm       ','  depth w-level ' )
98
99   END SUBROUTINE ldf_dyn_c1d
Note: See TracBrowser for help on using the repository browser.