Forrtl: severe 65: floating invalid error in SSEMIS.F in CMAQv5.2.1


Running CMAQv5.2.1 crashes at SSEMIS.F module. I extracted some variables from CMAQ run and looks like WET_M3J gets zero as the denominator and then CMAQ crashes. In M3J calculation, ESEASJ gets very small (E-25) and in my case I think it is because VFLXRH gets very small (E-30). I traced back the issue to VFLXRH equation and extracted OFRAC (ocean/seawater fraction) and SFRAC (surf zone fraction) parameters. SFRAC is 0.0 in CMAQ log files, but OFRAC always remains 3.56E-16.

I am confused about two issues in this case.

First, our most-inter domain does not touch any ocean. I have attached a visualization of our domain here (most inter-domain-03). I checked my ocean file and surfzone variable is 0.0 everywhere, but OPEN ocean for some cells is -E-15 or +E-15 or smaller which the negative value is weird since this variable is a fraction of seawater cover and it should be zero for my case. I am not sure if that is the reason CMAQ crashes.

Another issue is that in SSEMIS.F it looks like if there is no ocean in the domain and then if OFRAC and SFRAC are zero, it makes VFLXRH, ESEASJ, M3J , WET_M3J zero anyway and it makes the denominator (WET_M3J in line 938) in DRY_M2J zero and it will cause “floating invalid” error.

Any thoughts and suggestions would be greatly appreciated.

Thanks a lot in advance.


You might try downloading the beta version of CMAQ v5.3. The emissions processing (including sea spray emissions) has been substantially revised, and it is now much easier to simply turn off sea spray emissions.

If you want to use v5.2.1, then maybe the problem is here (line 751 of SSEMIS.F):

IF ( Grid_Data%OCEAN( C,R ) + Grid_Data%SZONE( C,R ) .GT. 0.0 ) THEN
    OFRAC = Grid_Data%OCEAN   ( C,R )
    SFRAC = Grid_Data%SZONE   ( C,R )

That looks like that could allow negative values for either OFRAC or SFRAC if the other is positive with a higher absolute value. I have not tested this, but you might try changing to

OFRAC = MAX( Grid_Data%OCEAN ( C,R ), 0.0 )
SFRAC = MAX( Grid_Data%SZONE ( C,R ), 0.0 )

Please let us know if this works!