4 USE module_driver_constants
6 LOGICAL intercomm_active( max_domains ), domain_active_this_task( max_domains )
9 SUBROUTINE init_module_dm
10 intercomm_active = .TRUE.
11 domain_active_this_task = .TRUE.
12 END SUBROUTINE init_module_dm
14 REAL FUNCTION wrf_dm_max_real ( inval )
17 wrf_dm_max_real = inval
18 END FUNCTION wrf_dm_max_real
20 REAL FUNCTION wrf_dm_min_real ( inval )
23 wrf_dm_min_real = inval
24 END FUNCTION wrf_dm_min_real
26 SUBROUTINE wrf_dm_min_reals ( inval, retval, n )
28 INTEGER, INTENT(IN) :: n
29 REAL, INTENT(IN) :: inval(:)
30 REAL, INTENT(OUT) :: retval(:)
32 END SUBROUTINE wrf_dm_min_reals
34 REAL FUNCTION wrf_dm_sum_real ( inval )
37 wrf_dm_sum_real = inval
38 END FUNCTION wrf_dm_sum_real
40 SUBROUTINE wrf_dm_sum_reals ( inval, retval )
42 REAL, INTENT(IN) :: inval(:)
43 REAL, INTENT(OUT) :: retval(:)
45 END SUBROUTINE wrf_dm_sum_reals
47 INTEGER FUNCTION wrf_dm_sum_integer ( inval )
50 wrf_dm_sum_integer = inval
51 END FUNCTION wrf_dm_sum_integer
53 SUBROUTINE wrf_dm_sum_integers ( inval, retval )
55 INTEGER, INTENT(IN) :: inval(:)
56 INTEGER, INTENT(OUT) :: retval(:)
58 END SUBROUTINE wrf_dm_sum_integers
60 INTEGER FUNCTION wrf_dm_bxor_integer ( inval )
63 wrf_dm_bxor_integer = inval
64 END FUNCTION wrf_dm_bxor_integer
66 SUBROUTINE wrf_dm_maxval ( val, idex, jdex )
71 END SUBROUTINE wrf_dm_maxval
73 SUBROUTINE wrf_dm_minval ( val, idex, jdex )
78 END SUBROUTINE wrf_dm_minval
80 SUBROUTINE wrf_dm_maxtile_real ( val , tile)
84 END SUBROUTINE wrf_dm_maxtile_real
86 SUBROUTINE wrf_dm_mintile_double ( val , tile)
90 END SUBROUTINE wrf_dm_mintile_double
92 SUBROUTINE wrf_dm_tile_val_int ( val , tile)
96 END SUBROUTINE wrf_dm_tile_val_int
99 SUBROUTINE wrf_dm_move_nest ( parent, nest, dx, dy )
101 TYPE (domain), INTENT(INOUT) :: parent, nest
102 INTEGER, INTENT(IN) :: dx,dy
104 END SUBROUTINE wrf_dm_move_nest
108 !=========================================================================
110 ! These are stub functions that do the right thing (usually nothing)
111 ! in case DM_PARALLEL is not compiled for.
112 ! This file, src/module_dm_stubs.F is copied to src/module_dm.F when
114 ! If, on the other hand, a DM package is specified, the module_dm.F
115 ! provided with that package (e.g. RSL) is copied from /external/RSL/module_dm.F
116 ! into src/module_dm.F.
117 ! It is important to recognize this, because changes directly to src/module_dm.F
120 LOGICAL FUNCTION wrf_dm_on_monitor()
121 wrf_dm_on_monitor = .true.
122 END FUNCTION wrf_dm_on_monitor
124 INTEGER FUNCTION wrf_dm_monitor_rank()
125 wrf_dm_monitor_rank = 0
126 END FUNCTION wrf_dm_monitor_rank
128 SUBROUTINE wrf_get_myproc( myproc )
133 END SUBROUTINE wrf_get_myproc
135 SUBROUTINE wrf_get_nproc( nprocs )
140 END SUBROUTINE wrf_get_nproc
142 SUBROUTINE wrf_get_nprocx( nprocs )
147 END SUBROUTINE wrf_get_nprocx
149 SUBROUTINE wrf_get_nprocy( nprocs )
154 END SUBROUTINE wrf_get_nprocy
156 SUBROUTINE wrf_dm_bcast_string ( buf , size )
161 END SUBROUTINE wrf_dm_bcast_string
163 SUBROUTINE wrf_dm_bcast_bytes ( buf , size )
168 END SUBROUTINE wrf_dm_bcast_bytes
170 SUBROUTINE wrf_dm_bcast_integer( BUF, N1 )
175 END SUBROUTINE wrf_dm_bcast_integer
177 SUBROUTINE wrf_dm_bcast_real( BUF, N1 )
182 END SUBROUTINE wrf_dm_bcast_real
184 SUBROUTINE wrf_dm_bcast_logical( BUF, N1 )
189 END SUBROUTINE wrf_dm_bcast_logical
191 SUBROUTINE wrf_dm_halo ( domdesc , comms , stencil_id )
193 INTEGER domdesc , comms(*) , stencil_id
195 END SUBROUTINE wrf_dm_halo
197 SUBROUTINE wrf_dm_boundary ( domdesc , comms , period_id , &
198 periodic_x , periodic_y )
200 INTEGER domdesc , comms(*) , period_id
201 LOGICAL , INTENT(IN) :: periodic_x, periodic_y
203 END SUBROUTINE wrf_dm_boundary
205 SUBROUTINE wrf_dm_xpose_z2x ( domdesc , comms , xpose_id )
207 INTEGER domdesc , comms(*), xpose_id
209 END SUBROUTINE wrf_dm_xpose_z2x
210 SUBROUTINE wrf_dm_xpose_x2y ( domdesc , comms , xpose_id )
212 INTEGER domdesc , comms(*), xpose_id
214 END SUBROUTINE wrf_dm_xpose_x2y
215 SUBROUTINE wrf_dm_xpose_y2z ( domdesc , comms , xpose_id )
217 INTEGER domdesc , comms(*), xpose_id
219 END SUBROUTINE wrf_dm_xpose_y2z
221 SUBROUTINE wrf_dm_define_comms ( grid )
224 TYPE(domain) , INTENT (INOUT) :: grid
226 END SUBROUTINE wrf_dm_define_comms
228 SUBROUTINE wrf_get_dm_communicator ( communicator )
230 INTEGER , INTENT(OUT) :: communicator
233 END SUBROUTINE wrf_get_dm_communicator
235 SUBROUTINE wrf_get_dm_iocommunicator ( iocommunicator )
237 INTEGER , INTENT(OUT) :: iocommunicator
240 END SUBROUTINE wrf_get_dm_iocommunicator
242 SUBROUTINE wrf_dm_shutdown
244 END SUBROUTINE wrf_dm_shutdown
247 END SUBROUTINE wrf_abort
249 SUBROUTINE wrf_patch_to_global_real (buf,globbuf,domdesc,ndim,&
250 ids,ide,jds,jde,kds,kde,&
251 ims,ime,jms,jme,kms,kme,&
252 ips,ipe,jps,jpe,kps,kpe )
254 INTEGER ids,ide,jds,jde,kds,kde,&
255 ims,ime,jms,jme,kms,kme,&
256 ips,ipe,jps,jpe,kps,kpe
257 INTEGER fid,domdesc,ndim,glen(3),llen(3)
261 END SUBROUTINE wrf_patch_to_global_real
263 SUBROUTINE wrf_global_to_patch_real (globbuf,buf,domdesc,ndim,&
264 ids,ide,jds,jde,kds,kde,&
265 ims,ime,jms,jme,kms,kme,&
266 ips,ipe,jps,jpe,kps,kpe )
268 INTEGER ids,ide,jds,jde,kds,kde,&
269 ims,ime,jms,jme,kms,kme,&
270 ips,ipe,jps,jpe,kps,kpe
271 INTEGER fid,domdesc,ndim,glen(3),llen(3)
275 END SUBROUTINE wrf_global_to_patch_real
278 SUBROUTINE wrf_patch_to_global_double (buf,globbuf,domdesc,ndim,&
279 ids,ide,jds,jde,kds,kde,&
280 ims,ime,jms,jme,kms,kme,&
281 ips,ipe,jps,jpe,kps,kpe )
283 INTEGER ids,ide,jds,jde,kds,kde,&
284 ims,ime,jms,jme,kms,kme,&
285 ips,ipe,jps,jpe,kps,kpe
286 INTEGER fid,domdesc,ndim,glen(3),llen(3)
287 DOUBLE PRECISION globbuf(*)
288 DOUBLE PRECISION buf(*)
290 END SUBROUTINE wrf_patch_to_global_double
292 SUBROUTINE wrf_global_to_patch_double (globbuf,buf,domdesc,ndim,&
293 ids,ide,jds,jde,kds,kde,&
294 ims,ime,jms,jme,kms,kme,&
295 ips,ipe,jps,jpe,kps,kpe )
297 INTEGER ids,ide,jds,jde,kds,kde,&
298 ims,ime,jms,jme,kms,kme,&
299 ips,ipe,jps,jpe,kps,kpe
300 INTEGER fid,domdesc,ndim,glen(3),llen(3)
301 DOUBLE PRECISION globbuf(*)
302 DOUBLE PRECISION buf(*)
304 END SUBROUTINE wrf_global_to_patch_double
306 SUBROUTINE wrf_patch_to_global_integer (buf,globbuf,domdesc,ndim,&
307 ids,ide,jds,jde,kds,kde,&
308 ims,ime,jms,jme,kms,kme,&
309 ips,ipe,jps,jpe,kps,kpe )
311 INTEGER ids,ide,jds,jde,kds,kde,&
312 ims,ime,jms,jme,kms,kme,&
313 ips,ipe,jps,jpe,kps,kpe
314 INTEGER fid,domdesc,ndim,glen(3),llen(3)
318 END SUBROUTINE wrf_patch_to_global_integer
320 SUBROUTINE wrf_global_to_patch_integer (globbuf,buf,domdesc,ndim,&
321 ids,ide,jds,jde,kds,kde,&
322 ims,ime,jms,jme,kms,kme,&
323 ips,ipe,jps,jpe,kps,kpe )
325 INTEGER ids,ide,jds,jde,kds,kde,&
326 ims,ime,jms,jme,kms,kme,&
327 ips,ipe,jps,jpe,kps,kpe
328 INTEGER fid,domdesc,ndim,glen(3),llen(3)
332 END SUBROUTINE wrf_global_to_patch_integer
334 SUBROUTINE wrf_patch_to_global_logical (buf,globbuf,domdesc,ndim,&
335 ids,ide,jds,jde,kds,kde,&
336 ims,ime,jms,jme,kms,kme,&
337 ips,ipe,jps,jpe,kps,kpe )
339 INTEGER ids,ide,jds,jde,kds,kde,&
340 ims,ime,jms,jme,kms,kme,&
341 ips,ipe,jps,jpe,kps,kpe
342 INTEGER fid,domdesc,ndim,glen(3),llen(3)
346 END SUBROUTINE wrf_patch_to_global_logical
348 SUBROUTINE wrf_global_to_patch_LOGICAL (globbuf,buf,domdesc,ndim,&
349 ids,ide,jds,jde,kds,kde,&
350 ims,ime,jms,jme,kms,kme,&
351 ips,ipe,jps,jpe,kps,kpe )
353 INTEGER ids,ide,jds,jde,kds,kde,&
354 ims,ime,jms,jme,kms,kme,&
355 ips,ipe,jps,jpe,kps,kpe
356 INTEGER fid,domdesc,ndim,glen(3),llen(3)
360 END SUBROUTINE wrf_global_to_patch_LOGICAL
362 SUBROUTINE push_communicators_for_domain( id )
364 INTEGER, OPTIONAL, INTENT(IN) :: id ! if specified also does an instate for grid id
365 END SUBROUTINE push_communicators_for_domain
366 SUBROUTINE pop_communicators_for_domain
367 END SUBROUTINE pop_communicators_for_domain
368 SUBROUTINE instate_communicators_for_domain( id )
370 INTEGER, INTENT(IN) :: id
371 END SUBROUTINE instate_communicators_for_domain
372 SUBROUTINE store_communicators_for_domain( id )
374 INTEGER, INTENT(IN) :: id
375 END SUBROUTINE store_communicators_for_domain