Note
Function that applies a low-pass filter to the surface PARAM%surf
subroutine smooth__() !================================================================================================ !<@note Function that applies a low-pass filter to the surface PARAM%surf !< !<@endnote !------------------------------------------------------------------------------------------------ implicit none integer(kind=I4) :: w, h real(kind=R8), dimension(:,:), allocatable :: tab_tmp real(kind=R8) :: cutoff read(JOB,*) cutoff ; LINE_READ = LINE_READ +1 ; write(SPY,*) "line: ", LINE_READ, "cutoff ", cutoff PARAM%cutoff = cutoff w = PARAM%width h = PARAM%height ! forces FFT reinitialization FFT_DIM = 0 allocate( tab_tmp(1:w, 1:h) ) ! remark: if cutoff is negative, the filter is a top-hat instead of Gaussian call fft_filter( tab = PARAM%surf(1:w, 1:h), & ! IN long = w, & ! IN larg = h, & ! IN cutoff = PARAM%cutoff, & ! IN bf_tab = tab_tmp(1:w, 1:h), & ! OUT multi_fft = .false., & ! IN pad = -1._R8, & ! IN ext = 'constant' ) ! IN ! standardize surface call std_array( tab = tab_tmp(1:w, 1:h) ) PARAM%surf(1:w, 1:h) = tab_tmp(1:w, 1:h) deallocate( tab_tmp ) FFT_DIM = 0 return endsubroutine smooth__