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

Hello Hasibul,

Line 652 which the backtrace is pointing to in the m3dry.F code is this one:

           rstom = MET_DATA%RS( c,r ) * dwat / dif0( l )
 &               + 1.0 / ( heff_ap / 3000.0 + 100.0 * meso( l ) ) / laicr

My suspicion is that there is some inconsistency in your WRF fields between the LWMASK or VEGF fields and the LAI fields. Specifically, I suspect your WRF fields may have grid cells where LAI is zero (causing a divide-by-zero error) despite having a non-zero VEGF value and/or a LWMASK indicating land.

Stomatal resistance (rstom) in line 652 is only calculated over land cells.

Line 502 determines whether a grid cell should be treated as all water (unvegetated)

        IF ( ( NINT(GRID_DATA%LWMASK( c,r )) .EQ. 0 ) .OR. ( vegcr .EQ. 0.0 ) ) THEN  ! water

Line 563 then starts the “else” branch of that “if” condition with the land-based calculations, including the calculation of rstom that assumes LAI to be non-zero.

The issue you are encountering seems similar to the one in this thread:

Similar to the discussion in that thread, you would want to perform a careful analysis of your LWMASK, VEGF, and LAI fields to identify and hopefully resolve any inconsistencies that currently exist.