[4448] | 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 |
---|
[4472] | 15 | !$OMP THREADPRIVATE( hboville,viscom,viscoh,pbl_lmixmin_alpha) |
---|
[4448] | 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 | 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 | lunout=lunout_in |
---|
| 37 | prt_level=prt_level_in |
---|
| 38 | |
---|
| 39 | b1=16.6 |
---|
| 40 | kap=0.4 |
---|
| 41 | kapb=0.4 |
---|
| 42 | |
---|
| 43 | ALLOCATE (l0(klon)) |
---|
| 44 | |
---|
| 45 | new_yamada4=.false. |
---|
| 46 | CALL getin_p('new_yamada4',new_yamada4) |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | IF (new_yamada4) THEN |
---|
| 50 | ! Corrections et reglages issus du travail de these d'Etienne Vignon. |
---|
| 51 | 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 | CALL getin_p('yamada4_ric',ric) |
---|
| 56 | ric0=0.19489 ! ric=0.195 originalement, mais produisait sm<0 |
---|
| 57 | ric=min(ric,ric0) ! Au dela de ric0, sm devient n??gatif |
---|
| 58 | yun=1. |
---|
| 59 | ydeux=2. |
---|
| 60 | hboville=.FALSE. |
---|
| 61 | viscom=1.46E-5 |
---|
| 62 | viscoh=2.06E-5 |
---|
| 63 | !lmixmin=1.0E-3 |
---|
| 64 | lmixmin=0. |
---|
| 65 | 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 | CALL getin_p('lmixmin',lmixmin) |
---|
| 80 | CALL getin_p('yamada4_hboville',hboville) |
---|
| 81 | CALL getin_p('yamada4_num',yamada4_num) |
---|
[4472] | 82 | pbl_lmixmin_alpha=0.0 |
---|
| 83 | CALL getin_p('pbl_lmixmin_alpha',pbl_lmixmin_alpha) |
---|
[4448] | 84 | |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | RETURN |
---|
| 88 | |
---|
| 89 | END SUBROUTINE yamada_ini |
---|
| 90 | |
---|
| 91 | END MODULE yamada_ini_mod |
---|