# NaN or Infinity detected in VDIFF in multi-day MPAS-CMAQ run

**URL:** <https://forum.cmascenter.org/t/nan-or-infinity-detected-in-vdiff-in-multi-day-mpas-cmaq-run/6172>\
**Category:** MPAS-CMAQ\
**Created:** [March 29, 2026, 11:44am UTC](https://forum.cmascenter.org/t/nan-or-infinity-detected-in-vdiff-in-multi-day-mpas-cmaq-run/6172 "2026-03-29T11:44:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeongBeomLee](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@JeongBeomLee](https://forum.cmascenter.org/u/JeongBeomLee)\
**Post date:** [March 29, 2026, 11:44am UTC](https://forum.cmascenter.org/t/nan-or-infinity-detected-in-vdiff-in-multi-day-mpas-cmaq-run/6172/1 "2026-03-29T11:44:39Z")

</div>

Hello,

I am currently studying the MPAS-CMAQ model and would like to ask a question about an issue I encountered during execution.

First, I downloaded the one-year example dataset provided by the US EPA. I then attempted to run the model for the period from January 16 to January 22, 2017.

What I found interesting is the following:  
(1) When I run the model one day at a time, the simulation completes successfully without any errors.  
(2) However, when I try to run the entire period from January 16 to January 22 at once, an error occurs.

The error message is: **“NaN or Infinity detected in VDIFF.”**

This error occurs after the simulation for January 16 is completed, specifically when the model starts calculating **00:07:30 on January 17** (that is, during the first time step of the next day).

Could anyone explain why this error occurs?

Has anyone experienced a similar issue?

Thank you.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/b/b9db227bc0e196999e2c3d01f8bcab0b0067e7a2.png)

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [March 30, 2026, 3:16pm UTC](https://forum.cmascenter.org/t/nan-or-infinity-detected-in-vdiff-in-multi-day-mpas-cmaq-run/6172/2 "2026-03-30T15:16:15Z")

</div>

There are CTM\_LOG\_[xxx] files that are written for each day under the output directory. Please check to see what the CTM\_LOG\_018 contains:

example command:

```auto
cat 20170117/CTM_LOG_018

```

based on this message: Nan or Infinity detected on processor 018.

Perhaps the output files for the first day, aren’t fully written to the filesystem, prior to the start of the next day? You could try adding a sleep command after the line for mpirun -np … in the run script.

```auto
sleep 1m

```

---

<div class="post-metadata">

**Author:** ![JeongBeomLee](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@JeongBeomLee](https://forum.cmascenter.org/u/JeongBeomLee)\
**Post date:** [April 1, 2026, 12:41pm UTC](https://forum.cmascenter.org/t/nan-or-infinity-detected-in-vdiff-in-multi-day-mpas-cmaq-run/6172/3 "2026-04-01T12:41:33Z")

</div>

Dear lizadams,

First of all, thank you very much for your reply.

I apologize for the delay in responding, as I was testing the MPAS-CMAQ model after adding the `sleep` command to the script as you suggested.

Unfortunately, even after applying your suggestion, the error **“NaN or Infinity detected on processor”** still occurred.

Additionally, I tested running the MPAS-CMAQ model with the `CTM_WB_DUST` and `BDSNP_MEGAN` options set to `"N"`. When I applied this method, the continuous simulation of the MPAS-CMAQ model completed successfully. I suspect that this is because the model does not process feedback related to `SOILINP/BDSNPINP`, which allowed the continuous simulation to run without issue.

Although I have not yet evaluated the model performance, I believe that regardless of the results, I will ultimately need to run MPAS-CMAQ with these options set to `"Y"`.

In the current situation, could you please advise me on what I should examine first in order to enable these options and run the MPAS-CMAQ model successfully?

Thank you again for your reply. I have been gaining very valuable experience through the CMAS Forum, and I truly appreciate it.

Sincerely,  
Jeongbeom Lee

```auto
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO IEEE_OVERFLOW_FLAG IEEE_UNDERFLOW_FLAG IEEE_DENORMAL

     CSQY_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/CSQY_DATA_cracmm2

     OPTICS_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/PHOT_OPTICS.dat

     CSQY_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/CSQY_DATA_cracmm2

     OPTICS_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/PHOT_OPTICS.dat

     OMI | /raid/mpas-cmaq/2017_120km/omi_cmaq_2017.dat

     OMI | /raid/mpas-cmaq/2017_120km/omi_cmaq_2017.dat

     CSQY_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/CSQY_DATA_cracmm2

     OPTICS_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/PHOT_OPTICS.dat

       NaN or Infinity detected on processor 013

       During VDIFF : Gas NaN | Aer 1.031E+09 | Non 1.382E-04

Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO IEEE_OVERFLOW_FLAG IEEE_UNDERFLOW_FLAG IEEE_DENORMAL

     OMI | /raid/mpas-cmaq/2017_120km/omi_cmaq_2017.dat

     CSQY_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/CSQY_DATA_cracmm2

     OPTICS_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/PHOT_OPTICS.dat

     CSQY_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/CSQY_DATA_cracmm2

     OPTICS_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/PHOT_OPTICS.dat

     OMI | /raid/mpas-cmaq/2017_120km/omi_cmaq_2017.dat

     CSQY_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/CSQY_DATA_cracmm2

     CSQY_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/CSQY_DATA_cracmm2

     OPTICS_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/PHOT_OPTICS.dat

     OPTICS_DATA | /home/mpas-cmaq-v1.1/MPAS_v7.0/src/core_atmosphere/cmaq/PHOT_OPTICS.dat

     OMI | /raid/mpas-cmaq/2017_120km/omi_cmaq_2017.dat

     OMI | /raid/mpas-cmaq/2017_120km/omi_cmaq_2017.dat

```

---

<div class="post-metadata">

**Author:** ![willison.jeff](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@willison.jeff](https://forum.cmascenter.org/u/willison.jeff)\
**Post date:** [April 6, 2026, 8:06pm UTC](https://forum.cmascenter.org/t/nan-or-infinity-detected-in-vdiff-in-multi-day-mpas-cmaq-run/6172/4 "2026-04-06T20:06:09Z")

</div>

> [@JeongBeomLee](#):
>
> e delay in responding, as I was testing the MPAS-CMAQ model after adding the `sleep` command

Can you identify if it’s the windblown dust or the BDSNP module that’s causing the issue? Or if it’s both?

---

<div class="post-metadata">

**Author:** ![JeongBeomLee](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@JeongBeomLee](https://forum.cmascenter.org/u/JeongBeomLee)\
**Post date:** [April 23, 2026, 2:28am UTC](https://forum.cmascenter.org/t/nan-or-infinity-detected-in-vdiff-in-multi-day-mpas-cmaq-run/6172/5 "2026-04-23T02:28:28Z")

</div>

Dear willison.jeff,

Thank you for your reply.

I still do not fully understand what logic is being calculated when I change the CMAQ options. So, for now, all I can do is modify the options and test the model behavior. To give the conclusion first, when I set both **CTM\_WB\_DUST** and **BDSNP\_MEGAN** to **“N”** , and do not use **“CCTM\_SOILOUT\_\*.nc”** as one of the MPAS-CMAQ outputs (that is, I exclude it from the input data), the model runs continuously without interruption.

Based on this, I am now looking into the parts related to **“CCTM\_SOILOUT\_\*.nc”**. One thing I am curious about is the **xtime** written in that file. It has a total of 25 time steps, but the second time step is blank. Is this intentional?

Depending on whether this file is intentional or not, I am thinking that the issue may be related to the time step rather than to the option settings.

Finally, thank you again for your response.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/4/4d4d890a70dc6d0eaacefc83065f602d98d1995c.png)
