Using SMOKE to convert netCDF file into CMAQ-ready format

Hi CMAS users:

I have an emission input dataset in netCDF format. However, it is not under the same style, which could be used in CMAQ simulation. Does anyone could guide me through, how to use SMOKE to handle this dataset?
I am attaching the metadata of this dataset, as well as an example of a common emission input dataset in CMAQ simulation (generated from SMOKE) below.

Thank you for your time
Best,
Huan

netcdf \2016_10_agriculture_NOx {
dimensions:
side = 2 ;
xysize = 64000 ;
variables:
double x_range(side) ;
double y_range(side) ;
double spacing(side) ;
int dimension(side) ;
float z(xysize) ;
z:scale_factor = 1. ;
z:add_offset = 0. ;
z:node_offset = 1 ;
z:nodata_value = -9999. ;

// global attributes:
:title = “” ;
:source = “MEIC Core gridding - GMTEngine” ;
data:

x_range = 70, 150 ;

y_range = 10, 60 ;

spacing = 0.25, 0.25 ;

dimension = 320, 200 ;

netcdf agts_l.area.20050710.1.us12-nc.nctox {
dimensions:
TSTEP = UNLIMITED ; // (25 currently)
DATE-TIME = 2 ;
LAY = 1 ;
VAR = 31 ;
ROW = 52 ;
COL = 66 ;
variables:
int TFLAG(TSTEP, VAR, DATE-TIME) ;
TFLAG:units = “<YYYYDDD,HHMMSS>” ;
TFLAG:long_name = "TFLAG " ;
TFLAG:var_desc = "Timestep-valid flags: (1) YYYYDDD or (2) HHMMSS " ;
float CO(TSTEP, LAY, ROW, COL) ;
CO:long_name = "CO " ;
CO:units = "moles/s " ;
CO:var_desc = "Model species CO " ;
float HONO(TSTEP, LAY, ROW, COL) ;
HONO:long_name = "HONO " ;
HONO:units = "moles/s " ;
HONO:var_desc = "Model species HONO " ;
float NO(TSTEP, LAY, ROW, COL) ;
NO:long_name = "NO " ;
NO:units = "moles/s " ;
NO:var_desc = "Model species NO " ;
float NO2(TSTEP, LAY, ROW, COL) ;
NO2:long_name = "NO2 " ;
NO2:units = "moles/s " ;
NO2:var_desc = "Model species NO2 " ;
float ALD2(TSTEP, LAY, ROW, COL) ;
ALD2:long_name = "ALD2 " ;
ALD2:units = "moles/s " ;
ALD2:var_desc = "Model species ALD2 " ;
float ALDX(TSTEP, LAY, ROW, COL) ;
ALDX:long_name = "ALDX " ;
ALDX:units = "moles/s " ;
ALDX:var_desc = "Model species ALDX " ;
float BENZENE(TSTEP, LAY, ROW, COL) ;
BENZENE:long_name = "BENZENE " ;
BENZENE:units = "moles/s " ;
BENZENE:var_desc = "Model species BENZENE " ;
float CH4(TSTEP, LAY, ROW, COL) ;
CH4:long_name = "CH4 " ;
CH4:units = "moles/s " ;
CH4:var_desc = "Model species CH4 " ;
float ETH(TSTEP, LAY, ROW, COL) ;
ETH:long_name = "ETH " ;
ETH:units = "moles/s " ;
ETH:var_desc = "Model species ETH " ;
float ETHA(TSTEP, LAY, ROW, COL) ;
ETHA:long_name = "ETHA " ;
ETHA:units = "moles/s " ;
ETHA:var_desc = "Model species ETHA " ;
float ETOH(TSTEP, LAY, ROW, COL) ;
ETOH:long_name = "ETOH " ;
ETOH:units = "moles/s " ;
ETOH:var_desc = "Model species ETOH " ;
float FORM(TSTEP, LAY, ROW, COL) ;
FORM:long_name = "FORM " ;
FORM:units = "moles/s " ;
FORM:var_desc = "Model species FORM " ;
float IOLE(TSTEP, LAY, ROW, COL) ;
IOLE:long_name = "IOLE " ;
IOLE:units = "moles/s " ;
IOLE:var_desc = "Model species IOLE " ;
float ISOP(TSTEP, LAY, ROW, COL) ;
ISOP:long_name = "ISOP " ;
ISOP:units = "moles/s " ;
ISOP:var_desc = "Model species ISOP " ;
float MEOH(TSTEP, LAY, ROW, COL) ;
MEOH:long_name = "MEOH " ;
MEOH:units = "moles/s " ;
MEOH:var_desc = "Model species MEOH " ;
float NVOL(TSTEP, LAY, ROW, COL) ;
NVOL:long_name = "NVOL " ;
NVOL:units = "moles/s " ;
NVOL:var_desc = "Model species NVOL " ;
float OLE(TSTEP, LAY, ROW, COL) ;
OLE:long_name = "OLE " ;
OLE:units = "moles/s " ;
OLE:var_desc = "Model species OLE " ;
float PAR(TSTEP, LAY, ROW, COL) ;
PAR:long_name = "PAR " ;
PAR:units = "moles/s " ;
PAR:var_desc = "Model species PAR " ;
float TERP(TSTEP, LAY, ROW, COL) ;
TERP:long_name = "TERP " ;
TERP:units = "moles/s " ;
TERP:var_desc = "Model species TERP " ;
float TOL(TSTEP, LAY, ROW, COL) ;
TOL:long_name = "TOL " ;
TOL:units = "moles/s " ;
TOL:var_desc = "Model species TOL " ;
float UNK(TSTEP, LAY, ROW, COL) ;
UNK:long_name = "UNK " ;
UNK:units = "moles/s " ;
UNK:var_desc = "Model species UNK " ;
float UNR(TSTEP, LAY, ROW, COL) ;
UNR:long_name = "UNR " ;
UNR:units = "moles/s " ;
UNR:var_desc = "Model species UNR " ;
float XYL(TSTEP, LAY, ROW, COL) ;
XYL:long_name = "XYL " ;
XYL:units = "moles/s " ;
XYL:var_desc = "Model species XYL " ;
float NH3(TSTEP, LAY, ROW, COL) ;
NH3:long_name = "NH3 " ;
NH3:units = "moles/s " ;
NH3:var_desc = "Model species NH3 " ;
float SO2(TSTEP, LAY, ROW, COL) ;
SO2:long_name = "SO2 " ;
SO2:units = "moles/s " ;
SO2:var_desc = "Model species SO2 " ;
float SULF(TSTEP, LAY, ROW, COL) ;
SULF:long_name = "SULF " ;
SULF:units = "moles/s " ;
SULF:var_desc = "Model species SULF " ;
float PEC(TSTEP, LAY, ROW, COL) ;
PEC:long_name = "PEC " ;
PEC:units = "g/s " ;
PEC:var_desc = "Model species PEC " ;
float PMFINE(TSTEP, LAY, ROW, COL) ;
PMFINE:long_name = "PMFINE " ;
PMFINE:units = "g/s " ;
PMFINE:var_desc = "Model species PMFINE " ;
float PNO3(TSTEP, LAY, ROW, COL) ;
PNO3:long_name = "PNO3 " ;
PNO3:units = "g/s " ;
PNO3:var_desc = "Model species PNO3 " ;
float POC(TSTEP, LAY, ROW, COL) ;
POC:long_name = "POC " ;
POC:units = "g/s " ;
POC:var_desc = "Model species POC " ;
float PSO4(TSTEP, LAY, ROW, COL) ;
PSO4:long_name = "PSO4 " ;
PSO4:units = "g/s " ;
PSO4:var_desc = "Model species PSO4 " ;

// global attributes:
:IOAPI_VERSION = "ioapi-3.2: Id: init3.F90 120 2019-06-21 14:18:20Z coats " ;
:EXEC_ID = "??? " ;
:FTYPE = 1 ;
:CDATE = 2020161 ;
:CTIME = 1230 ;
:WDATE = 2020161 ;
:WTIME = 1230 ;
:SDATE = 2005191 ;
:STIME = 0 ;
:TSTEP = 10000 ;
:NTHIK = 1 ;
:NCOLS = 66 ;
:NROWS = 52 ;
:NLAYS = 1 ;
:NVARS = 31 ;
:GDTYP = 2 ;
:P_ALP = 33. ;
:P_BET = 45. ;
:P_GAM = -97. ;
:XCENT = -97. ;
:YCENT = 40. ;
:XORIG = 1128000. ;
:YORIG = -672000. ;
:XCELL = 12000. ;
:YCELL = 12000. ;
:VGTYP = -1 ;
:VGTOP = 0.f ;
:VGLVLS = 0.f, 0.f ;
:GDNAM = "US12NC_66X52 " ;
:UPNAM = "CREATESET " ;
:VAR-LIST = "CO HONO NO NO2 ALD2 ALDX BENZENE CH4 ETH ETHA ETOH FORM IOLE ISOP MEOH NVOL OLE PAR TERP TOL UNK UNR XYL NH3 SO2 SULF PEC PMFINE PNO3 POC PSO4 " ;
:FILEDESC = "Area source emissions data /FROM/ OPENMRGOUT /VERSION/ SMOKEv4.7_ /BASE YEAR/ 2002 /NUMBER OF FILES/ 1 /FILE POSITION/ 1 /NUMBER OF VARIABLES/ 31 " ;
:HISTORY = “” ;
data:

TFLAG =
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 0,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 10000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 20000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 30000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 40000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 50000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 60000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 70000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 80000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 90000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 100000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 110000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 120000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 130000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 140000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 150000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 160000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 170000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 180000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 190000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 200000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 210000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 220000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005191, 230000,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0,
2005192, 0 ;

We would need a lot more information in order to do anything (particularly since this file does not fit any of the recommended netCDF conventions such as CF or M3IOAPI). And this probably needs custom Fortran or C; the functionality needed is not “off the shelf.”

Is the grid embedded in a lat-lon coordinate system, with (in I/O API terms) NCOLS=320, NROWS=200, XORIG=70.0d0, YORIG=10.0d0, XCELL=YCELL=0.25d0 covering India, China, Mongolia, and part of Siberia?

Note that CMAQ requires a conformal map-projection in Lambert, Equatorial Mercator, or Polar Stereographic, so you would have to re-grid from this grid to your CMAQ grid (I/O API routines GRID2XY, UNGRIDB, and BILIN will be useful for that…)

And what are the emissions variables and their units, and are the units actually what they claim to be? (Note that CMAQ emissions units are not: there is an extra “per grid cell” that is not stated but needs to be accounted for)?
Do you need to re-speciate? …and with what factors?

FWIW.

Hi Carlie,

Thank you for looking into my issue. I am answering your questions below. Hope it could be easier to solve my issue.

Best,
Huan

Is the grid embedded in a lat-lon coordinate system, with (in I/O API terms) NCOLS=320, NROWS=200, XORIG=70.0d0, YORIG=10.0d0, XCELL=YCELL=0.25d0 covering India, China, Mongolia, and part of Siberia?

Yes

Note that CMAQ requires a conformal map-projection in Lambert, Equatorial Mercator, or Polar Stereographic, so you would have to re-grid from this grid to your CMAQ grid (I/O API routines GRID2XY , UNGRIDB , and BILIN will be useful for that…)

I would like to convert to lambert conformal conic, could you guide me through how to use the I/O API tools to approach this?

And what are the emissions variables and their units, and are the units actually what they claim to be?

The emissions were divided into multiple netCDF files based on the variables. There, the one I provided only include one emission variable, and I need to combined them into one netCDF at the end. The unit is 10^3 kg per grid cell, it is the monthly emission amount. I know using SMOKE, it would be converted into hourly emission rate.

Do you need to re-speciate? …and with what factors?

No

I would like to convert to lambert conformal conic, could you guide me through how to use the I/O API tools to approach this?

This is a three-step process:

  • First, MODULE MODGCTP routine GRID2XY() can be used to find the Lambert coordinates for the cell cernters – see https://cjcoats.github.io/ioapi/MODGCTP.html
  • Then routine UNGRIDB() can be used to find a bilinear-interpolation matrix from the input grid to the output CMAQ grid: see https://cjcoats.github.io/ioapi/UNGRIDB.html
  • Then routine BILIN() can be used to interpolate input-grid emissions variables to the output CMAQ grid, using the interpolation matrix from the step above.

…multiple netCDF files based on the variables. There, the one I provided only include one emission variable, and I need to combined them into one netCDF at the end.

Let us assume (below) that there are NEMIS such files, one per variable. Input dimensions are 320 by 200 and cell-size is DLAT by DLON. Output dimensions are NCOLS by NROWS and cell size is XCELL by YCELL.

Routine READNCVAR() from MODULE MODNCFIO will give you a high-level (single-call) way of reading the emissions data.

The unit is 10^3 kg per grid cell, it is the monthly emission amount.

So you will need to multiply by (a) the ratio of the cell sizes; and (b) the (species specific) units conversion factor to convert to moles/sec/
For (a), let DLAT and DLON give the input lat-lon cell size, LAT(:,:) and LON(:.:) be the input-grid lat and lon value arrays, and R be the radius of the Earth in meters. Then (gridded) input cell-aree is approximately (PI/180)*DLAT*DLON*COS(LAT(:,:) and the output area is XCELL*YCELL. Then standard chemistry gives the per-species conversion from 10^3 KG to moles, and assuming uniform per-day/per-hour distribution of the emissions, the per-month to per-second conversion factor is approximately 12/(365.24243600). The most obvious correction to this is to find the diurnal distribution of the emissions, and compute an array of hourly-profile factors FH(24) that adds up to 1.

The most computationally-efficient program-outline looks something like the following:

  • Allocate and compute the bilinear-interpolation matrix C(4,NCOLS,NROWS).

  • Allocate an input-array A(320,200) and output-array E(NCOLS,NROWS,NEMIS).

  • For each emissions species S=1…NEMIS:

    • Read input A(320,200) from its emissions-file.
    • Multiply by the bilinear interpolation matrix to get E(:.:,S)
    • Multiply E(:,:,S) by the (gridded) cell-area ratios and by the 10^3 KG to *moles conversion factor.
  • Create the output-file.

  • For each output time step (at hour H)

    • For each species S
      • Write FH(H)*E(:,:,S) to the output file
  • Done … close program using M3EXIT()