Processing RCP emissions in SMOKE


How do we process RCP emissions (as opposed to the commonly used NEI emissions) in SMOKE?


I am not sure whether you want to simply process the RCP gridded emissions through SMOKE without regridding to a different modeling domain or not. But, as of SMOKE v4.0, we have implemented a few feature to regrid EDGAR global gridded inventories for your modeling domain.

Check out the link for details:


Thanks a lot! I am looking to simulate meteorology (using WRF) and air quality (using CMAQ) for the period 2000-2060 and would thus like to process the RCP8.5 emissions in SMOKE to make them CMAQ-ready. The RCP8.5 emissions data seems to have 0.5 degrees latitude-longitude resolution, decadal timesteps and select chemical species in a netCDF format. These would need to be dealt with in SMOKE before feeding emissions data to CMAQ. The document you shared will perhaps be of good use for that purpose, looking at the first page.


I tried to do the same as you want and I found that if the netCDF file has the variable “time step”, smkinven module will not recognize the inventory file. EDGAR emission files do not have that variable, because is a unique file containing the total emission (worlwide) in a year. So, EDGAR reveals the sum of the emission in a year, expresed as [kg /m2s ] .
I tried to used Fires gridded emissions from FIRES database, with 0,1 º of resolution, but at this time, I haven´t solved to get a unique file without “time step” variable. I don´t know how to erase it from the file.

Maybe someone in this forum could help us to solve it.



Smkinven has a flag called "NETCDF_POL_UNIT” to specify the unit of the EDGAR pollutants, set to kg m-2 s-1 which is consistent to your setting.

Also, you have an option how to process your inventory as monthly or annual based on your knowledge. You can tell Smkinven how to handle them by how you setup the Smkinven inventory list input file (ARINV). Here is the format shown below. You need to put either specific month (i.e., 1, 2, 3,12) if your inventory file is monthly. If it is annual, then set it to 0.

#SCC, Pollutant, Variable_Name, Month, File_location_name
ENERGY,NOX ,emis_nox,0,/nas/EDGAR/energy/nox/


Hello Baek:
Yes, I know what you want to tell me. But my question is, What happen if the netcdf file (containing emission inventory) has the variable “time step” inside.
The information you gave me is considering monthly files (the sum of monthly emission) but not considering the variable “time step” inside.
I remember, from SMOKE4.5 tutorial, that we have to give to SMKINVEN gridded netCDF files time independent. Am I correct???
Thanks for your time


In my case, I am trying to use an anual inventory file, but with daily emission information inside.


Hi Ernesto,

Unfortunately, current version of SMOKE does not support the time step in netCDF file. We may update the system to support that in the future but unfortunately there is no specific plan for that feature at this moment. Sorry. :frowning:


Not problem. I hope to use any tool to extract the “time step” variable from netCDF files. Until today, I do not find it.
Thanks for your time


While I was working on another project, Dr. Coats (IOAPI author) and I updated the IOAPI library to read and process raw NetCDF files including RCP and EDGAR pregridded inventory files. Once you install the latest version of IOAPI, you can tap into new module called “MODNCFIO”. You can read all attributes from the netcdf files quite easily. Here is the detail information about the module in IOAPI. You can develop a tool you need using these functions already available in IOAPI module.


I saw the POL_HEMI grid parameters in the GRIDDESC file for EDGAR data:

! coords --line: name; type, P-alpha, P-beta, P-gamma, xcent, ycent
6, 1.D0, 45.D0, -98.D0, -98.D0, 90.D0
’ ’ ! end coords. grids: name; xorig,yorig,xcell,ycell,ncols,nrows,nthik
’POL_HEMI’, -10098D3, -10098D3, 108.D3, 108.D3, 187, 187, 1
’ ’ ! end grids.

However, I am not sure I can accurately give the values of all the parameters like P-alpha, P-beta, etc to describe the grid+projection for RCP data that I downloaded. How should I proceed here?


