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 can i resolve the error in read wrfchem_d01 input files WRF-CHEM?


New member
Hi everyone, I've been trying to run WRF-chem with EDGAR anthropogenic emissions.
However I'm getting the following error

Timing for Writing wrfout_d01_2023-08-01_00:00:00 for domain 1: 1.46420 elapsed seconds
mediation_integrate: med_read_wrf_chem_emissions: Read emissions for time 2023-08-01_00:00:00
mediation_integrate: med_read_wrf_chem_emissions: Open file wrfchemi_d01_2023-08-01_00:00:00
-------------- FATAL CALLED ---------------
med_read_wrf_chem_emissions: error opening wrfchemi_d01_2023-08-01_00:00:00


  • namelist.input
    7.4 KB · Views: 4

I had this issue recently, it seems that WRF is very fussy about how it should receive the wrfchemi_* files. For me the problem was that the 'Time' field in my wrfchemi_* files was in a format that WRF didn't know how to handle. Check the output of the following command:

ncdump -v wrfchemi_d01_2023-08-01_00:00:00

It should look *something* like this:

netcdf wrfchemi_d01_2019-06-01_00\:00\:00 {
klevs = 1 ;
south_north = 269 ;
west_east = 319 ;
Time = UNLIMITED ; // (8 currently)
DateStrLen = 19 ;
char Times(Time, DateStrLen) ; <--- this line is where my problem was
Times:calendat = "standard" ;
Times:units = "YYYY-MM-DD_hh:mm:ss" ;
float xlong(south_north, west_east) ;
float xlat(south_north, west_east) ;
int64 klev(klevs) ;
float E_CO2(Time, klevs, south_north, west_east) ;
E_CO2:FieldType = 104LL ;
E_CO2:MemoryOrder = "XYZ" ;
E_CO2:description = "EMISSIONS" ;
E_CO2:units = "mol km^-2 hr^-1" ;
E_CO2:stagger = "" ;
E_CO2:coordinates = "XLONG XLAT" ;

Hope this helps!

Check your values in the Times variable.
For me what worked was making sure each datetime string was split into individual characters, e.g. "2019-06-01_00:00:00" = ['2','0','1',9','-','0','6...]
I think that's also why you need to specify DateStrLen = 19.

Another thing worth checking is that all the attributes of each field are present (FieldType, MemoryOrder etc).