10 implicit none ;
private 12 public :: hor_index_init,
assignment(=)
13 public :: rotate_hor_index
58 interface assignment(=); module
procedure HIT_assign ; end interface
63 subroutine hor_index_init(Domain, HI, param_file, local_indexing, index_offset)
67 logical,
optional,
intent(in) :: local_indexing
68 integer,
optional,
intent(in) :: index_offset
71 #include "version_variable.h" 75 call get_domain_extent(domain, hi%isc, hi%iec, hi%jsc, hi%jec, &
76 hi%isd, hi%ied, hi%jsd, hi%jed, &
77 hi%isg, hi%ieg, hi%jsg, hi%jeg, &
78 hi%idg_offset, hi%jdg_offset, hi%symmetric, &
79 local_indexing=local_indexing)
80 call get_global_shape(domain, hi%niglobal, hi%njglobal)
83 call log_version(param_file,
"MOM_hor_index", version, &
84 "Sets the horizontal array index types.", all_default=.true.)
86 hi%IscB = hi%isc ; hi%JscB = hi%jsc
87 hi%IsdB = hi%isd ; hi%JsdB = hi%jsd
88 hi%IsgB = hi%isg ; hi%JsgB = hi%jsg
89 if (hi%symmetric)
then 90 hi%IscB = hi%isc-1 ; hi%JscB = hi%jsc-1
91 hi%IsdB = hi%isd-1 ; hi%JsdB = hi%jsd-1
92 hi%IsgB = hi%isg-1 ; hi%JsgB = hi%jsg-1
94 hi%IecB = hi%iec ; hi%JecB = hi%jec
95 hi%IedB = hi%ied ; hi%JedB = hi%jed
96 hi%IegB = hi%ieg ; hi%JegB = hi%jeg
99 end subroutine hor_index_init
103 subroutine hit_assign(HI1, HI2)
104 type(hor_index_type),
intent(out) :: HI1
105 type(hor_index_type),
intent(in) :: HI2
109 hi1%isc = hi2%isc ; hi1%iec = hi2%iec ; hi1%jsc = hi2%jsc ; hi1%jec = hi2%jec
110 hi1%isd = hi2%isd ; hi1%ied = hi2%ied ; hi1%jsd = hi2%jsd ; hi1%jed = hi2%jed
111 hi1%isg = hi2%isg ; hi1%ieg = hi2%ieg ; hi1%jsg = hi2%jsg ; hi1%jeg = hi2%jeg
113 hi1%IscB = hi2%IscB ; hi1%IecB = hi2%IecB ; hi1%JscB = hi2%JscB ; hi1%JecB = hi2%JecB
114 hi1%IsdB = hi2%IsdB ; hi1%IedB = hi2%IedB ; hi1%JsdB = hi2%JsdB ; hi1%JedB = hi2%JedB
115 hi1%IsgB = hi2%IsgB ; hi1%IegB = hi2%IegB ; hi1%JsgB = hi2%JsgB ; hi1%JegB = hi2%JegB
117 hi1%niglobal = hi2%niglobal ; hi1%njglobal = hi2%njglobal
118 hi1%idg_offset = hi2%idg_offset ; hi1%jdg_offset = hi2%jdg_offset
119 hi1%symmetric = hi2%symmetric
120 hi1%turns = hi2%turns
121 end subroutine hit_assign
124 subroutine rotate_hor_index(HI_in, turns, HI)
126 integer,
intent(in) :: turns
129 if (modulo(turns, 2) /= 0)
then 156 hi%niglobal = hi_in%njglobal
157 hi%njglobal = hi_in%niglobal
158 hi%idg_offset = hi_in%jdg_offset
159 hi%jdg_offset = hi_in%idg_offset
161 hi%symmetric = hi_in%symmetric
165 hi%turns = hi_in%turns + turns
166 end subroutine rotate_hor_index
A structure that can be parsed to read and document run-time parameters.
The MOM6 facility to parse input files for runtime parameters.
Defines the horizontal index type (hor_index_type) used for providing index ranges.
An overloaded interface to log the values of various types of parameters.
Container for horizontal index ranges for data, computational and global domains. ...
Describes the decomposed MOM domain and has routines for communications across PEs.
Routines for error handling and I/O management.
An overloaded interface to log version information about modules.
The MOM_domain_type contains information about the domain decompositoin.
An overloaded interface to read and log the values of various types of parameters.