1 SUBROUTINE shift_domain_em ( grid , disp_x, disp_y &
3 # include "dummy_new_args.inc"
6 USE module_state_description
7 USE module_domain, ONLY : domain, get_ijk_from_grid
8 USE module_domain_type, ONLY : fieldlist
10 USE module_configure, ONLY : grid_config_rec_type, model_config_rec, model_to_grid_config_rec
12 USE module_dm, ONLY : local_communicator, mytask, ntasks, ntasks_x, ntasks_y, local_communicator_periodic, itrace
13 USE module_comm_dm, ONLY : SHIFT_HALO_sub
19 INTEGER disp_x, disp_y ! number of parent domain points to move
20 TYPE(domain) , POINTER :: grid
23 INTEGER px, py ! number and direction of nd points to move
24 INTEGER :: ids , ide , jds , jde , kds , kde , &
25 ims , ime , jms , jme , kms , kme , &
26 ips , ipe , jps , jpe , kps , kpe
27 INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7
28 TYPE (grid_config_rec_type) :: config_flags
29 TYPE( fieldlist ), POINTER :: p
32 ! need to split this routine to avoid clobbering certain widely used compilers
33 SUBROUTINE shift_domain_em2 ( grid , disp_x, disp_y &
35 # include "dummy_new_args.inc"
38 USE module_state_description
39 USE module_domain, ONLY : domain
42 INTEGER disp_x, disp_y ! number of parent domain points to move
43 TYPE(domain) , POINTER :: grid
45 ! Definitions of dummy arguments to solve
46 #include "dummy_new_decl.inc"
47 END SUBROUTINE shift_domain_em2
50 ! Definitions of dummy arguments to solve
51 #include "dummy_new_decl.inc"
55 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
57 CALL get_ijk_from_grid ( grid , &
58 ids, ide, jds, jde, kds, kde, &
59 ims, ime, jms, jme, kms, kme, &
60 ips, ipe, jps, jpe, kps, kpe )
62 px = isign(config_flags%parent_grid_ratio,disp_x)
63 py = isign(config_flags%parent_grid_ratio,disp_y)
70 grid%imask_nostag(ips:min(ide-1,ipe),jps:min(jde-1,jpe)) = 0
71 grid%imask_xstag(ips:ipe,jps:min(jde-1,jpe)) = 0
72 grid%imask_ystag(ips:min(ide-1,ipe),jps:jpe) = 0
73 grid%imask_xystag(ips:ipe,jps:jpe) = 0
75 ! shift the nest domain in x
77 #include "SHIFT_HALO.inc"
78 #include "../frame/loop_based_x_shift_code.h"
81 CALL shift_domain_em2 ( grid , disp_x, disp_y &
83 # include "dummy_new_args.inc"
89 END SUBROUTINE shift_domain_em
91 SUBROUTINE shift_domain_em2 ( grid , disp_x, disp_y &
93 # include "dummy_new_args.inc"
96 USE module_state_description
97 USE module_domain, ONLY : domain, get_ijk_from_grid
98 USE module_domain_type, ONLY : fieldlist
100 USE module_configure, ONLY : grid_config_rec_type, model_config_rec, model_to_grid_config_rec
102 USE module_dm, ONLY : local_communicator, mytask, ntasks, ntasks_x, ntasks_y, local_communicator_periodic, itrace
103 USE module_comm_dm, ONLY : SHIFT_HALO_sub
109 INTEGER disp_x, disp_y ! number of parent domain points to move
110 TYPE(domain) , POINTER :: grid
112 INTEGER i, j, ii, jpf
113 INTEGER px, py ! number and direction of nd points to move
114 INTEGER :: ids , ide , jds , jde , kds , kde , &
115 ims , ime , jms , jme , kms , kme , &
116 ips , ipe , jps , jpe , kps , kpe
117 INTEGER idim1,idim2,idim3,idim4,idim5,idim6,idim7
118 TYPE (grid_config_rec_type) :: config_flags
119 TYPE( fieldlist ), POINTER :: p
121 ! Definitions of dummy arguments to solve
122 #include "dummy_new_decl.inc"
126 CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
128 CALL get_ijk_from_grid ( grid , &
129 ids, ide, jds, jde, kds, kde, &
130 ims, ime, jms, jme, kms, kme, &
131 ips, ipe, jps, jpe, kps, kpe )
133 px = isign(config_flags%parent_grid_ratio,disp_x)
134 py = isign(config_flags%parent_grid_ratio,disp_y)
136 ! shift the nest domain in y
137 do ii = 1,abs(disp_y)
138 #include "SHIFT_HALO.inc"
139 #include "../frame/loop_based_y_shift_code.h"
143 END SUBROUTINE shift_domain_em2