[4090] | 1 | MODULE thermcell_ini_mod |
---|
| 2 | IMPLICIT NONE |
---|
| 3 | |
---|
| 4 | save |
---|
| 5 | integer :: dvdq=1,dqimpl=-1,prt_level=0,lunout |
---|
| 6 | real RG,RD,RCPD,RKAPPA,RLVTT,RLvCp,RETV |
---|
| 7 | real :: r_aspect_thermals,tau_thermals,fact_thermals_ed_dz |
---|
| 8 | integer :: iflag_thermals_ed,iflag_thermals_optflux,iflag_thermals_closure |
---|
[4381] | 9 | integer :: iflag_thermals_down |
---|
[4090] | 10 | |
---|
| 11 | !$OMP THREADPRIVATE(dvdq,dqimpl,prt_level,lunout) |
---|
| 12 | !$OMP THREADPRIVATE(RG,RD,RCPD,RKAPPA,RLVTT,RLvCp) |
---|
| 13 | !$OMP THREADPRIVATE(r_aspect_thermals,tau_thermals,fact_thermals_ed_dz) |
---|
| 14 | !$OMP THREADPRIVATE(iflag_thermals_ed,iflag_thermals_optflux,iflag_thermals_closure) |
---|
[4381] | 15 | !$OMP THREADPRIVATE(iflag_thermals_down) |
---|
[4090] | 16 | |
---|
[4381] | 17 | |
---|
[4090] | 18 | REAL, SAVE :: fact_epsilon=0.002 |
---|
| 19 | REAL, SAVE :: betalpha=0.9 |
---|
| 20 | REAL, SAVE :: afact=2./3. |
---|
| 21 | REAL, SAVE :: fact_shell=1. |
---|
| 22 | REAL,SAVE :: detr_min=1.e-5 |
---|
| 23 | REAL,SAVE :: entr_min=1.e-5 |
---|
| 24 | REAL,SAVE :: detr_q_coef=0.012 |
---|
| 25 | REAL,SAVE :: detr_q_power=0.5 |
---|
| 26 | REAL,SAVE :: mix0=0. |
---|
| 27 | INTEGER,SAVE :: thermals_flag_alim=0 |
---|
| 28 | |
---|
| 29 | !$OMP THREADPRIVATE(fact_epsilon, betalpha, afact, fact_shell) |
---|
| 30 | !$OMP THREADPRIVATE(detr_min, entr_min, detr_q_coef, detr_q_power) |
---|
| 31 | !$OMP THREADPRIVATE( mix0, thermals_flag_alim) |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | CONTAINS |
---|
| 35 | |
---|
| 36 | SUBROUTINE thermcell_ini(iflag_thermals,prt_level_in,tau_thermals_in,lunout_in, & |
---|
| 37 | & RG_in,RD_in,RCPD_in,RKAPPA_in,RLVTT_in,RETV_in) |
---|
| 38 | |
---|
| 39 | USE ioipsl_getin_p_mod, ONLY : getin_p |
---|
| 40 | |
---|
| 41 | integer, intent(in) :: iflag_thermals,prt_level_in,lunout_in |
---|
| 42 | real, intent(in) :: RG_in,RD_in,RCPD_in,RKAPPA_in,RLVTT_in,RETV_in,tau_thermals_in |
---|
| 43 | |
---|
| 44 | print*,'thermcell_ini' |
---|
| 45 | if (iflag_thermals==15.or.iflag_thermals==16) then |
---|
| 46 | dvdq=0 |
---|
| 47 | dqimpl=-1 |
---|
| 48 | else |
---|
| 49 | dvdq=1 |
---|
| 50 | dqimpl=1 |
---|
| 51 | endif |
---|
| 52 | prt_level=prt_level_in |
---|
| 53 | RG=RG_in |
---|
| 54 | RD=RD_in |
---|
| 55 | RCPD=RCPD_in |
---|
| 56 | RKAPPA=RKAPPA_in |
---|
| 57 | RLVTT=RLVTT_in |
---|
| 58 | RLvCp = RLVTT/RCPD |
---|
| 59 | RETV=RETV_in |
---|
| 60 | tau_thermals=tau_thermals_in |
---|
| 61 | lunout=lunout_in |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | !===================================================================== |
---|
| 65 | ! a la fois les vieilles param et thermcell_main : |
---|
| 66 | !===================================================================== |
---|
| 67 | |
---|
| 68 | r_aspect_thermals=2. |
---|
| 69 | CALL getin_p('r_aspect_thermals',r_aspect_thermals) |
---|
| 70 | |
---|
| 71 | tau_thermals = 0. |
---|
| 72 | CALL getin_p('tau_thermals',tau_thermals) |
---|
| 73 | |
---|
| 74 | fact_thermals_ed_dz = 0.1 |
---|
| 75 | CALL getin_p('fact_thermals_ed_dz',fact_thermals_ed_dz) |
---|
| 76 | |
---|
| 77 | fact_thermals_ed_dz = 0.1 |
---|
| 78 | CALL getin_p('fact_thermals_ed_dz',fact_thermals_ed_dz) |
---|
| 79 | |
---|
| 80 | iflag_thermals_ed = 0 |
---|
| 81 | CALL getin_p('iflag_thermals_ed',iflag_thermals_ed) |
---|
| 82 | |
---|
| 83 | iflag_thermals_optflux = 0 |
---|
| 84 | CALL getin_p('iflag_thermals_optflux',iflag_thermals_optflux) |
---|
| 85 | |
---|
| 86 | iflag_thermals_closure = 1 |
---|
| 87 | CALL getin_p('iflag_thermals_closure',iflag_thermals_closure) |
---|
| 88 | |
---|
[4381] | 89 | iflag_thermals_down = 0 |
---|
| 90 | CALL getin_p('iflag_thermals_down',iflag_thermals_down) |
---|
| 91 | |
---|
| 92 | |
---|
[4090] | 93 | CALL getin_p('thermals_fact_epsilon',fact_epsilon) |
---|
| 94 | CALL getin_p('thermals_betalpha',betalpha) |
---|
| 95 | CALL getin_p('thermals_afact',afact) |
---|
| 96 | CALL getin_p('thermals_fact_shell',fact_shell) |
---|
| 97 | CALL getin_p('thermals_detr_min',detr_min) |
---|
| 98 | CALL getin_p('thermals_entr_min',entr_min) |
---|
| 99 | CALL getin_p('thermals_detr_q_coef',detr_q_coef) |
---|
| 100 | CALL getin_p('thermals_detr_q_power',detr_q_power) |
---|
| 101 | CALL getin_p('thermals_mix0',mix0) |
---|
| 102 | CALL getin_p('thermals_flag_alim',thermals_flag_alim) |
---|
| 103 | |
---|
| 104 | |
---|
[4094] | 105 | RETURN |
---|
[4090] | 106 | |
---|
| 107 | END SUBROUTINE thermcell_ini |
---|
| 108 | END MODULE thermcell_ini_mod |
---|