PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
tiwmx.func.h
Go to the documentation of this file.
1!MNH_LIC Copyright 2014-2025 CNRS, Meteo-France and Universite Paul Sabatier
2!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
3!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4!MNH_LIC for details. version 1.
5!-----------------------------------------------------------------
6! ******* TO BE INCLUDED IN THE *CONTAINS* OF A SUBROUTINE, IN ORDER TO EASE AUTOMATIC INLINING ******
7! => Don't use drHook !!!
8!
9! This file can be included in the host model, we need to type the REAL variables
10!
11! Functions of temperature (saturation pressures and their derivatives, ice crystal and
12! water droplet growth functions...) read in the lookup tables of MODD_TIWMX (filled by
13! INI_TIWMX), the tables being given as argument (ICEP%TIWMX)
14!
15! Author: K. I. Ivarsson *SMHI* (20/11/14), formerly in mode_tiwmx.F90
16! Modifications: S. Riette Nov. 2026: elemental functions in tiwmx.func.h
17!
18 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION esatw(TIWMX, TT)
19 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
20 USE modd_precision, ONLY: mnhreal
21 IMPLICIT NONE
22
23!$acc routine seq
24
25 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
26 REAL(kind=mnhreal),INTENT(IN) :: tt
27 esatw = tiwmx%ESTABW(nint(xndegr*tt))
28 END FUNCTION esatw
29
30 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION desdtw(TIWMX, TT)
31 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
32 USE modd_precision, ONLY: mnhreal
33 IMPLICIT NONE
34
35!$acc routine seq
36
37 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
38 REAL(kind=mnhreal),INTENT(IN) :: tt
39 desdtw = tiwmx%DESTABW(nint(xndegr*tt))
40 END FUNCTION
41
42 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION esati(TIWMX, TT)
43 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
44 USE modd_precision, ONLY: mnhreal
45 IMPLICIT NONE
46
47!$acc routine seq
48
49 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
50 REAL(kind=mnhreal),INTENT(IN) :: tt
51 esati = tiwmx%ESTABI(nint(xndegr*tt))
52 END FUNCTION
53
54 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION desdti(TIWMX, TT)
55 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
56 USE modd_precision, ONLY: mnhreal
57 IMPLICIT NONE
58
59!$acc routine seq
60
61 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
62 REAL(kind=mnhreal),INTENT(IN) :: tt
63 desdti = tiwmx%DESTABI(nint(xndegr*tt))
64 END FUNCTION
65
66! Water droplet function:
67 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION aa2w(TIWMX, TT)
68 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
69 USE modd_precision, ONLY: mnhreal
70 IMPLICIT NONE
71
72!$acc routine seq
73
74 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
75 REAL(kind=mnhreal),INTENT(IN) :: tt
76 aa2w = tiwmx%A2WTAB(nint(xndegr*tt))
77 END FUNCTION
78
79! Ice crystal function
80 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION aa2(TIWMX, TT)
81 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
82 USE modd_precision, ONLY: mnhreal
83 IMPLICIT NONE
84
85!$acc routine seq
86
87 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
88 REAL(kind=mnhreal),INTENT(IN) :: tt
89 aa2 = tiwmx%A2TAB(nint(xndegr*tt))
90 END FUNCTION
91
92! Meyers IN concentration function:
93 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION am3(TIWMX, TT)
94 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
95 USE modd_precision, ONLY: mnhreal
96 IMPLICIT NONE
97
98!$acc routine seq
99
100 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
101 REAL(kind=mnhreal),INTENT(IN) :: tt
102 am3 = tiwmx%AM3TAB(nint(xndegr*tt))
103 END FUNCTION
104
105! Fletchers IN concentration function:
106 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION af3(TIWMX, TT)
107 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
108 USE modd_precision, ONLY: mnhreal
109 IMPLICIT NONE
110
111!$acc routine seq
112
113 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
114 REAL(kind=mnhreal),INTENT(IN) :: tt
115 af3 = tiwmx%AF3TAB(nint(xndegr*tt))
116 END FUNCTION
117
118! Ice crystal function
119 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION bb3(TIWMX, TT)
120 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
121 USE modd_precision, ONLY: mnhreal
122 IMPLICIT NONE
123
124!$acc routine seq
125
126 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
127 REAL(kind=mnhreal),INTENT(IN) :: tt
128 bb3 = tiwmx%BB3TAB(nint(xndegr*tt))
129 END FUNCTION
130
131! Water droplet function:
132 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION bb3w(TIWMX, TT)
133 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
134 USE modd_precision, ONLY: mnhreal
135 IMPLICIT NONE
136
137!$acc routine seq
138
139 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
140 REAL(kind=mnhreal),INTENT(IN) :: tt
141 bb3w = tiwmx%BB3WTAB(nint(xndegr*tt))
142 END FUNCTION
143
144! Function for IN concentration reduction between 0 and -25 C:
145 ELEMENTAL REAL(KIND=MNHREAL) FUNCTION redin(TIWMX, TT)
146 USE modd_tiwmx, ONLY: xndegr, tiwmx_t
147 USE modd_precision, ONLY: mnhreal
148 IMPLICIT NONE
149
150!$acc routine seq
151
152 TYPE(tiwmx_t), INTENT(IN) :: tiwmx
153 REAL(kind=mnhreal),INTENT(IN) :: tt
154 redin = tiwmx%REDINTAB(nint(xndegr*tt))
155 END FUNCTION redin
156
integer, parameter mnhreal
real, parameter xndegr
type(tiwmx_t), target, save tiwmx
elemental real(kind=mnhreal) function am3(tiwmx, tt)
Definition tiwmx.func.h:94
elemental real(kind=mnhreal) function bb3(tiwmx, tt)
Definition tiwmx.func.h:120
elemental real(kind=mnhreal) function desdti(tiwmx, tt)
Definition tiwmx.func.h:55
elemental real(kind=mnhreal) function af3(tiwmx, tt)
Definition tiwmx.func.h:107
elemental real(kind=mnhreal) function aa2(tiwmx, tt)
Definition tiwmx.func.h:81
elemental real(kind=mnhreal) function redin(tiwmx, tt)
Definition tiwmx.func.h:146
elemental real(kind=mnhreal) function aa2w(tiwmx, tt)
Definition tiwmx.func.h:68
elemental real(kind=mnhreal) function esatw(tiwmx, tt)
Definition tiwmx.func.h:19
elemental real(kind=mnhreal) function desdtw(tiwmx, tt)
Definition tiwmx.func.h:31
elemental real(kind=mnhreal) function bb3w(tiwmx, tt)
Definition tiwmx.func.h:133
elemental real(kind=mnhreal) function esati(tiwmx, tt)
Definition tiwmx.func.h:43