MCIP crash error

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 (759.9 KB)
20230915.12us1.txt (785.5 KB)

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.

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?

@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

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

@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

Thanks. I will use the PX LSM approach.

@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

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

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.

2 Likes

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

@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

Hi Tanya,

Any update about the new MCIP software? Thanks!

Hao

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 (:,:slight_smile: = 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(:,:slight_smile: = xwr(:,:slight_smile: * 0.001 ! kg/m2 → m
ENDIF
ELSE

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