SCALE-RM
scale_tracer_suzuki10.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
13 !-------------------------------------------------------------------------------
15  !-----------------------------------------------------------------------------
16  !
17  !++ used modules
18  !
19  use scale_precision
20  use scale_stdio
21  !-----------------------------------------------------------------------------
22  implicit none
23  private
24  !-----------------------------------------------------------------------------
25  !
26  !++ Public procedure
27  !
28  public :: tracer_suzuki10_setup
29 
30  include "inc_tracer_suzuki10.h"
31 
32  !-----------------------------------------------------------------------------
33 contains
34  !-----------------------------------------------------------------------------
35  subroutine tracer_suzuki10_setup
36  use scale_process, only: &
38  implicit none
39 
40  namelist / param_bin / &
41  nbin, &
42  nccn, &
43  iceflg, &
44  kphase
45 
46  if( io_l ) write(io_fid_log,*)
47  if( io_l ) write(io_fid_log,*) '+++ READ BIN NUMBER'
48 
49  rewind(io_fid_conf)
50  read(io_fid_conf,nml=param_bin,iostat=ierr)
51 
52  if( ierr < 0 ) then !--- missing
53  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
54  elseif( ierr > 0 ) then !--- fatal error
55  write(*,*) 'xxx Not appropriate names in namelist PARAM_BIN, Check!'
56  call prc_mpistop
57  end if
58 
59  if( io_l ) write(io_fid_log,nml=param_bin)
60 
61  if( iceflg == 0 ) then
62  nspc = 1
63  elseif( iceflg == 1 ) then
64  nspc = 7
65  else
66  write(*,*) "ICEFLG should be 0(warm rain) or 1(mixed rain) check!!"
67  call prc_mpistop
68  endif
69 
70  nccn1 = max(nccn,1)
71 
72  !-- setup QA_MP ...
73  qa_mp = i_qv+nbin*nspc+nccn
74  qqa = i_qv+nbin*nspc
75  qqs = i_qv
76  qqe = i_qv+nbin*nspc
77  qws = i_qv+1
78  qwe = i_qv+nbin
79  if( iceflg == 0 ) then
80  qis = 0
81  qie = -1
82  elseif( iceflg == 1 ) then
83  qis = (i_qv+nbin+1)*iceflg
84  qie = (i_qv+nbin*nspc)*iceflg
85  endif
86 
87  allocate( aq_mp_name(qa_mp) )
88  allocate( aq_mp_desc(qa_mp) )
89  allocate( aq_mp_unit(qa_mp) )
90 
91 
92  !-----------------------------------------------------------------------------
93  !
94  !++ calculate each category and aerosol
95  !
96  !-----------------------------------------------------------------------------
97  do n = 1, qa_mp
98  write(aq_mp_unit(n),'(a)') 'kg/kg'
99  enddo
100 
101  write(aq_mp_name(i_qv),'(a)') 'QV'
102  do m = 1, nspc
103  do n = 1, nbin
104  write(aq_mp_name(i_qv+nbin*(m-1)+n),'(a,i0)') trim(namspc(m)), n
105  enddo
106  enddo
107 
108  do n = 1, nccn
109  write(aq_mp_name(i_qv+nbin*nspc+n),'(a,i0)') trim(namspc(8)), n
110  enddo
111 
112  write(aq_mp_desc(i_qv),'(a)') 'Water Vapor mixing ratio'
113  do m = 1, nspc
114  do n = 1, nbin
115  write(aq_mp_desc(i_qv+nbin*(m-1)+n),'(a,i0)') trim(lnamspc(m)), n
116  enddo
117  enddo
118 
119  do n = 1, nccn
120  write(aq_mp_desc(i_qv+nbin*nspc+n),'(a,i0)') trim(lnamspc(8)), n
121  enddo
122 
123  return
124  end subroutine tracer_suzuki10_setup
125 
126 end module scale_tracer_suzuki10
integer, public qie
character(len=h_short), dimension(:), allocatable, public aq_mp_name
subroutine, public prc_mpistop
Abort MPI.
character(len=h_short), dimension(:), allocatable, public aq_mp_unit
integer, public qqe
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
integer, public qwe
module STDIO
Definition: scale_stdio.F90:12
integer, public qws
integer, public qis
module TRACER / suzuki10
character(len=h_mid), dimension(:), allocatable, public aq_mp_desc
integer, public i_qv
integer, public qqa
module PROCESS
integer, public qa_mp
integer, public qqs
module PRECISION
subroutine, public tracer_suzuki10_setup
integer, public io_fid_conf
Config file ID.
Definition: scale_stdio.F90:55
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56