trcnam_age.F90 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. MODULE trcnam_age
  2. !!======================================================================
  3. !! *** MODULE trcnam_age ***
  4. !! TOP : initialisation of some run parameters for Age tracer
  5. !!======================================================================
  6. !! History : 2.0 ! 2007-12 (C. Ethe, G. Madec)
  7. !!----------------------------------------------------------------------
  8. #if defined key_age
  9. !!----------------------------------------------------------------------
  10. !! 'key_age' AGE tracers
  11. !!----------------------------------------------------------------------
  12. !! trc_nam_age : AGE tracer initialisation
  13. !!----------------------------------------------------------------------
  14. USE oce_trc ! Ocean variables
  15. USE trcsms_age ! AGE specific variable
  16. USE trc
  17. IMPLICIT NONE
  18. PRIVATE
  19. PUBLIC trc_nam_age ! called by trcnam.F90 module
  20. !!----------------------------------------------------------------------
  21. !! NEMO/TOP 3.3 , NEMO Consortium (2010)
  22. !! $Id: trcnam_age.F90 4578 2017-09-25 09:34:12Z ufla $
  23. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  24. !!----------------------------------------------------------------------
  25. CONTAINS
  26. SUBROUTINE trc_nam_age
  27. !!-------------------------------------------------------------------
  28. !! *** ROUTINE trc_nam_age ***
  29. !!
  30. !! ** Purpose : Definition some run parameter for AGE model
  31. !!
  32. !! ** input : Namelist namage
  33. !!----------------------------------------------------------------------
  34. INTEGER :: numnatg_ref = -1 ! Logical unit for reference AGE namelist
  35. INTEGER :: numnatg_cfg = -1 ! Logical unit for configuration AGE namelist
  36. INTEGER :: numong = -1 ! Logical unit for output namelist
  37. INTEGER :: ios ! Local integer output status for namelist read
  38. INTEGER :: jl, jn
  39. !!
  40. NAMELIST/namage/ rn_age_depth, rn_age_kill_rate
  41. !!----------------------------------------------------------------------
  42. ! Variable setting
  43. ctrcnm (jp_age0) = 'Age'
  44. ctrcln (jp_age0) = 'Sea water age since surface contact'
  45. ctrcun (jp_age0) = 'year'
  46. ln_trc_ini(jp_age0) = .false.
  47. ! ! Open namelist files
  48. CALL ctl_opn( numnatg_ref, 'namelist_age_ref' , 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
  49. CALL ctl_opn( numnatg_cfg, 'namelist_age_cfg' , 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
  50. IF(lwm) CALL ctl_opn( numong, 'output.namelist.age', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
  51. REWIND( numnatg_ref ) ! Namelist namagedate in reference namelist : AGE parameters
  52. READ ( numnatg_ref, namage, IOSTAT = ios, ERR = 901)
  53. 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namage in reference namelist', lwp )
  54. REWIND( numnatg_cfg ) ! Namelist namagedate in configuration namelist : AGE parameters
  55. READ ( numnatg_cfg, namage, IOSTAT = ios, ERR = 902 )
  56. 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namage in configuration namelist', lwp )
  57. IF(lwm) WRITE ( numong, namage )
  58. IF(lwp) THEN ! control print
  59. WRITE(numout,*)
  60. WRITE(numout,*) ' trc_nam_age: Read namage, namelist for Age passive tracer'
  61. WRITE(numout,*) ' ~~~~~~~'
  62. WRITE(numout,*) ' depth over which age tracer reset to zero rn_age_depth = ', rn_age_depth
  63. WRITE(numout,*) ' recip of relax. timescale (s) for age tracer shallower than age_depth rn_age_kill_rate = ', rn_age_kill_rate
  64. ENDIF
  65. IF(lwm) CALL FLUSH ( numong ) ! flush output namelist
  66. END SUBROUTINE trc_nam_age
  67. #else
  68. !!----------------------------------------------------------------------
  69. !! Dummy module : No AGE
  70. !!----------------------------------------------------------------------
  71. CONTAINS
  72. SUBROUTINE trc_nam_age ! Empty routine
  73. END SUBROUTINE trc_nam_age
  74. #endif
  75. !!======================================================================
  76. END MODULE trcnam_age