56 type(model_state_type),
target,
intent(inout) :: current_state
58 if (current_state%th%active)
then
59 allocate(
tdegk(current_state%local_grid%size(z_index), &
60 current_state%local_grid%size(y_index), &
61 current_state%local_grid%size(x_index)))
62 allocate(
theta(current_state%local_grid%size(z_index), &
63 current_state%local_grid%size(y_index), &
64 current_state%local_grid%size(x_index)))
66 current_state%local_grid%size(y_index), &
67 current_state%local_grid%size(x_index)))
70 if (.not. current_state%passive_q .and. current_state%number_q_fields .gt. 0)
then
72 iqv=get_q_index(standard_q_names%VAPOUR,
'diagnostics_3d')
73 iql=get_q_index(standard_q_names%CLOUD_LIQUID_MASS,
'diagnostics_3d')
74 if (current_state%rain_water_mixing_ratio_index > 0) &
75 iqr = current_state%rain_water_mixing_ratio_index
81 type(model_state_type),
target,
intent(inout) :: current_state
83 real(kind=default_precision) :: exner, pmb, qv, qs
86 integer :: current_y_index, current_x_index, target_x_index, target_y_index
88 if (current_state%halo_column)
return
90 current_y_index=current_state%column_local_y
91 current_x_index=current_state%column_local_x
92 target_y_index=current_y_index-current_state%local_grid%halo_size(y_index)
93 target_x_index=current_x_index-current_state%local_grid%halo_size(x_index)
95 if (current_state%th%active)
then
96 theta(:,target_y_index, target_x_index) = &
97 (current_state%th%data(:,current_y_index,current_x_index) &
98 + current_state%global_grid%configuration%vertical%thref(:))
100 (current_state%th%data(:,current_y_index,current_x_index) &
101 + current_state%global_grid%configuration%vertical%thref(:))
103 if (.not. current_state%passive_q .and. &
104 current_state%number_q_fields .gt. 0)
then
106 current_state%q(
iql)%data(:,current_y_index,current_x_index) + &
107 current_state%q(
iqr)%data(:,current_y_index,current_x_index)
112 tdegk(:,target_y_index, target_x_index) = &
113 (current_state%th%data(:,current_y_index,current_x_index) &
114 + current_state%global_grid%configuration%vertical%thref(:) &
115 * current_state%global_grid%configuration%vertical%rprefrcp(:))
125 type(model_state_type),
target,
intent(inout) :: current_state
126 character(len=*),
intent(in) :: name
127 type(component_field_information_type),
intent(out) :: field_information
129 field_information%field_type=component_array_field_type
130 field_information%number_dimensions=3
131 field_information%dimension_sizes(1)=current_state%local_grid%size(z_index)
132 field_information%dimension_sizes(2)=current_state%local_grid%size(y_index)
133 field_information%dimension_sizes(3)=current_state%local_grid%size(x_index)
134 field_information%data_type=component_double_data_type
135 if (name .eq.
"temperature" .or. name .eq.
"theta" &
136 .or. name .eq.
"thetali")
then
137 field_information%enabled=current_state%th%active
139 field_information%enabled=.true.
148 type(model_state_type),
target,
intent(inout) :: current_state
149 character(len=*),
intent(in) :: name
150 type(component_field_value_type),
intent(out) :: field_value
154 if (name .eq.
"temperature")
then
155 allocate(field_value%real_3d_array(current_state%local_grid%size(z_index), &
156 current_state%local_grid%size(y_index), &
157 current_state%local_grid%size(x_index)))
158 field_value%real_3d_array(:,:,:) =
tdegk(:,:,:)
159 elseif (name .eq.
"theta")
then
160 allocate(field_value%real_3d_array(current_state%local_grid%size(z_index), &
161 current_state%local_grid%size(y_index), &
162 current_state%local_grid%size(x_index)))
163 field_value%real_3d_array(:,:,:) =
theta(:,:,:)
164 elseif (name .eq.
"thetali")
then
165 allocate(field_value%real_3d_array(current_state%local_grid%size(z_index), &
166 current_state%local_grid%size(y_index), &
167 current_state%local_grid%size(x_index)))