MOM6
MOM_memory_macros.h File Reference

Detailed Description

Memory macros.

This is a header file to define macros for static and dynamic memory allocation. Define STATIC_MEMORY_ in MOM_memory.h for static memory allocation. Otherwise dynamic memory allocation will be assumed. For explanation of symmetric and non-symmetric memory modes see Horizontal indexing and memory.

Definition in file MOM_memory_macros.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEALLOC_(x)   deallocate(x)
 
#define ALLOC_(x)   allocate(x)
 
#define ALLOCABLE_   ,allocatable
 
#define PTR_   ,pointer
 
#define TO_NULL_   =>NULL()
 
#define NIMEM_   :
 
#define NJMEM_   :
 
#define NIMEMB_PTR_   :
 
#define NJMEMB_PTR_   :
 
#define NIMEMB_   :
 
#define NJMEMB_   :
 
#define NIMEMB_SYM_   0:
 
#define NJMEMB_SYM_   0:
 
#define NKMEM_   :
 
#define NKMEM0_   0:
 
#define NK_INTERFACE_   :
 
#define C1_   :
 
#define C2_   :
 
#define C3_   :
 
#define SZI_(G)   G%isd:G%ied
 
#define SZJ_(G)   G%jsd:G%jed
 
#define SZK_(G)   G%ke
 
#define SZK0_(G)   0:G%ke
 
#define SZIB_(G)   G%IsdB:G%IedB
 
#define SZJB_(G)   G%JsdB:G%JedB
 
#define SZIBS_(G)   G%isd-1:G%ied
 
#define SZJBS_(G)   G%jsd-1:G%jed
 
#define SZDI_(G)   G%isd:G%ied
 
#define SZDIB_(G)   G%IsdB:G%IedB
 
#define SZDJ_(G)   G%jsd:G%jed
 
#define SZDJB_(G)   G%JsdB:G%JedB
 

Macro Definition Documentation

◆ ALLOC_

#define ALLOC_ (   x)    allocate(x)

Allocates array x when using dynamic memory mode. Does nothing in static memory mode.

Definition at line 57 of file MOM_memory_macros.h.

◆ ALLOCABLE_

#define ALLOCABLE_   ,allocatable

Attaches the ALLOCATABLE attribute to an array in dynamic memory mode. Does nothing in static memory mode.

Definition at line 59 of file MOM_memory_macros.h.

◆ C1_

#define C1_   :

Expands to : or 1. UNKNOWN PURPOSE!

Definition at line 95 of file MOM_memory_macros.h.

◆ C2_

#define C2_   :

Expands to : or 2. UNKNOWN PURPOSE!

Definition at line 97 of file MOM_memory_macros.h.

◆ C3_

#define C3_   :

Expands to : or 3. UNKNOWN PURPOSE!

Definition at line 99 of file MOM_memory_macros.h.

◆ DEALLOC_

#define DEALLOC_ (   x)    deallocate(x)

Deallocates array x when using dynamic memory mode. Does nothing in static memory mode.

Definition at line 55 of file MOM_memory_macros.h.

◆ NIMEM_

#define NIMEM_   :

Expands to : in dynamic memory mode, or is the i-shape of a tile in static memory mode. Use for heap (ALLOCABLE_ or PTR_) variables at h- or v- points.

Definition at line 68 of file MOM_memory_macros.h.

◆ NIMEMB_

#define NIMEMB_   :

Definition at line 81 of file MOM_memory_macros.h.

◆ NIMEMB_PTR_

#define NIMEMB_PTR_   :

Expands to : in dynamic memory mode, or to NIMEMB_ in static memory mode. Use for heap (ALLOCABLE_ or PTR_) variables at h- or v- points.

Definition at line 72 of file MOM_memory_macros.h.

◆ NIMEMB_SYM_

#define NIMEMB_SYM_   0:

Expands to 0: in dynamic memory mode, or is the staggered i-shape of a tile in static memory mode. Use for always-symmetric heap (ALLOCABLE_ or PTR_) variables at q- or u- points.

Definition at line 85 of file MOM_memory_macros.h.

◆ NJMEM_

#define NJMEM_   :

Expands to : in dynamic memory mode, or is the j-shape of a tile in static memory mode. Use for heap (ALLOCABLE_ or PTR_) variables at h- or u- points.

Definition at line 70 of file MOM_memory_macros.h.

◆ NJMEMB_

#define NJMEMB_   :

