Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Emissions-Based Forcing of WACCM

I am trying to run WACCM with emissions-based forcing of N2O, starting from compset F_2000_WACCM. I've modified user_nl_cam as follows:

&chem_surfvals_nl
flbc_list = 'CCL4', 'CF2CLBR', 'CF3BR', 'CFC11',
'CFC113', 'CFC12', 'CH3BR', 'CH3CCL3', 'CH3CL', 'CH4', 'CO2', 'H2',
'HCFC22'
&chem_inparm
srf_emis_specifier = 'N2O -> /glade/p/work/nevison/waccmnew/n2o_emis_1.9x2.5_1850-2000.nc'
/

in which my input file is formatted based on /glade/p/cesmdata/cseg/inputdata/atm/cam/chem/1850-2000_emis/IPCC_emissions_houw_CO_1850-2000_1.9x2.5.c090728.nc

My question: Are there additional changes I need to make to get this to work? WACCM is crashing after 20632 seconds with many repeated error statements like those pasted below in cesm.log.

(Note:, I chose my flbc_list species based on those that appeared in my atm_in file (omitting N2O) after successfully running an out-of-the-box case of WACCM with compset F_2000_WACCM.)


Failed to converge @ is_chem,flag,lchnk,i,k,f = T 1
60: 544 3 32 NaN
60: wts0,pures,puren,chno3,ch2so4 = NaN
60: NaN NaN NaN
60: NaN
60: stren,mixyln,ymix,hplus,num,den = 0.000000000000000E+000
60: 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000
60: 0.000000000000000E+000 NaN
60: h2o_avail,hno3_avail,p,t = 6.289301552730107E-006
60: 2.030285000603403E-010 3.40487500000000 NaN
60: molhno3,molh2so4,h2o_cond,hno3_cond = 0.000000000000000E+000
60: 0.000000000000000E+000 0.000000000000000E+000 NaN
60: equil: Iterations are beyond 50, number of iter = 101

Thanks,

Cindy
 

santos

Member
Hmm. I'm not completely sure what's going on, but the issue may be the way you are specifying srf_emis_specifier. A value in user_nl_cam doesn't add to the default value, it replaces it. So if you want to take an existing case and add N2O emissions, I think that what you should do is setup a case (up until the cesm_setup stage), then look for srf_emis_specifier in CaseDocs/atm_in. It will be multiple lines, with entries for CO and NO and other things. Then you copy that entire value with multiple strings to user_nl_cam, and add your N2O file to the end of that comma-separated list of strings.This is all assuming that you are using CESM 1.1/1.2. If you are using CESM 1.0, the same general rule applies, only you may have to run the build script before you can look at the namelist, and you have to edit one of the scripts in the Buildconf directory rather than user_nl_cam.
 
Thanks.  I tried expanding the srf_emis_specifier list to include CH2O, CO and NO (those were the only species in atm_in) as well as N2O, but got the same result I described earlier. I'm wondering if I need to define additional variables in the chem_surfvals_nl group.  An example of emissions-based forcing I was given includes this line in user_nl_cam:co2vmr = 1.e-12Why would CO2 ever be set to 1 ppt?   Also, I see no mention of n2ovmr in the default CaseDocs/atm_in.  Do I need to set n2ovmr to a special value to run with emissions-based forcing of N2O? Thanks, Cindy
 

santos

Member
As I understand it, co2vmr = 1.e-12 is just a way of specifying some negligible amount. But I don't know about what's going on for n2o in general, so I'll try to get someone else to answer. It might help if you post your entire atm_in file. Also, which model version are you using?
 

mmills

CSEG and Liaisons
Staff member
co2vmr is used to specify CO2 in runs in which CO2 is not calculated in the chemistry mechanism (such as in CAM without chemistry). In WACCM, CO2 is calculated based on the LBC and chemistry, so we set this namelist value to a very small value just to make sure that it is being ignored in all calculations. There is a corresponding namelist variable for n2ovmr, which should also be ignored when N2O is calculated in chemistry.The errors you are seeing may be due to the chemistry having difficulty adjusting to the new boundary conditions. N2O is defined in the chemistry preprocessor input file to be solved explicitly by the chemistry solver. This is how long-lived species with mixing ratio LBCs are specified. You may need to change N2O to be solved implicitly now that you are specifying emissions. This would require specifying a user-defined chemistry mechanism, or "user_mech_in" file, in the CAM_CONFIG_OPTS in your env_build.xml. You can copy the chem_mech.in file in models/atm/cam/src/chemistry/pp_waccm_mozart and make your modifications to that.Before trying that, you might try just increasing nsplit in your namelist to reduce the dynamical timestep as the model adjusts to your emissions. 
 
