psyclone.domain.lfric.kernel.scalar_array_arg_metadata#
Module containing the ScalarArrayArgMetadata class which captures the metadata associated with a ScalarArray argument. Supports the creation, modification and Fortran output of a ScalarArray argument.
Classes#
ScalarArrayArgMetadata: Class to capture LFRic kernel metadata information for a ScalarArray
- class psyclone.domain.lfric.kernel.scalar_array_arg_metadata.ScalarArrayArgMetadata(datatype, access, array_ndims)[source]#
Class to capture LFRic kernel metadata information for a ScalarArray argument.
- Parameters:
datatype (str) – the datatype of this ScalarArray (GH_INTEGER, …).
access (str) – the way the kernel accesses this Scalar Array (GH_READ).
array_ndims (str) – the rank (number of dimensions) of this ScalarArray.
Inheritance

- property array_ndims: int#
- Returns:
the number of dimensions for this ScalarArray argument.
- fortran_string()[source]#
- Return type:
str- Returns:
the metadata represented by this class as Fortran.
- classmethod get_array_ndims(fparser2_tree)[source]#
Retrieves the array ndims metadata value found within the supplied fparser2 tree and checks that it is valid.
- Parameters:
fparser2_tree (
fparser.two.Fortran2003.Part_Ref) – fparser2 tree capturing the required metadata.- Return type:
int- Returns:
the array ndims value extracted from the fparser2 tree, converted to an int.
- Raises:
ValueError – if the array ndims is not a string.
ValueError – if the array ndims is less than 1.