Commit 1afe698ec1a6c2319fa79014f61608b5862d18da

Authored by dumoda01
1 parent eb3930d2
Exists in master and in 1 other branch snow

Ajout de coefficients de relaxation specifique pour ammonium

nml/obs.nml
... ... @@ -164,6 +164,11 @@
164 164 z_a2= 35.
165 165 a_2= 0.0
166 166 a_prof_file= 'aprof.dat'
  167 + ARelaxTauM= 1.e15
  168 + ARelaxTauB= 1.e15
  169 + ARelaxTauS= 1.e15
  170 + ARelaxBott= 0.
  171 + ARelaxSurf= 0.
167 172 /
168 173  
169 174 !-------------------------------------------------------------------------------
... ...
src/meanflow/ammonium.F90
... ... @@ -67,7 +67,7 @@
67 67 use meanflow, only: h,u,v,w,AMM,avh !CHG5
68 68 use observations, only: dadx,dady,a_adv !CHG5
69 69 use observations, only: w_adv_discr,w_adv_method
70   - use observations, only: aprof,NRelaxTau !CHG5
  70 + use observations, only: aprof,ARelaxTau !CHG5
71 71 use airsea, only: p_e
72 72 use util, only: Dirichlet,Neumann
73 73 use util, only: oneSided,zeroDivergence
... ... @@ -168,7 +168,7 @@
168 168  
169 169 ! do diffusion step
170 170 call diff_center(nlev,dt,cnpar,posconc,h,DiffBcup,DiffBcdw, &
171   - DiffSup,DiffSdw,avh,LSour,Qsour,NRelaxTau,aprof,amm) !CHG5
  171 + DiffSup,DiffSdw,avh,LSour,Qsour,ARelaxTau,aprof,amm) !CHG5
172 172  
173 173 return
174 174 end subroutine ammonium
... ...
src/observations/observations.F90
... ... @@ -135,6 +135,11 @@
135 135 integer, public :: a_analyt_method=1
136 136 character(LEN=PATH_MAX) :: a_prof_file='aprof.dat'
137 137 REALTYPE :: z_a1,a_1,z_a2,a_2
  138 + REALTYPE :: ARelaxTauM=0.
  139 + REALTYPE :: ARelaxTauS=0.
  140 + REALTYPE :: ARelaxTauB=0.
  141 + REALTYPE :: ARelaxSurf=0.
  142 + REALTYPE :: ARelaxBott=0.
138 143  
139 144 ! Oxygen profile(s)
140 145 integer, public :: o2_prof_method=0
... ... @@ -369,6 +374,8 @@
369 374 namelist /aprofile/ & !CHG5
370 375 a_prof_method,a_analyt_method, &
371 376 z_a1,a_1,z_a2,a_2,a_prof_file
  377 + ARelaxTauM,ARelaxTauB,ARelaxTauS, &
  378 + ARelaxBott,ARelaxSurf
372 379  
373 380 namelist /o2_profile/ &
374 381 o2_prof_method,o2_units,o2_prof_file
... ... @@ -513,10 +520,12 @@
513 520 SRelaxTau(0)=SRelaxTauB
514 521 TRelaxTau(0)=TRelaxTauB
515 522 NRelaxTau(0)=NRelaxTauB !CHG3
  523 + ARelaxTau(0)=ARelaxTauB !CHG3
516 524 do i=1,nlev
517 525 TRelaxTau(i)=TRelaxTauM
518 526 SRelaxTau(i)=SRelaxTauM
519 527 NRelaxTau(i)=NRelaxTauM !CHG3
  528 + ARelaxTau(i)=ARelaxTauM !CHG3
520 529 db=db+0.5*h(i)
521 530 ds=ds-0.5*h(i)
522 531 if (db.le.SRelaxBott) SRelaxTau(i)=SRelaxTauB
... ... @@ -525,6 +534,8 @@
525 534 if (ds.le.TRelaxSurf) TRelaxTau(i)=TRelaxTauS
526 535 if (db.le.NRelaxBott) NRelaxTau(i)=NRelaxTauB !CHG3
527 536 if (ds.le.NRelaxSurf) NRelaxTau(i)=NRelaxTauS !CHG3
  537 + if (db.le.ARelaxBott) ARelaxTau(i)=ARelaxTauB !CHG5
  538 + if (ds.le.ARelaxSurf) ARelaxTau(i)=ARelaxTauS !CHG5
528 539 db=db+0.5*h(i)
529 540 ds=ds-0.5*h(i)
530 541 if ((s_prof_method.ne.0).and.(SRelaxTau(i).le.0.)) then
... ... @@ -554,6 +565,15 @@
554 565 LEVEL2 '***************************************************'
555 566 stop 'init_observations'
556 567 end if
  568 + if ((a_prof_method.ne.0).and.(ARelaxTau(i).le.0.)) then !CHG5
  569 + LEVEL2 ''
  570 + LEVEL2 '***************************************************'
  571 + LEVEL2 'ARelaxTau at i=',i,' is not a positive value.'
  572 + LEVEL2 'Please correct obs.nml and rerun.'
  573 + LEVEL2 'Program aborted.'
  574 + LEVEL2 '***************************************************'
  575 + stop 'init_observations'
  576 + end if
557 577 end do
558 578  
559 579 allocate(o2_prof(0:nlev),stat=rc)
... ... @@ -1150,6 +1170,7 @@
1150 1170 if (allocated(SRelaxTau)) deallocate(SRelaxTau)
1151 1171 if (allocated(TRelaxTau)) deallocate(TRelaxTau)
1152 1172 if (allocated(NRelaxTau)) deallocate(NRelaxTau) !CHG3
  1173 + if (allocated(ARelaxTau)) deallocate(ARelaxTau) !CHG5
1153 1174 if (allocated(uprof)) deallocate(uprof)
1154 1175 if (allocated(vprof)) deallocate(vprof)
1155 1176 if (allocated(epsprof)) deallocate(epsprof)
... ...