SCALE-RM
mod_da_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 :: da_admin_setup
27 
28  !-----------------------------------------------------------------------------
29  !
30  !++ Public parameters & variables
31  !
32  character(len=H_SHORT), public :: da_type = 'OFF'
33 
34  logical, public :: da_do ! do data assimilation?
35 
36  !-----------------------------------------------------------------------------
37  !
38  !++ Private procedure
39  !
40  !-----------------------------------------------------------------------------
41  !
42  !++ Private parameters & variables
43  !
44  !-----------------------------------------------------------------------------
45 contains
46  !-----------------------------------------------------------------------------
48  subroutine da_admin_setup
49  use scale_prc, only: &
50  prc_abort
51  implicit none
52 
53  namelist / param_da / &
54  da_type
55 
56  integer :: ierr
57  !---------------------------------------------------------------------------
58 
59  log_newline
60  log_info("DA_ADMIN_setup",*) 'Setup'
61 
62  !--- read namelist
63  rewind(io_fid_conf)
64  read(io_fid_conf,nml=param_da,iostat=ierr)
65  if( ierr < 0 ) then !--- missing
66  log_info("DA_ADMIN_setup",*) 'Not found namelist. Default used.'
67  elseif( ierr > 0 ) then !--- fatal error
68  log_error("DA_ADMIN_setup",*) 'Not appropriate names in namelist PARAM_DA. Check!'
69  call prc_abort
70  endif
71  log_nml(param_da)
72 
73  !-----< module component check >-----
74 
75  log_newline
76  log_info("DA_ADMIN_setup",*) 'Data Assimilation components '
77 
78  if ( da_type /= 'OFF' ) then
79  log_info_cont(*) 'Data Assimilation: ON, ', trim(da_type)
80  da_do = .true.
81  else
82  log_info_cont(*) 'Data Assimilation: OFF'
83  da_do = .false.
84  endif
85 
86  return
87  end subroutine da_admin_setup
88 
89 end module mod_da_admin
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_precision
module PRECISION
Definition: scale_precision.F90:14
mod_da_admin::da_do
logical, public da_do
Definition: mod_da_admin.F90:34
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_io
module STDIO
Definition: scale_io.F90:10
mod_da_admin
module Data Assimilation admin
Definition: mod_da_admin.F90:11
scale_prof
module profiler
Definition: scale_prof.F90:11
mod_da_admin::da_type
character(len=h_short), public da_type
Definition: mod_da_admin.F90:32
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:57
mod_da_admin::da_admin_setup
subroutine, public da_admin_setup
Setup.
Definition: mod_da_admin.F90:49