@@ -432,7 +432,7 @@ Mixed Precision
432432
433433The LFRic API supports the ability to specify the precision required
434434by the model via precision variables. To make use of this, the code
435- developer must declare scalars, arrays, fields and operators in the algorithm
435+ developer must declare scalars, arrays, fields and operators in the Algorithm
436436layer with the required LFRic-supported precision. In the current
437437implementation there are two supported precisions for ``REAL `` data and
438438one each for ``INTEGER `` and ``LOGICAL `` data. The actual precision used in
@@ -471,6 +471,10 @@ associated kernel metadata description and their precision:
471471+--------------------------+---------------------------------------+-----------+
472472| R_TRAN_FIELD_TYPE | GH_FIELD, GH_REAL | R_TRAN |
473473+--------------------------+---------------------------------------+-----------+
474+ | FIELD_REAL32_TYPE | GH_FIELD, GH_REAL | REAL32 |
475+ +--------------------------+---------------------------------------+-----------+
476+ | FIELD_REAL64_TYPE | GH_FIELD, GH_REAL | REAL64 |
477+ +--------------------------+---------------------------------------+-----------+
474478| INTEGER_FIELD_TYPE | GH_FIELD, GH_INTEGER | I_DEF |
475479+--------------------------+---------------------------------------+-----------+
476480| OPERATOR_TYPE | GH_OPERATOR, GH_REAL | R_DEF |
@@ -479,13 +483,18 @@ associated kernel metadata description and their precision:
479483+--------------------------+---------------------------------------+-----------+
480484| R_TRAN_OPERATOR_TYPE | GH_OPERATOR, GH_REAL | R_TRAN |
481485+--------------------------+---------------------------------------+-----------+
486+ | OPERATOR_REAL32_TYPE | GH_OPERATOR, GH_REAL | REAL32 |
487+ +--------------------------+---------------------------------------+-----------+
488+ | OPERATOR_REAL64_TYPE | GH_OPERATOR, GH_REAL | REAL64 |
489+ +--------------------------+---------------------------------------+-----------+
482490| COLUMNWISE_OPERATOR_TYPE | GH_COLUMNWISE_OPERATOR, GH_REAL | R_SOLVER |
483491+--------------------------+---------------------------------------+-----------+
484492
485493As can be seen from the above table, the kernel metadata does not
486494capture all of the precision options. For example, from the metadata
487495it is not possible to determine whether a ``REAL `` scalar, ``REAL `` field
488- or ``REAL `` operator has precision ``R_DEF ``, ``R_SOLVER `` or ``R_TRAN ``.
496+ or ``REAL `` operator has precision ``R_DEF ``, ``R_SOLVER ``, ``R_TRAN ``
497+ or one of the Fortran intrinsic precisions (``REAL32 ``, ``REAL64 ``).
489498
490499If a scalar, array, field, or operator is specified with a particular
491500precision in the algorithm layer then any associated kernels that it
@@ -601,6 +610,10 @@ outlined in the table below:
601610+-------------------------+------------------+--------------+
602611| ``r_tran_field_type `` | ``real `` | ``r_tran `` |
603612+-------------------------+------------------+--------------+
613+ | ``field_real32_type `` | ``real `` | ``real32 `` |
614+ +-------------------------+------------------+--------------+
615+ | ``field_real64_type `` | ``real `` | ``real64 `` |
616+ +-------------------------+------------------+--------------+
604617| ``integer_field_type `` | ``integer `` | ``i_def `` |
605618+-------------------------+------------------+--------------+
606619
@@ -701,7 +714,8 @@ a message that indicates the problem.
701714| Fortran Datatype | Supported Precision |
702715+==================+==========================+
703716| ``real `` | ``r_def ``, ``r_bl ``, |
704- | | ``r_solver ``, ``r_tran `` |
717+ | | ``r_solver``, ``r_tran``,|
718+ | | ``real32 ``, ``real64 `` |
705719+------------------+--------------------------+
706720| ``integer `` | ``i_def `` |
707721+------------------+--------------------------+
@@ -731,6 +745,10 @@ outlined in the table below:
731745+----------------------------+------------------+--------------+
732746| ``r_tran_operator_type `` | ``real `` | ``r_tran `` |
733747+----------------------------+------------------+--------------+
748+ | ``operator_real32_type `` | ``real `` | ``real32 `` |
749+ +----------------------------+------------------+--------------+
750+ | ``operator_real64_type `` | ``real `` | ``real64 `` |
751+ +----------------------------+------------------+--------------+
734752
735753.. _lfric-mixed-precision-cma-operators :
736754
0 commit comments