34 type(model_state_type),
target,
intent(inout) :: current_state
36 if (.not. is_component_enabled(current_state%options_database,
"diverr"))
then 37 call log_master_log(log_error,
"The pstep component requires the diverr component to be enabled")
44 type(model_state_type),
target,
intent(inout) :: current_state
47 current_state%column_local_y, current_state%column_local_x)
54 type(model_state_type),
target,
intent(inout) :: current_state
56 integer :: k, x_index, y_index
57 real(kind=DEFAULT_PRECISION) :: dtmtmp
59 x_index=current_state%column_local_x
60 y_index=current_state%column_local_y
62 dtmtmp=merge(current_state%dtm, 0.5_default_precision*current_state%dtm, current_state%field_stepping == centred_stepping)
63 do k=2,current_state%local_grid%size(z_index)
66 current_state%zu%data(k, y_index, x_index)= current_state%zu%data(k, y_index, x_index)+ 2.0_default_precision*&
67 current_state%global_grid%configuration%horizontal%cx*dtmtmp*(current_state%p%data(k, y_index, x_index)-&
68 current_state%p%data(k, y_index, x_index+1))
71 current_state%zv%data(k, y_index, x_index)=&
72 current_state%zv%data(k, y_index, x_index)+2.0_default_precision*&
73 current_state%global_grid%configuration%horizontal%cy*dtmtmp*&
74 (current_state%p%data(k, y_index, x_index) - current_state%p%data(k, y_index+1, x_index))
77 if (k .lt. current_state%local_grid%size(z_index))
then 78 current_state%zw%data(k, y_index, x_index)=current_state%zw%data(k, y_index, x_index)+2.0_default_precision*&
79 current_state%global_grid%configuration%vertical%rdzn(k+1)*dtmtmp*(current_state%p%data(k, y_index, x_index)-&
80 current_state%p%data(k+1, y_index, x_index))
84 if (current_state%use_viscosity_and_diffusion .and. current_state%use_surface_boundary_conditions)
then 86 current_state%zu%data(1, y_index, x_index)=-current_state%zu%data(2, y_index, x_index)-&
87 2.0_default_precision*current_state%ugal
90 current_state%zv%data(1, y_index, x_index)=-current_state%zv%data(2, y_index, x_index)-&
91 2.0_default_precision*current_state%vgal
95 current_state%zu%data(1, y_index, x_index)=current_state%zu%data(2, y_index, x_index)
98 current_state%zv%data(1, y_index, x_index)=current_state%zv%data(2, y_index, x_index)
108 type(model_state_type),
target,
intent(inout) :: current_state
109 integer,
intent(in) :: y_index, x_index
113 do k=1,current_state%local_grid%size(z_index)
115 current_state%u%data(k, y_index, x_index)= current_state%u%data(k, y_index, x_index)-current_state%ugal
116 current_state%zu%data(k, y_index, x_index)= current_state%zu%data(k, y_index, x_index)-current_state%ugal
119 current_state%v%data(k, y_index, x_index)= current_state%v%data(k, y_index, x_index)-current_state%vgal
120 current_state%zv%data(k, y_index, x_index)= current_state%zv%data(k, y_index, x_index)-current_state%vgal
subroutine step_pressure_field(current_state)
Does the actual stepping of the pressure field.
integer, parameter, public log_error
Only log ERROR messages.
subroutine timestep_callback(current_state)
Called each timestep, this will step the pressure field for the non halo columns. ...
subroutine perform_galilean_transformation(current_state, y_index, x_index)
Performs Galilean transformation of flow current and z fields.
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 centred_stepping
Stepping parameter values which determine centred or forward stepping.
logical function, public is_component_enabled(options_database, component_name)
Determines whether or not a specific component is registered and enabled.
subroutine, public log_master_log(level, message)
Will log just from the master process.
Description of a component.
Interfaces and types that MONC components must specify.
Stepping of the pressure field. Completes the time-stepping of the velocity fields by adding the pres...
subroutine initialisation_callback(current_state)
Initialisation callback hook which will check the diverr component is enabled (as this allocates p) ...
Functionality to support the different types of grid and abstraction between global grids and local o...
The model state which represents the current state of a run.
type(component_descriptor_type) function, public pstep_get_descriptor()
Descriptor of this component for registration.