c1d.F90 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. MODULE c1d
  2. !!======================================================================
  3. !! *** MODULE c1d ***
  4. !! Ocean domain : 1D configuration
  5. !!=====================================================================
  6. !! History : 2.0 ! 2004-09 (C. Ethe) Original code
  7. !! 3.0 ! 2008-04 (G. Madec) adaptation to SBC
  8. !! 3.5 ! 2013-10 (D. Calvert) add namelist
  9. !!----------------------------------------------------------------------
  10. #if defined key_c1d
  11. !!----------------------------------------------------------------------
  12. !! 'key_c1d' 1D column configuration
  13. !!----------------------------------------------------------------------
  14. !! c1d_init : read in the C1D namelist
  15. !!----------------------------------------------------------------------
  16. USE in_out_manager ! I/O manager
  17. USE par_kind ! kind parameters
  18. USE lib_mpp
  19. IMPLICIT NONE
  20. PRIVATE
  21. PUBLIC c1d_init ! called by nemogcm.F90
  22. LOGICAL , PUBLIC, PARAMETER :: lk_c1d = .TRUE. ! 1D config. flag
  23. REAL(wp), PUBLIC :: rn_lat1d ! Column latitude
  24. REAL(wp), PUBLIC :: rn_lon1d ! Column longitude
  25. LOGICAL , PUBLIC :: ln_c1d_locpt ! Localization (or not) of 1D column in a grid
  26. !!----------------------------------------------------------------------
  27. !! NEMO/C1D 3.3 , NEMO Consortium (2010)
  28. !! $Id: c1d.F90 2355 2015-05-20 07:11:50Z ufla $
  29. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  30. !!======================================================================
  31. CONTAINS
  32. SUBROUTINE c1d_init
  33. !!----------------------------------------------------------------------
  34. !! *** ROUTINE c1d_init ***
  35. !!
  36. !! ** Purpose : Initialization of C1D options
  37. !!
  38. !! ** Method : Read namelist namc1d
  39. !!----------------------------------------------------------------------
  40. INTEGER :: ios ! Local integer output status for namelist read
  41. NAMELIST/namc1d/ rn_lat1d, rn_lon1d , ln_c1d_locpt
  42. !!----------------------------------------------------------------------
  43. !
  44. REWIND( numnam_ref ) ! Namelist namc1d in reference namelist : Tracer advection scheme
  45. READ ( numnam_ref, namc1d, IOSTAT = ios, ERR = 901)
  46. 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d in reference namelist', lwp )
  47. REWIND( numnam_cfg ) ! Namelist namtra_adv in configuration namelist : Tracer advection scheme
  48. READ ( numnam_cfg, namc1d, IOSTAT = ios, ERR = 902 )
  49. 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d in configuration namelist', lwp )
  50. IF(lwm) WRITE ( numond, namc1d )
  51. !
  52. IF(lwp) THEN ! Control print
  53. WRITE(numout,*)
  54. WRITE(numout,*) 'c1d_init : Initialize 1D model configuration options'
  55. WRITE(numout,*) '~~~~~~~~'
  56. WRITE(numout,*) ' Namelist namc1d : set options for the C1D model'
  57. WRITE(numout,*) ' column latitude rn_lat1d = ', rn_lat1d
  58. WRITE(numout,*) ' column longitude rn_lon1d = ', rn_lon1d
  59. WRITE(numout,*) ' column localization in a grid ln_c1d_locpt = ', ln_c1d_locpt
  60. ENDIF
  61. !
  62. !
  63. END SUBROUTINE c1d_init
  64. #else
  65. !!----------------------------------------------------------------------
  66. !! Dummy module : No use of 1D configuration
  67. !!----------------------------------------------------------------------
  68. USE par_kind ! kind parameters
  69. LOGICAL, PUBLIC, PARAMETER :: lk_c1d = .FALSE. !: 1D config. flag de-activated
  70. REAL(wp) :: rn_lat1d, rn_lon1d
  71. LOGICAL , PUBLIC :: ln_c1d_locpt = .FALSE.
  72. CONTAINS
  73. SUBROUTINE c1d_init ! Dummy routine
  74. END SUBROUTINE c1d_init
  75. #endif
  76. !!======================================================================
  77. END MODULE c1d