MONC
Functions/Subroutines
clearsourceterms_mod Module Reference

Clears the source terms at the start of a timestep to then be populated by items in the dynamics group. More...

Functions/Subroutines

type(component_descriptor_type) function, public clearsourceterms_get_descriptor ()
 Provides a description of this component for the core to register. More...
 
subroutine timestep_callback (current_state)
 Timestep callback which simply clears the source terms. More...
 

Detailed Description

Clears the source terms at the start of a timestep to then be populated by items in the dynamics group.

Function/Subroutine Documentation

◆ clearsourceterms_get_descriptor()

type(component_descriptor_type) function, public clearsourceterms_mod::clearsourceterms_get_descriptor

Provides a description of this component for the core to register.

Returns
The descriptor containing registration information for this component

Definition at line 17 of file clearsourceterms.F90.

18  clearsourceterms_get_descriptor%name="clearsourceterms"
19  clearsourceterms_get_descriptor%version=0.1
20  clearsourceterms_get_descriptor%timestep=>timestep_callback
Here is the call graph for this function:

◆ timestep_callback()

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

Timestep callback which simply clears the source terms.

Parameters
current_stateThe current model state

Definition at line 25 of file clearsourceterms.F90.

26  type(model_state_type), target, intent(inout) :: current_state
27 
28  integer :: i
29 
30 #ifdef U_ACTIVE
31  current_state%su%data=0.0_default_precision
32 #endif
33 #ifdef V_ACTIVE
34  current_state%sv%data=0.0_default_precision
35 #endif
36 #ifdef W_ACTIVE
37  current_state%sw%data=0.0_default_precision
38 #endif
39 
40  if (current_state%sth%active) then
41  current_state%sth%data=0.0_default_precision
42  end if
43 
44  do i=1, current_state%number_q_fields
45  current_state%sq(i)%data=0.0_default_precision
46  end do
Here is the caller graph for this function: