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 ! ----------------------------------------------------------
57 ! End of Interface blocks
58 ! ----------------------------------------------------------
59 ! ----------------------------------------------------------
60 ! ----------------------------------------------------------
62 ! ----------------------------------------------------------
63 ! ----------------------------------------------------------
64 ! Interpolation calls for EM CORE. The called
65 ! routines below are supplied by module_dm.F
66 ! from the external communications package (e.g. RSL)
67 ! ----------------------------------------------------------
68 #if (EM_CORE == 1 && defined( DM_PARALLEL ))
70 CALL wrf_dm_nestexchange_init
72 CALL model_to_grid_config_rec ( nested_grid%id , model_config_rec , config_flags )
73 grid => nested_grid%intermediate_grid
74 # if (defined(MOVE_NESTS) || ((!defined(KEEP_INT_AROUND)) && (!defined(SGIALTIX)) && (!defined(FUJITSU_FX10))))
76 CALL alloc_space_field ( grid, grid%id , 1 , 2 , .TRUE. , nested_grid%active_this_task, &
77 grid%sd31, grid%ed31, grid%sd32, grid%ed32, grid%sd33, grid%ed33, &
78 grid%sm31, grid%em31, grid%sm32, grid%em32, grid%sm33, grid%em33, &
79 grid%sp31, grid%ep31, grid%sp32, grid%ep32, grid%sp33, grid%ep33, &
80 grid%sp31x, grid%ep31x, grid%sp32x, grid%ep32x, grid%sp33x, grid%ep33x,&
81 grid%sp31y, grid%ep31y, grid%sp32y, grid%ep32y, grid%sp33y, grid%ep33y,&
82 grid%sm31x, grid%em31x, grid%sm32x, grid%em32x, grid%sm33x, grid%em33x, & ! x-xpose
83 grid%sm31y, grid%em31y, grid%sm32y, grid%em32y, grid%sm33y, grid%em33y & ! y-xpose
89 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
90 CALL interp_domain_em_part1 ( grid , nested_grid%intermediate_grid, nested_grid, config_flags &
92 # include "actual_new_args.inc"
95 IF ( nested_grid%active_this_task ) THEN
96 grid => nested_grid%intermediate_grid
97 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
99 CALL interp_domain_em_part2 ( grid, nested_grid, parent_grid, config_flags &
101 # include "actual_new_args.inc"
106 grid => nested_grid%intermediate_grid
107 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
108 # if (defined(MOVE_NESTS) || ((!defined(KEEP_INT_AROUND)) && (!defined(SGIALTIX)) && (!defined(FUJITSU_FX10))))
109 IF ( grid%active_this_task ) THEN
110 CALL dealloc_space_field ( grid )
114 ! ------------------------------------------------------
115 ! End of Interpolation calls for EM CORE.
116 ! ------------------------------------------------------
118 END SUBROUTINE med_interp_domain
121 SUBROUTINE med_interp_domain_small ( parent_grid , nested_grid )
125 #if (defined(MOVE_NESTS) || ((!defined(KEEP_INT_AROUND)) && (!defined(SGIALTIX)) && (!defined(FUJITSU_FX10))))
126 USE module_dm, ONLY : intercomm_active
129 TYPE(domain), POINTER :: parent_grid , nested_grid
130 TYPE(domain), POINTER :: grid
132 TYPE (grid_config_rec_type) :: config_flags
136 ! ----------------------------------------------------------
137 SUBROUTINE interp_domain_em_small_part1 ( grid, intermediate_grid, ngrid, config_flags &
139 # include "dummy_new_args.inc"
144 TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid")
145 TYPE(domain), POINTER :: intermediate_grid
146 TYPE(domain), POINTER :: ngrid
147 TYPE (grid_config_rec_type) :: config_flags
148 # include "dummy_new_decl.inc"
149 END SUBROUTINE interp_domain_em_small_part1
151 SUBROUTINE interp_domain_em_small_part2 ( grid, nested_grid, config_flags &
153 # include "dummy_new_args.inc"
158 TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid")
159 TYPE(domain), POINTER :: nested_grid
160 TYPE (grid_config_rec_type) :: config_flags
161 # include "dummy_new_decl.inc"
162 END SUBROUTINE interp_domain_em_small_part2
166 ! ----------------------------------------------------------
167 ! Interpolation calls for EM CORE. The called
168 ! routines below are supplied by module_dm.F
169 ! from the external communications package (e.g. RSL)
170 ! ----------------------------------------------------------
172 #if (EM_CORE == 1 && defined( DM_PARALLEL ))
173 CALL model_to_grid_config_rec ( nested_grid%id , model_config_rec , config_flags )
174 grid => nested_grid%intermediate_grid
175 # if (defined(MOVE_NESTS) || ((!defined(KEEP_INT_AROUND)) && (!defined(SGIALTIX)) && (!defined(FUJITSU_FX10))))
177 CALL alloc_space_field ( grid, grid%id , 1 , 2 , .TRUE. , nested_grid%active_this_task, &
178 grid%sd31, grid%ed31, grid%sd32, grid%ed32, grid%sd33, grid%ed33, &
179 grid%sm31, grid%em31, grid%sm32, grid%em32, grid%sm33, grid%em33, &
180 grid%sp31, grid%ep31, grid%sp32, grid%ep32, grid%sp33, grid%ep33, &
181 grid%sp31x, grid%ep31x, grid%sp32x, grid%ep32x, grid%sp33x, grid%ep33x,&
182 grid%sp31y, grid%ep31y, grid%sp32y, grid%ep32y, grid%sp33y, grid%ep33y,&
183 grid%sm31x, grid%em31x, grid%sm32x, grid%em32x, grid%sm33x, grid%em33x, & ! x-xpose
184 grid%sm31y, grid%em31y, grid%sm32y, grid%em32y, grid%sm33y, grid%em33y & ! y-xpose
190 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
191 CALL interp_domain_em_small_part1 ( grid , nested_grid%intermediate_grid, nested_grid, config_flags &
193 # include "actual_new_args.inc"
196 grid => nested_grid%intermediate_grid
197 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
198 CALL interp_domain_em_small_part2 ( grid, nested_grid, config_flags &
200 # include "actual_new_args.inc"
204 grid => nested_grid%intermediate_grid
205 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
206 # if (defined(MOVE_NESTS) || ((!defined(KEEP_INT_AROUND)) && (!defined(SGIALTIX)) && (!defined(FUJITSU_FX10))))
207 IF ( intercomm_active( grid%id ) ) THEN
208 CALL dealloc_space_field ( grid )
212 ! ------------------------------------------------------
213 ! End of Interpolation calls for EM CORE.
214 ! ------------------------------------------------------
215 call wrf_debug(0,'FILE: share/mediation_interp_domain.F ROUTINE: med_interp_domain_small CALLING: done ')
217 END SUBROUTINE med_interp_domain_small