trcnam_trp.F90 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. MODULE trcnam_trp
  2. !!======================================================================
  3. !! *** MODULE trcnam_trp ***
  4. !! TOP : namelist read options for transport
  5. !!======================================================================
  6. !! History : 1.0 ! 2004-03 (C. Ethe) Original code
  7. !! 2.0 ! 2007-12 (C. Ethe, G. Madec) revised architecture
  8. !!----------------------------------------------------------------------
  9. #if defined key_top
  10. !!----------------------------------------------------------------------
  11. !! 'key_top' TOP models
  12. !!----------------------------------------------------------------------
  13. !! trc_nam_trp : read the passive tracer namelist for transport
  14. !!----------------------------------------------------------------------
  15. USE trc ! passive tracers variables
  16. USE in_out_manager ! ocean dynamics and active tracers variables
  17. USE lib_mpp ! distributed memory computing library
  18. IMPLICIT NONE
  19. PRIVATE
  20. PUBLIC trc_nam_trp ! routine called by step module
  21. ! !!: ** Advection (namtrc_adv) **
  22. LOGICAL , PUBLIC :: ln_trcadv_cen2 ! 2nd order centered scheme flag
  23. LOGICAL , PUBLIC :: ln_trcadv_tvd ! TVD scheme flag
  24. LOGICAL , PUBLIC :: ln_trcadv_muscl ! MUSCL scheme flag
  25. LOGICAL , PUBLIC :: ln_trcadv_muscl2 ! MUSCL2 scheme flag
  26. LOGICAL , PUBLIC :: ln_trcadv_ubs ! UBS scheme flag
  27. LOGICAL , PUBLIC :: ln_trcadv_qck ! QUICKEST scheme flag
  28. LOGICAL , PUBLIC :: ln_trcadv_msc_ups ! use upstream scheme within muscl
  29. ! !!: ** lateral mixing namelist (nam_trcldf) **
  30. LOGICAL , PUBLIC :: ln_trcldf_lap !: laplacian operator
  31. LOGICAL , PUBLIC :: ln_trcldf_bilap !: bilaplacian operator
  32. LOGICAL , PUBLIC :: ln_trcldf_level !: iso-level direction
  33. LOGICAL , PUBLIC :: ln_trcldf_hor !: horizontal (geopotential) direction
  34. LOGICAL , PUBLIC :: ln_trcldf_iso !: iso-neutral direction
  35. REAL(wp), PUBLIC :: rn_ahtrc_0 !: diffusivity coefficient for passive tracer (m2/s)
  36. REAL(wp), PUBLIC :: rn_ahtrb_0 !: background diffusivity coefficient for passive tracer (m2/s)
  37. REAL(wp), PUBLIC :: rn_fact_lap !: Enhanced zonal diffusivity coefficent in the equatorial domain
  38. ! !!: ** Treatment of Negative concentrations ( nam_trcrad )
  39. LOGICAL , PUBLIC :: ln_trcrad !: flag to artificially correct negative concentrations
  40. ! !!: ** Vertical diffusion (nam_trczdf) **
  41. LOGICAL , PUBLIC :: ln_trczdf_exp !: explicit vertical diffusion scheme flag
  42. INTEGER , PUBLIC :: nn_trczdf_exp !: number of sub-time step (explicit time stepping)
  43. ! !!: ** newtonian damping namelist (nam_trcdmp) **
  44. ! !!* Namelist namtrc_dmp : passive tracer newtonian damping *
  45. INTEGER , PUBLIC :: nn_zdmp_tr ! = 0/1/2 flag for damping in the mixed layer
  46. CHARACTER(LEN=200) , PUBLIC :: cn_resto_tr !File containing restoration coefficient
  47. !!----------------------------------------------------------------------
  48. !! NEMO/TOP 3.3 , NEMO Consortium (2010)
  49. !! $Id: trcnam_trp.F90 4624 2014-04-28 12:09:03Z acc $
  50. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  51. !!----------------------------------------------------------------------
  52. CONTAINS
  53. SUBROUTINE trc_nam_trp
  54. !!----------------------------------------------------------------------
  55. !! *** ROUTINE trc_nam_trp ***
  56. !!
  57. !! ** Purpose : Read Namelist for tracer transport option
  58. !!----------------------------------------------------------------------
  59. INTEGER :: ios ! Local integer output status for namelist read
  60. NAMELIST/namtrc_adv/ ln_trcadv_cen2 , ln_trcadv_tvd , &
  61. & ln_trcadv_muscl, ln_trcadv_muscl2, &
  62. & ln_trcadv_ubs , ln_trcadv_qck, ln_trcadv_msc_ups
  63. NAMELIST/namtrc_ldf/ ln_trcldf_lap , &
  64. & ln_trcldf_bilap, ln_trcldf_level, &
  65. & ln_trcldf_hor , ln_trcldf_iso , rn_ahtrc_0, rn_ahtrb_0, &
  66. & rn_fact_lap
  67. NAMELIST/namtrc_zdf/ ln_trczdf_exp , nn_trczdf_exp
  68. NAMELIST/namtrc_rad/ ln_trcrad
  69. NAMELIST/namtrc_dmp/ nn_zdmp_tr , cn_resto_tr
  70. !!----------------------------------------------------------------------
  71. IF(lwp) WRITE(numout,*)
  72. IF(lwp) WRITE(numout,*) ' trc_nam_trp: read namelist for tracer transport'
  73. IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~'
  74. REWIND( numnat_ref ) ! Namelist namtrc_adv in reference namelist : Tracer advection scheme
  75. READ ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901)
  76. 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in reference namelist', lwp )
  77. REWIND( numnat_cfg ) ! Namelist namtrc_adv in configuration namelist : Tracer advection scheme
  78. READ ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 )
  79. 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist', lwp )
  80. IF(lwm) WRITE ( numont, namtrc_adv )
  81. IF(lwp) THEN ! Namelist print
  82. WRITE(numout,*)
  83. WRITE(numout,*) 'trc_adv_ctl : choice/control of the tracer advection scheme'
  84. WRITE(numout,*) '~~~~~~~~~~~'
  85. WRITE(numout,*) ' Namelist namtrc_adv : chose a advection scheme for tracers'
  86. WRITE(numout,*) ' 2nd order advection scheme ln_trcadv_cen2 = ', ln_trcadv_cen2
  87. WRITE(numout,*) ' TVD advection scheme ln_trcadv_tvd = ', ln_trcadv_tvd
  88. WRITE(numout,*) ' MUSCL advection scheme ln_trcadv_muscl = ', ln_trcadv_muscl
  89. WRITE(numout,*) ' MUSCL2 advection scheme ln_trcadv_muscl2 = ', ln_trcadv_muscl2
  90. WRITE(numout,*) ' UBS advection scheme ln_trcadv_ubs = ', ln_trcadv_ubs
  91. WRITE(numout,*) ' QUICKEST advection scheme ln_trcadv_qck = ', ln_trcadv_qck
  92. ENDIF
  93. !
  94. REWIND( numnat_ref ) ! Namelist namtrc_ldf in reference namelist : Tracer lateral diffusive operator
  95. READ ( numnat_ref, namtrc_ldf, IOSTAT = ios, ERR = 903)
  96. 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist', lwp )
  97. REWIND( numnat_cfg ) ! Namelist namtrc_ldf in configuration namelist : Tracer lateral diffusive operator
  98. READ ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 )
  99. 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist', lwp )
  100. IF(lwm) WRITE ( numont, namtrc_ldf )
  101. IF(lwp) THEN ! Namelist print
  102. WRITE(numout,*)
  103. WRITE(numout,*) 'trc:ldf_ctl : lateral tracer diffusive operator'
  104. WRITE(numout,*) '~~~~~~~~~~~'
  105. WRITE(numout,*) ' Namelist namtrc_ldf : set lateral mixing parameters (type, direction, coefficients)'
  106. WRITE(numout,*) ' laplacian operator ln_trcldf_lap = ', ln_trcldf_lap
  107. WRITE(numout,*) ' bilaplacian operator ln_trcldf_bilap = ', ln_trcldf_bilap
  108. WRITE(numout,*) ' iso-level ln_trcldf_level = ', ln_trcldf_level
  109. WRITE(numout,*) ' horizontal (geopotential) ln_trcldf_hor = ', ln_trcldf_hor
  110. WRITE(numout,*) ' iso-neutral ln_trcldf_iso = ', ln_trcldf_iso
  111. WRITE(numout,*) ' diffusivity coefficient rn_ahtrc_0 = ', rn_ahtrc_0
  112. WRITE(numout,*) ' background hor. diffusivity rn_ahtrb_0 = ', rn_ahtrb_0
  113. WRITE(numout,*) ' enhanced zonal diffusivity rn_fact_lap = ', rn_fact_lap
  114. ENDIF
  115. ! ! Vertical mixing
  116. REWIND( numnat_ref ) ! Namelist namtrc_zdf in reference namelist : Tracer vertical mixing
  117. READ ( numnat_ref, namtrc_zdf, IOSTAT = ios, ERR = 905)
  118. 905 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in reference namelist', lwp )
  119. REWIND( numnat_cfg ) ! Namelist namtrc_zdf in configuration namelist : Tracer vertical mixing
  120. READ ( numnat_cfg, namtrc_zdf, IOSTAT = ios, ERR = 906 )
  121. 906 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in configuration namelist', lwp )
  122. IF(lwm) WRITE ( numont, namtrc_zdf )
  123. IF(lwp) THEN ! ! Control print
  124. WRITE(numout,*)
  125. WRITE(numout,*) ' Namelist namtrc_zdf : set vertical diffusion parameters'
  126. WRITE(numout,*) ' time splitting / backward scheme ln_trczdf_exp = ', ln_trczdf_exp
  127. WRITE(numout,*) ' number of time step nn_trczdf_exp = ', nn_trczdf_exp
  128. ENDIF
  129. !
  130. REWIND( numnat_ref ) ! Namelist namtrc_rad in reference namelist : Tracer negative concentrations
  131. READ ( numnat_ref, namtrc_rad, IOSTAT = ios, ERR = 907)
  132. 907 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in reference namelist', lwp )
  133. REWIND( numnat_cfg ) ! Namelist namtrc_rad in configuration namelist : Tracer negative concentrations
  134. READ ( numnat_cfg, namtrc_rad, IOSTAT = ios, ERR = 908 )
  135. 908 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist', lwp )
  136. IF(lwm) WRITE ( numont, namtrc_rad )
  137. IF(lwp) THEN ! ! Control print
  138. WRITE(numout,*)
  139. WRITE(numout,*) ' Namelist namtrc_rad : treatment of negative concentrations'
  140. WRITE(numout,*) ' correct artificially negative concen. or not ln_trcrad = ', ln_trcrad
  141. ENDIF
  142. REWIND( numnat_ref ) ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping
  143. READ ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909)
  144. 909 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist', lwp )
  145. REWIND( numnat_cfg ) ! Namelist namtrc_dmp in configuration namelist : Passive tracers newtonian damping
  146. READ ( numnat_cfg, namtrc_dmp, IOSTAT = ios, ERR = 910)
  147. 910 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist', lwp )
  148. IF(lwm) WRITE ( numont, namtrc_dmp )
  149. IF(lwp) THEN ! Namelist print
  150. WRITE(numout,*)
  151. WRITE(numout,*) 'trc_dmp : Passive tracers newtonian damping'
  152. WRITE(numout,*) '~~~~~~~'
  153. WRITE(numout,*) ' Namelist namtrc_dmp : set damping parameter'
  154. WRITE(numout,*) ' mixed layer damping option nn_zdmp_tr = ', nn_zdmp_tr, '(zoom: forced to 0)'
  155. WRITE(numout,*) ' Restoration coeff file cn_resto_tr = ', cn_resto_tr
  156. ENDIF
  157. !
  158. END SUBROUTINE trc_nam_trp
  159. #else
  160. !!----------------------------------------------------------------------
  161. !! Dummy module : No TOP model
  162. !!----------------------------------------------------------------------
  163. CONTAINS
  164. SUBROUTINE trc_nam_trp ! Empty routine
  165. END SUBROUTINE trc_nam_trp
  166. #endif
  167. !!======================================================================
  168. END MODULE trcnam_trp