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)
type(component_descriptor_type) function, public lateral_bcs_get_descriptor()
Provides a description of this component for the core to register.
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
integer, parameter, public z_index
Grid index parameters.
Contains common definitions for the data and datatypes used by MONC.
The ModelState which represents the current state of a run.
integer, parameter, public log_debug
Log DEBUG, INFO, WARNING and ERROR messages.
Description of a component.
integer, parameter lbc_periodic
subroutine, public log_log(level, message, str)
Logs a message at the specified level. If the level is above the current level then the message is ig...
Interfaces and types that MONC components must specify.
subroutine apply_rigid(current_state, istart, iend, jstart, jend, kstart, kend)
integer, parameter lbc_blend
Functionality to support the different types of grid and abstraction between global grids and local o...
integer, parameter lbc_rigid
Applies lateral boundary conditions. Note that these boundary conditions only make sense if bi-period...
subroutine timestep_callback(current_state)
Timestep callback which applies lateral boundary conditions.
The model state which represents the current state of a run.
integer function, public log_get_logging_level()
Retrieves the current logging level.
integer, parameter, public y_index
integer, parameter, public x_index
subroutine initialisation_callback(current_state)
Initialisation callback. Sets up boundary depth and other configurable options.