GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phylmd/yamada_ini_mod.F90 Lines: 26 34 76.5 %
Date: 2023-06-30 12:51:15 Branches: 4 8 50.0 %

Line Branch Exec Source
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
19
  real, dimension(:), allocatable, save :: l0
20
  !$OMP THREADPRIVATE(l0)
21
  integer :: lunout,prt_level
22
  !$OMP THREADPRIVATE(lunout,prt_level)
23
24
25
CONTAINS
26
27
1
SUBROUTINE yamada_ini(klon,lunout_in,prt_level_in)
28
29
   USE ioipsl_getin_p_mod, ONLY : getin_p
30
31
! local
32
  integer, intent(in) :: klon,lunout_in,prt_level_in
33
  real :: ric0
34
  real frif,falpha,fsm,ri
35
36
1
  lunout=lunout_in
37
1
  prt_level=prt_level_in
38
39
1
  b1=16.6
40
1
  kap=0.4
41
1
  kapb=0.4
42
43

1
    ALLOCATE (l0(klon))
44
45
1
   new_yamada4=.false.
46
1
   CALL getin_p('new_yamada4',new_yamada4)
47
48
49
1
    IF (new_yamada4) THEN
50
! Corrections et reglages issus du travail de these d'Etienne Vignon.
51
1
       ric=0.143 ! qui donne des valeurs proches des seuils proposes
52
                 ! dans YAMADA 1983 : sm=0.0845 (0.085 dans Y83)
53
                 !                    sm=1.1213 (1.12  dans Y83)
54
55
1
       CALL getin_p('yamada4_ric',ric)
56
       ric0=0.19489      ! ric=0.195 originalement, mais produisait sm<0
57
1
       ric=min(ric,ric0) ! Au dela de ric0, sm devient n??gatif
58
1
       yun=1.
59
1
       ydeux=2.
60
1
       hboville=.FALSE.
61
1
       viscom=1.46E-5
62
1
       viscoh=2.06E-5
63
       !lmixmin=1.0E-3
64
1
       lmixmin=0.
65
1
       yamada4_num=5
66
    ELSE
67
       ric=0.195
68
       yun=2.
69
       ydeux=1.
70
       hboville=.TRUE.
71
       viscom=0.
72
       viscoh=0.
73
       lmixmin=1.
74
       yamada4_num=0
75
    ENDIF
76
77
78
!    WRITE(lunout,*)'YAMADA4 RIc, RIfc, Sm_min, Alpha_min',ric,rifc,seuilsm,seuilalpha
79
1
    CALL getin_p('lmixmin',lmixmin)
80
1
    CALL getin_p('yamada4_hboville',hboville)
81
1
    CALL getin_p('yamada4_num',yamada4_num)
82
1
    pbl_lmixmin_alpha=0.0
83
1
    CALL getin_p('pbl_lmixmin_alpha',pbl_lmixmin_alpha)
84
85
86
87
1
 RETURN
88
89
END SUBROUTINE yamada_ini
90
91
END MODULE yamada_ini_mod