MOM6
mom_safe_alloc::safe_alloc_ptr Interface Reference

Detailed Description

Definition at line 35 of file MOM_safe_alloc.F90.

Private functions

subroutine safe_alloc_ptr_3d_2arg (ptr, ni, nj, nk)
 
subroutine safe_alloc_ptr_2d_2arg (ptr, ni, nj)
 
subroutine safe_alloc_ptr_3d (ptr, is, ie, js, je, nk)
 
subroutine safe_alloc_ptr_2d (ptr, is, ie, js, je)
 
subroutine safe_alloc_ptr_1d (ptr, i1, i2)
 

Functions and subroutines

◆ safe_alloc_ptr_1d()

subroutine mom_safe_alloc::safe_alloc_ptr::safe_alloc_ptr_1d ( real, dimension(:), pointer  ptr,
integer, intent(in)  i1,
integer, intent(in), optional  i2 
)
private

Definition at line 56 of file MOM_safe_alloc.F90.

56  real, pointer :: ptr(:)
57  integer, intent(in) :: i1
58  integer, optional, intent(in) :: i2
59  if (.not.ASSOCIATED(ptr)) then
60  if (present(i2)) then
61  allocate(ptr(i1:i2))
62  else
63  allocate(ptr(i1))
64  endif
65  ptr(:) = 0.0
66  endif

◆ safe_alloc_ptr_2d()

subroutine mom_safe_alloc::safe_alloc_ptr::safe_alloc_ptr_2d ( real, dimension(:,:), pointer  ptr,
integer, intent(in)  is,
integer, intent(in)  ie,
integer, intent(in)  js,
integer, intent(in)  je 
)
private

Definition at line 88 of file MOM_safe_alloc.F90.

88  real, pointer :: ptr(:,:)
89  integer, intent(in) :: is, ie, js, je
90  if (.not.ASSOCIATED(ptr)) then
91  allocate(ptr(is:ie,js:je))
92  ptr(:,:) = 0.0
93  endif

◆ safe_alloc_ptr_2d_2arg()

subroutine mom_safe_alloc::safe_alloc_ptr::safe_alloc_ptr_2d_2arg ( real, dimension(:,:), pointer  ptr,
integer, intent(in)  ni,
integer, intent(in)  nj 
)
private

Definition at line 70 of file MOM_safe_alloc.F90.

70  real, pointer :: ptr(:,:)
71  integer, intent(in) :: ni, nj
72  if (.not.ASSOCIATED(ptr)) then
73  allocate(ptr(ni,nj))
74  ptr(:,:) = 0.0
75  endif

◆ safe_alloc_ptr_3d()

subroutine mom_safe_alloc::safe_alloc_ptr::safe_alloc_ptr_3d ( real, dimension(:,:,:), pointer  ptr,
integer, intent(in)  is,
integer, intent(in)  ie,
integer, intent(in)  js,
integer, intent(in)  je,
integer, intent(in)  nk 
)
private

Definition at line 97 of file MOM_safe_alloc.F90.

97  real, pointer :: ptr(:,:,:)
98  integer, intent(in) :: is, ie, js, je, nk
99  if (.not.ASSOCIATED(ptr)) then
100  allocate(ptr(is:ie,js:je,nk))
101  ptr(:,:,:) = 0.0
102  endif

◆ safe_alloc_ptr_3d_2arg()

subroutine mom_safe_alloc::safe_alloc_ptr::safe_alloc_ptr_3d_2arg ( real, dimension(:,:,:), pointer  ptr,
integer, intent(in)  ni,
integer, intent(in)  nj,
integer, intent(in)  nk 
)
private

Definition at line 79 of file MOM_safe_alloc.F90.

79  real, pointer :: ptr(:,:,:)
80  integer, intent(in) :: ni, nj, nk
81  if (.not.ASSOCIATED(ptr)) then
82  allocate(ptr(ni,nj,nk))
83  ptr(:,:,:) = 0.0
84  endif

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