Definition at line 82 of file MOM_memory_macros.h.

◆ NJMEMB_PTR_

#define NJMEMB_PTR_   :

Expands to : in dynamic memory mode, or to NJMEMB_ in static memory mode. Use for heap (ALLOCABLE_ or PTR_) variables at h- or u- points.

Definition at line 74 of file MOM_memory_macros.h.

◆ NJMEMB_SYM_

#define NJMEMB_SYM_   0:

Expands to 0: in dynamic memory mode, or is the staggered j-shape of a tile in static memory mode. Use for always-symmetric heap (ALLOCABLE_ or PTR_) variables at q- or v- points.

Definition at line 87 of file MOM_memory_macros.h.

◆ NK_INTERFACE_

#define NK_INTERFACE_   :

Expands to : in dynamic memory mode or to NK_+1 in static memory mode. Use for heap (ALLOCABLE_ or PTR_) interface variables.

Definition at line 93 of file MOM_memory_macros.h.

◆ NKMEM0_

#define NKMEM0_   0:

Expands to 0: in dynamic memory mode or to 0:NK_ in static memory mode. Use for heap (ALLOCABLE_ or PTR_) interface variables.

Definition at line 91 of file MOM_memory_macros.h.

◆ NKMEM_

#define NKMEM_   :

Expands to : in dynamic memory mode or is to the number of layers in static memory mode. Use for heap (ALLOCABLE_ or PTR_) layer variables.

Definition at line 89 of file MOM_memory_macros.h.

◆ PTR_

#define PTR_   ,pointer

Attaches the POINTER attribute to an array in dynamic memory mode. Does nothing in static memory mode.

Definition at line 61 of file MOM_memory_macros.h.

◆ SZDI_

#define SZDI_ (   G)    G%isd:G%ied

The i-shape of a dynamic dummy argument staggered at h- or v-points.

Definition at line 127 of file MOM_memory_macros.h.

◆ SZDIB_

#define SZDIB_ (   G)    G%IsdB:G%IedB

The i-shape of a dynamic dummy argument staggered at q- or u-points.

Definition at line 129 of file MOM_memory_macros.h.

◆ SZDJ_

#define SZDJ_ (   G)    G%jsd:G%jed

The j-shape of a dynamic dummy argument staggered at h- or u-points.

Definition at line 131 of file MOM_memory_macros.h.

◆ SZDJB_

#define SZDJB_ (   G)    G%JsdB:G%JedB

The j-shape of a dynamic dummy argument staggered at q- or v-points.

Definition at line 133 of file MOM_memory_macros.h.

◆ SZI_

#define SZI_ (   G)    G%isd:G%ied
Todo:
Explain or remove C1_, C2_ and C3_

The i-shape of a dummy argument staggered at h- or v-points.

Definition at line 106 of file MOM_memory_macros.h.

◆ SZIB_

#define SZIB_ (   G)    G%IsdB:G%IedB

The i-shape of a dummy argument staggered at q- or u-points.

Definition at line 114 of file MOM_memory_macros.h.

◆ SZIBS_

#define SZIBS_ (   G)    G%isd-1:G%ied

The i-shape of a symmetric dummy argument staggered at q- or u-points.

Definition at line 118 of file MOM_memory_macros.h.

◆ SZJ_

#define SZJ_ (   G)    G%jsd:G%jed

The j-shape of a dummy argument staggered at h- or u-points.

Definition at line 108 of file MOM_memory_macros.h.

◆ SZJB_

#define SZJB_ (   G)    G%JsdB:G%JedB

The j-shape of a dummy argument staggered at q- or v-points.

Definition at line 116 of file MOM_memory_macros.h.

◆ SZJBS_

#define SZJBS_ (   G)    G%jsd-1:G%jed

The j-shape of a symmetric dummy argument staggered at q- or v-points.

Definition at line 120 of file MOM_memory_macros.h.

◆ SZK0_

#define SZK0_ (   G)    0:G%ke

The k-shape of an interface dummy argument.

Definition at line 112 of file MOM_memory_macros.h.

◆ SZK_

#define SZK_ (   G)    G%ke

The k-shape of a layer dummy argument.

Definition at line 110 of file MOM_memory_macros.h.

◆ TO_NULL_

#define TO_NULL_   =>NULL()

Nullify a pointer in dynamic memory mode. Does nothing in static memory mode.

Definition at line 63 of file MOM_memory_macros.h.