-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdomstp.F90
111 lines (93 loc) · 4.87 KB
/
domstp.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
MODULE domstp
!!==============================================================================
!! *** MODULE domstp ***
!! Ocean initialization : time domain
!!==============================================================================
!!----------------------------------------------------------------------
!! dom_stp : ocean time domain initialization
!!----------------------------------------------------------------------
!! History : OPA ! 1990-10 (O. Marti) Original code
!! ! 1996-01 (G. Madec) terrain following coordinates
!! NEMO 1.0 ! 2002-08 (G. Madec) F90: Free form and module
!!----------------------------------------------------------------------
USE oce ! ocean dynamics and tracers
USE dom_oce ! ocean space and time domain
USE in_out_manager ! I/O manager
USE lib_mpp ! MPP library
IMPLICIT NONE
PRIVATE
PUBLIC dom_stp ! routine called by inidom.F90
!! * Substitutions
# include "domzgr_substitute.h90"
!!----------------------------------------------------------------------
!! NEMO/OPA 3.3 , NEMO Consortium (2010)
!! $Id$
!! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE dom_stp
!!----------------------------------------------------------------------
!! *** ROUTINE dom_stp ***
!!
!! ** Purpose : Intialize ocean time step for the run
!!
!! ** Method : - Initialization of a coef. use in the Asselin time
!! filter: atfp1 = 1 - 2 * atfp where atfp is the Asselin time
!! filter parameter read in namelist
!! - Model time step:
!! nacc = 0 : synchronous time intergration.
!! There is one time step only, defined by: rdt, rdttra(k)=rdt
!! nacc = 1 : accelerating the convergence. There is 2 different
!! time steps for dynamics and tracers:
!! rdt : dynamical part
!! rdttra(k): temperature and salinity
!! The tracer time step is a function of vertical level. the model
!! reference time step ( i.e. for wind stress, surface heat and
!! salt fluxes) is the surface tracer time step is rdttra(1).
!! N.B. depth dependent acceleration of convergence is not im-
!! plemented for s-coordinate.
!!
!! ** Action : - rdttra : vertical profile of tracer time step
!! - atfp1 : = 1 - 2*atfp
!!
!! References : Bryan, K., 1984, J. Phys. Oceanogr., 14, 666-673.
!!----------------------------------------------------------------------
INTEGER :: jk ! dummy loop indice
!!----------------------------------------------------------------------
IF(lwp) THEN
WRITE(numout,*)
WRITE(numout,*) 'dom_stp : time stepping setting'
WRITE(numout,*) '~~~~~~~'
ENDIF
! 0. Asselin Time filter
! ----------------------
atfp1 = 1. - 2. * atfp
SELECT CASE ( nacc )
CASE ( 0 ) ! Synchronous time stepping
IF(lwp) WRITE(numout,*)' synchronous time stepping'
IF(lwp) WRITE(numout,*)' dynamics and tracer time step = ', rdt/3600., ' hours'
rdttra(:) = rdt
CASE ( 1 ) ! Accelerating the convergence
IF(lwp) WRITE(numout,*) ' no tracer damping in the turbocline'
IF(lwp) WRITE(numout,*)' accelerating the convergence'
IF(lwp) WRITE(numout,*)' dynamics time step = ', rdt/3600., ' hours'
IF( ln_sco .AND. rdtmin /= rdtmax .AND. lk_vvl ) &
& CALL ctl_stop ( ' depth dependent acceleration of convergence not implemented in s-coordinates &
& nor in variable volume' )
IF(lwp) WRITE(numout,*)' tracers time step : dt (hours) level'
DO jk = 1, jpk
IF( gdept_1d(jk) <= rdth ) rdttra(jk) = rdtmin
IF( gdept_1d(jk) > rdth ) THEN
rdttra(jk) = rdtmin + ( rdtmax - rdtmin ) &
* ( EXP( ( gdept_1d(jk ) - rdth ) / rdth ) - 1. ) &
/ ( EXP( ( gdept_1d(jpk) - rdth ) / rdth ) - 1. )
ENDIF
IF(lwp) WRITE(numout,"(36x,f5.2,5x,i3)") rdttra(jk)/3600., jk
END DO
CASE DEFAULT ! E R R O R
WRITE(ctmp1,*) ' nacc value e r r o r, nacc= ',nacc
CALL ctl_stop( ctmp1 )
END SELECT
END SUBROUTINE dom_stp
!!======================================================================
END MODULE domstp