1 | MODULE yamada_ini_mod |
---|
2 | |
---|
3 | ! AFAIRE : frif defini deux fois. |
---|
4 | ! peut on passer une fonction du module au code. |
---|
5 | |
---|
6 | implicit none |
---|
7 | |
---|
8 | save |
---|
9 | |
---|
10 | LOGICAL :: new_yamada4 |
---|
11 | INTEGER :: yamada4_num |
---|
12 | !$OMP THREADPRIVATE(new_yamada4,yamada4_num) |
---|
13 | LOGICAL :: hboville=.TRUE. |
---|
14 | REAL :: viscom,viscoh,pbl_lmixmin_alpha |
---|
15 | !$OMP THREADPRIVATE( hboville,viscom,viscoh,pbl_lmixmin_alpha) |
---|
16 | real :: ric, yun,ydeux,lmixmin,b1,kap,kapb |
---|
17 | !$OMP THREADPRIVATE(ric, yun,ydeux,lmixmin,b1,kap,kapb) |
---|
18 | integer :: iflag_vdif_q2 |
---|
19 | !$OMP THREADPRIVATE(iflag_vdif_q2) |
---|
20 | |
---|
21 | real, dimension(:), allocatable, save :: l0 |
---|
22 | !$OMP THREADPRIVATE(l0) |
---|
23 | integer :: lunout,prt_level |
---|
24 | !$OMP THREADPRIVATE(lunout,prt_level) |
---|
25 | |
---|
26 | |
---|
27 | CONTAINS |
---|
28 | |
---|
29 | SUBROUTINE yamada_ini(klon,lunout_in,prt_level_in) |
---|
30 | |
---|
31 | USE ioipsl_getin_p_mod, ONLY : getin_p |
---|
32 | |
---|
33 | ! local |
---|
34 | integer, intent(in) :: klon,lunout_in,prt_level_in |
---|
35 | real :: ric0 |
---|
36 | real frif,falpha,fsm,ri |
---|
37 | |
---|
38 | lunout=lunout_in |
---|
39 | prt_level=prt_level_in |
---|
40 | |
---|
41 | b1=16.6 |
---|
42 | kap=0.4 |
---|
43 | kapb=0.4 |
---|
44 | |
---|
45 | ALLOCATE (l0(klon)) |
---|
46 | |
---|
47 | new_yamada4=.false. |
---|
48 | CALL getin_p('new_yamada4',new_yamada4) |
---|
49 | |
---|
50 | iflag_vdif_q2=1 |
---|
51 | CALL getin_p('iflag_vdif_q2',iflag_vdif_q2) |
---|
52 | |
---|
53 | |
---|
54 | IF (new_yamada4) THEN |
---|
55 | ! Corrections et reglages issus du travail de these d'Etienne Vignon. |
---|
56 | ric=0.143 ! qui donne des valeurs proches des seuils proposes |
---|
57 | ! dans YAMADA 1983 : sm=0.0845 (0.085 dans Y83) |
---|
58 | ! sm=1.1213 (1.12 dans Y83) |
---|
59 | |
---|
60 | CALL getin_p('yamada4_ric',ric) |
---|
61 | ric0=0.19489 ! ric=0.195 originalement, mais produisait sm<0 |
---|
62 | ric=min(ric,ric0) ! Au dela de ric0, sm devient n??gatif |
---|
63 | yun=1. |
---|
64 | ydeux=2. |
---|
65 | hboville=.FALSE. |
---|
66 | viscom=1.46E-5 |
---|
67 | viscoh=2.06E-5 |
---|
68 | !lmixmin=1.0E-3 |
---|
69 | lmixmin=0. |
---|
70 | yamada4_num=5 |
---|
71 | ELSE |
---|
72 | ric=0.195 |
---|
73 | yun=2. |
---|
74 | ydeux=1. |
---|
75 | hboville=.TRUE. |
---|
76 | viscom=0. |
---|
77 | viscoh=0. |
---|
78 | lmixmin=1. |
---|
79 | yamada4_num=0 |
---|
80 | ENDIF |
---|
81 | |
---|
82 | |
---|
83 | ! WRITE(lunout,*)'YAMADA4 RIc, RIfc, Sm_min, Alpha_min',ric,rifc,seuilsm,seuilalpha |
---|
84 | CALL getin_p('lmixmin',lmixmin) |
---|
85 | CALL getin_p('yamada4_hboville',hboville) |
---|
86 | CALL getin_p('yamada4_num',yamada4_num) |
---|
87 | pbl_lmixmin_alpha=0.0 |
---|
88 | CALL getin_p('pbl_lmixmin_alpha',pbl_lmixmin_alpha) |
---|
89 | |
---|
90 | |
---|
91 | |
---|
92 | RETURN |
---|
93 | |
---|
94 | END SUBROUTINE yamada_ini |
---|
95 | |
---|
96 | END MODULE yamada_ini_mod |
---|