72 type(model_state_type),
target,
intent(inout) :: current_state
75 real(kind=DEFAULT_PRECISION) :: cltop_col, clbas_col
77 if (current_state%first_timestep_column)
then 78 totqv=0.0_default_precision
79 totql=0.0_default_precision
80 totqz=0.0_default_precision
81 wmax=0.0_default_precision
82 wmin=0.0_default_precision
83 qlmax=0.0_default_precision
84 cltop_av=0.0_default_precision
85 clbas_av=0.0_default_precision
86 cltop=0.0_default_precision
87 clbas=0.0_default_precision
90 if (.not. current_state%halo_column)
then 91 cltop_col=0.0_default_precision
92 clbas_col=0.0_default_precision
93 do k=2, current_state%local_grid%size(z_index)
94 wmax=max(wmax, current_state%w%data(k, current_state%column_local_y, current_state%column_local_x))
95 wmin=min(wmin, current_state%w%data(k, current_state%column_local_y, current_state%column_local_x))
97 if (current_state%number_q_fields .gt. 0)
then 98 if (current_state%liquid_water_mixing_ratio_index .gt. 0 .and. &
99 current_state%number_q_fields .ge. current_state%liquid_water_mixing_ratio_index)
then 100 if (qlmax .lt. current_state%q(current_state%liquid_water_mixing_ratio_index)%data(k, &
101 current_state%column_local_y, current_state%column_local_x))
then 102 qlmax=max(qlmax, current_state%q(current_state%liquid_water_mixing_ratio_index)%data(k, &
103 current_state%column_local_y, current_state%column_local_x))
107 if (current_state%q(current_state%liquid_water_mixing_ratio_index)%data(k, &
108 current_state%column_local_y, current_state%column_local_x) .gt. qlcrit)
then 109 cltop_col=current_state%global_grid%configuration%vertical%zn(k)
110 cltop=max(cltop, current_state%global_grid%configuration%vertical%zn(k))
111 clbas=min(clbas, current_state%global_grid%configuration%vertical%zn(k))
114 if (current_state%q(current_state%liquid_water_mixing_ratio_index)%data(current_state%local_grid%size(z_index)+1-k, &
115 current_state%column_local_y, current_state%column_local_x) .gt. qlcrit)
then 116 clbas_col=current_state%global_grid%configuration%vertical%zn(current_state%local_grid%size(z_index)+1-k)
120 totqz=totqz+tempfac(k)*current_state%q(current_state%liquid_water_mixing_ratio_index)%data(k, &
121 current_state%column_local_y, current_state%column_local_x)*current_state%global_grid%configuration%vertical%zn(k)
124 if (current_state%water_vapour_mixing_ratio_index .gt. 0 .and. &
125 current_state%number_q_fields .ge. current_state%water_vapour_mixing_ratio_index)
then 126 totqv=totqv+tempfac(k)*current_state%q(current_state%water_vapour_mixing_ratio_index)%data(k, &
127 current_state%column_local_y, current_state%column_local_x)
128 totql=totql+tempfac(k)*current_state%q(current_state%liquid_water_mixing_ratio_index)%data(k, &
129 current_state%column_local_y, current_state%column_local_x)
133 if (cltop_col .gt. 0.0_default_precision) ncl_col=ncl_col+1
134 cltop_av=cltop_av+cltop_col
135 clbas_av=clbas_av+clbas_col