Open cseppan opened 8 months ago
Inconsistent in number of species appears to be caused by HAPS integration treatment. Depending on SMK_PROCESS_HAPS
setting (e.g., "NONE" or "ALL"), area_map_rwc_2018gg_18j.txt
may content map file for VOC along with VOC_INV, whereas area_rwc.ncf account for VOC.
The issue being isolated to the SETNONHAP subrountine ($SMOKE_HOME/src/smkinven/setnonhap.f)
The following is array of emitted species input to SETNONHAP when processing rwc source.
INVDNAME( 1) = FORMALD
INVDNAME( 5) = BENZENE
INVDNAME( 7) = ACETALD
INVDNAME( 9) = NAPHTH
INVDNAME( 11) = BUTADIE
INVDNAME( 12) = ACROLEI
INVDNAME( 22) = CO
INVDNAME( 79) = NH3
INVDNAME( 83) = NOX
INVDNAME( 88) = PM10
INVDNAME( 89) = PM2_5
INVDNAME(101) = SO2
INVDNAME(107) = VOC
INVDNAME(108) = VOC_INV
When SMK_PROCESS_HAPS
is set to "ALL" or "PARTIAL", a new pollutant NONHAPVOC is calculated as the remainder of subtracting HAPs emission from VOC or TOG emission. Around code line 614 - 620, VOC is renamed to NONHAPVOC, and INVSTAT (which keeps track of which pollutants from the INTABLE are valid from input emission source) is activated for NONHAPVOC.
C..................... Rename VOC to NONHAPVOC
C..................... increment a number of poll for NONHAP[VOC|TOG]
NONVPOS = INDEX1( NONHAPNAM( K ), MXIDAT, INVDNAM )
IPOSCOD ( VPOS ) = NONVPOS
TMPPOSCOD( NVPOS ) = NONVPOS
TMPPOLVAL( NVPOS,: )= POLVAL( VPOS,: )
INVSTAT ( NONVPOS )= 2
Output array of emitted species from SETNONHAP when SMK_PROCESS_HAPS = 'ALL'
INVDNAME( 1) = FORMALD
INVDNAME( 5) = BENZENE
INVDNAME( 7) = ACETALD
INVDNAME( 9) = NAPHTH
INVDNAME( 11) = BUTADIE
INVDNAME( 12) = ACROLEI
INVDNAME( 22) = CO
INVDNAME( 79) = NH3
INVDNAME( 82) = NONHAPVOC
INVDNAME( 83) = NOX
INVDNAME( 88) = PM10
INVDNAME( 89) = PM2_5
INVDNAME(101) = SO2
INVDNAME(108) = VOC_INV
Note how VOC was renamed to NONHAPVOC, and the total number of species remain unchanged at 14. However, INVSTAT for VOC is still activated. This resulted in the total number of tracked pollutant increased by one (15) instead of remain unchanged (14).
Potential solution: deactivate INVSTAT for VOC when SMK_PROCESS_HAPS = 'ALL'
C Add position index of VOC in INVSTAT
INTEGER VPOS_SAVE
then
VPOS_SAVE = IPOSCOD( VPOS ) ! UNC-IE, Feb 2024: Save location of VOC in INVSTAT
NONVPOS = INDEX1( NONHAPNAM( K ), MXIDAT, INVDNAM )
IPOSCOD ( VPOS ) = NONVPOS
TMPPOSCOD( NVPOS ) = NONVPOS
TMPPOLVAL( NVPOS,: )= POLVAL( VPOS,: )
INVSTAT ( NONVPOS )= 2
c UNC-IE: Feb 2024, as VOC is renamed to NONHAPVOC,
c INVSTAT(NVPOS) should be set to zero when SMK_PROCESS_HAPS = 'ALL'
IF ( PROC_HAPS == 'ALL' ) INVSTAT ( VPOS_SAVE ) = 0
After running the RWC sector using the training data, I tried to create a one-off script that would generate gridded emissions:
Smkmerge fails with the error
Looking at the RWC intermediate inventory data, the area_map_rwc_2018gg_18j.txt and area_rwc.ncf files are inconsistent.