ESCOMP / ESCOMP/CAM

FLBC overwrite of CO2 field

Open
#1,645 4 comments 0 reactions 1 assignee Claimed by @fvitt View on GitHub
bug
Dominant language
No language data
Stars
91
Forks
183
Avg merge
6d 2m
Merged PRs (30d)
9

Description

### What happened?

The CO2 from the FLBC file overwrites the prognostic CO2 when GHG chemistry is combined with emissions-driven CO2.

When running the default CAM7 chemistry mechanism (pp_ghg_mam4) with emissions-driven CO2 (co2_cycle, co2_flag=.true.), the fixed lower boundary condition silently overwrites prognostic CO2 in the lowest model layer.

In this configuration CO2 is both a chemistry solution species (`map2chm("CO2 index") > 0`) and an advected co2_cycle tracer receiving coupler surface fluxes via `cam_in%cflx`, applied in the bottom layer by clubb_emissions_cam (in CAM7, older versions used vertical_diffusion). Every timestep, `chem_timestep_tend` calls `gas_phase_chemdr` which calls `flbc_set(vmr, ncol, lchnk, map2chm)`, which resets `vmr(:,pver,"CO2 index")` to the interpolated flbc_file value whenever CO2 is in flbc_list.

I believe this overwritten value is also passed back to the surface via `cam_out%co2prog`.

I believe this bug was first noticed / reported by @klindsay28.

I tried to verify that this bug is still in ESCOMP/CAM via code inspection.

### What are the steps to reproduce the bug?

Run `ghg_mam4` chemistry with `-co2_cycle` in `CAM_CONFIG_OPTS`.

### What CAM tag were you using?

cam6_4_189

### What machine were you running CAM on?

Other (please explain below)

### What compiler were you using?

Other (please specify below)

### Path to a case directory, if applicable

_No response_

### Will you be addressing this bug yourself?

No

### Extra info

I have a fix for NorESM (which is in different files). I can propose this fix as a draft PR if you are interested. The main idea is to use a new array that is identical to `map2chm` except for CO2 when `co2_transport` is on.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.