0.6.2-dev0
FORCES
FORtran lib for Comp. Env. Sys.
Loading...
Searching...
No Matches
mo_utils::imaxloc Interface Reference

First location in array of element with the maximum value. More...

Public Member Functions

integer(i4) function imaxloc_i4 (arr, mask)
 
integer(i4) function imaxloc_i8 (arr, mask)
 
integer(i4) function imaxloc_sp (arr, mask)
 
integer(i4) function imaxloc_dp (arr, mask)
 

Detailed Description

First location in array of element with the maximum value.

Fortran intrinsic maxloc return arrays with all subsripts corresponding to the maximum value in the array.
This routine returns only the first entry as scalar integer.

Example

integer(i4) :: imax
imax = imaxloc(vec, mask=mask)

-> see also example in test directory

Parameters
[in]integer(i4/i8)/real(sp/dp)/complex(spc/dpc) :: array(:)Input array
[in]logical :: mask(:)If present, only those locations in array corresponding to the true values in mask are searched for the maximum value.
Returns
integer(i4) :: imaxloc — First location of maximum
Authors
Matthias Cuntz, Juliane Mai
Date
Feb 2014

Definition at line 131 of file mo_utils.F90.

Member Function/Subroutine Documentation

◆ imaxloc_dp()

integer(i4) function mo_utils::imaxloc::imaxloc_dp ( real(dp), dimension(:), intent(in)  arr,
logical, dimension(:), intent(in), optional  mask 
)

Definition at line 764 of file mo_utils.F90.

◆ imaxloc_i4()

integer(i4) function mo_utils::imaxloc::imaxloc_i4 ( integer(i4), dimension(:), intent(in)  arr,
logical, dimension(:), intent(in), optional  mask 
)

Definition at line 726 of file mo_utils.F90.

◆ imaxloc_i8()

integer(i4) function mo_utils::imaxloc::imaxloc_i8 ( integer(i8), dimension(:), intent(in)  arr,
logical, dimension(:), intent(in), optional  mask 
)

Definition at line 745 of file mo_utils.F90.

◆ imaxloc_sp()

integer(i4) function mo_utils::imaxloc::imaxloc_sp ( real(sp), dimension(:), intent(in)  arr,
logical, dimension(:), intent(in), optional  mask 
)

Definition at line 783 of file mo_utils.F90.


The documentation for this interface was generated from the following file: