MOM6
mom_array_transform::allocate_rotated_array Interface Reference

Detailed Description

Allocate an array based on the rotated index map of an unrotated reference array.

Definition at line 64 of file MOM_array_transform.F90.

Private functions

subroutine allocate_rotated_array_real_2d (A_in, lb, turns, A)
 Allocate a 2d real array on the rotated index map of a reference array. More...
 
subroutine allocate_rotated_array_real_3d (A_in, lb, turns, A)
 Allocate a 3d real array on the rotated index map of a reference array. More...
 
subroutine allocate_rotated_array_real_4d (A_in, lb, turns, A)
 Allocate a 4d real array on the rotated index map of a reference array. More...
 
subroutine allocate_rotated_array_integer (A_in, lb, turns, A)
 Allocate a 2d integer array on the rotated index map of a reference array. More...
 

Detailed Description

Allocate an array based on the rotated index map of an unrotated reference array.

Definition at line 64 of file MOM_array_transform.F90.

Functions and subroutines

◆ allocate_rotated_array_integer()

subroutine mom_array_transform::allocate_rotated_array::allocate_rotated_array_integer ( integer, dimension(lb(1):,lb(2):), intent(in)  A_in,
integer, dimension(2), intent(in)  lb,
integer, intent(in)  turns,
integer, dimension(:,:), intent(inout), allocatable  A 
)
private

Allocate a 2d integer array on the rotated index map of a reference array.

Parameters
[in]lbLower index bounds of A_in
[in]a_inReference array
[in]turnsNumber of quarter turns
[in,out]aArray on rotated index

Definition at line 342 of file MOM_array_transform.F90.

342  integer, intent(in) :: lb(2) !< Lower index bounds of A_in
343  integer, intent(in) :: a_in(lb(1):,lb(2):) !< Reference array
344  integer, intent(in) :: turns !< Number of quarter turns
345  integer, allocatable, intent(inout) :: a(:,:) !< Array on rotated index
346 
347  integer :: ub(2)
348 
349  ub(:) = ubound(a_in)
350 
351  if (modulo(turns, 2) /= 0) then
352  allocate(a(lb(2):ub(2), lb(1):ub(1)))
353  else
354  allocate(a(lb(1):ub(1), lb(2):ub(2)))
355  endif

◆ allocate_rotated_array_real_2d()

subroutine mom_array_transform::allocate_rotated_array::allocate_rotated_array_real_2d ( real, dimension(lb(1):, lb(2):), intent(in)  A_in,
integer, dimension(2), intent(in)  lb,
integer, intent(in)  turns,
real, dimension(:,:), intent(inout), allocatable  A 
)
private

Allocate a 2d real array on the rotated index map of a reference array.

Parameters
[in]lbLower index bounds of A_in
[in]a_inReference array
[in]turnsNumber of quarter turns
[in,out]aArray on rotated index

Definition at line 282 of file MOM_array_transform.F90.

282  ! NOTE: lb must be declared before A_in
283  integer, intent(in) :: lb(2) !< Lower index bounds of A_in
284  real, intent(in) :: a_in(lb(1):, lb(2):) !< Reference array
285  integer, intent(in) :: turns !< Number of quarter turns
286  real, allocatable, intent(inout) :: a(:,:) !< Array on rotated index
287 
288  integer :: ub(2)
289 
290  ub(:) = ubound(a_in)
291 
292  if (modulo(turns, 2) /= 0) then
293  allocate(a(lb(2):ub(2), lb(1):ub(1)))
294  else
295  allocate(a(lb(1):ub(1), lb(2):ub(2)))
296  endif

◆ allocate_rotated_array_real_3d()

subroutine mom_array_transform::allocate_rotated_array::allocate_rotated_array_real_3d ( real, dimension(lb(1):, lb(2):, lb(3):), intent(in)  A_in,
integer, dimension(3), intent(in)  lb,
integer, intent(in)  turns,
real, dimension(:,:,:), intent(inout), allocatable  A 
)
private

Allocate a 3d real array on the rotated index map of a reference array.

Parameters
[in]lbLower index bounds of A_in
[in]a_inReference array
[in]turnsNumber of quarter turns
[in,out]aArray on rotated index

Definition at line 302 of file MOM_array_transform.F90.

302  ! NOTE: lb must be declared before A_in
303  integer, intent(in) :: lb(3) !< Lower index bounds of A_in
304  real, intent(in) :: a_in(lb(1):, lb(2):, lb(3):) !< Reference array
305  integer, intent(in) :: turns !< Number of quarter turns
306  real, allocatable, intent(inout) :: a(:,:,:) !< Array on rotated index
307 
308  integer :: ub(3)
309 
310  ub(:) = ubound(a_in)
311 
312  if (modulo(turns, 2) /= 0) then
313  allocate(a(lb(2):ub(2), lb(1):ub(1), lb(3):ub(3)))
314  else
315  allocate(a(lb(1):ub(1), lb(2):ub(2), lb(3):ub(3)))
316  endif

◆ allocate_rotated_array_real_4d()

subroutine mom_array_transform::allocate_rotated_array::allocate_rotated_array_real_4d ( real, dimension(lb(1):,lb(2):,lb(3):,lb(4):), intent(in)  A_in,
integer, dimension(4), intent(in)  lb,
integer, intent(in)  turns,
real, dimension(:,:,:,:), intent(inout), allocatable  A 
)
private

Allocate a 4d real array on the rotated index map of a reference array.

Parameters
[in]lbLower index bounds of A_in
[in]a_inReference array
[in]turnsNumber of quarter turns
[in,out]aArray on rotated index

Definition at line 322 of file MOM_array_transform.F90.

322  ! NOTE: lb must be declared before A_in
323  integer, intent(in) :: lb(4) !< Lower index bounds of A_in
324  real, intent(in) :: a_in(lb(1):,lb(2):,lb(3):,lb(4):) !< Reference array
325  integer, intent(in) :: turns !< Number of quarter turns
326  real, allocatable, intent(inout) :: a(:,:,:,:) !< Array on rotated index
327 
328  integer:: ub(4)
329 
330  ub(:) = ubound(a_in)
331 
332  if (modulo(turns, 2) /= 0) then
333  allocate(a(lb(2):ub(2), lb(1):ub(1), lb(3):ub(3), lb(4):ub(4)))
334  else
335  allocate(a(lb(1):ub(1), lb(2):ub(2), lb(3):ub(3), lb(4):ub(4)))
336  endif

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