Issues with M3DRY "NEGATIVE or UNDEFINED Dry Deposition Velocity"

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)

CTM_LOG_059.v531_noisam_mpi_intel_SC_20120502.txt (62.6 KB) run_cctm_df12_all_gid402_CMAQ5.3.1_noisam.txt (35.2 KB) bldit_cctm_saprc07tc_ae6_aq_noisam.csh (28.6 KB)

1 Like

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!

Hi,

In our case, I think it’s an issue with MCIP. I was trying to run the CMAQ 5.3.1 with input data that we used for our set-up with CMAQ 5.0.2.

We need to reprocess our WRF met fields, and see if that solves the issue. I’ll let you know if that works.

Thanks,

Marc

Hi,

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.

Hope this can help you.

1 Like

Thank you very much. We did not get too far on this, so this is going to help us enormously.

Sincerely,

Marc

In addition,there’s another solution.I modified the m3dry.F and it works.
From


To
Hope this can help you.

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.

1 Like

Hello,I used WRF4.0, but that didn’t solve the problem.

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)

Hi there,

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?

C.W.Huang

It seems like there is no problem, maybe you can try this:
m3dry.txt (40.6 KB)

save your m3dry.F
modify this m3dry.txt to m3dry.F and put this in your BLD and recomplied.

Hope this can help you.
C.W.Huang

I am indeed missing an endif,Now the problem has been solved,This problem has troubled me for a long time, thank you very much