MONC
steppingdirection.F90
Go to the documentation of this file.
1 
6  implicit none
7 
8 #ifndef TEST_MODE
9  private
10 #endif
11 
13 
14 contains
15 
19  steppingdirection_get_descriptor%name="stepping_direction"
24 
27  subroutine initialisation_callback(current_state)
28  type(model_state_type), target, intent(inout) :: current_state
29 
30  ! TODO - allow configuration to use forward stepping for scalars (th and q) and momentum (u,v,w)
31  current_state%scalar_stepping = centred_stepping
32  current_state%momentum_stepping = centred_stepping
33  end subroutine initialisation_callback
34 
41  subroutine timestep_callback(current_state)
42  type(model_state_type), target, intent(inout) :: current_state
43 
44  current_state%field_stepping = centred_stepping
45  if (current_state%timestep .eq. current_state%start_timestep) current_state%field_stepping = forward_stepping
46  end subroutine timestep_callback
47 end module steppingdirection_mod
steppingdirection_mod
Determines the current stepping direction, which can be either forward or centred....
Definition: steppingdirection.F90:3
steppingdirection_mod::steppingdirection_get_descriptor
type(component_descriptor_type) function, public steppingdirection_get_descriptor()
Returns the descriptor of this component.
Definition: steppingdirection.F90:19
steppingdirection_mod::initialisation_callback
subroutine initialisation_callback(current_state)
Sets the scalar stepping on initialisation. This does not change throughout the model run so we can s...
Definition: steppingdirection.F90:28
monc_component_mod
Interfaces and types that MONC components must specify.
Definition: monc_component.F90:6
steppingdirection_mod::timestep_callback
subroutine timestep_callback(current_state)
Determines whether we are forward or centre stepping.
Definition: steppingdirection.F90:42
state_mod::model_state_type
The ModelState which represents the current state of a run.
Definition: state.F90:39
state_mod::forward_stepping
integer, parameter, public forward_stepping
Definition: state.F90:15
state_mod::centred_stepping
integer, parameter, public centred_stepping
Stepping parameter values which determine centred or forward stepping.
Definition: state.F90:15
monc_component_mod::component_descriptor_type
Description of a component.
Definition: monc_component.F90:42
state_mod
The model state which represents the current state of a run.
Definition: state.F90:2