FMS  2024.03
Flexible Modeling System
mpp_utilities_mod

Module for utiltity routines to be used in MPP modules. More...

Functions/Subroutines

subroutine, public mpp_array_global_min_max (in_array, tmask, isd, jsd, isc, iec, jsc, jec, nk, g_min, g_max, geo_x, geo_y, geo_z, xgmin, ygmin, zgmin, xgmax, ygmax, zgmax)
 Compute and return the global min and max of an array and the corresponding lat-lon-depth locations . More...
 

Detailed Description

Module for utiltity routines to be used in MPP modules.

Currently only holds one routine for finding global min and max

Function/Subroutine Documentation

◆ mpp_array_global_min_max()

subroutine, public mpp_utilities_mod::mpp_array_global_min_max ( real, dimension(isd:,jsd:,:), intent(in)  in_array,
real, dimension(isd:,jsd:,:), intent(in)  tmask,
integer, intent(in)  isd,
integer, intent(in)  jsd,
integer, intent(in)  isc,
integer, intent(in)  iec,
integer, intent(in)  jsc,
integer, intent(in)  jec,
integer, intent(in)  nk,
real, intent(out)  g_min,
real, intent(out)  g_max,
real, dimension(isd:,jsd:), intent(in)  geo_x,
real, dimension(isd:,jsd:), intent(in)  geo_y,
real, dimension(:), intent(in)  geo_z,
real, intent(out)  xgmin,
real, intent(out)  ygmin,
real, intent(out)  zgmin,
real, intent(out)  xgmax,
real, intent(out)  ygmax,
real, intent(out)  zgmax 
)

Compute and return the global min and max of an array and the corresponding lat-lon-depth locations .

This algorithm works only for an input array that has a unique global max and min location. This is assured by introducing a factor that distinguishes the values of extrema at each processor.

Vectorized using maxloc() and minloc() intrinsic functions by Russe.nosp@m.ll.F.nosp@m.iedle.nosp@m.r@cs.nosp@m.iro.a.nosp@m.u (May 2005).

Modified by Zhi.L.nosp@m.iang.nosp@m.@noaa.nosp@m..gov (July 2005)

Modified by Niki..nosp@m.Zade.nosp@m.h@noa.nosp@m.a.go.nosp@m.v (Feb. 2009)

Definition at line 54 of file mpp_utilities.F90.