SCALE-RM
scale_ocean_grid_icoA_index.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  !
27 
28  !-----------------------------------------------------------------------------
29  !
30  !++ Public parameters & variables
31  !
32  integer, public :: okmax = -1 ! # of computational cells: z for ocean
33  integer, public :: oimax = -1 ! # of computational cells: x for ocean
34  integer, public :: ojmax = -1 ! # of computational cells: y for ocean
35  !$acc declare create(OKMAX,OIMAX,OJMAX)
36 
37  integer, public :: oka ! # of total grids: z for ocean, local
38  integer, public :: oks ! start point of inner domain: z for ocean, local
39  integer, public :: oke ! end point of inner domain: z for ocean, local
40  !$acc declare create(OKA,OKS,OKE)
41 
42  integer, public :: oia ! # of total grids: x for ocean, local
43  integer, public :: ois ! start point of inner domain: x for ocean, local
44  integer, public :: oie ! end point of inner domain: x for ocean, local
45  !$acc declare create(OIA,OIS,OIE)
46 
47  integer, public :: oja ! # of total grids: y for ocean, local
48  integer, public :: ojs ! start point of inner domain: y for ocean, local
49  integer, public :: oje ! end point of inner domain: y for ocean, local
50  !$acc declare create(OJA,OJS,OJE)
51 
52  !-----------------------------------------------------------------------------
53  !
54  !++ Private procedure
55  !
56  !-----------------------------------------------------------------------------
57  !
58  !++ Private parameters & variables
59  !
60  !-----------------------------------------------------------------------------
61 contains
62  !-----------------------------------------------------------------------------
65  use scale_prc, only: &
66  prc_abort
67  use scale_atmos_grid_icoa_index, only: &
68  imax, &
69  ia, is, ie, &
70  jmax, &
71  ja, js, je
72  implicit none
73 
74  namelist / param_ocean_grid_icoa_index / &
75  okmax
76 
77  integer :: ierr
78  !---------------------------------------------------------------------------
79 
80  log_newline
81  log_info("OCEAN_GRID_ICOA_INDEX_setup",*) 'Setup'
82 
83  !--- read namelist
84  rewind(io_fid_conf)
85  read(io_fid_conf,nml=param_ocean_grid_icoa_index,iostat=ierr)
86  if( ierr < 0 ) then !--- missing
87  log_info("OCEAN_GRID_ICOA_INDEX_setup",*) 'Not found namelist. Default used.'
88  elseif( ierr > 0 ) then !--- fatal error
89  log_error("OCEAN_GRID_ICOA_INDEX_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_GRID_ICOA_INDEX. Check!'
90  call prc_abort
91  endif
92  log_nml(param_ocean_grid_icoa_index)
93 
94  if ( okmax < 1 ) then
95  log_error("OCEAN_GRID_ICOA_INDEX_setup",*) 'OKMAX must be >= 1 ', okmax
96  call prc_abort
97  end if
98 
99  oka = okmax
100  oks = 1
101  oke = okmax
102 
103  log_newline
104  log_info("OCEAN_GRID_ICOA_INDEX_setup",*) 'Ocean grid index information '
105  log_info_cont('(1x,A,I6,A,I6,A,I6)') 'z-axis levels :', okmax
106 
107 
108  ! at this moment horizontal grid is same as that in atmosphere
109  oimax = imax
110  oia = ia
111  ois = is
112  oie = ie
113 
114  ojmax = jmax
115  oja = ja
116  ojs = js
117  oje = je
118 
119  !$acc update device(OKMAX,OIMAX,OJMAX)
120  !$acc update device(OKA,OKS,OKE)
121  !$acc update device(OIA,OIS,OIE)
122  !$acc update device(OJA,OJS,OJE)
123  return
124  end subroutine ocean_grid_icoa_index_setup
125 
module atmosphere / grid / icosahedralA / index
module STDIO
Definition: scale_io.F90:10
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:57
module ocean / grid / icosahedralA / index
subroutine, public ocean_grid_icoa_index_setup
Setup.
module PROCESS
Definition: scale_prc.F90:11
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
module PRECISION
module profiler
Definition: scale_prof.F90:11