FE-Project
Loading...
Searching...
No Matches
mod_user.F90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
10!-------------------------------------------------------------------------------
11#include "scalelib.h"
13
14 !-----------------------------------------------------------------------------
15 !
16 !++ used modules
17 !
18 use scale_precision
19 use scale_io
20 use scale_prof
21
22 use mod_atmos_component, only: &
24 use mod_user_base, only: &
26 !-----------------------------------------------------------------------------
27 implicit none
28 private
29 !-----------------------------------------------------------------------------
30 !
31 !++ Public procedure
32 !
33 type, public, extends(userbase) :: user
34 contains
35 procedure :: mkinit_ => user_mkinit
36 generic :: mkinit => mkinit_
37 procedure :: setup_ => user_setup
38 generic :: setup => setup_
39 end type user
40
41 !-----------------------------------------------------------------------------
42 !
43 !++ Public parameters & variables
44 !
45 !-----------------------------------------------------------------------------
46 !
47 !++ Private procedure
48 !
49 !-----------------------------------------------------------------------------
50 !
51 !++ Private parameters & variables
52 !
53 !-----------------------------------------------------------------------------
54contains
55!OCL SERIAL
56 subroutine user_mkinit( this, atm )
57 implicit none
58 class(user), intent(inout) :: this
59 class(atmoscomponent), intent(inout) :: atm
60 !------------------------------------------
61 return
62 end subroutine user_mkinit
63
64!OCL SERIAL
65 subroutine user_setup( this, atm )
66 use scale_prc, only: &
67 prc_abort
68 implicit none
69
70 class(user), intent(inout) :: this
71 class(atmoscomponent), intent(inout) :: atm
72
73 logical :: USER_do = .false.
74 namelist / param_user / &
75 user_do
76
77 integer :: ierr
78 !------------------------------------------
79
80 log_newline
81 log_info("USER_setup",*) 'Setup'
82
83 !--- read namelist
84 rewind(io_fid_conf)
85 read(io_fid_conf,nml=param_user,iostat=ierr)
86 if( ierr < 0 ) then !--- missing
87 log_info("USER_setup",*) 'Not found namelist. Default used.'
88 elseif( ierr > 0 ) then !--- fatal error
89 log_error("USER_setup",*) 'Not appropriate names in namelist PARAM_USER. Check!'
90 call prc_abort
91 endif
92 log_nml(param_user)
93
94 log_newline
95 log_info("USER_setup",*) 'This module is dummy.'
96
97 call this%UserBase%Setup( atm, user_do )
98
99 return
100 end subroutine user_setup
101end module mod_user
module ATMOSPHERE component
module USER_base
module USER
Definition mod_user.F90:12
subroutine user_mkinit(this, atm)
Definition mod_user.F90:57