You need to find out the detail spatial domain information for your gridded inventory files before you move forward. If your modeling domain is different than what I provided you, then you need to generate your own GRIDMASK input file for a proper spatial and temporal allocations processing through SMOKE.


Running MCIP also gives a GRIDDESC file for the WRF meteorological input, I assume.


What are possible ways of converting CSV files to IO/API format in (1) linux, and (2) windows environments? It looks like I will have to do the conversion during RCP emissions preprocessing for SMOKE.



The specifics of what needs to be done depend upon what is in the CSV file. The easiest way starts with a pre-existing IO/API file, but that isn’t strictly necessary. The code below is just something a colleague threw together very quickly – it is probably not complete but it should be close:


import pandas as pd

import PseudoNetCDF as pnc

pathtoexistingemisfile = ‘/path/to/’

outpath = ‘’

pathtocsv = ‘/path/to/RCP.csv’

read and copy an existing file

iofile = pnc.pncopen(pathtoexistingemisfile).copy()

zero out

for k, v in iofile.variables.items():

if k != ‘TFLAG’:

v[:] = 0.

Assuming a specific structure of columns and spatial/temporal consistency

Datetime_UTC in the form YYYY-MM-DD HH:MM:SS+0000

Latitude in the form of decimal degrees north

Longitude in the form of decimal degrees east

Species in the form of the name expected by CMAQ

Value in the unit expected by CMAQ

csvdata = pd.read_csv(pathtocsv, parse_dates=[‘Datetime_UTC’])

Convert lon/lat to i/j

i, j = iofile.ll2ij(csvdata[‘Longitude’], csvdata[‘Latitude’])

csvdata[‘I’] = csvdata[‘Longitude’].astype(‘i’) * 0 + i

csvdata[‘J’] = csvdata[‘I’] * 0 + j

Group on date/i/j/spc and sum masses

grouped = csvdata.groupby([‘Species’, ‘Datetime_UTC’, ‘I’, ‘J’]).sum()

times = iofile.getTimes()

for ridx, row in grouped.iterrows():

spck, date, i, j = ridx

h = ((date - times[0]).total_seconds() // 3600).astype(‘i’)

iofile.variables[spck][h, 0, j, i] = row[‘Value’], format=‘NETCCDF_CLASSIC’)


netCDF to IO/API conversion

Hello Dr Baek.
Here I am again. I have been bussy trying to change netCDF format to use in SMOKE, similar to EDGAR files.
Now, I have a way to proceess that kind of file, and it worth perfect. Now, I am wondering if I can extract daily inventory files (netCDF files) instead monthly inventory as you told me before.
I am trying to obtain fire emissions from global inventory data. So, the most correctly way is to process it as daily emissions.
It is possible to put in arinv file daily emissions from netCDF file?


I am not sure what is the best option for this but current version can not process daily netcdf gridded inventory files. Not sure it will work or not but you can run daily netCDF inventory file as ARINV everyday. It means you need to switch the daily netcdf file everyday. With this option, you need to be careful about the time zone shift of your daily fire emissions. If they are in GMT, you need to update COSTCY file for all country to be in GMT to avoid any time zone shift during the run.


Thanks Mr Baek.
In fact, that´s the problem I have right now.
I simulated daily inventory netCDF files, putting a factor of 1 for monthly and weekly profiles. I obtained results, but there are some weird, because it suposes to be biomass burning emissions, and I can see emissions from Ocean. So, the grid cells with emissions are not well located geograpically. That problem i did not observed using edgar inventory.
I attached the image I obtained in Verdi, and you can see my problem.

I also attached you the global maps for biomass burning I used to (the same as Edgar in resolution 3600 x 1800)

Do you know what could be the cause of it?

Thanks for your time


I have been making some calculations with the new EDGAR database for several domains in Europe with annual inventories and it works properfly. However, I found that “temporal” gives me an error: “Problem with input data” when modifying the month in the ARINV list input file. Do I have to modify any format of the inventory netcdf input files? or should I modify any additional environment variables?

Thank you for your help.


Hi Eduardo,
Are you still having a problem on processing Temporal? What kind of error message from Temporal?