2 !WRF:MEDIATION_LAYER:NESTING
4 SUBROUTINE med_interp_domain ( parent_grid , nested_grid )
10 TYPE(domain), POINTER :: parent_grid , nested_grid
11 TYPE(domain), POINTER :: grid
13 TYPE (grid_config_rec_type) :: config_flags
14 ! ----------------------------------------------------------
15 ! ----------------------------------------------------------
17 ! ----------------------------------------------------------
19 ! ----------------------------------------------------------
20 ! Interface definitions for EM CORE
21 ! ----------------------------------------------------------
23 ! ----------------------------------------------------------
24 ! These routines are supplied by module_dm.F from the
25 ! external communication package (e.g. external/RSL)
26 ! ----------------------------------------------------------
27 SUBROUTINE interp_domain_em_part1 ( grid, intermediate_grid, ngrid, config_flags &
29 # include "dummy_new_args.inc"
34 TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid")
35 TYPE(domain), POINTER :: intermediate_grid
36 TYPE(domain), POINTER :: ngrid
37 TYPE (grid_config_rec_type) :: config_flags
38 # include "dummy_new_decl.inc"
39 END SUBROUTINE interp_domain_em_part1
41 SUBROUTINE interp_domain_em_part2 ( grid, nested_grid, parent_grid, config_flags &
43 # include "dummy_new_args.inc"
48 TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid")
49 TYPE(domain), POINTER :: nested_grid
50 TYPE(domain), POINTER :: parent_grid !KAL added for vertical nesting
51 TYPE (grid_config_rec_type) :: config_flags
52 # include "dummy_new_decl.inc"
53 END SUBROUTINE interp_domain_em_part2
56 SUBROUTINE interp_domain_em_part3 ( grid, nested_grid, parent_grid, config_flags &
58 # include "dummy_new_args.inc"
63 TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid")
64 TYPE(domain), POINTER :: nested_grid
65 TYPE(domain), POINTER :: parent_grid !KAL added for vertical nesting
66 TYPE (grid_config_rec_type) :: config_flags
67 # include "dummy_new_decl.inc"
68 END SUBROUTINE interp_domain_em_part3
71 ! ----------------------------------------------------------
72 ! End of Interface blocks
73 ! ----------------------------------------------------------
74 ! ----------------------------------------------------------
75 ! ----------------------------------------------------------
77 ! ----------------------------------------------------------
78 ! ----------------------------------------------------------
79 ! Interpolation calls for EM CORE. The called
80 ! routines below are supplied by module_dm.F
81 ! from the external communications package (e.g. RSL)
82 ! ----------------------------------------------------------
83 #if (EM_CORE == 1 && defined( DM_PARALLEL ))
85 CALL wrf_dm_nestexchange_init
87 CALL model_to_grid_config_rec ( nested_grid%id , model_config_rec , config_flags )
88 grid => nested_grid%intermediate_grid
89 # if (defined(MOVE_NESTS) || ((!defined(KEEP_INT_AROUND)) && (!defined(SGIALTIX)) && (!defined(FUJITSU_FX10))))
91 CALL alloc_space_field ( grid, grid%id , 1 , 2 , .TRUE. , nested_grid%active_this_task, &
92 grid%sd31, grid%ed31, grid%sd32, grid%ed32, grid%sd33, grid%ed33, &
93 grid%sm31, grid%em31, grid%sm32, grid%em32, grid%sm33, grid%em33, &
94 grid%sp31, grid%ep31, grid%sp32, grid%ep32, grid%sp33, grid%ep33, &
95 grid%sp31x, grid%ep31x, grid%sp32x, grid%ep32x, grid%sp33x, grid%ep33x,&
96 grid%sp31y, grid%ep31y, grid%sp32y, grid%ep32y, grid%sp33y, grid%ep33y,&
97 grid%sm31x, grid%em31x, grid%sm32x, grid%em32x, grid%sm33x, grid%em33x, & ! x-xpose
98 grid%sm31y, grid%em31y, grid%sm32y, grid%em32y, grid%sm33y, grid%em33y & ! y-xpose
104 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
105 CALL interp_domain_em_part1 ( grid , nested_grid%intermediate_grid, nested_grid, config_flags &
107 # include "actual_new_args.inc"
110 IF ( nested_grid%active_this_task ) THEN
111 grid => nested_grid%intermediate_grid
112 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
114 CALL interp_domain_em_part2 ( grid, nested_grid, parent_grid, config_flags &
116 # include "actual_new_args.inc"
119 CALL interp_domain_em_part3 ( grid, nested_grid, parent_grid, config_flags &
121 # include "actual_new_args.inc"
126 grid => nested_grid%intermediate_grid
127 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
128 # if (defined(MOVE_NESTS) || ((!defined(KEEP_INT_AROUND)) && (!defined(SGIALTIX)) && (!defined(FUJITSU_FX10))))
129 IF ( grid%active_this_task ) THEN
130 CALL dealloc_space_field ( grid )
134 ! ------------------------------------------------------
135 ! End of Interpolation calls for EM CORE.
136 ! ------------------------------------------------------
138 END SUBROUTINE med_interp_domain
141 SUBROUTINE med_interp_domain_small ( parent_grid , nested_grid )
145 #if (defined(MOVE_NESTS) || ((!defined(KEEP_INT_AROUND)) && (!defined(SGIALTIX)) && (!defined(FUJITSU_FX10))))
146 USE module_dm, ONLY : intercomm_active
149 TYPE(domain), POINTER :: parent_grid , nested_grid
150 TYPE(domain), POINTER :: grid
152 TYPE (grid_config_rec_type) :: config_flags
156 ! ----------------------------------------------------------
157 SUBROUTINE interp_domain_em_small_part1 ( grid, intermediate_grid, ngrid, config_flags &
159 # include "dummy_new_args.inc"
164 TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid")
165 TYPE(domain), POINTER :: intermediate_grid
166 TYPE(domain), POINTER :: ngrid
167 TYPE (grid_config_rec_type) :: config_flags
168 # include "dummy_new_decl.inc"
169 END SUBROUTINE interp_domain_em_small_part1
171 SUBROUTINE interp_domain_em_small_part2 ( grid, nested_grid, config_flags &
173 # include "dummy_new_args.inc"
178 TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid")
179 TYPE(domain), POINTER :: nested_grid
180 TYPE (grid_config_rec_type) :: config_flags
181 # include "dummy_new_decl.inc"
182 END SUBROUTINE interp_domain_em_small_part2
186 ! ----------------------------------------------------------
187 ! Interpolation calls for EM CORE. The called
188 ! routines below are supplied by module_dm.F
189 ! from the external communications package (e.g. RSL)
190 ! ----------------------------------------------------------
192 #if (EM_CORE == 1 && defined( DM_PARALLEL ))
193 CALL model_to_grid_config_rec ( nested_grid%id , model_config_rec , config_flags )
194 grid => nested_grid%intermediate_grid
195 # if (defined(MOVE_NESTS) || ((!defined(KEEP_INT_AROUND)) && (!defined(SGIALTIX)) && (!defined(FUJITSU_FX10))))
197 CALL alloc_space_field ( grid, grid%id , 1 , 2 , .TRUE. , nested_grid%active_this_task, &
198 grid%sd31, grid%ed31, grid%sd32, grid%ed32, grid%sd33, grid%ed33, &
199 grid%sm31, grid%em31, grid%sm32, grid%em32, grid%sm33, grid%em33, &
200 grid%sp31, grid%ep31, grid%sp32, grid%ep32, grid%sp33, grid%ep33, &
201 grid%sp31x, grid%ep31x, grid%sp32x, grid%ep32x, grid%sp33x, grid%ep33x,&
202 grid%sp31y, grid%ep31y, grid%sp32y, grid%ep32y, grid%sp33y, grid%ep33y,&
203 grid%sm31x, grid%em31x, grid%sm32x, grid%em32x, grid%sm33x, grid%em33x, & ! x-xpose
204 grid%sm31y, grid%em31y, grid%sm32y, grid%em32y, grid%sm33y, grid%em33y & ! y-xpose
210 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
211 CALL interp_domain_em_small_part1 ( grid , nested_grid%intermediate_grid, nested_grid, config_flags &
213 # include "actual_new_args.inc"
216 grid => nested_grid%intermediate_grid
217 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
218 CALL interp_domain_em_small_part2 ( grid, nested_grid, config_flags &
220 # include "actual_new_args.inc"
224 grid => nested_grid%intermediate_grid
225 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
226 # if (defined(MOVE_NESTS) || ((!defined(KEEP_INT_AROUND)) && (!defined(SGIALTIX)) && (!defined(FUJITSU_FX10))))
227 IF ( intercomm_active( grid%id ) ) THEN
228 CALL dealloc_space_field ( grid )
232 ! ------------------------------------------------------
233 ! End of Interpolation calls for EM CORE.
234 ! ------------------------------------------------------
235 call wrf_debug(0,'FILE: share/mediation_interp_domain.F ROUTINE: med_interp_domain_small CALLING: done ')
237 END SUBROUTINE med_interp_domain_small