Skip to content

Commit 245645c

Browse files
authored
Merge pull request #12 from chen-0126/master
Add support for CMAQ and bug fixes
2 parents c2c33aa + 335651c commit 245645c

32 files changed

Lines changed: 689 additions & 280 deletions

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
EMIPS:EMission Inventory Processing System
22
============================================
33

4-
[![Join the chat at https://gitter.im/meteoinfo/community](https://badges.gitter.im/meteoinfo/community/meteoinfo.svg)](https://gitter.im/meteoinfo/community)
5-
64
Installation
75
------------
86

@@ -34,6 +32,8 @@ Learn more about MeteoInfo and EMIPS in its official documentation at http://met
3432
Version
3533
-------
3634

35+
EMIPS-1.1 was released (2023-06-24). Added support for CMAQ and bug fixes.
36+
3737
EMIPS-1.0 was released (2023-01-26).
3838

3939
Author
@@ -61,7 +61,7 @@ Sci. Total Environ. 870, 161909. https://doi.org/10.1016/j.scitotenv.2023.161909
6161
License
6262
-------
6363

64-
Copyright 2019-2022, EMIPS Developers
64+
Copyright 2019-2023, EMIPS Developers
6565

6666
Licensed under the LGPL License, Version 3.0 (the "License");
6767
you may not use this file except in compliance with the License.

emips/__init__$py.class

0 Bytes
Binary file not shown.

emips/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
import chem_spec
55
import vertical_alloc
66

7-
__version__ = '1.0'
7+
__version__ = '1.1'
88

99
import os
1010
ge_data_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'ge_data')
1111

12-
version = 'EMIPS-1.0 (2022.08.04)'
12+
version = 'EMIPS-1.1 (2023.06.24)'
1313
__all__ = ['ge_data_dir', 'utils', 'temp_alloc', 'spatial_alloc', 'chem_spec', 'vertical_alloc', 'version']
1.67 KB
Binary file not shown.

emips/chem_spec/chemical_speciation.py

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .pollutant import Pollutant
55
import mipylib.numeric as np
66

7-
__all__ = ['get_pollutant_profile', 'read_file', 'speciation', 'get_model_species_wrf']
7+
__all__ = ['get_pollutant_profile', 'read_file', 'speciation', 'get_model_species_WRFChem', 'get_model_species_CMAQ']
88

99

1010
def get_pollutant_profile(poll_profiles, pollutant):
@@ -89,17 +89,17 @@ def speciation(data, pollutant_profile):
8989
return s_data
9090

9191

92-
def get_model_species_wrf(mechanism_name):
92+
def get_model_species_WRFChem(mechanism_name):
9393
"""
94-
Get species in wrf-chem in different chemical mechanism.
94+
Get species under different chemical mechanisms in WRF-Chem.
9595
(E_PM10: saprc99, cb05 E_PM_10: radm2, mozart)
9696
:param mechanism_name: (*string*) The name of chemical mechanism.
9797
:return: (*list*) All species(out_species) and aerosols(out_species_aer) under chemical mechanisms.
9898
"""
9999
mechanism_name = mechanism_name.lower()
100100
if mechanism_name == 'cb05':
101101
##########################################
102-
# ------CB05, emiss_opt=15, (52, 15)------#
102+
#------CB05, emiss_opt=15, (52, 15)------#
103103
##########################################
104104
out_species = ['E_ACET', 'E_PAR', 'E_ALK3', 'E_ALK4', 'E_ALK5', 'E_TOL', 'E_XYL', 'E_BALD',
105105
'E_ALD2', 'E_CCOOH', 'E_CO', 'E_CRES', 'E_ETH', 'E_ETHA', 'E_GLY', 'E_FORM',
@@ -113,7 +113,7 @@ def get_model_species_wrf(mechanism_name):
113113

114114
elif mechanism_name == 'radm2':
115115
##########################################
116-
# ------RADM2, emiss_opt=3, (42, 19)------#
116+
#------RADM2, emiss_opt=3, (42, 19)------#
117117
##########################################
118118
out_species = ['E_ISO', 'E_SO2', 'E_NO', 'E_NO2', 'E_CO', 'E_CH4', 'E_ETH', 'E_HC3',
119119
'E_HC5', 'E_HC8', 'E_XYL', 'E_OL2', 'E_OLT', 'E_OLI', 'E_TOL', 'E_CSL',
@@ -126,7 +126,7 @@ def get_model_species_wrf(mechanism_name):
126126
'E_ORGJ_BB', 'E_CLI', 'E_CLJ']
127127
elif mechanism_name == 'saprc99':
128128
###########################################
129-
# -----SAPRC99, emiss_opt=13, (55, 15)-----#
129+
#-----SAPRC99, emiss_opt=13, (55, 15)-----#
130130
###########################################
131131
out_species = ['E_SO2', 'E_C2H6', 'E_C3H8', 'E_C2H2', 'E_ALK3', 'E_ALK4', 'E_ALK5', 'E_ETHENE',
132132
'E_C3H6', 'E_OLE1', 'E_OLE2', 'E_ARO1', 'E_ARO2', 'E_HCHO', 'E_CCHO', 'E_RCHO',
@@ -140,7 +140,7 @@ def get_model_species_wrf(mechanism_name):
140140

141141
elif mechanism_name == 'mozart':
142142
##########################################
143-
# -----MOZART, emiss_opt=10, (53, 23)-----#
143+
#-----MOZART, emiss_opt=10, (53, 23)-----#
144144
##########################################
145145
out_species = ['E_CO', 'E_NO', 'E_NO2', 'E_BIGALK', 'E_BIGENE', 'E_C2H4', 'E_C2H5OH', 'E_C2H6',
146146
'E_C3H6', 'E_C3H8', 'E_CH2O', 'E_CH3CHO', 'E_CH3COCH3', 'E_CH3OH', 'E_MEK', 'E_SO2',
@@ -154,3 +154,25 @@ def get_model_species_wrf(mechanism_name):
154154
'E_CO_A', 'E_ORGI_A', 'E_ORGJ_A', 'E_CO_BB', 'E_ORGI_BB', 'E_ORGJ_BB', 'E_PM_10']
155155

156156
return out_species, out_species_aer
157+
158+
159+
def get_model_species_CMAQ(mechanism_name):
160+
"""
161+
Get species under different chemical mechanisms in CMAQ.
162+
:param mechanism_name: (*string*) The name of chemical mechanism.
163+
:return: (*list*) All species(out_species) and aerosols(out_species_aer) under chemical mechanisms.
164+
"""
165+
mechanism_name = mechanism_name.lower()
166+
if mechanism_name == 'cb05':
167+
########################################
168+
#-----CB05, emiss_opt=10, (42, 19)-----#
169+
########################################
170+
out_species = ['ALD2', 'CO', 'ETH', 'FORM', 'ISOP', 'NH3', 'NO', 'NO2', 'UNR',
171+
'OLE', 'PAR', 'PEC', 'PMC', 'PMOTHR', 'PNO3', 'POC', 'PSO4', 'PCL',
172+
'PNH4', 'PNA', 'PMG', 'PK', 'PCA', 'PNCOM', 'PFE', 'PAL', 'PSI', 'PTI',
173+
'PMN', 'PH2O', 'SO2', 'SULF', 'TERP', 'TOL', 'XYL', 'MEOH', 'ETOH',
174+
'ETHA', 'ALDX', 'IOLE', 'CH4', 'AACD']
175+
out_species_aer = ['PEC', 'PMC', 'PMOTHR', 'PNO3', 'POC', 'PSO4', 'PCL', 'PNH4', 'PNA',
176+
'PMG', 'PK', 'PCA', 'PNCOM', 'PFE', 'PAL', 'PSI', 'PTI', 'PMN', 'PH2O']
177+
178+
return out_species, out_species_aer
403 Bytes
Binary file not shown.

emips/chem_spec/species_profile.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ def read_string(cls, line, mechanism=None):
5050
data = line.split()
5151
pollutant = Pollutant(data[1])
5252
if mechanism is None:
53-
species = Species(data[2])
53+
if data[2] == 'NO':
54+
species = Species(data[2], molar_mass=30)
55+
elif data[2] == 'NO2':
56+
species = Species(data[2], molar_mass=46)
57+
else:
58+
species = Species(data[2])
5459
else:
5560
species = mechanism.species(data[2])
5661
return SpeciesProfile(pollutant, species, float(data[3]), float(data[4]), float(data[5]))

emips/loadApp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class LoadApp(PluginBase):
1010

1111
def __init__(self):
1212
self.setName("EMIPS")
13-
self.setAuthor("Yaqiang Wang & Wenchong Chen")
13+
self.setAuthor("Yaqiang Wang & Wencong Chen")
1414
self.setVersion("1.0")
1515
self.setDescription("EMission Inventory Processing System")
1616
self.app_menu_item = None
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Read before running
2+
----------------------
3+
4+
1, Set parameters(time, directory and dimension etc.) in "for_CMAQ.py".
5+
6+
7+
8+

emips/run/run_with_script/for_CMAQ/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)