54 public vir, vicp, vicv, ind_gas, num_gas
68 subroutine multi_gases_init(ngas, nwat, ri, cpi, is_master)
79 integer,
intent(in):: ngas, nwat
80 real(kind=kind_dyn),
intent(in):: ri(0:ngas)
81 real(kind=kind_dyn),
intent(in):: cpi(0:ngas)
82 logical,
intent(in):: is_master
87 logical :: default_gas=.false.
94 if( ri(n).ne.0.0 .or. cpi(n).ne.0.0 ) num_gas=n
96 if ( num_gas.eq.1 ) default_gas=.true.
97 allocate( vir(0:num_gas) )
98 allocate( vicp(0:num_gas) )
99 allocate( vicv(0:num_gas) )
101 cv_air = cp_air - rdgas
103 cvi(n) = cpi(n) - ri(n)
107 vicp(0) = cpi(0)/cp_air
108 vicv(0) = cvi(0)/cv_air
109 if( default_gas )
then
116 if( ri(n).gt.0.0 ) vir(n) = ri(n)/rdgas - vir(0)
118 if( cpi(n).gt.0.0 ) vicp(n) = cpi(n)/cp_air - vicp(0)
120 if( cvi(n).gt.0.0 ) vicv(n) = cvi(n)/cv_air - vicv(0)
124 write(*,*)
' ccpp multi_gases_init with ind_gas=',ind_gas
125 write(*,*)
' ccpp multi_gases_init with num_gas=',num_gas
126 write(*,*)
' ccpp multi_gases_init with vir =',vir
127 write(*,*)
' ccpp multi_gases_init with vicp=',vicp
128 write(*,*)
' ccpp multi_gases_init with vicv=',vicv