Maintenance is scheduled between 16:00 and 23:59 CET (15:00 to 22:59 UTC), Thursday 2020-05-28.

Access to git.nilu.no may be interrupted or the system may be unavailable at any time during this timeframe.

Commit d6a245b5 authored by Sabine's avatar Sabine

DOW, HOD species read in

parent 79996be9
......@@ -68,6 +68,7 @@ subroutine readspecies(id_spec,pos_spec)
real :: pdecay, pweta_gas, pwetb_gas, preldiff, phenry, pf0, pdensity, pdquer
real :: pdsigma, pdryvel, pweightmolar, pohcconst, pohdconst, pohnconst
real :: pcrain_aero, pcsnow_aero, pccn_aero, pin_aero
real :: parea_dow(7), parea_hour(24), ppoint_dow(7), ppoint_hour(24)
integer :: readerror
! declare namelist
......@@ -75,7 +76,8 @@ subroutine readspecies(id_spec,pos_spec)
pspecies, pdecay, pweta_gas, pwetb_gas, &
pcrain_aero, pcsnow_aero, pccn_aero, pin_aero, &
preldiff, phenry, pf0, pdensity, pdquer, &
pdsigma, pdryvel, pweightmolar, pohcconst, pohdconst, pohnconst
pdsigma, pdryvel, pweightmolar, pohcconst, pohdconst, pohnconst, &
parea_dow, parea_hour, ppoint_dow, ppoint_hour
pspecies="" ! read failure indicator value
pdecay=-999.9
......@@ -97,6 +99,16 @@ subroutine readspecies(id_spec,pos_spec)
pohnconst=2.0
pweightmolar=-999.9
do j=1,24 ! initialize everything to no variation
area_hour(pos_spec,j)=1.
point_hour(pos_spec,j)=1.
end do
do j=1,7
area_dow(pos_spec,j)=1.
point_dow(pos_spec,j)=1.
end do
if (readerror.ne.0) then ! text format input
! Open the SPECIES file and read species names and properties
!************************************************************
specnum(pos_spec)=id_spec
......@@ -162,6 +174,18 @@ subroutine readspecies(id_spec,pos_spec)
read(unitspecies,'(f8.2)',end=22) ohnconst(pos_spec)
! write(*,*) ohnconst(pos_spec)
! Read in daily and day-of-week variation of emissions, if available
!*******************************************************************
read(unitspecies,*,end=22)
do j=1,24 ! 24 hours, starting with 0-1 local time
read(unitspecies,*) ihour,area_hour(pos_spec,j),point_hour(pos_spec,j)
end do
read(unitspecies,*)
do j=1,7 ! 7 days of the week, starting with Monday
read(unitspecies,*) idow,area_dow(pos_spec,j),point_dow(pos_spec,j)
end do
pspecies=species(pos_spec)
pdecay=decay(pos_spec)
pweta_gas=weta_gas(pos_spec)
......@@ -182,7 +206,17 @@ subroutine readspecies(id_spec,pos_spec)
pohdconst=ohdconst(pos_spec)
pohnconst=ohnconst(pos_spec)
else
do j=1,24 ! 24 hours, starting with 0-1 local time
parea_hour(j)=area_hour(pos_spec,j)
ppoint_hour(j)=point_hour(pos_spec,j)
end do
do j=1,7 ! 7 days of the week, starting with Monday
parea_dow(j)=area_dow(pos_spec,j)
ppoint_dow(j)=point_dow(pos_spec,j)
end do
else ! namelist available
species(pos_spec)=pspecies
decay(pos_spec)=pdecay
......@@ -203,6 +237,16 @@ subroutine readspecies(id_spec,pos_spec)
ohcconst(pos_spec)=pohcconst
ohdconst(pos_spec)=pohdconst
ohnconst(pos_spec)=pohnconst
do j=1,24 ! 24 hours, starting with 0-1 local time
area_hour(pos_spec,j)=parea_hour(j)
point_hour(pos_spec,j)=ppoint_hour(j)
end do
do j=1,7 ! 7 days of the week, starting with Monday
area_dow(pos_spec,j)=parea_dow(j)
point_dow(pos_spec,j)=ppoint_dow(j)
end do
endif
i=pos_spec
......@@ -303,30 +347,6 @@ subroutine readspecies(id_spec,pos_spec)
20 continue
! Read in daily and day-of-week variation of emissions, if available
!*******************************************************************
! HSO: This is not yet implemented as namelist parameters
do j=1,24 ! initialize everything to no variation
area_hour(i,j)=1.
point_hour(i,j)=1.
end do
do j=1,7
area_dow(i,j)=1.
point_dow(i,j)=1.
end do
if (readerror.ne.0) then ! text format input
read(unitspecies,*,end=22)
do j=1,24 ! 24 hours, starting with 0-1 local time
read(unitspecies,*) ihour,area_hour(i,j),point_hour(i,j)
end do
read(unitspecies,*)
do j=1,7 ! 7 days of the week, starting with Monday
read(unitspecies,*) idow,area_dow(i,j),point_dow(i,j)
end do
endif
22 close(unitspecies)
......
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