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

BHIST_BPRP co2vmr not recognized

Hi CESM2 and CAM users,

I am attempting to run a BHIST_BPRP simulation with a spinup from an in house B1850_BPRP. I want the simulation to evolve with a different initial value of co2 than from the default.
The B1850 simulation had a co2 value of 287.5101e6, which I implemented into the user_nl_cam:
co2vmr = 287.5101e-6

The build step shows that the value was implemented:
camconf/namelist:co2vmr = 287.5101e-6
popconf/pop_in: atm_alt_co2_const = 287.5101

However, when I execute the simulation, the CO2 value is overridden by some BHIST_BPRP default:
atm.log.36838643.220221-153618: chem_surfvals_set: ncdate= 18500101 co2vmr= 2.842621376246775E-004

The log later shows that this value is not fixed, which is expected from BPRP, but I am do not know how to override the initial conditions:
atm.log.36838643.220221-153618: chem_surfvals_set: ncdate= 18501229 co2vmr= 2.843831296633827E-004
atm.log.36838643.220221-153618: chem_surfvals_set: ncdate= 18501230 co2vmr= 2.843834971690117E-004
atm.log.36838643.220221-153618: chem_surfvals_set: ncdate= 18501231 co2vmr= 2.843838646746406E-004

How do we override the initial condition of CO2 in the BHIST_BPRP simulation (aka flag CO2C—prognostic CO2).

Cheers,
-Jonathan
 
Additional Information:

I calculated the atmospheric CO2 using NCL dpres_hybrid_ccm, wgt_vertical_n, dim_sum_wgt_n_Wrap, wgt_areaave_Wrap:
First I concatenated 12 months of CO2 values, ran the ncl script, then averaging over the 12 months with ncra.
CO2 = 283.8889

My input co2vmr = 287.5101e-6 is overridden by an initial conditions file. A 3 PPMV difference is too much CO2 to be accounted for by the emissions files in 1 month of simulation.
I believe that the co2vmr is overridden by the:
atm_in: scenario_ghg = 'CHEM_LBC_FILE'
atm_in: flbc_file = '/scratch/snx3000/jbuzan/inputdata/atm/waccm/lb/LBC_1750-2015_CMIP6_GlobAnnAvg_c180926.nc'

Is there a way to override this file? I thought the point of running the B1850_BPRP control is to feed the new initial CO2 into the BHIST_BPRP simulation.
 

klindsay

CSEG and Liaisons
Staff member
The CO2 constituents/tracers (CO2, CO2_LND, CO2_OCN, CO2_FFF) in BPRP experiments get their initial value from the CAM initial condition file, if this file has values for these tracers. This file, specified by CAM's namelist variable ncdata, would usually have these values in the usecase of initializing a BHIST_BPRP experiment from a B1850_BPRP experiment.

You can avoid this by specifying an initial condition file that doesn't have values for these tracers. In this scenario, the CO2 tracers are initialized to co2vmr (after converting from a volume mixing ratio to a mass mixing ratio).

For example, the command
ncks -v "CO2*" -x b.e21.B1850.f09_g17.CMIP6-esm-piControl.001.cam.i.0151-01-01-00000.nc b.e21.B1850.f09_g17.CMIP6-esm-piControl.001.cam.i.no_CO2.0151-01-01-00000.nc
creates a copy of the initial condition file from the default RUN_REFCASE and RUN_REFDATE settings that omits the CO2 tracers.
I ran this command in a test BHIST_BPRP experiment's RUNDIR after prestaging input file, and added
ncdata = 'b.e21.B1850.f09_g17.CMIP6-esm-piControl.001.cam.i.no_CO2.0151-01-01-00000.nc'
to user_nl_cam. When I ran this experiment, the atm.log file included lines like
CAM_PIO_CHECK_VAR INFO: variable CO2 is not on file
Field CO2 not found on initial dataset
CO2 initialized by "co2_init_cnst"
for each CO2 tracer, and the CO2 tracers were initialized to the initial co2vmr value (again with the unit change).

If you want to add a uniform offset to the initial CO2 tracer values, but keep their spatial structure, you can modify the values in the initial condition file, using tools like ncl or python. If you do this, I recommend doing so on a copy of the initial condition file, to keep the original intact, and point the model to that file by specifying ncdata in user_nl_cam. Also note that the CO2 tracers in the initial condition file are mass mixing ratios, not volume mixing ratios, and have units of "kg CO2/kg dry air".
 
