# Inconsistent start time in input files （MERGE）

**URL:** <https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632>\
**Category:** SMOKE\
**Tags:** smoke-50, known\_issue\
**Created:** [January 17, 2024, 8:25pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632 "2024-01-17T20:25:37Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phillip](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@Phillip](https://forum.cmascenter.org/u/Phillip)\
**Post date:** [January 17, 2024, 8:25pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/1 "2024-01-17T20:25:37Z")

</div>

Hi all,

I am running SMOKE on Derecho (NCAR cluster) but got the following error at the merge step.  
“\*\*\* ERROR ABORT in subroutine SETOUTDATE  
Inconsistent start time in input files”

I compiled IOAPI-3.2 and SMOKE 4.7 with the GFortran compiler and was merging emissions. The pre-merged emissions are generated before with an Intel compiler. The start time in all the premerged-emission files are consistent.

Any help or suggestions are appreciated.

Thanks,  
[mrggrid\_all\_2017gb\_17j\_20170101\_12US1\_cmaq\_cb6ae7\_nobeis\_norwc.txt](https://forum.cmascenter.org/uploads/short-url/sdC0cbYJu0rz9DH69Z4edISOx9Y.txt) (11.6 KB)

Phillip

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [January 17, 2024, 9:03pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/2 "2024-01-17T21:03:03Z")

</div>

As your log says, there is an inconsistency in the files: the OCEAN file is for 2005 whereas the rest of the files are for 2017. This is a problem…

On the other hand,the time step sequence checks for the input files to MRGGRID are unreasonably strict: they _should_ check that the files **contain** the data for the run’s requested time step sequence, rather than insisting that the files contain **exactly** this time step sequence. FWIW.

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [January 17, 2024, 9:07pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/3 "2024-01-17T21:07:21Z")

</div>

@cjcoats, it’s been a while since I used mrggrid, but shouldn’t MRG\_DIFF\_DAYS which is set to Y allow the tool to merge across different dates, as long as the times line up? I think that’s a pretty standard way of using this tool, with some emission sectors being only processed for representative days and others processed for each individual day. If so, the problem might indeed be with an overly restrictive consistency check on the times? I’m a bit out of my element here, though.

---

<div class="post-metadata">

**Author:** ![Phillip](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@Phillip](https://forum.cmascenter.org/u/Phillip)\
**Post date:** [January 17, 2024, 9:12pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/4 "2024-01-17T21:12:18Z")

</div>

No, it’s not about the ocean emissions. I got the same error message after turning ocean emission off.  
I succeed in memerging exactly the same files on the Cheyenne cluster. So I was wondering the merge executable (GFortran compiled) is not compatible with pre-merged emissions (Generated by Intel-compiled SMOKE)

---

<div class="post-metadata">

**Author:** ![james.beidler](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@james.beidler](https://forum.cmascenter.org/u/james.beidler)\
**Post date:** [January 17, 2024, 9:26pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/5 "2024-01-17T21:26:35Z")

</div>

@hogrefe.christian is correct, MRG\_DIFF\_DAYS allows different dates to be merged and mrggrid is routinely used this way specifically with the ocean Cl file. There should be some additional output in the logs directly after the offending input file (“ERROR: Start time 000000 in file A…”) but it isn’t showing up.

@Phillip Are your m3tools compiled with GFortran? You could try reading and then dumping back out the files using m3xtract to see if that makes any difference. Can you share your run script and mrggrid FILELIST?

---

<div class="post-metadata">

**Author:** ![Phillip](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@Phillip](https://forum.cmascenter.org/u/Phillip)\
**Post date:** [January 17, 2024, 9:37pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/6 "2024-01-17T21:37:11Z")

</div>

[Sector\_merge\_12US1\_2017gb\_17j\_01\_1.csh](https://forum.cmascenter.org/uploads/short-url/kC4efgBNLJ5sCpTwZkaBJSwb4Bd.csh) (6.0 KB)  
[filelist\_2017gb\_17j\_12US1\_1.lst.txt](https://forum.cmascenter.org/uploads/short-url/8MKzb8QvNboCYiheAK9vGFHiRue.txt) (123 Bytes)

Hi James,

Yes, I compiled IOAPI and SMOKE with GFortran compiler, so m3tools are compiled with GFortran.  
I didn’t get the “m3xtract” part and could you explain a little bit more?  
I attached the run script and FIELIST.  
BTW, Which script should I put the “MRG\_DIFF\_DAYS” option?

Thanks so much.  
Pengfei

---

<div class="post-metadata">

**Author:** ![james.beidler](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@james.beidler](https://forum.cmascenter.org/u/james.beidler)\
**Post date:** [January 17, 2024, 9:47pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/7 "2024-01-17T21:47:25Z")

</div>

According to the mrggrid log that you shared MRG\_DIFF\_DAYS is already set to TRUE, so you are good on that front.

I see PTNONIPM in your filelist but not in your mrggrid log. Can you do a “ncdump -v TFLAG” on the ptnonipm gridded emissions file referenced by the PTNONIPM variable? You are looking for the STIME to be set to “0” in the global attributes and a 0 time in the first timestep of the TFLAG variable. If it is anything else that is likely the root of the problem.

Don’t worry about trying anything with m3tools until you verify the PTNONIPM time info.

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [January 17, 2024, 9:51pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/8 "2024-01-17T21:51:55Z")

</div>

BTW, I/O API M3Tools program [_M3STAT_](https://cjcoats.github.io/ioapi/M3STAT.html) is often the easiest way to do this sort of check (by default, it reports statistics for each time step of each variable of the file…)

---

<div class="post-metadata">

**Author:** ![Phillip](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@Phillip](https://forum.cmascenter.org/u/Phillip)\
**Post date:** [January 17, 2024, 11:21pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/9 "2024-01-17T23:21:52Z")

</div>

[ptnpnipm\_log.txt](https://forum.cmascenter.org/uploads/short-url/kym1uunviBKVfSehBopnRfqVeus.txt) (48.5 KB)  
Attached is the output log after doing “ncdump -v TFLAG” on ptnonipm emission.

STIME and the first timestep of the TFLAG variable are both zero.

 ![Image_20240117171840](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/6/6a3c288196bf7f09c61eeb0dde0cdbcac78d2817.png)

---

<div class="post-metadata">

**Author:** ![Phillip](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@Phillip](https://forum.cmascenter.org/u/Phillip)\
**Post date:** [January 17, 2024, 11:22pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/10 "2024-01-17T23:22:18Z")

</div>

Thanks for this information.

---

<div class="post-metadata">

**Author:** ![james.beidler](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@james.beidler](https://forum.cmascenter.org/u/james.beidler)\
**Post date:** [January 18, 2024, 6:13pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/11 "2024-01-18T18:13:03Z")

</div>

Thanks for checking, that’s too bad it wasn’t the simplest explanation.

There is a version of SMOKE 4.7 compiled with Intel Fortran available as part of the 2017gb package. Would you mind trying to use the mrggrid packaged in this zip file to see if it fixes the issue?

[https://gaftp.epa.gov/Air/emismod/2017/smoke\_2017gb\_platform\_core\_26jul2023.zip](https://gaftp.epa.gov/Air/emismod/2017/smoke_2017gb_platform_core_26jul2023.zip)

---

<div class="post-metadata">

**Author:** ![Phillip](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@Phillip](https://forum.cmascenter.org/u/Phillip)\
**Post date:** [January 18, 2024, 6:38pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/12 "2024-01-18T18:38:48Z")

</div>

I did. It showed the following. That’s why I compiled it with GFortran.

“Please verify that both the operating system and the processor support Intel(R) X87, CMOV, MMX, FXSAVE, SSE, SSE2, SSE3, SSSE3, SSE4\_1, SSE4\_2, MOVBE, POPCNT, F16C, AVX, FMA, BMI, LZCNT and AVX2 instructions.”

---

<div class="post-metadata">

**Author:** ![huytran6583](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/huytran6583/32/3357_2.png) [@huytran6583](https://forum.cmascenter.org/u/huytran6583)\
**Post date:** [January 18, 2024, 7:31pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/13 "2024-01-18T19:31:40Z")

</div>

Please try this pre-compiled SMOKE 5.0 with Intel Fortran and see if it work.

> **[SMOKEv5.0.Linux2\_x86\_64ifort.tar.gz](https://drive.google.com/file/d/19S9vHXbeJ1EuRzuGieosUmv9dK5rdeZL/view?usp=share_link)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![Phillip](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@Phillip](https://forum.cmascenter.org/u/Phillip)\
**Post date:** [January 19, 2024, 10:54am UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/14 "2024-01-19T10:54:09Z")

</div>

It worked! Thanks a million.

---

<div class="post-metadata">

**Author:** ![alexiseayy](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@alexiseayy](https://forum.cmascenter.org/u/alexiseayy)\
**Post date:** [January 30, 2024, 2:21pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/15 "2024-01-30T14:21:36Z")

</div>

I got the same error message after turning ocean emission off.[.](https://krnl.fun/)  
[.](https://hdstreamz.uno)

---

<div class="post-metadata">

**Author:** ![james.beidler](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@james.beidler](https://forum.cmascenter.org/u/james.beidler)\
**Post date:** [January 30, 2024, 3:03pm UTC](https://forum.cmascenter.org/t/inconsistent-start-time-in-input-files-merge/4632/16 "2024-01-30T15:03:43Z")

</div>

If it was exactly this error:  
“\*\*\* ERROR ABORT in subroutine SETOUTDATE  
Inconsistent start time in input files”  
Did you try the SMOKE 5.0 package posted above?

There is a related issue and bug fix posted to GitHub that you can try if you want to compile from source:

> <https://github.com/CEMPD/SMOKE/issues/90>
>
> Local logical variable EFLAG is not initialized with a default value in the seto…udate.f subroutine. This could cause an incorrect exit at line 130 with certain compilers or compiler options.