Mike, Thanks for these suggestions.  I've tried both setting NSPLIT = 16 (default was 8) in user_nl_cam and including -usr_mech_infile =user_mech.in in CAM_CONFIG_OPTS, in which I changed N2O from explict to implicit.  Neither of these changes has any discernible effect.  Regardless of whether I run with N2O implicit or explicit, the model exits quickly with errors that start out with lines like:filew failed, worst i, j, qtmp, q =            1          51then come a series of:QNEG3 from TPHYSBCb:m= 64 lat/lchnk=    277 Min. mixing ratio violated at    1 points.  Reset to  1.0E+00 Worst = 1.0E+00 at i,k=   1 66followed by a very large number of lines such as:imp_sol: Time step   1.1250000000000E+01 failed to converge @ (lchnk,lev,col,nstep) =    442    54    12     1The imp_sol error lines are interspersed between a wide variety of listed species pairs, but probably occur most commonly between N2D and O3.  I never see N2O itself listed as one of the species among these imp_sol error lines.  Why would a simple change such as specifying an N2O emissions input file have such far-reaching effects, and is there anything else I can try to make this work?  My latest case directory is at /glade/p/work/nevison/cesm1_2_0/scripts/bcn2owaccmimp2. Thanks, Cindy
 

santos

Member
Unfortunately, the filew and QNEG3 warnings are usually not helpful. They are constantly produced by the model even if nothing is wrong at all, and usually represent small truncation errors, or false positives for constituents that have unusual "concentrations" (such as age of air tracers). I took a look and I see that this is indeed the case; the implicit solver ("imp_sol") is the true issue here.Neither O3 nor N2D are special here. O3 just happens to be first on the list, and N2D is last. The lines appear jumbled in cesm.log because multiple tasks are writing to the same file, and their output is out of order. The atm.log is much easier to understand. This is the complete first error message from there: imp_sol: Time step   1.8000000000000E+03 failed to converge @ (lchnk,lev,col,nstep) =    184    53    11     1
 imp_sol: Time step   9.0000000000000E+02 failed to converge @ (lchnk,lev,col,nstep) =    184    53    11     1
 imp_sol: Time step   4.5000000000000E+02 failed to converge @ (lchnk,lev,col,nstep) =    184    53    11     1
 imp_sol: Time step   2.2500000000000E+02 failed to converge @ (lchnk,lev,col,nstep) =    184    53    11     1
 imp_sol: Time step   1.1250000000000E+02 failed to converge @ (lchnk,lev,col,nstep) =    184    53    11     1
 imp_sol: Time step   1.1250000000000E+01 failed to converge @ (lchnk,lev,col,nstep) =    184    53    11     1
 imp_sol: Failed to converge @ (lchnk,lev,col,nstep,dt,time) =    184    53    11     1  1.1250000000000E+01  1.1250000000000E+01
 O3        0.000E+00
 O         1.000E+00
 O2        1.000E+00
 O2_1D     1.074E-01
 N         7.551E-01
 NO        5.582E+00
 NO2       9.118E-01
 OH        1.085E+00
 NO3       4.600E-01
 HNO3      1.317E-01
 HO2NO2    1.000E+00
 CH3O2     1.791E-01
 CH3OOH    1.000E+00
 CH2O      9.216E-01
 HO2       1.000E+00
 H2O2      1.000E+00
 H2O       1.000E+00
 CL        1.105E+00
 CL2       1.000E+00
 CLO       2.784E-01
 OCLO      4.217E-02
 CL2O2     9.732E-01
 HCL       1.144E+00
 HOCL      3.203E-01
 CLONO2    9.207E-01
 BR        1.085E+00
 BRO       0.000E+00
 HBR       1.441E-01
 HOBR      1.000E+00
 BRONO2    1.000E+00
 N2p       0.000E+00
 Np        0.000E+00
 N2D       0.000E+00 
You can see that NO2 is indeed one of the listed constituents. In fact most of these don't look good, having been pushed to 0 or 1 (or above 1). I forget what the units are on these concentrations; if these are mass mixing ratio, this is obviously absurd.
 

santos

Member
Hmm, this is messy. Try setting "n2ovmr = 0._r8" in your namelist. This shouldn't matter, but I suspect that it actually does for CESM 1.2. Francis Vitt put in a fix for this after the release.
 
Top