Commit 05cf28de authored by Espen Sollum's avatar Espen Sollum
Browse files

Updated checks and warning messages for wet deposition parameters given in SPECIES files

parent 61df8d93
......@@ -198,8 +198,8 @@ module com_mod
! WET DEPOSITION
! weta_gas, wetb_gas parameters for below-cloud wet scavenging coefficients (gasses)
! crain_aero, in_aero parameters for in-cloud wet scavenging coefficients (aerosols)
! wetc_in, wetd_in parameters for in-cloud wet scavenging coefficients (aerosols)
! crain_aero, csnow_aero parameters for below-cloud wet scavenging coefficients (aerosols)
! ccn_aero, cin_aero parameters for in-cloud wet scavenging coefficients (aerosols)
! GAS DEPOSITION
! reldiff diffusivitiy of species relative to diff. of H2O
......
......@@ -185,7 +185,7 @@ module par_mod
! Maximum number of particles, species, and similar
!**************************************************
integer,parameter :: maxpart=4000000
integer,parameter :: maxpart=1000000
integer,parameter :: maxspec=1
real,parameter :: minmass=0.0001
......
......@@ -104,21 +104,21 @@ subroutine readpartpositions
close(unitpartin)
open(unitpartin,file=path(2)(1:length(2))//'partposit_end', &
form='unformatted',err=998)
100 read(unitpartin,end=99) itimein
i=0
200 i=i+1
read(unitpartin) npoint(i),xlonin,ylatin,ztra1(i),itramem(i), &
topo,pvi,qvi,rhoi,hmixi,tri,tti,(xmass1(i,j),j=1,nspec)
if (xlonin.eq.-9999.9) goto 100
xtra1(i)=(xlonin-xlon0)/dx
ytra1(i)=(ylatin-ylat0)/dy
numparticlecount=max(numparticlecount,npoint(i))
goto 200
99 numpart=i-1
100 read(unitpartin,end=99) itimein
i=0
200 i=i+1
read(unitpartin) npoint(i),xlonin,ylatin,ztra1(i),itramem(i), &
topo,pvi,qvi,rhoi,hmixi,tri,tti,(xmass1(i,j),j=1,nspec)
if (xlonin.eq.-9999.9) goto 100
xtra1(i)=(xlonin-xlon0)/dx
ytra1(i)=(ylatin-ylat0)/dy
numparticlecount=max(numparticlecount,npoint(i))
goto 200
99 numpart=i-1
close(unitpartin)
......
......@@ -132,7 +132,7 @@ subroutine readpartpositions
! All processes read the whole file
!***************************************
open(unitpartin,file=path(2)(1:length(2))//'partposit_end', &
open(unitpartin,file=path(2)(1:length(2))//'partposit_end', &
form='unformatted',err=998)
100 read(unitpartin,end=99) itimein
......
......@@ -361,32 +361,34 @@ subroutine readreleases
! Check if wet deposition or OH reaction shall be calculated
!***********************************************************
! NIK 15.02.2015, with new wet dep scheme either A or B parameters can be assigned a positive value which switches on wet dep
if (weta_gas(i).gt.0. .or. wetb_gas(i).gt.0.) then ! :TODO: or particle
! ESO 04.2016 check for below-cloud scavenging (gas or aerosol)
if ((dquer(i).le.0..and.(weta_gas(i).gt.0. .or. wetb_gas(i).gt.0.)) .or. &
&(dquer(i).gt.0. .and. (crain_aero(i) .gt. 0. .or. csnow_aero(i).gt.0.))) then
WETDEP=.true.
if (lroot) then
write (*,*) 'Below-cloud scavenging: ON'
! write (*,*) 'Below-cloud scavenging coefficients: ',weta(i),i
write (*,*) ' Below-cloud scavenging: ON'
! write (*,*) 'Below-cloud scavenging coefficients: ',weta(i),i
end if
else
if (lroot) write (*,*) 'Below-cloud scavenging: OFF'
if (lroot) write (*,*) ' Below-cloud scavenging: OFF'
endif
! NIK 31.01.2013 + 10.12.2013 + 15.02.2015
if (ccn_aero(i).gt.0. .or. in_aero(i).gt.0.) then
if (dquer(i).gt.0..and.(ccn_aero(i).gt.0. .or. in_aero(i).gt.0.)) then
WETDEP=.true.
if (lroot) then
write (*,*) 'In-cloud scavenging: ON'
write (*,*) ' In-cloud scavenging: ON'
! write (*,*) 'In-cloud scavenging coefficients: ',&
! &ccn_aero(i),in_aero(i),i !,wetc_in(i), wetd_in(i),i
end if
else
if (lroot) write (*,*) 'In-cloud scavenging: OFF'
if (lroot) write (*,*) ' In-cloud scavenging: OFF'
endif
if (ohcconst(i).gt.0.) then
OHREA=.true.
if (lroot) write (*,*) 'OHreaction switched on: ',ohcconst(i),i
if (lroot) write (*,*) ' OHreaction switched on: ',ohcconst(i),i
endif
if ((reldiff(i).gt.0.).or.(density(i).gt.0.).or.(dryvel(i).gt.0.)) then
......
......@@ -39,16 +39,16 @@ subroutine readspecies(id_spec,pos_spec)
!*****************************************************************************
! *
! Variables: *
! decaytime(maxtable) half time for radiological decay *
! specname(maxtable) names of chemical species, radionuclides *
! weta_gas, wetb_gas Parameters for determining below-cloud scavenging *
! ccn_aero Parameter for determining in-cloud scavenging *
! in_aero Parameter for determining in-cloud scavenging *
! ohcconst OH reaction rate constant C *
! ohdconst OH reaction rate constant D *
! ohnconst OH reaction rate constant n *
! id_spec SPECIES number as referenced in RELEASE file *
! id_pos position where SPECIES data shall be stored *
! decaytime(maxtable) half time for radiological decay *
! specname(maxtable) names of chemical species, radionuclides *
! weta_gas, wetb_gas Parameters for below-cloud scavenging of gasses *
! crain_aero,csnow_aero Parameters for below-cloud scavenging of aerosols *
! ccn_aero,in_aero Parameters for in-cloud scavenging of aerosols *
! ohcconst OH reaction rate constant C *
! ohdconst OH reaction rate constant D *
! ohnconst OH reaction rate constant n *
! id_spec SPECIES number as referenced in RELEASE file *
! id_pos position where SPECIES data shall be stored *
! *
! Constants: *
! *
......@@ -112,8 +112,9 @@ subroutine readspecies(id_spec,pos_spec)
read(unitspecies,species_params,iostat=readerror)
close(unitspecies)
! if ((pweightmolar.eq.-789.0).or.(readerror.ne.0)) then ! no namelist found
if ((len(pspecies).eq.0).or.(readerror.ne.0)) then ! no namelist found
if ((len(trim(pspecies)).eq.0).or.(readerror.ne.0)) then ! no namelist found
if (lroot) write(*,*) "SPECIES file not in NAMELIST format, attempting to &
&read as fixed format"
readerror=1
......@@ -149,7 +150,7 @@ subroutine readspecies(id_spec,pos_spec)
read(unitspecies,'(e18.1)',end=22) density(pos_spec)
! write(*,*) density(pos_spec)
read(unitspecies,'(e18.1)',end=22) dquer(pos_spec)
! write(*,*) 'dquer(pos_spec):', dquer(pos_spec)
! write(*,*) 'dquer(pos_spec):', dquer(pos_spec)
read(unitspecies,'(e18.1)',end=22) dsigma(pos_spec)
! write(*,*) dsigma(pos_spec)
read(unitspecies,'(f18.2)',end=22) dryvel(pos_spec)
......@@ -220,79 +221,79 @@ subroutine readspecies(id_spec,pos_spec)
!NIK 16.02.2015
! Check scavenging parameters given in SPECIES file
if (weta_gas(pos_spec).gt.0.0 .or. wetb_gas(pos_spec).gt.0.0 .or. ccn_aero(pos_spec).gt.0.0 .or. in_aero(pos_spec).gt.0.0) then
if (dquer(pos_spec).gt.0) then !is particle
if (lroot) then
write(*,'(a,f5.2)') ' Particle below-cloud scavenging parameter A &
&(Rain collection efficiency) ', crain_aero(pos_spec)
write(*,'(a,f5.2)') ' Particle below-cloud scavenging parameter B &
&(Snow collection efficiency) ', csnow_aero(pos_spec)
end if
if (weta_gas(pos_spec).gt.1.0 .or. wetb_gas(pos_spec).gt.1.0) then
if (lroot) then
write(*,*) '*******************************************'
write(*,*) ' WARNING: Particle below-cloud scavenging parameter A or B &
&is out of likely range'
write(*,*) ' Likely range is 0.0-1.0'
write(*,*) '*******************************************'
if (lroot) then
! Particles
!**********
if (dquer(pos_spec).gt.0) then
if (ccn_aero(pos_spec) .gt. 0) then
write(*,'(a,f5.2)') ' Particle CCN efficiency (CCNeff):', ccn_aero(pos_spec)
else
write(*,'(a)') ' Particle CCN efficiency (CCNeff): OFF'
endif
if (in_aero(pos_spec) .gt. 0) then
write(*,'(a,f5.2)') ' Particle IN efficiency (INeff) :', in_aero(pos_spec)
else
write(*,'(a)') ' Particle IN efficiency (INeff) : OFF'
endif
if (crain_aero(pos_spec) .gt. 0) then
write(*,'(a,f5.2)') ' Particle Rain efficiency (Crain) :', crain_aero(pos_spec)
else
write(*,'(a)') ' Particle Rain efficiency (Crain) : OFF'
endif
if (csnow_aero(pos_spec) .gt. 0) then
write(*,'(a,f5.2)') ' Particle Snow efficiency (Csnow) :', csnow_aero(pos_spec)
else
write(*,'(a)') ' Particle Snow efficiency (Csnow) : OFF'
end if
endif
if (lroot) then
write(*,'(a,f5.2)') ' Particle in-cloud scavenging parameter Ai &
&(CCN efficiency) ', ccn_aero(pos_spec)
write(*,'(a,f5.2)') ' Particle in-cloud scavenging parameter Bi &
&(IN efficiency) ', in_aero(pos_spec)
end if
if (ccn_aero(pos_spec).gt.1.0 .or. ccn_aero(pos_spec).lt.0.01) then
if (lroot) then
write(*,*) '*******************************************'
write(*,*) ' WARNING: Particle in-cloud scavenging parameter A is out of likely range'
write(*,*) ' Likely range is 0.0-1.0 for CCN '
write(*,*) '*******************************************'
if (density(pos_spec) .gt. 0) then
write(*,'(a)') ' Dry deposition is turned : ON'
else
write(*,'(a)') ' Dry deposition is (density<0) : OFF'
end if
endif
if (in_aero(pos_spec).gt.1.0 .or. in_aero(pos_spec).lt.0.01) then
if (lroot) then
if (crain_aero(pos_spec).gt.10.0 .or. csnow_aero(pos_spec).gt.10.0 .or. &
&ccn_aero(pos_spec).gt.1.0 .or. in_aero(pos_spec).gt.1.0) then
write(*,*) '*******************************************'
write(*,*) ' WARNING: Particle in-cloud scavenging parameter B is out of likely range'
write(*,*) ' Likely range is 0.0-1.0 for Ice nuclei (IN) '
write(*,*) ' WARNING: Particle Scavenging parameter likely out of range '
write(*,*) ' Likely range for Crain 0.0-10'
write(*,*) ' Likely range for Csnow 0.0-10'
write(*,*) ' Physical range for CCNeff 0.0-1'
write(*,*) ' Physical range for INeff 0.0-1'
write(*,*) '*******************************************'
end if
endif
else !is gas
if (lroot) then
write(*,*) ' Gas below-cloud scavenging parameter A ', weta_gas(pos_spec)
write(*,'(a,f5.2)') ' Gas below-cloud scavenging parameter B ', wetb_gas(pos_spec)
write(*,*) ' Gas in-cloud scavenging uses default values as in Hertel et al 1995'
end if
if (weta_gas(pos_spec).gt.0.) then !if wet deposition is turned on
if (weta_gas(pos_spec).gt.1E-04 .or. weta_gas(pos_spec).lt.1E-09) then
if (lroot) then
else
! Gas
!****
if (weta_gas(pos_spec) .gt. 0 .and. wetb_gas(pos_spec).gt.0) then
write(*,*) ' Wet removal for gases is turned: ON'
write(*,*) ' Gas below-cloud scavenging parameter A ', &
&weta_gas(pos_spec)
write(*,'(a,f5.2)') ' Gas below-cloud scavenging parameter B ', &
&wetb_gas(pos_spec)
else
write(*,*) ' Wet removal for gases is turned: OFF '
end if
if (reldiff(i).gt.0.) then
write(*,*) ' Dry deposition for gases is turned: ON '
else
write(*,*) ' Dry deposition for gases is turned: OFF '
end if
if (weta_gas(pos_spec).gt.0.) then !if wet deposition is turned on
if (weta_gas(pos_spec).gt.1E-04 .or. weta_gas(pos_spec).lt.1E-09 .or. &
&wetb_gas(pos_spec).gt.0.8 .or. wetb_gas(pos_spec).lt.0.4) then
write(*,*) '*******************************************'
write(*,*) ' WARNING: Gas below-cloud scavenging parameter A is out of likely range'
write(*,*) ' Likely range is 1E-04 to 1E-08 (see Hertel et al 1995)'
write(*,*) ' WARNING: Gas below-cloud scavengig is out of likely range'
write(*,*) ' Likely range for A is 1E-04 to 1E-08'
write(*,*) ' Likely range for B is 0.60 to 0.80 '
write(*,*) '*******************************************'
end if
endif
end if
if (wetb_gas(pos_spec).gt.0.) then !if wet deposition is turned on
if (wetb_gas(pos_spec).gt.0.8 .or. wetb_gas(pos_spec).lt.0.6) then
if (lroot) then
write(*,*) '*******************************************'
write(*,*) ' WARNING: Gas below-cloud scavenging parameter B is out of likely range'
write(*,*) ' Likely range is 0.6 to 0.8 (see Hertel et al 1995)'
write(*,*) '*******************************************'
end if
if (((weta_gas(pos_spec).gt.0).or.(wetb_gas(pos_spec).gt.0)).and.&
&(henry(pos_spec).le.0)) then
if (dquer(pos_spec).le.0) goto 996 ! no particle, no henry set
endif
end if
endif
endif
if (((weta_gas(pos_spec).gt.0).or.(wetb_gas(pos_spec).gt.0)).and.(henry(pos_spec).le.0)) then
if (dquer(pos_spec).le.0) goto 996 ! no particle, no henry set
endif
end if
if (spec_ass(pos_spec).gt.0) then
spec_found=.FALSE.
......@@ -303,7 +304,7 @@ subroutine readspecies(id_spec,pos_spec)
ASSSPEC=.TRUE.
endif
end do
if (spec_found.eqv..FALSE.) then
if (spec_found.eqv..false.) then
goto 997
endif
endif
......
......@@ -101,7 +101,7 @@ subroutine timemanager
implicit none
integer :: j,ks,kp,l,n,itime,nstop,nstop1
integer :: j,ks,kp,l,n,itime=0,nstop,nstop1
! integer :: ksp
integer :: loutnext,loutstart,loutend
integer :: ix,jy,ldeltat,itage,nage
......
......@@ -136,10 +136,9 @@ subroutine timemanager
!**********************************************************************
! itime=0
if (lroot.or.mp_dev_mode) then
write(*,45) itime,numpart*mp_partgroup_np,gridtotalunc,wetgridtotalunc,drygridtotalunc
! write(*,46) float(itime)/3600,itime,numpart*mp_partgroup_np
! write(*,45) itime,numpart*mp_partgroup_np,gridtotalunc,wetgridtotalunc,drygridtotalunc
write(*,46) float(itime)/3600,itime,numpart*mp_partgroup_np
if (verbosity.gt.0) then
write (*,*) 'timemanager> starting simulation'
......
......@@ -349,18 +349,17 @@ subroutine wetdepo(itime,ltsample,loutnext)
!ZHG Use the activated fraction and the liqid water to calculate the washout
! AEROSOL
!**************************************************
if (dquer(ks).gt.0.) then ! is particle
!********
if (dquer(ks).gt.0.) then
S_i= frac_act/cl
!*********************
! GAS
else ! is gas
!****
else
cle=(1-cl)/(henry(ks)*(r_air/3500.)*act_temp)+cl
!REPLACE to switch old/ new scheme
! S_i=frac_act/cle
! S_i=frac_act/cle
S_i=1/cle
endif ! gas or particle
......
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