MONC
Functions/Subroutines | Variables
set_consistent_lowbc_mod Module Reference

This component sets the source term for the lowest level (Level 1) so that, depending on surface consitionm, there is consistent lower boundary condition. More...

Functions/Subroutines

type(component_descriptor_type) function set_consistent_lowbc_get_descriptor ()
 Provides the descriptor back to the caller and is used in component registration. More...
 
subroutine initialisation_callback (current_state)
 
subroutine timestep_callback (current_state)
 
subroutine set_flow_lowbc (current_state, current_x_index, current_y_index)
 
subroutine set_th_lowbc (current_state, current_x_index, current_y_index)
 
subroutine set_q_lowbc (current_state, current_x_index, current_y_index)
 

Variables

logical advect_flow
 
logical advect_th
 
logical advect_q
 
integer iqv
 

Detailed Description

This component sets the source term for the lowest level (Level 1) so that, depending on surface consitionm, there is consistent lower boundary condition.

Function/Subroutine Documentation

◆ initialisation_callback()

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

Definition at line 29 of file set_consistent_lowbc.F90.

30  ! copy of the initialisation callback from pwadvection, used to
31  ! identify whether acting on flow, theta or q fields
32  type(model_state_type), target, intent(inout) :: current_state
33 
34  ! Determine vapour index
35  if (.not. current_state%passive_q) then
36  iqv = get_q_index(standard_q_names%VAPOUR, 'lowerbc')
37  endif
38 
Here is the caller graph for this function:

◆ set_consistent_lowbc_get_descriptor()

type(component_descriptor_type) function set_consistent_lowbc_mod::set_consistent_lowbc_get_descriptor

Provides the descriptor back to the caller and is used in component registration.

Returns
The termination check component descriptor

Definition at line 22 of file set_consistent_lowbc.F90.

23  set_consistent_lowbc_get_descriptor%name="set_consistent_lowbc"
24  set_consistent_lowbc_get_descriptor%version=0.1
25  set_consistent_lowbc_get_descriptor%initialisation=>initialisation_callback
26  set_consistent_lowbc_get_descriptor%timestep=>timestep_callback
Here is the call graph for this function:

◆ set_flow_lowbc()

subroutine set_consistent_lowbc_mod::set_flow_lowbc ( type(model_state_type), intent(inout), target  current_state,
integer, intent(in)  current_x_index,
integer, intent(in)  current_y_index 
)

Definition at line 60 of file set_consistent_lowbc.F90.

61  type(model_state_type), target, intent(inout) :: current_state
62  integer, intent(in) :: current_x_index, current_y_index
63 
64  if (current_state%use_viscosity_and_diffusion .and. &
65  current_state%use_surface_boundary_conditions) then
66 #ifdef U_ACTIVE
67  current_state%su%data(1, current_y_index, current_x_index)= &
68  -current_state%su%data(2, current_y_index, current_x_index)
69 #endif
70 #ifdef V_ACTIVE
71  current_state%sv%data(1, current_y_index, current_x_index)= &
72  -current_state%sv%data(2, current_y_index, current_x_index)
73 #endif
74  else
75 #ifdef U_ACTIVE
76  current_state%su%data(1, current_y_index, current_x_index)= &
77  current_state%su%data(2, current_y_index, current_x_index)
78 #endif
79 #ifdef V_ACTIVE
80  current_state%sv%data(1, current_y_index, current_x_index)= &
81  current_state%sv%data(2, current_y_index, current_x_index)
82 #endif
83  endif
84 
Here is the caller graph for this function:

◆ set_q_lowbc()

subroutine set_consistent_lowbc_mod::set_q_lowbc ( type(model_state_type), intent(inout), target  current_state,
integer, intent(in)  current_x_index,
integer, intent(in)  current_y_index 
)

Definition at line 103 of file set_consistent_lowbc.F90.

104  type(model_state_type), target, intent(inout) :: current_state
105  integer, intent(in) :: current_x_index, current_y_index
106 
107  integer :: i
108 
109  if (current_state%number_q_fields .gt. 0) then
110  do n=1,current_state%number_q_fields
111  current_state%sq(n)%data(1, current_y_index, current_x_index)= &
112  current_state%sq(n)%data(2,current_y_index, current_x_index)
113  enddo
114  endif
115  if (current_state%use_surface_boundary_conditions .and. &
116  current_state%type_of_surface_boundary_conditions == prescribed_surface_values) then
117  current_state%sq(iqv)%data(1, current_y_index, current_x_index)= &
118  -(current_state%sq(iqv)%data(2,current_y_index, current_x_index))
119  endif
120 
Here is the caller graph for this function:

◆ set_th_lowbc()

subroutine set_consistent_lowbc_mod::set_th_lowbc ( type(model_state_type), intent(inout), target  current_state,
integer, intent(in)  current_x_index,
integer, intent(in)  current_y_index 
)

Definition at line 87 of file set_consistent_lowbc.F90.

88  type(model_state_type), target, intent(inout) :: current_state
89  integer, intent(in) :: current_x_index, current_y_index
90 
91  if (current_state%use_surface_boundary_conditions) then
92  if (current_state%type_of_surface_boundary_conditions == prescribed_surface_fluxes) then
93  current_state%sth%data(1, current_y_index, current_x_index)= &
94  current_state%sth%data(2, current_y_index, current_x_index)
95  else
96  current_state%sth%data(1, current_y_index, current_x_index)= &
97  -current_state%sth%data(2, current_y_index, current_x_index)
98  endif
99  endif
100 
Here is the caller graph for this function:

◆ timestep_callback()

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

Definition at line 41 of file set_consistent_lowbc.F90.

42  type(model_state_type), target, intent(inout) :: current_state
43 
44  integer :: current_x_index, current_y_index
45 
46  current_x_index=current_state%column_local_x
47  current_y_index=current_state%column_local_y
48 
49  if (current_state%halo_column) return
50 
51  call set_flow_lowbc(current_state, current_x_index, current_y_index)
52  if (current_state%th%active) then
53  call set_th_lowbc(current_state, current_x_index, current_y_index)
54  endif
55  if (current_state%number_q_fields .gt. 0) then
56  call set_q_lowbc(current_state, current_x_index, current_y_index)
57  endif
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ advect_flow

logical set_consistent_lowbc_mod::advect_flow

Definition at line 13 of file set_consistent_lowbc.F90.

13  logical :: advect_flow, advect_th, advect_q

◆ advect_q

logical set_consistent_lowbc_mod::advect_q

Definition at line 13 of file set_consistent_lowbc.F90.

◆ advect_th

logical set_consistent_lowbc_mod::advect_th

Definition at line 13 of file set_consistent_lowbc.F90.

◆ iqv

integer set_consistent_lowbc_mod::iqv

Definition at line 15 of file set_consistent_lowbc.F90.

15  integer :: iqv ! index for vapour