1 | ! |
---|
2 | ! $Id: calcul_fluxs_mod.F90 3102 2017-12-03 20:27:42Z oboucher $ |
---|
3 | ! |
---|
4 | MODULE calcul_fluxs_mod |
---|
5 | |
---|
6 | |
---|
7 | CONTAINS |
---|
8 | |
---|
9 | SUBROUTINE calcul_flux_wind(knon, dtime, & |
---|
10 | u0, v0, u1, v1, gustiness, cdrag_m, & |
---|
11 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
12 | p1lay, t1lay, & |
---|
13 | flux_u1, flux_v1) |
---|
14 | |
---|
15 | USE dimphy |
---|
16 | USE comcstfi_mod, ONLY: r |
---|
17 | ! INCLUDE "YOMCST.h" |
---|
18 | ! INCLUDE "clesphys.h" |
---|
19 | |
---|
20 | ! Input arguments |
---|
21 | !**************************************************************************************** |
---|
22 | INTEGER, INTENT(IN) :: knon |
---|
23 | REAL, INTENT(IN) :: dtime |
---|
24 | REAL, DIMENSION(klon), INTENT(IN) :: u0, v0 ! u and v at niveau 0 |
---|
25 | REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness ! u and v at niveau 1 |
---|
26 | REAL, DIMENSION(klon), INTENT(IN) :: cdrag_m ! cdrag pour momentum |
---|
27 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV |
---|
28 | REAL, DIMENSION(klon), INTENT(IN) :: p1lay ! pression 1er niveau (milieu de couche) |
---|
29 | REAL, DIMENSION(klon), INTENT(IN) :: t1lay ! temperature |
---|
30 | ! Output arguments |
---|
31 | !**************************************************************************************** |
---|
32 | REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1 |
---|
33 | REAL, DIMENSION(klon), INTENT(OUT) :: flux_v1 |
---|
34 | |
---|
35 | ! Local variables |
---|
36 | !**************************************************************************************** |
---|
37 | INTEGER :: i |
---|
38 | REAL :: mod_wind, buf |
---|
39 | |
---|
40 | !**************************************************************************************** |
---|
41 | ! Calculate the surface flux |
---|
42 | ! |
---|
43 | !**************************************************************************************** |
---|
44 | DO i=1,knon |
---|
45 | mod_wind = min_wind_speed + SQRT(gustiness(i)+(u1(i) - u0(i))**2 + (v1(i)-v0(i))**2) |
---|
46 | buf = cdrag_m(i) * mod_wind * p1lay(i)/(r*t1lay(i)) |
---|
47 | flux_u1(i) = (AcoefU(i) - u0(i)) / (1/buf - BcoefU(i)*dtime ) |
---|
48 | flux_v1(i) = (AcoefV(i) - v0(i)) / (1/buf - BcoefV(i)*dtime ) |
---|
49 | END DO |
---|
50 | |
---|
51 | END SUBROUTINE calcul_flux_wind |
---|
52 | ! |
---|
53 | !**************************************************************************************** |
---|
54 | ! |
---|
55 | END MODULE calcul_fluxs_mod |
---|