std_array1D Subroutine

private subroutine std_array1D(tab, mx)

Arguments

Type IntentOptional Attributes Name
real(kind=R8), intent(inout), dimension(:) :: tab

1D array

type(moment_stat), intent(out), optional :: mx

moment_stat statistical moments


Calls

proc~~std_array1d~~CallsGraph proc~std_array1d std_array1D proc~calc_moments calc_moments proc~std_array1d->proc~calc_moments proc~calc_moments_1d calc_moments_1D proc~calc_moments->proc~calc_moments_1d

Called by

proc~~std_array1d~~CalledByGraph proc~std_array1d std_array1D proc~std_array std_array proc~std_array->proc~std_array1d

Source Code

   subroutine std_array1D(tab, mx)
   implicit none
   real(kind=R8), intent(inout), dimension(:) :: tab    !! *1D array*
   type(moment_stat), intent(out), optional   :: mx     !! [[moment_stat]] *statistical moments*

      type(moment_stat) :: mx_tmp

      integer (kind=I4) :: nb_m

      if ( present(mx) ) then

         nb_m = 4

      else

         nb_m = 2

      endif

      call calc_moments(tab = tab, mx = mx_tmp, nb_mom = nb_m)

      tab = (tab - mx_tmp%mu) / mx_tmp%si

      if ( present(mx) ) mx = mx_tmp

   return
   endsubroutine std_array1D