ESCOMP / CAM

Community Atmosphere Model
75 stars 140 forks source link

D-Region ion chemistry in WACCMX not converging #465

Closed fvitt closed 2 years ago

fvitt commented 2 years ago

The chemistry solver is not able to converge at high altitudes in WACCMX when D-region ion mechanism is used. The model is very slow and produces copious "failed to converge" error messages, such as:

75: imp_sol: Time step 1.8750000000000E+00 failed to converge @ (lchnk,lev,col,nstep) = 645 26 12 226 75: imp_sol: Failed to converge @ (lchnk,lev,col,nstep,dt,time) = 645 26 12 226 1.8750000000000E+00 1.3687500000000E+02 75: CO3m 0.000E+00 75: CO4m 0.000E+00 75: NOp_CO2 0.000E+00

CO2 is explicitly solved while the ions are implicitly solved.

CO2 and some positive ions are quickly driven to zero in some regions which seems to cause the implicit solver to not converge on a solultion:

co2_exp_00 NOp_CO2_exp_00

When implicitly solving CO2, along with the ions, the "failed to converge" message do not appear and the model runs normally.

Following are corresponding solutions when implicitly solving for CO2:

co2_imp_00 NOp_CO2_imp_00

The WACCMX compsets we currently have with D-region ion chemistry are:

FXmadHIST : HIST_CAM60%WXIED_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV FXmadSD : HIST_CAM60%WXIED%SDYN_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV

These use the waccm_mad_mam4 chemistry mechanism. It seems that we should move CO2 to the implicit solver in this mechanism if want to support these WACCMX compsets.

@dan800 , Thoughts?

dan800 commented 2 years ago

I agree that CO2 should be moved to the implicit solver for these two compsets. Any cost saving from having CO2 solved explicitly would appear to be erased by the slow convergence. At this point how many species are left that are explicitly solved? Would it be better to move all species to implicit and not have this back and forth with the two sets of solvers?

fvitt commented 2 years ago

I don't know if we are saving much computation time by solving some species explicitly. There are roughly 20 remaining species explicitly solved: CCL4 CF2CLBR CF3BR CFC11 CFC113 CFC114 CFC115 CFC12 CH2BR2 CH3BR CH3CCL3 CH3CL CH4 CHBR3 H2402 HCFC141B HCFC142B HCFC22 N2O SF6

fvitt commented 2 years ago

The impact of moving the remaining species to the implicit solver seem to be about a 3% increase in overall model cost.

dkinnison commented 2 years ago

I would just move the above species to the implicit solution. The explicit vs implicit was more a historical structure when computer time was a major issue.

fvitt commented 2 years ago

The immediate and easiest solution for this particular issue is to simply move CO2 to the implicit solver for the waccm_mad_mam4 mechanism which I can do by hand.

Separate from this, we may want to do away with explicitly solving for all chemical species which should require new mechanism files for all all the supported chemical mechanisms in CESM generated by Chemistry Cafe and we should remove the explicit solver from the code. This should be treated as a separate issue, in my opinion.

dan800 commented 2 years ago

I agree that they are two separate issues - we can move manually CO2 in these two mechanism and close this issue.