I am having issues running CMAQ 5.3.1. The program aborts after showing an error message regarding deposition velocity of O3 being NaN (I am attaching the LOG file, the run script and the bldit script). Any insights of what it may be happening?
=============================================
|>--- SET UP GRAVITATIONAL SETTLING ---<|
=============================================
*** Subroutine: M3DRY
*** NEGATIVE or UNDEFINED Dry Deposition Velocity
*** Point = 14 1
*** Species = O3
*** Vd = NaN
*** ERROR ABORT in subroutine M3DRY on PE 059
ABORT
PM3EXIT: DTBUF 8:01:15 May 2, 2012
Date and time 8:01:15 May 2, 2012 (2012123:080115)
Have you fixed this issure yet?
I have the same issue as you,and I checked the M3DRY subroutine. I found that the issue may be caused by ‘Hg air surface exchange subroutine’ in m3dry.F or improper data in METCRO2D from MCIP.
I’m still trying to figure it out.Please inform me if you have any solutions.
Thanks!
I solved the issue by using WPSv4.0.
A blog in chinese ([https://www.i-lightning.cn/2020/01/a_strange_error_about_wrf_cmaq/]) helped me a lot.
This issue occurs while there are ‘Flerchinger USEd in NEW version. Iterations= 10’ in rsl.out or SMOIS,SH2O=0 in wrfout,lead to zero in WR(canopy moisture content) in METCRO2D.These can be solved by using WPSv4.0.
Another blog explained the resaons([Sillman: Corrections to CMAQ 4.7.1]).
Numerical problems can occur in these algorithms because the WRF model input has LAI=0 for grids located over the ocean or in ice-bound regions. The m3dry.F algorithm includes divide-by-LAI without protection for LAI being zero. This can cause the program to generate Inf or NaN values.
The problem seems to come from some problem in the land and soil processing. One comment says that these problems happen when WFC is zero such as for a water or ice cell. However, this part of the code is only executed for vegetated land cells (NINT(GRID_DATA%LWMASK( c,r )) .NE. 0 ) .AND. ( vegcr .GT. 0.0 ). WFC should never be zero in such cells. If it is, that means there is an error upstream such that there is no soil data for the land cell. Should not have vegetation without soil. This should not be allowed because it will also cause errors in the LSM part of WRF. If we do as suggested checking for WFC = 0, then it is just covering up for an error upstream.
Hi,
Maybe you can modify the m3dry.F as I said in Apr 7 in this topic.It works successfully and this bug has never occured again.
Hope this can help you.
C.W.Huang
Hi there,
I modified the m3dry.F routine as C.W.Huang suggested, and it worked for me as well. I modeled Southern California, and we obtained similar model performance as with version 5.0.2.
Marc
hi,
When I follow this method to modify m3dry.F, make will appear the following compilation error,
m3dry.F(781): error #6099: An ENDDO statement occurred without a corresponding DO or DO WHILE statement.
END DO ddloop ! (l = 1, n_spc_m3dry)
^
m3dry.F(795): error #6099: An ENDDO statement occurred without a corresponding DO or DO WHILE statement.
END DO ! c
^
m3dry.F(796): error #6099: An ENDDO statement occurred without a corresponding DO or DO WHILE statement.
END DO ! r
^
m3dry.F(550): error #6321: An unterminated block exists.
ELSE ! land
^
m3dry.F(483): error #8147: DO construct with a construct name must be terminated by an ENDDO statement with the same name.
ddloop: DO l = 1, n_spc_m3dry
^
m3dry.F(383): error #6321: An unterminated block exists.
DO c = 1, ncols
^
m3dry.F(382): error #6321: An unterminated block exists.
DO r = 1, nrows
^
compilation aborted for m3dry.F (code 1)
Can you upload the screenshot of your code changes? It seems like you had wrong changes.
I add two if…else…endif code statements between line 607 to 614 in M3DRY.F to make sure that WFC<=0 not cause problems. Maybe you missed an endif?