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 type(MOMENT_STAT) :: m_res 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 allocate( tab_tmp(1:w, 1:h) ) 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 call calc_moments( tab = tab_tmp(1:w, 1:h), & ! IN mx = m_res, & ! OUT nb_mom = 2 ) ! IN ! the surface has been modified, so recenter and rescale PARAM%surf(1:w, 1:h) = ( tab_tmp(1:w, 1:h) - m_res%mu ) / m_res%si deallocate( tab_tmp ) return endsubroutine smooth__