40 type(model_state_type),
target,
intent(inout) :: current_state
55 type(model_state_type),
target,
intent(inout) :: current_state
57 INTEGER :: istart, iend, jstart, jend, kstart, kend
61 LOGICAL :: is_east, is_west, is_north, is_south
63 if (current_state%timestep==1)
return
65 is_west=current_state%parallel%wrapped_around(x_index,1)
66 is_east=current_state%parallel%wrapped_around(x_index,2)
67 is_south=current_state%parallel%wrapped_around(y_index,1)
68 is_north=current_state%parallel%wrapped_around(y_index,2)
71 if (is_west .or. is_east .or. is_north .or. is_south)
then
72 kstart=current_state%local_grid%local_domain_start_index(z_index)
73 kend=current_state%local_grid%local_domain_end_index(z_index)
79 iend=current_state%local_grid%local_domain_end_index(x_index)
81 jstart=current_state%local_grid%local_domain_start_index(y_index)
82 jend=current_state%local_grid%local_domain_end_index(y_index)
89 call apply_rigid(current_state,istart,iend,jstart,jend,kstart,kend)
91 do i=iend+1,iend+current_state%local_grid%halo_size(x_index)
92 current_state%u%data(:,:,i) = current_state%u%data(:,:,iend)
93 current_state%zu%data(:,:,i) = current_state%zu%data(:,:,iend)
94 current_state%w%data(:,:,i) = current_state%w%data(:,:,iend)
95 current_state%zw%data(:,:,i) = current_state%zw%data(:,:,iend)
107 istart=current_state%local_grid%local_domain_start_index(x_index)
109 jstart=current_state%local_grid%local_domain_start_index(y_index)
110 jend=current_state%local_grid%local_domain_end_index(y_index)
118 call apply_rigid(current_state,istart,iend,jstart,jend,kstart,kend)
120 do i=istart-current_state%local_grid%halo_size(x_index),istart-1
121 current_state%u%data(:,:,i) = current_state%u%data(:,:,istart)
122 current_state%zu%data(:,:,i) = current_state%zu%data(:,:,istart)
123 current_state%w%data(:,:,i) = current_state%w%data(:,:,istart)
124 current_state%zw%data(:,:,i) = current_state%zw%data(:,:,istart)
135 istart=current_state%local_grid%local_domain_start_index(x_index)
136 iend=current_state%local_grid%local_domain_end_index(x_index)
137 jend=current_state%local_grid%local_domain_end_index(y_index)
145 call apply_rigid(current_state,istart,iend,jstart,jend,kstart,kend)
146 do j=jend+1,jend+current_state%local_grid%halo_size(y_index)
147 current_state%v%data(:,:,j) = current_state%v%data(:,:,jend)
148 current_state%zv%data(:,:,j) = current_state%zv%data(:,:,jend)
149 current_state%w%data(:,:,j) = current_state%w%data(:,:,jend)
150 current_state%zw%data(:,:,j) = current_state%zw%data(:,:,jend)
162 istart=current_state%local_grid%local_domain_start_index(x_index)
163 iend=current_state%local_grid%local_domain_end_index(x_index)
164 jstart=current_state%local_grid%local_domain_start_index(y_index)
172 call apply_rigid(current_state,istart,iend,jstart,jend,kstart,kend)
173 do j=jstart-current_state%local_grid%halo_size(y_index),jstart-1
174 current_state%v%data(:,:,j) = current_state%v%data(:,:,jstart)
175 current_state%zv%data(:,:,j) = current_state%zv%data(:,:,jstart)
176 current_state%w%data(:,:,j) = current_state%w%data(:,:,jstart)
177 current_state%zw%data(:,:,j) = current_state%zw%data(:,:,jstart)
186 subroutine apply_rigid(current_state,istart,iend,jstart,jend,kstart,kend)
187 type(model_state_type),
target,
intent(inout) :: current_state
189 INTEGER :: istart, iend, jstart, jend, kstart, kend
206 current_state%th%data(k,j,i) = current_state%zth%data(k,j,i)
210 do iq = 1, current_state%number_q_fields
214 current_state%q(iq)%data(k,j,i) = current_state%zq(iq)%data(k,j,i)