libsim  Versione 7.1.6

◆ qc_compute_normalizeddensityindex()

subroutine, public modqccli::qc_compute_normalizeddensityindex ( type(qcclitype), intent(inout)  this,
real, dimension(:), intent(in)  perc_vals,
type(cyclicdatetime), intent(in)  cyclicdt,
real, optional  presentperc,
integer, optional  presentnumb,
logical, intent(in), optional  data_normalized 
)
Parametri
[in,out]thisvolume providing data to be computed and output data. Input data are not modified by the method, apart from performing a vol7d_alloc_vol on it
[in]perc_valspercentile values to use in compute, between 0. and 100.
[in]cyclicdtcyclic date and time
presentpercrate of data present for compute on expected values (default=not used)
presentnumbnumber of data present for compute (default= not used)
[in]data_normalizeddata input are normalized and the output will be not differentiated by area/height.

Definizione alla linea 1894 del file modqccli.F90.

1895 
1896  !create mask only with valid time
1897  mask = spread(spread((this%v7d%time == cyclicdt ),1,size(this%v7d%ana)),3,size(this%v7d%network))
1898  !delete in mask different area
1899  do j=1, size(mask,1)
1900  if (areav(j) /= area(i)) mask(j,:,:) =.false.
1901  end do
1902 
1903  if (this%height2level) then
1904  allocate (maskplus(size(this%v7d%ana),size(this%v7d%time),size(this%v7d%network)))
1905  do k=1,cli_nlevel
1906 #ifdef DEBUG
1907  CALL l4f_category_log(this%category, l4f_debug, 'k has value '//t2c(k))
1908 #endif
1909 
1910  do iana=1,size(mask,1)
1911  if (iclv(iana) /= k) maskplus(iana,:,:) =.false.
1912  if (iclv(iana) == k) maskplus(iana,:,:) = mask(iana,:,:)
1913  enddo
1914 
1915  call sub_ndi(mymask=maskplus)
1916 
1917  enddo
1918  deallocate(maskplus)
1919 
1920  else
1921 
1922  k=1
1923  call sub_ndi(mymask=mask)
1924 
1925  endif
1926 
1927  end do
1928 
1929  else
1930 
1931  mask = spread(spread((this%v7d%time == cyclicdt ),1,size(this%v7d%ana)),3,size(this%v7d%network))
1932 
1933  k=1
1934  i=1
1935  call sub_ndi(mymask=mask)
1936 
1937  endif
1938 
1939  end do
1940  end do
1941 end do
1942 
1943 deallocate (ndi,limbins,mask)
1944 if (.NOT.(lnorm)) deallocate(area)
1945 
1946 contains
1947 
1948 subroutine sub_ndi(mymask)
1949 
1950 logical :: mymask(:,:,:)
1951 
1952  ! we want more than 30% data present and a number of data bigger than 100 (default)
1953 if &
1954  ( c_e(lpresentperc) .and. ((float(count &
1955  (mymask .and. c_e(this%v7d%voldatir(:,:, indlevel, indtimerange, inddativarr,:)))&
1956  ) / &
1957  float(count(mymask))) < lpresentperc)) &
1958  return
1959 
1960 if &
1961  ( c_e(lpresentnumb) .and. (count &
1962  (mymask .and. c_e(this%v7d%voldatir(:,:, indlevel, indtimerange, inddativarr,:))) < lpresentnumb)&
1963  ) &
1964  return
1965 
1966 !print*,"compute"
1967 !print*,"-------------------------------------------------------------"
1968 
1969 call NormalizedDensityIndex (&
1970  pack(this%v7d%voldatir(:,:, indlevel, indtimerange, inddativarr,:), &
1971  mask=mymask), &
1972  perc_vals, ndi, limbins)
1973 
1974 do j=1,size(perc_vals)-1
1975  indana=(k-1)*(size(perc_vals)-1)*narea + (j-1)*narea + i
1976  this%clima%voldatir(indana, indtime, indlevel, indtimerange, inddativarr, indnetwork)=&
1977  limbins(j)
1978  this%clima%voldatiattrr(indana, indtime, indlevel, indtimerange, inddativarr, indnetwork,indattr)=&
1979  ndi(j)*100
1980 end do
1981 
1982 end subroutine sub_ndi
1983 
1984 
1985 end SUBROUTINE qc_compute_normalizeddensityindex
1986 
1987 end module modqccli
1988 
1989 
1992 
Controllo di qualità climatico.
Definition: modqccli.F90:301

Generated with Doxygen.