CMAQv5.2_DDM-3D Jacobian files for other chemical mechanisms

Hello,all
I found jac_cb05tucl_ae6_aq.F was not imperfect when I compile CMAQv5.2_DDM-3D with cb05tucl_ae6_aq mechanism.

jac_cb05tucl_ae6_aq.F(2021): error #6351: The number of subscripts is incorrect. [C]
PD( CLNO2 ,H2NO3PIJ ) = RK( 212 ) * C( )
--------------------------------------------------------^
jac_cb05tucl_ae6_aq.F(2022): error #6351: The number of subscripts is incorrect. [C]
& + RK( 213 ) * C( )
--------------------------------------------------------^
jac_cb05tucl_ae6_aq.F(2023): error #6351: The number of subscripts is incorrect. [C]
PD( CLNO2 ,H2NO3PK ) = RK( 214 ) * C( )
--------------------------------------------------------^
jac_cb05tucl_ae6_aq.F(2102): error #6351: The number of subscripts is incorrect. [C]
& - RK( 212 ) * C( )
--------------------------------------------------------^
jac_cb05tucl_ae6_aq.F(2103): error #6351: The number of subscripts is incorrect. [C]
& - RK( 213 ) * C( )
--------------------------------------------------------^
jac_cb05tucl_ae6_aq.F(2110): error #6351: The number of subscripts is incorrect. [C]
& - RK( 214 ) * C( )
--------------------------------------------------------^
compilation aborted for jac_cb05tucl_ae6_aq.F (code 1)
make: *** [jac_cb05tucl_ae6_aq.o] Error 1
ERROR while running make command

Could you help me?
Thank you for your time.

Please try again using the CMAQv5.3 version

I don’t think DDM-3D is available for CMAQ v5.3. Please correct me if I’m wrong.

You are correct that DDM-3D was not released for CMAQv5.3.
Here are a few resources that may help:
CMAQv5.2 DDM-3D

CMAQv5.0.2 DDM
https://www.airqualitymodeling.org/index.php/CMAQv5.0.2_Direct_Decoupled_Method

Successful testing was performed with the cb6r3_ae6nvPOA_aq mechanism:
https://www.airqualitymodeling.org/index.php/CMAQ_version_5.2_DDM_Technical_Documentation

We are currently working on implementing a more robust mechanism support for the next release of CMAQ-DDM. In the current system, any slight changes to the base mechanism will likely break the subsequent DDM algorithms. Possibly, this is what happened here.

I am currently running the mechanism “cb6r3_ae6nvPOA” with no issues, so I suggest you try that one. If you application must use cb05tucl_ae6, I can probably come up with something, but it would for the non-volatile version.

Do you have the cb05tucl_ae6nvPOA version that works?

Sorry to disturb, when will the next version will release and could you give me some help on correct running the DDM-3D with a revised mechanism based on the cb6r3_ae6nvPOA chemical mechanism? Thanks!

Did you get the jac_cb05tucl_aq6_aq.f file that can run normally? Could you please share a copy with me? Thank you very much for your help!

@lizadams Sorry to disturb. I am wondering when the next version will be released. And could you give me some help on correctly running the DDM-3D for other chemical mechanisms? I want to use the cb05 chemical mechanism, and I have tried to revise the jac_xxx.f file by myself, but the results seem wrong. Specifically, the senseitivity of NOx to Ozone was zero. Do you know if jac_xxx.f is the only file needed to revise when using another chemical mechanism? Thanks!

Hi Erica,

Sorry, I completely missed this threat the entire time. The next version of CMAQ is coming out in the fall. I am not exactly sure on the date, but it should be fairly soon. In that version, the need for jac_*.f is going away, so there should be no more issues with incompatible changes to chemistry.

However, it doesn’t sound like your current issue is with the jacobian. If your jacobian is wrong for the mechanism, the model would crash and not produce output. Since you report getting zeros in your output, there is likely a different issue.

Now, you say that you are looking at sensitivity of NOx to O3. Do you actually mean the sensitivity of O3 to NOx? The sensitivity of NOx to O3 emissions probably should be zero in most applications, because there is no O3 emissions.

Sergey

1 Like

Hi Sergey,
Thank you so much for your response !!!
You are right, and I have calculated the sensitivity of O3 to NOx emissions. The sensinput file, the run script, and the final results are attached. I think I have set the sensitivity options correctly, but I still get a lot of zero values. I am hoping you can give me some advice. Thank you again!
sensinput.cmas.dat.ENV1.txt (221 Bytes)
run_cctm_pbs20.csh (23.6 KB)

Erica,

Your control file and run script look fine. So, the next thing to check would be if you are getting reasonable output for the base concentrations. Does your O3 output look ok?

Also, are all sensitivity outputs zero? What does NO_EN look like? Is the zero only in the first time step or the entire day?

Finally, does this file:

set EMISfile = EM_{CFG}_{yyyymmdd_emis}.nc #> Offline 3d emissions file name
setenv EGRIDFILE1 EMISpath/EGRID1/EM_{CFG}_${yyyymmdd_emis}.nc

look ok? This is your emissions files that I think you are trying to find the sensitivity to.

Sergey

Hi Sergey, @sergey
Thank you for your reply!
The O3 output looks fine, and the O3 distribution and magnitude are consistent with my previous simulations.
:sob: All sensitivity outputs are zero, except for NO2_EN and NO_EN. It is strange that the NO_EN result has abnormally high values while the emission file is continuous at the same time in the same area and there are no high values in emissions. Could you tell me what this means?
The results are zero for all times of the day for sensitivity output like O3_EN.
I used the emission files from my base simulation as well as the emission files required for the sensitivity simulations, and after inspection, the emission file looks correct.
I’m sorry to disturb you. Have you even encountered similar errors? I hope you can give me some advice.



Thanks,
Erica

@sergey On the way, I got similar zero values with the cb05e51 chemical mechanism using the benchmark file given by the CMAQ website. As a result, I believe that some variables may be mismatched throughout the DDM process. I’m hoping you can give me some advice.

I am not really sure why get such behavior. You said you revised the jacobian file. It is possible that is the cause. Does the standard cb6r3_ae6nvPOA jacobian not work for you?

Sergey

Thank you for responding! The standard cb6r3_ae6nvPOA can be used properly, but the aforementioned error will occur if the mechanism is altered or a new reaction is introduced. I found the jacbian file for the cb05e51 mechanism in the /src/gas/ directory. Which file do you think went wrong, and maybe I can test it further? Thank you very much!

Erica

My guess would be that the file you altered is what is caused the issue. If the standard jacobian is working properly, what are you trying to do that requires changing it?

Sergey

Hi Sergey, @sergey
Thank you for your reply!
I want to use the CB05 mechanism and change some of the chemical reactions in the existing mechansims. When I don’t alter the jacobian file copied from the /src/gas directory, it still doesn’t work.

Erica

Erica,

Now I think I finally understand what is happing.

The jacobian used in the DDM calculations is specific to the chemical mechanism. Since you modified the mechanism, it should no longer work properly. This is is the behavior you are experiencing. You could look inside the jac*.f file and make the analogous modification there to the rows and columns of the matrix it is defining based on whatever changes you made to the mechanism.

Alternatively, the next CMAQ release will have the capability to generate this matrix automatically during runtime.

Sergey

Sergey,
Thanks for your reply. I’ll keep trying.
Erica