Allocate a 2-d or 3-d allocatable array.
Definition at line 18 of file MOM_safe_alloc.F90.
|
subroutine | safe_alloc_allocatable_3d (ptr, is, ie, js, je, nk) |
| Allocate a 3-d allocatable array based on its index starting and ending values and k-index size. More...
|
|
subroutine | safe_alloc_allocatable_2d (ptr, is, ie, js, je) |
| Allocate a 2-d allocatable array based on its index starting and ending values. More...
|
|
subroutine | safe_alloc_allocatable_3d_6arg (ptr, is, ie, js, je, ks, ke) |
| Allocate a 3-d allocatable array based on its 6 index starting and ending values. More...
|
|
◆ 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 |
Allocate a 2-d allocatable array based on its index starting and ending values.
- Parameters
-
| ptr | An allocatable array to allocate |
[in] | is | The start index to allocate for the 1st dimension |
[in] | ie | The end index to allocate for the 1st dimension |
[in] | js | The start index to allocate for the 2nd dimension |
[in] | je | The end index to allocate for the 2nd dimension |
Definition at line 117 of file MOM_safe_alloc.F90.
117 real,
dimension(:,:),
allocatable :: ptr
118 integer,
intent(in) :: is
119 integer,
intent(in) :: ie
120 integer,
intent(in) :: js
121 integer,
intent(in) :: je
122 if (.not.
allocated(ptr))
then
123 allocate(ptr(is:ie,js:je))
◆ 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 |
Allocate a 3-d allocatable array based on its index starting and ending values and k-index size.
- Parameters
-
| ptr | An allocatable array to allocate |
[in] | is | The start index to allocate for the 1st dimension |
[in] | ie | The end index to allocate for the 1st dimension |
[in] | js | The start index to allocate for the 2nd dimension |
[in] | je | The end index to allocate for the 2nd dimension |
[in] | nk | The size to allocate for the 3rd dimension |
Definition at line 131 of file MOM_safe_alloc.F90.
131 real,
dimension(:,:,:),
allocatable :: ptr
132 integer,
intent(in) :: is
133 integer,
intent(in) :: ie
134 integer,
intent(in) :: js
135 integer,
intent(in) :: je
136 integer,
intent(in) :: nk
137 if (.not.
allocated(ptr))
then
138 allocate(ptr(is:ie,js:je,nk))
◆ safe_alloc_allocatable_3d_6arg()
subroutine mom_safe_alloc::safe_alloc_alloc::safe_alloc_allocatable_3d_6arg |
( |
real, dimension(:,:,:), allocatable |
ptr, |
|
|
integer, intent(in) |
is, |
|
|
integer, intent(in) |
ie, |
|
|
integer, intent(in) |
js, |
|
|
integer, intent(in) |
je, |
|
|
integer, intent(in) |
ks, |
|
|
integer, intent(in) |
ke |
|
) |
| |
|
private |
Allocate a 3-d allocatable array based on its 6 index starting and ending values.
- Parameters
-
| ptr | An allocatable array to allocate |
[in] | is | The start index to allocate for the 1st dimension |
[in] | ie | The end index to allocate for the 1st dimension |
[in] | js | The start index to allocate for the 2nd dimension |
[in] | je | The end index to allocate for the 2nd dimension |
[in] | ks | The start index to allocate for the 3rd dimension |
[in] | ke | The end index to allocate for the 3rd dimension |
Definition at line 145 of file MOM_safe_alloc.F90.
145 real,
dimension(:,:,:),
allocatable :: ptr
146 integer,
intent(in) :: is
147 integer,
intent(in) :: ie
148 integer,
intent(in) :: js
149 integer,
intent(in) :: je
150 integer,
intent(in) :: ks
151 integer,
intent(in) :: ke
152 if (.not.
allocated(ptr))
then
153 allocate(ptr(is:ie,js:je,ks:ke))
The documentation for this interface was generated from the following file:
- /glade/work/altuntas/cesm.sandboxes/cesm2_2_alpha_X_mom/components/mom/MOM6/src/framework/MOM_safe_alloc.F90