Note
Function that returns the starting surface of random heights
subroutine add_nois() !================================================================================================ !<@note Function that returns the starting surface of random heights !< !<@endnote !------------------------------------------------------------------------------------------------ implicit none integer (kind=I4) :: w, h, l real(kind=R8) :: size_noise real(kind=R8), allocatable, dimension(:) :: tab_tmp type(MOMENT_STAT) :: mx read(JOB,*) mx%sk, mx%ku, size_noise ; LINE_READ = LINE_READ +1 ; write(SPY,*) "line: ", LINE_READ, "ssk, sku, size ", mx%sk, mx%ku, size_noise w = PARAM%width h = PARAM%height l = PARAM%npts allocate( tab_tmp(1:l) ) call build_heights( vec_out = tab_tmp(1:l), & ! OUT use_fct_expo = ( mx%ku < 1.34 * mx%sk**2 + 1.8 ), & ! IN stats_in = mx, & ! IN lg = l ) ! IN call std_array( tab = tab_tmp(1:l) ) call scramble( tab = tab_tmp(1:l), & ! INOUT lg = l ) ! IN PARAM%surf(1:w, 1:h) = PARAM%surf(1:w, 1:h) + size_noise * reshape( tab_tmp(1:l), [w, h] ) deallocate( tab_tmp ) return endsubroutine add_nois