A simple question about how SMOKE reads Annual Emissions Data from FF10 file?

Hello,

Let’s say I am working on a FF10 formatted input file for the ptegu sector from EPA 2016v2 platform.

For the ptegu "one time "SMOKE script, SMOKE reads annual emissions. The annual emissions is on column 14 in the CSV formatted file. for example, the annual emissions are (column 14)
image

in the following file.

If you see closely, column 9 has a comma within the double quotes.

If I call column 14 (annual emissions) using command

cut -d, -f14

The output I can see is
image

That’s because there is a comma within double quotes in column 9 .

My question is , How SMOKE reads/calls annual emissions data from column 14?.

Does SMOKE source code consider the commas inside double quotes?

Thanks in advance

SMOKE can handle commas within embedded quotes. So, “A01,2” is treated by SMOKE as a single column. The ‘cut’ command does not handle quotes, though, so ‘cut’ does treat that embedded comma as a delimiter and shifts all subsequent columns off by one as a result. But that’s not an issue in SMOKE.

1 Like