[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 | LOGICAL :: new_yamada4 |
---|
| 9 | INTEGER :: yamada4_num |
---|
| 10 | !$OMP THREADPRIVATE(new_yamada4,yamada4_num) |
---|
| 11 | LOGICAL :: hboville=.TRUE. |
---|
| 12 | REAL :: viscom,viscoh,pbl_lmixmin_alpha |
---|
[4472] | 13 | !$OMP THREADPRIVATE( hboville,viscom,viscoh,pbl_lmixmin_alpha) |
---|
[4448] | 14 | real :: ric, yun,ydeux,lmixmin,b1,kap,kapb |
---|
| 15 | !$OMP THREADPRIVATE(ric, yun,ydeux,lmixmin,b1,kap,kapb) |
---|
[4822] | 16 | integer :: iflag_vdif_q2 |
---|
| 17 | !$OMP THREADPRIVATE(iflag_vdif_q2) |
---|
[4448] | 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 | |
---|
[4822] | 48 | iflag_vdif_q2=1 |
---|
| 49 | CALL getin_p('iflag_vdif_q2',iflag_vdif_q2) |
---|
[4448] | 50 | |
---|
[4822] | 51 | |
---|
[4448] | 52 | IF (new_yamada4) THEN |
---|
| 53 | ! Corrections et reglages issus du travail de these d'Etienne Vignon. |
---|
| 54 | ric=0.143 ! qui donne des valeurs proches des seuils proposes |
---|
| 55 | ! dans YAMADA 1983 : sm=0.0845 (0.085 dans Y83) |
---|
| 56 | ! sm=1.1213 (1.12 dans Y83) |
---|
| 57 | |
---|
| 58 | CALL getin_p('yamada4_ric',ric) |
---|
| 59 | ric0=0.19489 ! ric=0.195 originalement, mais produisait sm<0 |
---|
| 60 | ric=min(ric,ric0) ! Au dela de ric0, sm devient n??gatif |
---|
| 61 | yun=1. |
---|
| 62 | ydeux=2. |
---|
| 63 | hboville=.FALSE. |
---|
| 64 | viscom=1.46E-5 |
---|
| 65 | viscoh=2.06E-5 |
---|
| 66 | !lmixmin=1.0E-3 |
---|
| 67 | lmixmin=0. |
---|
| 68 | yamada4_num=5 |
---|
| 69 | ELSE |
---|
| 70 | ric=0.195 |
---|
| 71 | yun=2. |
---|
| 72 | ydeux=1. |
---|
| 73 | hboville=.TRUE. |
---|
| 74 | viscom=0. |
---|
| 75 | viscoh=0. |
---|
| 76 | lmixmin=1. |
---|
| 77 | yamada4_num=0 |
---|
| 78 | ENDIF |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | ! WRITE(lunout,*)'YAMADA4 RIc, RIfc, Sm_min, Alpha_min',ric,rifc,seuilsm,seuilalpha |
---|
| 82 | CALL getin_p('lmixmin',lmixmin) |
---|
| 83 | CALL getin_p('yamada4_hboville',hboville) |
---|
| 84 | CALL getin_p('yamada4_num',yamada4_num) |
---|
[4472] | 85 | pbl_lmixmin_alpha=0.0 |
---|
| 86 | CALL getin_p('pbl_lmixmin_alpha',pbl_lmixmin_alpha) |
---|
[4448] | 87 | |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | RETURN |
---|
| 91 | |
---|
| 92 | END SUBROUTINE yamada_ini |
---|
| 93 | |
---|
| 94 | END MODULE yamada_ini_mod |
---|