Hello,
While checking the hourly emissions in CCTM_EMIS_DIAG from my MPAS-CMAQ runs, I noticed that the gridded emissions (GR_EMIS_xxx) did not seem to follow the diurnal cycle of the input files. I then ran the distributed 120 km benchmark and saw the same behaviour, so I looked into the code. I found a place that looks like it might be the cause, and a one-line change made the emissions follow the input in my tests. I would be grateful if you could check whether my understanding is correct.
I searched the forum, the USEPA/CMAQ issues and pull requests (PR #181 seems to be a different issue), and the USEPA/MPAS repository, but could not find this reported. Apologies if it is already known.
What I observed
The gridded emissions in CCTM_EMIS_DIAG match the input at 00:00 and 01:00 UTC, but from 02:00 onward they seem to stay at the 01:00 value until the end of the run. Since the run script restarts the model every day, this would mean that each day only the 00:00 and 01:00 records are used. Point sources (STK_EMIS) and inline emissions look fine. This is easy to miss with inventories that are constant within a day, but it would matter for emissions with a diurnal cycle.
Where I think it comes from
In r_interpolate_var_3d_mpas (centralized_io_module.F), when the model time passes the tail time stamp, the routine converts the tail time stamp and calls retrieve_time_dep_gridded_data with that same time, without advancing it with NEXTIME:
if (cio_mpas_grid_data_tstamp(loc_tail, var_loc) .lt. loc_mpas_time_stamp) then
call mio_time_format_conversion (cio_mpas_grid_data_tstamp(loc_tail, var_loc), loc_jdate, loc_jtime)
call retrieve_time_dep_gridded_data (loc_jdate, loc_jtime, loc_vname)
If I understand it correctly, this reads the 01:00 record again, so both buffers end up holding 01:00. The WRF counterparts (for example r_interpolate_var_3d) and the MPAS point-source routine call NEXTIME ( loc_jdate, loc_jtime, loc_tstep ) before the retrieve, and r_interpolate_var_3d_mpas declares use util_module, only : nextime but does not seem to call it.
What I tried
I added one line:
call mio_time_format_conversion (cio_mpas_grid_data_tstamp(loc_tail, var_loc), loc_jdate, loc_jtime)
call nextime (loc_jdate, loc_jtime, loc_tstep)
call retrieve_time_dep_gridded_data (loc_jdate, loc_jtime, loc_vname)
To check it, I ran the distributed benchmark (2017-01-01) for 4 hours with two executables, keeping all inputs and settings unchanged; the only difference was this line. The table compares the global totals in CCTM_EMIS_DIAG (mol/s) with the change in the gridded emission input since 01:00:
| Species | Hour (UTC) | without the line | with the line | (with − without) | input[h] − input[01] |
|---|---|---|---|---|---|
| SO2 | 02 | 3.28271e4 | 3.36469e4 | 820 | 820 |
| SO2 | 03 | 3.28089e4 | 3.58922e4 | 3083 | 3083 |
| NO | 02 | 7.39175e4 | 7.73690e4 | 3452 | 3451 |
| NO | 03 | 7.43705e4 | 7.91632e4 | 4793 | 4793 |
| CO | 02 | 6.90034e5 | 6.80402e5 | −9632 | −9632 |
| CO | 03 | 6.92829e5 | 6.71626e5 | −21203 | −21204 |
The difference between the two runs matches the hourly change in the gridded input, so without the line the gridded emissions appear to stay at their 01:00 values. The small changes that remain without the line seem to come from point sources and inline emissions, which go through other routines. With the line, my own runs also follow the diurnal cycle of the input for all 24 hours.
Versions
- USEPA/MPAS MPAS7.0 branch (latest, commit 8828ff0a) + CMAQ MPAS_CMAQ branch (
src/core_atmosphere/cmaq/centralized_io_module.F) - The same code appears to be in CMAQv6.0 (main, commit 13c473c8, 2026-10-09):
CCTM/src/cio/centralized_io_module.F,r_interpolate_var_3d_mpas(starts at line 4797; the retrieve call is at line 4873)
Environment
- Compiler: GNU Fortran 13.3.0 (Ubuntu 24.04) with MPICH 4.3.0, built with
make gfortran CORE=atmosphere USE_PIO2=true - Run script:
run_bench.csh(the benchmarkrun.cshadapted for a single workstation, 24 MPI tasks); for the test, onlyMPASEXE,RUNLEN=4,config_run_duration='0_04:00:00'and the output directory were changed - Application: the distributed 120 km uniform mesh (x1.40962), 2017-01-01, cracmm2_m3dry build, with the distributed benchmark inputs
- I could not attach files as a new forum user; I am happy to share the comparison script and its full output (it also lists the DIAG/input ratios for every hour) if useful
Could you please let me know whether this change is correct, or whether I am misunderstanding how the emission files are meant to be read? I can share my run scripts as well.
Best regards,
Yuya Hasegawa