# MCIP crash error

**URL:** <https://forum.cmascenter.org/t/mcip-crash-error/4738>\
**Category:** MCIP\
**Created:** [February 24, 2024, 3:55pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738 "2024-02-24T15:55:24Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [February 24, 2024, 3:55pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/1 "2024-02-24T15:55:24Z")

</div>

I am using the MCIP v5.4 to process my 12-km CONUS WRF v4.5 simulations. Some of the days MCIP works well (e.g. the log file of 09/15/2023), but some of the runs stopped at creating the last time frame with the following error (e.g., 09/16 log file). I tried to run couple of days and around half of them with this error stopped at the last time frame. Any suggestions on how to fix it? Thanks!

Hao

_Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation._

_Backtrace for this error:_  
_#0 0x14b659a796a0 in ???_  
_#1 0x14b659a788d5 in ???_  
_#2 0x14b658aa7b4f in ???_  
_#3 0x4c75b9 in resistcalc\__

- at /home/haohe/scratch/CMAQv5.4/PREP/mcip/src/resistcalc.f90:281\*  
_#4 0x49d9a0 in pblsup\__
- at /home/haohe/scratch/CMAQv5.4/PREP/mcip/src/pblsup.f90:331\*  
_#5 0x446563 in dynflds\__
- at /home/haohe/scratch/CMAQv5.4/PREP/mcip/src/dynflds.f90:67\*  
_#6 0x404357 in mcip_
- at /home/haohe/scratch/CMAQv5.4/PREP/mcip/src/mcip.f90:169\*  
_#7 0x40465a in main_
- at /home/haohe/scratch/CMAQv5.4/PREP/mcip/src/mcip.f90:79\*  
_Floating exception (core dumped)_  
_Error running mcip_

[20230916.12us1.txt](https://forum.cmascenter.org/uploads/short-url/w6XSBfRxsKJMR5IMGUqhLMxI17Z.txt) (759.9 KB)  
[20230915.12us1.txt](https://forum.cmascenter.org/uploads/short-url/x0qsiB7O5K8fOw0TpR5YNG2U2Dc.txt) (785.5 KB)

---

<div class="post-metadata">

**Author:** ![cgnolte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/cgnolte/32/53_2.png) [@cgnolte](https://forum.cmascenter.org/u/cgnolte)\
**Post date:** [February 24, 2024, 9:02pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/2 "2024-02-24T21:02:52Z")

</div>

What land-surface model was used in your WRF simulation, and what land use/land cover classification?  
Line 281 of resistcalc.f90 reads:

```
 radf = 1.1 * xrgrnd(c,r) / ( radl * xlai(c,r) ) ! NP89 - EQN34

```

My guess is that xlai is 0 somewhere, and you’re getting a divide by 0 error.

---

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [February 25, 2024, 3:22pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/3 "2024-02-25T15:22:44Z")

</div>

Thanks for your quick reply. I am using the NLCD 40 categories land use data and the Unified Noah land-surface model. Any suggestion to change these options?

---

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [February 26, 2024, 1:46pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/4 "2024-02-26T13:46:33Z")

</div>

@haohe.umcp –

What version of WRF did you use for your runs? There are some versions of WRF that have an error (that has since been corrected) that causes an incompatibility between NLCD and NOAH LSM.

–Tanya

---

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [February 26, 2024, 2:18pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/5 "2024-02-26T14:18:16Z")

</div>

I used WRF v4.5 and latest CMAQ v5.4. Hopefully they corrected the error. Maybe I can change the LSM?

---

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [February 26, 2024, 2:43pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/6 "2024-02-26T14:43:42Z")

</div>

@haohe.umcp –

Thank you. (You also mentioned it in your opening comment; I’m sorry I overlooked that.)

It appears that the bug in WRF was corrected in WRFV4.4.2, so you are fine with WRF. I need to make some changes to MCIP to accommodate the changes that were made by NCAR to include LCZ as part of the land use classifications, and that will be a little tricky because the definitions fluctuated between the most recent releases.

However, I’ll also need to work with you to figure out if you have a divide-by-zero in your files or if this is a bug in MCIP.

The quickest workaround (if you have flexibility) is to use PX LSM with NLCD because that is well-tested.

Please keep me posted on what you choose to do.

–Tanya

---

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [February 26, 2024, 4:56pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/7 "2024-02-26T16:56:51Z")

</div>

Thanks. I will use the PX LSM approach.

---

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [February 26, 2024, 5:10pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/8 "2024-02-26T17:10:51Z")

</div>

@haohe.umcp –

Sounds good. You will still need a new version of MCIP because of the new categories. I will have the mods for you soon…probably late this week.

–Tanya

---

<div class="post-metadata">

**Author:** ![nosha\_assare](https://avatars.discourse-cdn.com/v4/letter/n/ba8739/32.png) [@nosha\_assare](https://forum.cmascenter.org/u/nosha_assare)\
**Post date:** [March 3, 2024, 11:50pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/9 "2024-03-03T23:50:39Z")

</div>

Hello,

I got the same error though I use PX LSM with Modis land use as my domain is outside US. I found that, at some grid cells LAI (here should be from LAI\_PX) is 0.0 over land. how can I solve this? I did not have this issue with NOAH LSM, but I still prefer to use PX LSM as I want to activate windblown dust emissions in CMAQ.

Thanks

---

<div class="post-metadata">

**Author:** ![nosha\_assare](https://avatars.discourse-cdn.com/v4/letter/n/ba8739/32.png) [@nosha\_assare](https://forum.cmascenter.org/u/nosha_assare)\
**Post date:** [March 4, 2024, 2:19pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/10 "2024-03-04T14:19:31Z")

</div>

Hi again, I’ve found the cause of error in MCIP for may case. I found out that LAI\_modis\_10m was used by geogrid while modis\_landuse\_20class\_30s\_with\_lakes was used for land cover. this inconsistency in resolution of input data caused having some Land grids with 0 LAI. We have to make sure that consistent resolutions used for lai,landuse and vegfraction when running wrf.

---

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [March 4, 2024, 4:16pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/11 "2024-03-04T16:16:18Z")

</div>

I tried PX LSM approach and still had this problem, fyi.

---

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [March 4, 2024, 4:28pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/12 "2024-03-04T16:28:15Z")

</div>

@haohe.umcp and @nosha_assare –

This is all very helpful information. I’m still looking into the issue, and I hope to have something for you soon.

Thank you for your patience.  
–Tanya

---

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [March 26, 2024, 1:46pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/14 "2024-03-26T13:46:17Z")

</div>

Hi Tanya,

Any update about the new MCIP software? Thanks!

Hao

---

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [April 6, 2024, 2:15pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/15 "2024-04-06T14:15:33Z")

</div>

I have made some updates in WRF, but received another error like

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:  
#0 0x14794f63f6a0 in ???  
#1 0x14794f63e8d5 in ???  
#2 0x14794e66db4f in ???  
#3 0x46cdd5 in metvars2ctm\_  
at /home/haohe/scratch/CMAQv5.4/PREP/mcip/src/metvars2ctm.f90:491  
#4 0x446559 in dynflds\_  
at /home/haohe/scratch/CMAQv5.4/PREP/mcip/src/dynflds.f90:61  
#5 0x404357 in mcip  
at /home/haohe/scratch/CMAQv5.4/PREP/mcip/src/mcip.f90:169  
#6 0x40465a in main  
at /home/haohe/scratch/CMAQv5.4/PREP/mcip/src/mcip.f90:79  
Floating exception (core dumped)  
Error running mcip

I check the code on Line 491 of metvars2ctm.f90 there is below in bold. It is a simple multiplication, how the error happens?

IF ( ifwr ) THEN  
xwr (:,🙂 = wr (sc:ec,sr:er)  
write(_,_) “HHHH Before: Maximum value:”, maxval(xwr), “Minimum value:”, minval(xwr)  
IF ( met\_model == 2 ) THEN ! WRF: divide by water density  
**xwr(:,🙂 = xwr(:,🙂 \* 0.001 ! kg/m2 → m**  
ENDIF  
ELSE

---

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [May 7, 2024, 7:32pm UTC](https://forum.cmascenter.org/t/mcip-crash-error/4738/16 "2024-05-07T19:32:50Z")

</div>

Hi @haohe.umcp!

Do you know if there are valid values throughout the array, WR? One way to get a floating point exception is if there are undefined data points in your array or if they are filled with very large numbers (like XMISS) that cannot be scaled.

Please check MAXVAL(wr) and MINVAL(wr) to see.

–Tanya
