-
Notifications
You must be signed in to change notification settings - Fork 9
/
field_module.fypp
58 lines (46 loc) · 1.65 KB
/
field_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
56
57
58
#! (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_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)
#:for fta, ftb in zip (ftlTA, ftlRB)
USE ${fta.name}$_MODULE, ONLY : &
& ${ftb.name}$ => ${fta.name}$, &
& ${ftb.name}$_PTR => ${fta.name}$_PTR, &
& ${fta.name}$, &
& ${fta.name}$_PTR
#:if fta.hasView
USE ${fta.name}$_MODULE, ONLY : &
& ${ftb.name}$_VIEW => ${fta.name}$_VIEW, &
& ${fta.name}$_VIEW
#:endif
#:endfor
#:for fto in ftlOT
USE ${fto.name}$_MODULE
#:endfor
#:enddef
#ifdef PARKIND1_SINGLE
$:useAliasRB (fieldTypeListRB, fieldTypeListRM, fieldTypeListRD + fieldTypeListOT)
#else
$:useAliasRB (fieldTypeListRB, fieldTypeListRD, fieldTypeListRM + fieldTypeListOT)
#endif
${fieldType.useParkind1 ()}$
IMPLICIT NONE
PRIVATE
#:for ft in fieldTypeListOT + fieldTypeListRM + fieldTypeListRB + fieldTypeListRD
PUBLIC :: ${ft.name}$
PUBLIC :: ${ft.name}$_PTR
#:if ft.hasView
PUBLIC :: ${ft.name}$_VIEW
#:endif
#:endfor
END MODULE FIELD_MODULE