SCALE-RM
mod_ocean_admin.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
9 !-------------------------------------------------------------------------------
10 #include "scalelib.h"
12  !-----------------------------------------------------------------------------
13  !
14  !++ used modules
15  !
16  use scale_precision
17  use scale_io
18  use scale_prof
19  !-----------------------------------------------------------------------------
20  implicit none
21  private
22  !-----------------------------------------------------------------------------
23  !
24  !++ Public procedure
25  !
26  public :: ocean_admin_setup
27 
28  !-----------------------------------------------------------------------------
29  !
30  !++ Public parameters & variables
31  !
32  logical, public :: ocean_do = .true. ! main switch for the model
33 
34  character(len=H_SHORT), public :: ocean_dyn_type = 'NONE'
35  ! 'OFF'
36  ! 'SLAB'
37  ! 'OFFLINE'
38  ! 'INIT'
39  character(len=H_SHORT), public :: ocean_sfc_type = 'FIXED-TEMP'
40  character(len=H_SHORT), public :: ocean_ice_type = 'NONE'
41  ! 'SIMPLE'
42  ! 'INIT'
43  character(len=H_SHORT), public :: ocean_alb_type = 'NAKAJIMA00'
44  ! 'INIT'
45  character(len=H_SHORT), public :: ocean_rgn_type = 'MOON07'
46  ! 'MILLER92'
47  ! 'INIT'
48 
49  !-----------------------------------------------------------------------------
50  !
51  !++ Private procedure
52  !
53  !-----------------------------------------------------------------------------
54  !
55  !++ Private parameters & variables
56  !
57  !-----------------------------------------------------------------------------
58 contains
59  !-----------------------------------------------------------------------------
61  subroutine ocean_admin_setup
62  use scale_prc, only: &
63  prc_abort
64  implicit none
65 
66  namelist / param_ocean / &
72 
73  integer :: ierr
74  !---------------------------------------------------------------------------
75 
76  log_newline
77  log_info("OCEAN_ADMIN_setup",*) 'Setup'
78 
79  !--- read namelist
80  rewind(io_fid_conf)
81  read(io_fid_conf,nml=param_ocean,iostat=ierr)
82  if( ierr < 0 ) then !--- missing
83  log_info("OCEAN_ADMIN_setup",*) 'Not found namelist. Default used.'
84  elseif( ierr > 0 ) then !--- fatal error
85  log_error("OCEAN_ADMIN_setup",*) 'Not appropriate names in namelist PARAM_OCEAN. Check!'
86  call prc_abort
87  endif
88  log_nml(param_ocean)
89 
90  !-----< module component check >-----
91 
92  log_newline
93  log_info("OCEAN_ADMIN_setup",*) 'Ocean model components '
94 
95  if ( ocean_dyn_type /= 'OFF' .AND. ocean_dyn_type /= 'NONE' ) then
96  log_info_cont(*) 'Ocean model : ON, ', trim(ocean_dyn_type)
97  ocean_do = .true.
98  else
99  log_info_cont(*) 'Ocean model : OFF'
100  ocean_do = .false.
101  endif
102 
103  if ( ocean_do ) then
104 
105  log_info_cont(*) '+ Ocean surface model : ', trim(ocean_sfc_type)
106  log_info_cont(*) '+ Ocean ice model : ', trim(ocean_ice_type)
107  log_info_cont(*) '+ Ocean albedo model : ', trim(ocean_alb_type)
108  log_info_cont(*) '+ Ocean roughness model : ', trim(ocean_rgn_type)
109 
110  end if
111 
112  return
113  end subroutine ocean_admin_setup
114 
115 end module mod_ocean_admin
character(len=h_short), public ocean_sfc_type
logical, public ocean_do
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
character(len=h_short), public ocean_alb_type
module PROCESS
Definition: scale_prc.F90:11
character(len=h_short), public ocean_dyn_type
character(len=h_short), public ocean_ice_type
module Ocean admin
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
character(len=h_short), public ocean_rgn_type
subroutine, public ocean_admin_setup
Setup.
module profiler
Definition: scale_prof.F90:11
module PRECISION
module STDIO
Definition: scale_io.F90:10