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 bar_fields=bar_fields+2
54 if (.not. current_state%continuation_run)
then
55 allocate(current_state%global_grid%configuration%vertical%olvbar(current_state%local_grid%size(z_index)),&
56 current_state%global_grid%configuration%vertical%olzvbar(current_state%local_grid%size(z_index)))
58 bar_fields=bar_fields+2
60 if (current_state%th%active)
then
61 if (.not. current_state%continuation_run)
then
62 allocate(current_state%global_grid%configuration%vertical%olthbar(current_state%local_grid%size(z_index)),&
63 current_state%global_grid%configuration%vertical%olzthbar(current_state%local_grid%size(z_index)))
65 bar_fields=bar_fields+2
67 if (current_state%number_q_fields .gt. 0)
then
68 bar_fields=bar_fields+(current_state%number_q_fields*2)
69 if (.not. current_state%continuation_run)
then
70 allocate(current_state%global_grid%configuration%vertical%olqbar(current_state%local_grid%size(z_index), &
71 current_state%number_q_fields), current_state%global_grid%configuration%vertical%olzqbar(&
72 current_state%local_grid%size(z_index), current_state%number_q_fields))
75 allocate(bartmp(current_state%local_grid%size(z_index), bar_fields))
78 if (.not. current_state%continuation_run)
call calculate_mean_profiles(current_state)