Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

How to Convert a Custom Local NetCDF Emission Inventory for Use with WRF-Chem's anthro_emis Utility?

seti

Member
Dear all,
I hope you are doing well.
I am currently working with WRF-Chem, and I have a locally developed emission inventory specifically prepared for my study area. The dataset is in NetCDF format, but it does not conform to the standard structure required by WRF-Chem emission pre-processing tools (such as the anthro_emis utility).

I would like to ask for your guidance on the following:
  • How can I properly reformat or convert my local NetCDF emission inventory so that it can be ingested by the anthro_emis utility or any other available tool for WRF-Chem?
  • Are there any recommended workflows, scripts, or guidelines for adapting a custom emission inventory (especially one that is not initially designed for WRF-Chem) to the required format?
  • What are the key structural aspects (variables, dimensions, units) that my NetCDF file must have to be correctly processed?
Any advice, references, or examples would be greatly appreciated. Thank you very much in advance for your support.
Best regards,
 
I do not use the anthro_emis utility
  1. You can process the NetCDF output files using various programs including: Matlab, Phyton, Fortran
  2. you can see the process from CSV to netcdf in GitHub - JoseAgustin/emis_2016: Generar el inventario nacional de emisiones año 2016 de contaminantes criterio, a una estructura y formato para su uso en modelización de calidad del aire
  3. The output file must contain the following
dimensions:
Time = UNLIMITED ; // (24 currently)
DateStrLen = 19 ;
west_east = 90 ;
south_north = 90 ;
bottom_top = 1 ;
emissions_zdim_stag = 8 ;
variables:
char Times(Time, DateStrLen) ;
Times:units = "Date string" ;
Times:long_name = "Format YYYY-MM-DD_HH:MN:SS" ;
float XLONG(Time, south_north, west_east) ;
XLONG:FieldType = 104 ;
XLONG:MemoryOrder = "XYZ" ;
XLONG:description = "LONGITUDE, WEST IS NEGATIVE" ;
XLONG:units = "degree_east" ;
XLONG:axis = "X" ;
float XLAT(Time, south_north, west_east) ;
XLAT:FieldType = 104 ;
XLAT:MemoryOrder = "XYZ" ;
XLAT:description = "LATITUDE, SOUTH IS NEGATIVE" ;
XLAT:units = "degree_north" ;
XLAT:axis = "Y" ;
float E_CO(Time, emissions_zdim_stag, south_north, west_east) ;
E_CO:FieldType = 104 ;
E_CO:MemoryOrder = "XYZ" ;
E_CO:description = "Emissions rate of Carbon Monoxide" ;
E_CO:units = "mol km^-2 hr^-1" ;
E_CO:stagger = "Z" ;
E_CO:coordinates = "XLONG XLAT" ;
Code:
...

float E_MACR(Time, emissions_zdim_stag, south_north, west_east) ;
E_MACR:FieldType = 104 ;
E_MACR:MemoryOrder = "XYZ" ;
E_MACR:description = "Emissions rate of Methacrolein" ;
E_MACR:units = "mol km^-2 hr^-1" ;
E_MACR:stagger = "Z" ;
E_MACR:coordinates = "XLONG XLAT" ;

// global attributes:
:TITLE = "Version in title should be V4.0" ;
:START_DATE = "2018-05-14_00:00:00" ;
:SIMULATION_START_DATE = "2018-05-14_00:00:00" ;
:WEST-EAST_GRID_DIMENSION = 90 ;
:SOUTH-NORTH_GRID_DIMENSION = 90 ;
:BOTTOM-TOP_GRID_DIMENSION = 1 ;
:DX = 3000.f ;
:DY = 3000.f ;
:CEN_LAT = 19.44717f ;
:CEN_LON = -99.11286f ;
:TRUELAT1 = 17.5f ;
:TRUELAT2 = 29.5f ;
:MOAD_CEN_LAT = 19.44717f ;
:STAND_LON = -99.11286f ;
:POLE_LAT = 90.f ;
:POLE_LON = 0.f ;
:GRIDTYPE = "C" ;
:GMT = 12.f ;
:JULYR = 2018 ;
:JULDAY = 134 ;
:MAP_PROJ = 1 ;
:MMINLU = "USGS" ;
:MECHANISM = "radm2" ;
:CREATION_DATE = "05-Apr-2025 09:11:00.454" ;
}
  • Some of the global attributes are from the geo_em.d01.nc
  • The chemical variable names are defined in registry.chem, beginning at line 63 under the section:
    # Anthropogenic emissions
    Note: The available variables depend on which chemical mechanism you select.
 
Top