MONC
Data Types | Functions/Subroutines | Variables
def_tvd_diagnostic_terms Module Reference

Data Types

type  str_tvd_diagnostic_terms
 

Functions/Subroutines

subroutine allocate_tvd_diagnostic_terms (current_state, tvd_dgs_terms)
 
subroutine deallocate_tvd_diagnostic_terms (current_state, tvd_dgs_terms)
 

Variables

type(str_tvd_diagnostic_termstvd_dgs_terms
 

Function/Subroutine Documentation

◆ allocate_tvd_diagnostic_terms()

subroutine def_tvd_diagnostic_terms::allocate_tvd_diagnostic_terms ( type(model_state_type), intent(in), target  current_state,
type(str_tvd_diagnostic_terms), intent(inout)  tvd_dgs_terms 
)

Definition at line 27 of file def_tvd_diagnostic_terms.F90.

28 
29  implicit none
30 
31  type(model_state_type), target, intent(in) :: current_state
32  type(str_tvd_diagnostic_terms), intent(inout) :: tvd_dgs_terms
33 
34  integer :: k_top, x_local, y_local
35 
36  k_top = current_state%local_grid%size(z_index) + current_state%local_grid%halo_size(z_index) * 2
37  x_local = current_state%local_grid%size(x_index) + current_state%local_grid%halo_size(x_index) * 2
38  y_local = current_state%local_grid%size(y_index) + current_state%local_grid%halo_size(x_index) * 2
39 
40  allocate(tvd_dgs_terms%adv_u_dgs(k_top, y_local, x_local), &
41  tvd_dgs_terms%adv_v_dgs(k_top, y_local, x_local), &
42  tvd_dgs_terms%adv_w_dgs(k_top, y_local, x_local), &
43  tvd_dgs_terms%adv_th_dgs(k_top, y_local, x_local))
44 
45  tvd_dgs_terms%adv_u_dgs(:,:,:) = 0.0
46  tvd_dgs_terms%adv_v_dgs(:,:,:) = 0.0
47  tvd_dgs_terms%adv_w_dgs(:,:,:) = 0.0
48  tvd_dgs_terms%adv_th_dgs(:,:,:) = 0.0
49 
50  if (current_state%number_q_fields > 0) then
51  allocate(tvd_dgs_terms%adv_q_dgs(k_top, y_local, x_local, current_state%number_q_fields))
52  tvd_dgs_terms%adv_q_dgs(:,:,:,:)= 0.0
53  endif
54 

◆ deallocate_tvd_diagnostic_terms()

subroutine def_tvd_diagnostic_terms::deallocate_tvd_diagnostic_terms ( type(model_state_type), intent(in), target  current_state,
type(str_tvd_diagnostic_terms), intent(inout)  tvd_dgs_terms 
)

Definition at line 57 of file def_tvd_diagnostic_terms.F90.

58  type(model_state_type), target, intent(in) :: current_state
59  type(str_tvd_diagnostic_terms), intent(inout) :: tvd_dgs_terms
60 
61  deallocate(tvd_dgs_terms%adv_u_dgs, &
62  tvd_dgs_terms%adv_v_dgs, &
63  tvd_dgs_terms%adv_w_dgs, &
64  tvd_dgs_terms%adv_th_dgs)
65 
66  if (current_state%number_q_fields > 0) then
67  deallocate(tvd_dgs_terms%adv_q_dgs)
68  endif
69 

Variable Documentation

◆ tvd_dgs_terms

type(str_tvd_diagnostic_terms) def_tvd_diagnostic_terms::tvd_dgs_terms

Definition at line 23 of file def_tvd_diagnostic_terms.F90.

23  type(str_tvd_diagnostic_terms) :: tvd_dgs_terms