Called on MONC initialisation, will allocate appropriate data structures.
35 type(model_state_type),
target,
intent(inout) :: current_state
39 rnhpts=1.0_default_precision/
real(current_state%global_grid%size(x_index)*current_state%global_grid%size(y_index))
41 start_x=current_state%local_grid%local_domain_start_index(x_index)
42 end_x=current_state%local_grid%local_domain_end_index(X_INDEX)
43 start_y=current_state%local_grid%local_domain_start_index(y_index)
44 end_y=current_state%local_grid%local_domain_end_index(Y_INDEX)
47 if (.not. current_state%continuation_run)
then 48 allocate(current_state%global_grid%configuration%vertical%olubar(current_state%local_grid%size(z_index)),&
49 current_state%global_grid%configuration%vertical%olzubar(current_state%local_grid%size(z_index)))
51 allocate(current_state%global_grid%configuration%vertical%savolubar(current_state%local_grid%size(z_index)))
52 bar_fields=bar_fields+2
55 if (.not. current_state%continuation_run)
then 56 allocate(current_state%global_grid%configuration%vertical%olvbar(current_state%local_grid%size(z_index)),&
57 current_state%global_grid%configuration%vertical%olzvbar(current_state%local_grid%size(z_index)))
59 allocate(current_state%global_grid%configuration%vertical%savolvbar(current_state%local_grid%size(z_index)))
60 bar_fields=bar_fields+2
62 if (current_state%th%active)
then 63 if (.not. current_state%continuation_run)
then 64 allocate(current_state%global_grid%configuration%vertical%olthbar(current_state%local_grid%size(z_index)),&
65 current_state%global_grid%configuration%vertical%olzthbar(current_state%local_grid%size(z_index)))
67 bar_fields=bar_fields+2
69 if (current_state%number_q_fields .gt. 0)
then 70 bar_fields=bar_fields+(current_state%number_q_fields*2)
71 if (.not. current_state%continuation_run)
then 72 allocate(current_state%global_grid%configuration%vertical%olqbar(current_state%local_grid%size(z_index), &
73 current_state%number_q_fields), current_state%global_grid%configuration%vertical%olzqbar(&
74 current_state%local_grid%size(z_index), current_state%number_q_fields))
77 allocate(bartmp(current_state%local_grid%size(z_index), bar_fields))
80 if (.not. current_state%continuation_run)
call calculate_mean_profiles(current_state)