MOM6
mom_safe_alloc::safe_alloc_alloc Interface Reference

Detailed Description

Definition at line 40 of file MOM_safe_alloc.F90.

Private functions

subroutine safe_alloc_allocatable_3d (ptr, is, ie, js, je, nk)
 
subroutine safe_alloc_allocatable_2d (ptr, is, ie, js, je)
 

Functions and subroutines

◆ safe_alloc_allocatable_2d()

subroutine mom_safe_alloc::safe_alloc_alloc::safe_alloc_allocatable_2d ( real, dimension(:,:), allocatable  ptr,
integer, intent(in)  is,
integer, intent(in)  ie,
integer, intent(in)  js,
integer, intent(in)  je 
)
private

Definition at line 106 of file MOM_safe_alloc.F90.

106  real, allocatable :: ptr(:,:)
107  integer, intent(in) :: is, ie, js, je
108  if (.not.ALLOCATED(ptr)) then
109  allocate(ptr(is:ie,js:je))
110  ptr(:,:) = 0.0
111  endif

◆ safe_alloc_allocatable_3d()

subroutine mom_safe_alloc::safe_alloc_alloc::safe_alloc_allocatable_3d ( real, dimension(:,:,:), allocatable  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 115 of file MOM_safe_alloc.F90.

115  real, allocatable :: ptr(:,:,:)
116  integer, intent(in) :: is, ie, js, je, nk
117  if (.not.ALLOCATED(ptr)) then
118  allocate(ptr(is:ie,js:je,nk))
119  ptr(:,:,:) = 0.0
120  endif

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