MONC
Functions/Subroutines
steppingdirection_mod Module Reference

Determines the current stepping direction, which can be either forward or centred. This is mainly for field stepping, which is u, v, w fields but also scalars as well which is th and q. More...

Functions/Subroutines

type(component_descriptor_type) function, public steppingdirection_get_descriptor ()
 Returns the descriptor of this component. More...
 
subroutine initialisation_callback (current_state)
 Sets the scalar stepping on initialisation. This does not change throughout the model run so we can safely set it here. More...
 
subroutine timestep_callback (current_state)
 Determines whether we are forward or centre stepping. More...
 

Detailed Description

Determines the current stepping direction, which can be either forward or centred. This is mainly for field stepping, which is u, v, w fields but also scalars as well which is th and q.

Function/Subroutine Documentation

◆ initialisation_callback()

subroutine steppingdirection_mod::initialisation_callback ( type(model_state_type), intent(inout), target  current_state)
private

Sets the scalar stepping on initialisation. This does not change throughout the model run so we can safely set it here.

Parameters
current_stateThe current model state

Definition at line 27 of file steppingdirection.F90.

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
Here is the caller graph for this function:

◆ steppingdirection_get_descriptor()

type(component_descriptor_type) function, public steppingdirection_mod::steppingdirection_get_descriptor

Returns the descriptor of this component.

Returns
The stepping direction component descriptor

Definition at line 18 of file steppingdirection.F90.

19  steppingdirection_get_descriptor%name="stepping_direction"
20  steppingdirection_get_descriptor%version=0.1
21  steppingdirection_get_descriptor%initialisation=>initialisation_callback
22  steppingdirection_get_descriptor%timestep=>timestep_callback
Here is the call graph for this function:

◆ timestep_callback()

subroutine steppingdirection_mod::timestep_callback ( type(model_state_type), intent(inout), target  current_state)
private

Determines whether we are forward or centre stepping.

This is important as forward stepping will effectively ignore the Z field and performs no smoothing on the field. Centre stepping uses the Z field and the Robert filter for smoothing.

Parameters
current_stateThe current model state

Definition at line 41 of file steppingdirection.F90.

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
Here is the caller graph for this function: