mom_array_transform module reference

Module for supporting the rotation of a field’s index map. The implementation of each angle is described below.

More…

Functions/Subroutines

rotate_array_real_2d()

Rotate the elements of a 2d real array along first and second axes.

rotate_array_real_3d()

Rotate the elements of a 3d real array along first and second axes.

rotate_array_real_4d()

Rotate the elements of a 4d real array along first and second axes.

rotate_array_integer()

Rotate the elements of a 2d integer array along first and second axes.

rotate_array_logical()

Rotate the elements of a 2d logical array along first and second axes.

rotate_array_pair_real_2d()

Rotate the elements of a 2d real array pair along first and second axes.

rotate_array_pair_real_3d()

Rotate the elements of a 3d real array pair along first and second axes.

rotate_array_pair_integer()

Rotate the elements of a 4d real array pair along first and second axes.

rotate_vector_real_2d()

Rotate the elements of a 2d real vector along first and second axes.

rotate_vector_real_3d()

Rotate the elements of a 3d real vector along first and second axes.

rotate_vector_real_4d()

Rotate the elements of a 4d real vector along first and second axes.

allocate_rotated_array_real_2d()

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

allocate_rotated_array_real_3d()

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

allocate_rotated_array_real_4d()

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

allocate_rotated_array_integer()

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

Detailed Description

+90deg: B(i,j) = A(n-j,i) = transpose, then row reverse 180deg: B(i,j) = A(m-i,n-j) = row reversal + column reversal -90deg: B(i,j) = A(j,m-i) = row reverse, then transpose

90 degree rotations change the shape of the field, and are handled separately from 180 degree rotations.

Function/Subroutine Documentation

subroutine mom_array_transform/rotate_array_real_2d(A_in, turns, A)

Rotate the elements of a 2d real array along first and second axes.

Parameters:
  • a_in :: [in] Unrotated array [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [out] Rotated array [arbitrary]

subroutine mom_array_transform/rotate_array_real_3d(A_in, turns, A)

Rotate the elements of a 3d real array along first and second axes.

Parameters:
  • a_in :: [in] Unrotated array [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [out] Rotated array [arbitrary]

subroutine mom_array_transform/rotate_array_real_4d(A_in, turns, A)

Rotate the elements of a 4d real array along first and second axes.

Parameters:
  • a_in :: [in] Unrotated array [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [out] Rotated array [arbitrary]

subroutine mom_array_transform/rotate_array_integer(A_in, turns, A)

Rotate the elements of a 2d integer array along first and second axes.

Parameters:
  • a_in :: [in] Unrotated array

  • turns :: [in] Number of quarter turns

  • a :: [out] Rotated array

subroutine mom_array_transform/rotate_array_logical(A_in, turns, A)

Rotate the elements of a 2d logical array along first and second axes.

Parameters:
  • a_in :: [in] Unrotated array

  • turns :: [in] Number of quarter turns

  • a :: [out] Rotated array

subroutine mom_array_transform/rotate_array_pair_real_2d(A_in, B_in, turns, A, B)

Rotate the elements of a 2d real array pair along first and second axes.

Parameters:
  • a_in :: [in] Unrotated scalar array pair [arbitrary]

  • b_in :: [in] Unrotated scalar array pair [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [out] Rotated scalar array pair [arbitrary]

  • b :: [out] Rotated scalar array pair [arbitrary]

subroutine mom_array_transform/rotate_array_pair_real_3d(A_in, B_in, turns, A, B)

Rotate the elements of a 3d real array pair along first and second axes.

Parameters:
  • a_in :: [in] Unrotated scalar array pair [arbitrary]

  • b_in :: [in] Unrotated scalar array pair [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [out] Rotated scalar array pair [arbitrary]

  • b :: [out] Rotated scalar array pair [arbitrary]

subroutine mom_array_transform/rotate_array_pair_integer(A_in, B_in, turns, A, B)

Rotate the elements of a 4d real array pair along first and second axes.

Parameters:
  • a_in :: [in] Unrotated scalar array pair

  • b_in :: [in] Unrotated scalar array pair

  • turns :: [in] Number of quarter turns

  • a :: [out] Rotated scalar array pair

  • b :: [out] Rotated scalar array pair

subroutine mom_array_transform/rotate_vector_real_2d(A_in, B_in, turns, A, B)

Rotate the elements of a 2d real vector along first and second axes.

Parameters:
  • a_in :: [in] First component of unrotated vector [arbitrary]

  • b_in :: [in] Second component of unrotated vector [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [out] First component of rotated vector [arbitrary]

  • b :: [out] Second component of unrotated vector [arbitrary]

subroutine mom_array_transform/rotate_vector_real_3d(A_in, B_in, turns, A, B)

Rotate the elements of a 3d real vector along first and second axes.

Parameters:
  • a_in :: [in] First component of unrotated vector [arbitrary]

  • b_in :: [in] Second component of unrotated vector [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [out] First component of rotated vector [arbitrary]

  • b :: [out] Second component of unrotated vector [arbitrary]

subroutine mom_array_transform/rotate_vector_real_4d(A_in, B_in, turns, A, B)

Rotate the elements of a 4d real vector along first and second axes.

Parameters:
  • a_in :: [in] First component of unrotated vector [arbitrary]

  • b_in :: [in] Second component of unrotated vector [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [out] First component of rotated vector [arbitrary]

  • b :: [out] Second component of unrotated vector [arbitrary]

subroutine mom_array_transform/allocate_rotated_array_real_2d(A_in, lb, turns, A)

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

Parameters:
  • lb :: [in] Lower index bounds of A_in

  • a_in :: [in] Reference array [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [inout] Array on rotated index [arbitrary]

subroutine mom_array_transform/allocate_rotated_array_real_3d(A_in, lb, turns, A)

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

Parameters:
  • lb :: [in] Lower index bounds of A_in

  • a_in :: [in] Reference array [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [inout] Array on rotated index [arbitrary]

subroutine mom_array_transform/allocate_rotated_array_real_4d(A_in, lb, turns, A)

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

Parameters:
  • lb :: [in] Lower index bounds of A_in

  • a_in :: [in] Reference array [arbitrary]

  • turns :: [in] Number of quarter turns

  • a :: [inout] Array on rotated index [arbitrary]

subroutine mom_array_transform/allocate_rotated_array_integer(A_in, lb, turns, A)

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

Parameters:
  • lb :: [in] Lower index bounds of A_in

  • a_in :: [in] Reference array

  • turns :: [in] Number of quarter turns

  • a :: [inout] Array on rotated index