I tried to add a new gas chemical reaction in mech_cb6r3_ae7_aq.def ( A = B + C # *; similar to the excited NO2 reacting with water to produce HONO), but it occurred both during the day and night. How to set the results to zero if sun is below the horizon?
Ideally, the objective can be accomplished if the rate constant’s expression references a reaction rate’s constant listed before the new reaction in the mechanism definitions file. For example, the reaction would be expressed as below
A = B + C # x/*<R11>;
where x equals a scaling factor for the reaction with the label, R11. I mentioned ideally because the CHEMMECH utility has a bug that prevents using the example. The fix is easy if you are willing to modify a file and re-build CHEMMECH. In CMAQ version 5.2 and higher, the file is UTIL/chemmech/src/wrt_reactions_module.f and the current two lines,
The exact line numbers depend on the CMAQ version. In version 5.4, the line numbers equal 597 and 598.
Please reply if more information is needed.
In your posted question, you mentioned HONO production from a excited NO2 and H2O reaction. I believe that current literature does report its reaction rate constant as dependent on sunlight. Rather, the production of excited NO2 depends on sunlight.
Try picking from the existing reactions one that has a fixed value for its rate constant next set the scaling factor, x, so its product with the rate constant of the selected reaction equals the desired value.
For example, the new rate constant should equal 1.0E-13 molecule/(sec*cm3) and uses as the referenced reaction. In cb6r3_ae6_aq, reaction has 2.14E-10 molecule/(sec*cm3) as its rate constant. The scaling factor, x, then equals 1.0E-13 divided by 2.14E-10 or 4.67E-4.
I believe to see your problem. My earlier advice does not work well because the RXNS_FUNC_MODULE.F90 file produced sets the rate constant for the new reaction before the referenced rate constant is defined so the new rate constant equals zero. My regrets for sending bad advice .