Commit 1afe698e authored by dumoda01's avatar dumoda01

Ajout de coefficients de relaxation specifique pour ammonium

parent eb3930d2
...@@ -164,6 +164,11 @@ ...@@ -164,6 +164,11 @@
z_a2= 35. z_a2= 35.
a_2= 0.0 a_2= 0.0
a_prof_file= 'aprof.dat' a_prof_file= 'aprof.dat'
ARelaxTauM= 1.e15
ARelaxTauB= 1.e15
ARelaxTauS= 1.e15
ARelaxBott= 0.
ARelaxSurf= 0.
/ /
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
use meanflow, only: h,u,v,w,AMM,avh !CHG5 use meanflow, only: h,u,v,w,AMM,avh !CHG5
use observations, only: dadx,dady,a_adv !CHG5 use observations, only: dadx,dady,a_adv !CHG5
use observations, only: w_adv_discr,w_adv_method use observations, only: w_adv_discr,w_adv_method
use observations, only: aprof,NRelaxTau !CHG5 use observations, only: aprof,ARelaxTau !CHG5
use airsea, only: p_e use airsea, only: p_e
use util, only: Dirichlet,Neumann use util, only: Dirichlet,Neumann
use util, only: oneSided,zeroDivergence use util, only: oneSided,zeroDivergence
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
! do diffusion step ! do diffusion step
call diff_center(nlev,dt,cnpar,posconc,h,DiffBcup,DiffBcdw, & call diff_center(nlev,dt,cnpar,posconc,h,DiffBcup,DiffBcdw, &
DiffSup,DiffSdw,avh,LSour,Qsour,NRelaxTau,aprof,amm) !CHG5 DiffSup,DiffSdw,avh,LSour,Qsour,ARelaxTau,aprof,amm) !CHG5
return return
end subroutine ammonium end subroutine ammonium
......
...@@ -135,6 +135,11 @@ ...@@ -135,6 +135,11 @@
integer, public :: a_analyt_method=1 integer, public :: a_analyt_method=1
character(LEN=PATH_MAX) :: a_prof_file='aprof.dat' character(LEN=PATH_MAX) :: a_prof_file='aprof.dat'
REALTYPE :: z_a1,a_1,z_a2,a_2 REALTYPE :: z_a1,a_1,z_a2,a_2
REALTYPE :: ARelaxTauM=0.
REALTYPE :: ARelaxTauS=0.
REALTYPE :: ARelaxTauB=0.
REALTYPE :: ARelaxSurf=0.
REALTYPE :: ARelaxBott=0.
! Oxygen profile(s) ! Oxygen profile(s)
integer, public :: o2_prof_method=0 integer, public :: o2_prof_method=0
...@@ -369,6 +374,8 @@ ...@@ -369,6 +374,8 @@
namelist /aprofile/ & !CHG5 namelist /aprofile/ & !CHG5
a_prof_method,a_analyt_method, & a_prof_method,a_analyt_method, &
z_a1,a_1,z_a2,a_2,a_prof_file z_a1,a_1,z_a2,a_2,a_prof_file
ARelaxTauM,ARelaxTauB,ARelaxTauS, &
ARelaxBott,ARelaxSurf
namelist /o2_profile/ & namelist /o2_profile/ &
o2_prof_method,o2_units,o2_prof_file o2_prof_method,o2_units,o2_prof_file
...@@ -513,10 +520,12 @@ ...@@ -513,10 +520,12 @@
SRelaxTau(0)=SRelaxTauB SRelaxTau(0)=SRelaxTauB
TRelaxTau(0)=TRelaxTauB TRelaxTau(0)=TRelaxTauB
NRelaxTau(0)=NRelaxTauB !CHG3 NRelaxTau(0)=NRelaxTauB !CHG3
ARelaxTau(0)=ARelaxTauB !CHG3
do i=1,nlev do i=1,nlev
TRelaxTau(i)=TRelaxTauM TRelaxTau(i)=TRelaxTauM
SRelaxTau(i)=SRelaxTauM SRelaxTau(i)=SRelaxTauM
NRelaxTau(i)=NRelaxTauM !CHG3 NRelaxTau(i)=NRelaxTauM !CHG3
ARelaxTau(i)=ARelaxTauM !CHG3
db=db+0.5*h(i) db=db+0.5*h(i)
ds=ds-0.5*h(i) ds=ds-0.5*h(i)
if (db.le.SRelaxBott) SRelaxTau(i)=SRelaxTauB if (db.le.SRelaxBott) SRelaxTau(i)=SRelaxTauB
...@@ -525,6 +534,8 @@ ...@@ -525,6 +534,8 @@
if (ds.le.TRelaxSurf) TRelaxTau(i)=TRelaxTauS if (ds.le.TRelaxSurf) TRelaxTau(i)=TRelaxTauS
if (db.le.NRelaxBott) NRelaxTau(i)=NRelaxTauB !CHG3 if (db.le.NRelaxBott) NRelaxTau(i)=NRelaxTauB !CHG3
if (ds.le.NRelaxSurf) NRelaxTau(i)=NRelaxTauS !CHG3 if (ds.le.NRelaxSurf) NRelaxTau(i)=NRelaxTauS !CHG3
if (db.le.ARelaxBott) ARelaxTau(i)=ARelaxTauB !CHG5
if (ds.le.ARelaxSurf) ARelaxTau(i)=ARelaxTauS !CHG5
db=db+0.5*h(i) db=db+0.5*h(i)
ds=ds-0.5*h(i) ds=ds-0.5*h(i)
if ((s_prof_method.ne.0).and.(SRelaxTau(i).le.0.)) then if ((s_prof_method.ne.0).and.(SRelaxTau(i).le.0.)) then
...@@ -554,6 +565,15 @@ ...@@ -554,6 +565,15 @@
LEVEL2 '***************************************************' LEVEL2 '***************************************************'
stop 'init_observations' stop 'init_observations'
end if end if
if ((a_prof_method.ne.0).and.(ARelaxTau(i).le.0.)) then !CHG5
LEVEL2 ''
LEVEL2 '***************************************************'
LEVEL2 'ARelaxTau at i=',i,' is not a positive value.'
LEVEL2 'Please correct obs.nml and rerun.'
LEVEL2 'Program aborted.'
LEVEL2 '***************************************************'
stop 'init_observations'
end if
end do end do
allocate(o2_prof(0:nlev),stat=rc) allocate(o2_prof(0:nlev),stat=rc)
...@@ -1150,6 +1170,7 @@ ...@@ -1150,6 +1170,7 @@
if (allocated(SRelaxTau)) deallocate(SRelaxTau) if (allocated(SRelaxTau)) deallocate(SRelaxTau)
if (allocated(TRelaxTau)) deallocate(TRelaxTau) if (allocated(TRelaxTau)) deallocate(TRelaxTau)
if (allocated(NRelaxTau)) deallocate(NRelaxTau) !CHG3 if (allocated(NRelaxTau)) deallocate(NRelaxTau) !CHG3
if (allocated(ARelaxTau)) deallocate(ARelaxTau) !CHG5
if (allocated(uprof)) deallocate(uprof) if (allocated(uprof)) deallocate(uprof)
if (allocated(vprof)) deallocate(vprof) if (allocated(vprof)) deallocate(vprof)
if (allocated(epsprof)) deallocate(epsprof) if (allocated(epsprof)) deallocate(epsprof)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment