domstp.F90 4.9 KB

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