wrfchem-leeds / WRFotron

Tools to automatise WRF-Chem runs with re-initialised meteorology
https://wrfchem-leeds.github.io/WRFotron/
GNU Affero General Public License v3.0
21 stars 7 forks source link

Aqueous chemistry in stratocumulus clouds does not work with WRFChem3.7.1. #5

Closed lukeconibear closed 4 years ago

lukeconibear commented 4 years ago

What happened: Aqueous chemistry in stratocumulus clouds (cldchem_onoff) does not work with WRFChem3.7.1.

Aqueous chemistry does work for cumulus clouds (conv_tr_aqchem).

This issue does not happen for WRFChem4.0.3.

What you expected to happen: When using MOZART-MOSAIC with aqueous chemistry (chem_opt = 202), aqueous chemistry works with both cumulus clouds (conv_tr_aqchem = 1) and stratocumulus clouds (cldchem_onoff = 1).

Minimal Complete Verifiable Example: Running WRFChem3.7.1 with chem_opt = 202 and cldchem_onoff = 1, the rsl.error.0000 returns:

 chem_init: calling wetscav_mozcart_init for domain            1
   wetscav_mozcart_init: hetcnt =           42
   wetscav_mozcart_init: hno3_ndx =            1
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:     328
ERROR: cloud chemistry option requires chem_opt = 8 through 13 or 31 to 36 or 41 to 43 to function.
-------------------------------------------
Abort(1) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

Potential solutions/workarounds?

  1. Edit the relevant Fortran code (?) to include chem_opt = 202 in the above conditional.

  2. Fix the performance issue with WRFChem4 and move over to that.

lukeconibear commented 4 years ago

The solution is to include chem_opt = 202 in the config_flags%cldchem_onoff conditional within chemics_init.F. For example on line 308, replace:

           ( config_flags%chem_opt == 203).OR.                                    &

with:

           ( config_flags%chem_opt == 202 ) .OR. ( config_flags%chem_opt == 203) .OR. &

then recompile.