-
Notifications
You must be signed in to change notification settings - Fork 9
/
field_util_module.fypp
55 lines (44 loc) · 1.79 KB
/
field_util_module.fypp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#! (C) Copyright 2022- ECMWF.
#! (C) Copyright 2022- Meteo-France.
#!
#! This software is licensed under the terms of the Apache Licence Version 2.0
#! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#! In applying this licence, ECMWF does not waive the privileges and immunities
#! granted to it by virtue of its status as an intergovernmental organisation
#! nor does it submit to any jurisdiction.
MODULE FIELD_UTIL_MODULE
#:set fieldTypeListOT = fieldType.getFieldTypeList (kinds=['JPIM', 'JPLM'])
#:set fieldTypeListRM = fieldType.getFieldTypeList (kinds=['JPRM'])
#:set fieldTypeListRB = fieldType.getFieldTypeList (kinds=['JPRB'])
#:set fieldTypeListRD = fieldType.getFieldTypeList (kinds=['JPRD'])
#:def useAliasRB (ftlRB, ftlTA, ftlOT)
#:if defined('WITH_FIAT')
#:set method_list = ['LOAD', 'SAVE', 'DIFF', 'COPY', 'WIPE', 'HOST', 'LEGACY', 'CRC64']
#:else
#:set method_list = ['LOAD', 'SAVE', 'DIFF', 'COPY', 'WIPE', 'HOST', 'LEGACY']
#:endif
#:for fta, ftb in zip (ftlTA, ftlRB)
USE ${fta.name}$_UTIL_MODULE, ONLY : &
#:for method in method_list
& ${method}$_${ftb.name}$ => ${method}$_${fta.name}$, ${method}$_${fta.name}$, ${method}$, &
#:if method not in ['DIFF', 'CRC64', 'LEGACY']
& ${method}$_${ftb.name}$_PTR => ${method}$_${fta.name}$_PTR, ${method}$_${fta.name}$_PTR, &
#:if fta.hasView
& ${method}$_${ftb.name}$_VIEW => ${method}$_${fta.name}$_VIEW, ${method}$_${fta.name}$_VIEW, &
#:endif
#:endif
#:endfor
& COPY
#:endfor
#:for fto in ftlOT
USE ${fto.name}$_UTIL_MODULE
#:endfor
#:enddef
#ifdef PARKIND1_SINGLE
$:useAliasRB (fieldTypeListRB, fieldTypeListRM, fieldTypeListRD + fieldTypeListOT)
#else
$:useAliasRB (fieldTypeListRB, fieldTypeListRD, fieldTypeListRM + fieldTypeListOT)
#endif
${fieldType.useParkind1 ()}$
IMPLICIT NONE
END MODULE