ERROR about Floating point exception

Dear all,

I am running the wrf-cmaq twoway model in CMAQ version 5.4.
To compare the effect of aerosol feedback in winter and summer, I am running one month each for January and July 2020, adjusting the feedback option. When I set NPROCS to 24 and ran a total of 4 cases, I got the error “Floating point exception for CFRAC_3D” in the two summer cases.
So I set NPROCS to 28 and ran the summer sf (feedback on) case and found that it worked fine without the error.
However, I tried setting NPROCS up to 36 (maximum number of CPUs) for the nf (feedback off) case and found that the model always stopped at the same time with the same error. What could be the problem?
I’ve attached the error code below.

     Processing Day/Time [YYYYDDD:HHMMSS]: 2020186:054000
       Which is Equivalent to (UTC): 5:40:00  Saturday,  July 4, 2020
       Time-Step Length (HHMMSS): 000500
     Beginning Emissions
       Calling Real Emissions at Date:    2020186  and time:      54230


     After        VDIFF :  Gas  2.250E-01  | Aer  6.738E+09  | Non  6.313E-04
     After       COUPLE :  Gas  1.918E+03  | Aer  1.940E+14  | Non  5.302E+00

     ATTENTION: Applying fix to aerosol Boundary Conditions for aerosol modes.
       Set verbose_rdbcon preprocessor flag to learn more.

     After         HADV :  Gas  1.918E+03  | Aer  1.902E+14  | Non  5.343E+00
     After          ADV :  Gas  1.918E+03  | Aer  1.902E+14  | Non  5.342E+00
     After        HDIFF :  Gas  1.918E+03  | Aer  1.902E+14  | Non  5.342E+00
     After     DECOUPLE :  Gas  2.250E-01  | Aer  6.612E+09  | Non  6.361E-04

  COL, ROW, LAY =     26     1    27

  TA, PRES =   2.2171E+02  1.8352E+04

  QV, QC, QI, QS =  -4.4278E-07  2.1908E-09  0.0000E+00  0.0000E+00

  ESW, ESI, QVSW, QVSI =   5.1303E+00  3.1842E+00  1.7394E-04  1.0794E-04

  WEIGH, QVS_WEIGH =   0.0000E+00  1.7394E-04

  SUBSAT, RHUM, RHGRID, ARG =   1.7438E-04 -2.5457E-03  1.0000E+00 -1.5215E-05


     *** ERROR ABORT in subroutine CAL_CFRAC_3D on PE 010
     Floating point exception for CFRAC_3D


     *** ERROR ABORT in subroutine CAL_CFRAC_3D on PE 010
     Floating point exception for CFRAC_3D
     Date&time specified as 0

Hi ycyeong,

Could you please add an additional flag -traceback (I assume you used ifort compiler) in the cmaq/Makefile.twoway? Then delete all cmaq/.o cmaq/.mod and then recompile the model by typing “compile em_real >& mylog”. Hopefully it will show you at what line in CAL_CFRAC_3D subroutine. By the way, what are the sizes of your wrf and cmaq domain?

Cheers,
David

Thank you for your reply.
My domain size is 150x130 (137x117).
This error has been resolved. The error occurred because I set sf_sflay_physics and bl_pbl_physics to 1 in namelist.input. Maybe it comes from a lot of computation. I was able to get out of the error after changing the two options to 7.

Hi ycyeong,

I am glad to hear your issue has been resolved. For the WRF-CMAQ coupled model, (I believe coupled model document has stated) it needs to use PX related options. For example, sf_sflay_phsics, it needs to use option 7, PX surface layer.

Cheers,
David

Hi,

Unfortunately, I am encountering the same error again.
The error occurs within the CAL_CFRAC_3D subroutine in PHOT_MET_DATA.F, as shown below:

IF (CFRAC_3D(I,J,K) .NE. CFRAC_3D(I,J,K) .OR.
    & CFRAC_3D(I,J,K) .GT. 1.0) THEN
    WRITE(LOGDEV,'(/2X,A,3I6)') 'COL, ROW, LAY = ', I, J, K
    WRITE(LOGDEV,'(/2X,A,4ES12.4)')
    & 'TA, PRES = ', TA(I,J,K), PRES(I,J,K)
    WRITE(LOGDEV,'(/2X,A,4ES12.4)')
    & 'QV, QC, QI, QS = ', QV(I,J,K), QC(I,J,K), QI(I,J,K), QS(I,J,K)
    WRITE(LOGDEV,'(/2X,A,4ES12.4)')
    & 'ESW, ESI, QVSW, QVSI = ', ESW, ESI, QVSW, QVSI
    WRITE(LOGDEV,'(/2X,A,4ES12.4)')
    & 'WEIGH, QVS_WEIGH = ', WHT, QVS_WEIGHT
    WRITE(LOGDEV,'(/2X,A,4ES12.4)')
    & 'SUBSAT, RHUM, RHGRID, ARG = ', SUBSAT, RHUM, RHGRID, ARG
    XMSG = 'Floating point exception for CFRAC_3D'
    CALL M3EXIT('CAL_CFRAC_3D', 0, 0, XMSG, XSTAT1)
END IF

The error is triggered because the calculated value of CFRAC_3D(I,J,K) meets the conditions of the IF statement above. Upon investigation, I found that some of the meteorological variables(QV, RHUM etc) included in the error message have negative values, which seem to affect the calculation of CFRAC_3D.

Additionally, I will attach the namelist.input file I used for reference.
namelist.txt (4.8 KB)