Hi Keith,

I am still confused by this. The cam.i file that I have from the B1850_BPRP run has CO2 values that are ~287ppmv. I made sure to add the ncdata='my.cam.i.file.nc' to the user_nl_cam, but I still get a hard reset of CO2 to 284. I also tried removing the CO2 values from the cam.i file. and below, the simulation is still trying to use the 284.



I am using:
./xmlchange RUN_TYPE='hybrid'
So, it should be reading my initial conditions files from the B1850_BPRP case.

./xmlchange CCSM_CO2_PPMV=287.5101
I am trying to change the PPMV in multiple places.

In the Case directory:
> cat user_nl_cam
! Users should add all user specific namelist changes below in the form of
! namelist_var = new_namelist_value
co2vmr=287.5101e-6
ncdata = 'B1850_BPRP_aug16.cam.i.0211-01-01-00000.nc'

Is it possible that I am not implementing the co2vmr correctly in to the user_nl_cam?

In the Run directory:
atm_in
&chem_surfvals_nl
flbc_file = '/scratch/snx3000/jbuzan/inputdata/atm/waccm/lb/LBC_1750-2015_CMIP6_GlobAnnAvg_c180926.nc'
flbc_list = 'CO2','CH4','N2O','CFC11eq','CFC12'
flbc_type = 'SERIAL'
scenario_ghg = 'CHEM_LBC_FILE'
/

I am not seeing the co2vmr listed in the chem_surfvals_nl.


> fgrep -i co2 atm.log.36879397.220223-103458
CO2
rad namelist spec: A:CO2:CO2
A:CO2 has constituents name:CO2
ac_CO2_filelist_175001-201512_fv_0.9x1.25_c20181011.txt
emissions-cmip6_CO2_anthro_ac_175001-201512_fv_0.9x1.25_c20181011.nc
34 CO2_OCN CO2_OCN dry
35 CO2_FFF CO2_FFF dry
36 CO2_LND CO2_LND dry
37 CO2 CO2 dry
CO2
chem_surfvals_set: ncdate= 18500101 co2vmr= 2.842621376246775E-004
co2 volume mixing ratio = 2.842621376246775E-004
CAM_PIO_CHECK_VAR INFO: variable CO2_OCN is not on file
Field CO2_OCN not found on initial dataset
CO2_OCN initialized by "co2_init_cnst"
CAM_PIO_CHECK_VAR INFO: variable CO2_FFF is not on file
Field CO2_FFF not found on initial dataset
CO2_FFF initialized by "co2_init_cnst"
CAM_PIO_CHECK_VAR INFO: variable CO2_LND is not on file
Field CO2_LND not found on initial dataset
CO2_LND initialized by "co2_init_cnst"
CAM_PIO_CHECK_VAR INFO: variable CO2 is not on file
Field CO2 not found on initial dataset
CO2 initialized by "co2_init_cnst"
 
Hi Keith,

I believe I have another clue. The co2vmr is not being passed along because of the flbc_file.

I am running ./preview_namelists:
ERROR: Command /users/jbuzan/cesm2_1_3/components/cam/bld/build-namelist -ntasks 0 -csmdata /scratch/snx3000/jbuzan/inputdata -infile /scratch/snx3000/jbuzan/cases/CESMTWO/BHIST_BPRP__test36_60_12/Buildconf/camconf/namelist -ignore_ic_year -use_case hist_cam6 -inputdata /scratch/snx3000/jbuzan/cases/CESMTWO/BHIST_BPRP__test36_60_12/Buildconf/cam.input_data_list -namelist " &atmexp /" failed rc=255
out=CAM build-namelist - INFO: Chem flbc_file in use. co2vmr = 287.5101e-6 removed from namelist.
err=CAM build-namelist - ERROR: fv_decomp_set: bad input: ntasks=0.
-ntask argument to build-namelist is wrong. at /users/jbuzan/cesm2_1_3/components/cam/bld/build-namelist line 4141.
 
Hi Keith,

I seem to be chasing a red herring. Although the logs tell me that the co2 is at 284PPMV, the cam.i file that is generated from the BHIST_BPRP simulation after 1 year of simulation has a CO2 value that is comparable to the initialization file that was implemented. Difference between the B1850_BPRP and BHIST_BPRP (CO2 = 287.405882703958) after 1 year was CO2 = 0.251353354987259.
 
Top