85 type(model_state_type),
target,
intent(inout) :: current_state
88 integer :: current_y_index, current_x_index, target_x_index, target_y_index
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%first_timestep_column)
then 118 if (.not. current_state%halo_column)
then 119 if (current_state%number_q_fields .gt. 0)
then 123 if (current_state%liquid_water_mixing_ratio_index .gt. 0 .and. &
124 current_state%number_q_fields .ge. current_state%liquid_water_mixing_ratio_index)
then 125 qlmax(target_y_index, target_x_index) = &
126 maxval(current_state%q(current_state%liquid_water_mixing_ratio_index)%data &
127 (:,current_y_index, current_x_index))
136 do k = 2, current_state%local_grid%size(z_index)
137 if (current_state%q(current_state%liquid_water_mixing_ratio_index)%data(k, &
138 current_y_index, current_x_index) .gt. qlcrit)
then 139 cltop(target_y_index, target_x_index) = &
140 current_state%global_grid%configuration%vertical%zn(k)
142 if (current_state%q(current_state%liquid_water_mixing_ratio_index)%data( &
143 current_state%local_grid%size(z_index)+1-k, current_y_index, current_x_index) .gt. &
145 clbas(target_y_index, target_x_index)= &
146 current_state%global_grid%configuration%vertical%zn(current_state%local_grid%size(z_index)+1-k)
152 if (current_state%water_vapour_mixing_ratio_index .gt. 0 .and. &
153 current_state%number_q_fields .ge. current_state%water_vapour_mixing_ratio_index)
then 154 do k = 2, current_state%local_grid%size(z_index)
155 vwp(target_y_index, target_x_index)=vwp(target_y_index, target_x_index) &
156 +tempfac(k)*current_state%q(current_state%water_vapour_mixing_ratio_index)%data(k, &
157 current_y_index, current_x_index)
158 lwp(target_y_index, target_x_index)=lwp(target_y_index, target_x_index) &
159 +tempfac(k)*current_state%q(current_state%liquid_water_mixing_ratio_index)%data(k, &
160 current_y_index, current_x_index)
166 if (current_state%use_surface_boundary_conditions)
then 167 if (current_state%water_vapour_mixing_ratio_index .gt. 0 .and. &
168 current_state%number_q_fields .ge. current_state%water_vapour_mixing_ratio_index)
then 169 lathf(target_y_index, target_x_index)= (current_state%diff_coefficient%data(1, current_y_index, current_x_index) * &
170 current_state%global_grid%configuration%vertical%rdzn(2) * &
171 (current_state%q(current_state%water_vapour_mixing_ratio_index)%data(1,current_y_index,current_x_index) - &
172 current_state%q(current_state%water_vapour_mixing_ratio_index)%data(2,current_y_index,current_x_index))) &
173 * rlvap * current_state%global_grid%configuration%vertical%rhon(1)
176 if (current_state%th%active)
then 177 senhf(target_y_index, target_x_index)=(current_state%diff_coefficient%data(1, current_y_index, current_x_index) &
178 * current_state%global_grid%configuration%vertical%rdzn(2) &
179 * (current_state%th%data(1, current_y_index, current_x_index) &
180 - current_state%th%data(2, current_y_index, current_x_index) &
181 - current_state%global_grid%configuration%vertical%dthref(1))) &
182 * current_state%global_grid%configuration%vertical%rhon(1)*cp
185 wmax(target_y_index, target_x_index)=maxval(current_state%w%data(:, current_y_index, current_x_index))
186 wmin(target_y_index, target_x_index)=minval(current_state%w%data(:, current_y_index, current_x_index))