48 type(model_state_type),
intent(inout) :: current_state
50 integer :: alloc_z, alloc_y, alloc_x, i
52 alloc_z=current_state%local_grid%size(
z_index) + current_state%local_grid%halo_size(
z_index) * 2
53 alloc_y=current_state%local_grid%size(
y_index) + current_state%local_grid%halo_size(
y_index) * 2
54 alloc_x=current_state%local_grid%size(
x_index) + current_state%local_grid%halo_size(
x_index) * 2
57 call allocate_prognostic(current_state%u, alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, primal_grid)
58 call allocate_prognostic(current_state%zu, alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, primal_grid)
59 call allocate_prognostic(current_state%su, alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, primal_grid)
60 call allocate_prognostic(current_state%savu, alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, primal_grid)
63 call allocate_prognostic(current_state%v, alloc_z, alloc_y, alloc_x, dual_grid, primal_grid, dual_grid)
64 call allocate_prognostic(current_state%zv, alloc_z, alloc_y, alloc_x, dual_grid, primal_grid, dual_grid)
65 call allocate_prognostic(current_state%sv, alloc_z, alloc_y, alloc_x, dual_grid, primal_grid, dual_grid)
66 call allocate_prognostic(current_state%savv, alloc_z, alloc_y, alloc_x, dual_grid, primal_grid, dual_grid)
69 call allocate_prognostic(current_state%w, alloc_z, alloc_y, alloc_x, primal_grid, dual_grid, dual_grid)
70 call allocate_prognostic(current_state%zw, alloc_z, alloc_y, alloc_x, primal_grid, dual_grid, dual_grid)
71 call allocate_prognostic(current_state%sw, alloc_z, alloc_y, alloc_x, primal_grid, dual_grid, dual_grid)
72 call allocate_prognostic(current_state%savw, alloc_z, alloc_y, alloc_x, primal_grid, dual_grid, dual_grid)
75 if (enable_theta)
then
76 call allocate_prognostic(current_state%th, alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, dual_grid)
77 call allocate_prognostic(current_state%zth, alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, dual_grid)
78 call allocate_prognostic(current_state%sth, alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, dual_grid)
80 if (current_state%number_q_fields .gt. 0)
then
81 allocate(current_state%q(current_state%number_q_fields), &
82 current_state%zq(current_state%number_q_fields), current_state%sq(current_state%number_q_fields))
83 do i=1, current_state%number_q_fields
84 call allocate_prognostic(current_state%q(i), alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, dual_grid)
85 call allocate_prognostic(current_state%zq(i), alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, dual_grid)
86 call allocate_prognostic(current_state%sq(i), alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, dual_grid)
90 current_state%water_vapour_mixing_ratio_index=get_q_index(standard_q_names%VAPOUR,
'simplesetup')
91 current_state%liquid_water_mixing_ratio_index=get_q_index(standard_q_names%CLOUD_LIQUID_MASS,
'simplesetup')
95 call allocate_prognostic(current_state%sth_lw, alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, dual_grid)
96 call allocate_prognostic(current_state%sth_sw, alloc_z, alloc_y, alloc_x, dual_grid, dual_grid, dual_grid)