## Greenhouse gas concentration forcing for ACCESS-ESM1.6 piControl:
### Forcin…g dataset definition:
See https://input4mips-cvs.readthedocs.io/en/latest/dataset-overviews/greenhouse-gas-concentrations/
### Input files:
```
${INPUT4MIPS_DIR}/CMIP7/CMIP/CR/CR-CMIP-1-0-0/atmos/yr/${species}/gm/v20250228/${species}_input4MIPs_GHGConcentrations_CMIP_CR-CMIP-1-0-0_gm_1750-2022.nc
```
where `${species}` is one of the 9 species: `co2`, `n2o`, `ch4`, `cfc11`, `cfc12`, `cfc113`, `hcfc22`, `hfc125`, `hfc134a`. The order of species, here and below, matches the order in the `RUN_Radiation` namelist as documented below.
The [forcing dataset definition](https://input4mips-cvs.readthedocs.io/en/latest/dataset-overviews/greenhouse-gas-concentrations/) also describes "equivalence species", but neither of the two options stated there apply to the set of 9 species used by ACCESS-ESM1.6.
### Time variable definition
```
double time(time) ;
time:axis = "T" ;
time:bounds = "time_bnds" ;
time:units = "days since 1850-01-01" ;
time:standard_name = "time" ;
time:calendar = "proleptic_gregorian" ;
time:amip = "time" ;
```
### Forcing variable definitions:
(Per species, one species per file)
```
float co2(time) ;
co2:standard_name = "mole_fraction_of_carbon_dioxide_in_air" ;
co2:long_name = "co2" ;
co2:units = "ppm" ;
co2:cell_methods = "area: time: mean" ;
float n2o(time) ;
n2o:standard_name = "mole_fraction_of_nitrous_oxide_in_air" ;
n2o:long_name = "n2o" ;
n2o:units = "ppb" ;
n2o:cell_methods = "area: time: mean" ;
float ch4(time) ;
ch4:standard_name = "mole_fraction_of_methane_in_air" ;
ch4:long_name = "ch4" ;
ch4:units = "ppb" ;
ch4:cell_methods = "area: time: mean" ;
float cfc11(time) ;
cfc11:standard_name = "mole_fraction_of_cfc11_in_air" ;
cfc11:long_name = "cfc11" ;
cfc11:units = "ppt" ;
cfc11:cell_methods = "area: time: mean" ;
float cfc12(time) ;
cfc12:standard_name = "mole_fraction_of_cfc12_in_air" ;
cfc12:long_name = "cfc12" ;
cfc12:units = "ppt" ;
cfc12:cell_methods = "area: time: mean" ;
float cfc113(time) ;
cfc113:standard_name = "mole_fraction_of_cfc113_in_air" ;
cfc113:long_name = "cfc113" ;
cfc113:units = "ppt" ;
cfc113:cell_methods = "area: time: mean" ;
float hcfc22(time) ;
hcfc22:standard_name = "mole_fraction_of_hcfc22_in_air" ;
hcfc22:long_name = "hcfc22" ;
hcfc22:units = "ppt" ;
hcfc22:cell_methods = "area: time: mean" ;
float hfc125(time) ;
hfc125:standard_name = "mole_fraction_of_hfc125_in_air" ;
hfc125:long_name = "hfc125" ;
hfc125:units = "ppt" ;
hfc125:cell_methods = "area: time: mean" ;
float hfc134a(time) ;
hfc134a:standard_name = "mole_fraction_of_hfc134a_in_air" ;
hfc134a:long_name = "hfc134a" ;
hfc134a:units = "ppt" ;
hfc134a:cell_methods = "area: time: mean" ;
```
where for **piControl**, `time==182.5`. That is, `time` represents mid-year 1850.
### Ancillary file relative to ESM1.6 config directory:
```
atmosphere/namelists
```
### Ancillary fields:
In the `RUN_Radiation` namelist in `atmosphere/namelists`, the following fields are to be set:
```
CO2_MMR= 4.318924e-04,
N2OMMR= 4.125577e-07,
CH4MMR= 4.422761e-07,
C11MMR= 0.000000e+00,
C12MMR= 0.000000e+00,
C113MMR= 0.000000e+00,
HCFC22MMR= 0.000000e+00,
HFC125MMR= 0.000000e+00,
HFC134AMMR= 0.000000e+00,
```
where the correspondence between species and field is as follows:
| Species | Field |
| -------- | ----- |
| `co2` | `CO2_MMR` |
| `n2o` | `N2OMMR` |
| `ch4` | `CH4MMR` |
| `cfc11` | `C11MMR` |
| `cfc12` | `C12MMR` |
| `cfc113` | `C113MMR` |
| `hcfc22` | `HCFC22MMR` |
| `hfc125` | `HFC125MMR` |
| `hfc134a` | `HFC134AMMR` |
### Processing:
Each species must undergo a unit conversion from a mole fraction to a mass mixing ratio. The mass mixing ratio is the ratio of the molar mass of each species to the standard molar mass of dry air. In other words, the unit conversion of a species from the mole fraction is:
```
species_mmr = mole_fraction[species] * molar_mass[species] / DRY_AIR_MOLAR_MASS
```
The current accepted molar mass of dry air is 28.966 g/mol. [1] [The value used by the UK Met Office for CMIP6 was 28.97](https://code.metoffice.gov.uk/trac/ancil/wiki/CMIP6/ForcingData/GreenhouseGases), so the molar mass that should be used is 28.97. The other molar masses to use are:
```
MOLAR_MASS_LOOKUP = {
"co2": 44.01,
"n2o": 44.01,
"ch4": 16.04,
"cfc11": 137.37,
"cfc12": 120.91,
"cfc113": 187.37,
"hcfc22": 86.47,
"hfc125": 120.02,
"hfc134a": 102.03}
```
where the values for `co2`, `n2o`, `ch4`, `cfc12` and `hfc134a` correspond to [molecular weight values used by the UK Met Office for CMIP6](https://code.metoffice.gov.uk/trac/ancil/wiki/CMIP6/ForcingData/GreenhouseGases) and the other values can be obtained via (e.g.) Wikipedia:
[cfc11](https://en.wikipedia.org/wiki/Trichlorofluoromethane), [cfc113](https://en.wikipedia.org/wiki/1,1,2-Trichloro-1,2,2-trifluoroethane), [hcfc22](https://en.wikipedia.org/wiki/Chlorodifluoromethane), [hfc125](https://en.wikipedia.org/wiki/Pentafluoroethane).
[1] Donald P. Gatley, Sebastian Herrmann & Hans-Joachim Kretzschmar (2008)
"A Twenty-First Century Molar Mass for Dry Air", HVAC&R Research, 14:5, 655-662,
[DOI:10.1080/10789669.2008.10391032](https://doi.org/10.1080/10789669.2008.10391032)
#### Processing examples:
The following function uses [the NetCDF4 Python package](https://unidata.github.io/netcdf4-python/) to read in the relevant CMIP7 dataset and calculate the mass mixing ratio for a species.
```
def year1850_mmr(ghg_path, molar_mass, species):
"""
Use the CMIP7 dataset for the given species
to calculate the mass mixing ratio.
"""
def scale(ghg_set, species):
"""
Determine the scaling factor used for the given species
"""
SCALE_LOOKUP = {
"ppm": 1.0e-6,
"ppb": 1.0e-9,
"ppt": 1.0e-12}
return SCALE_LOOKUP[ghg_set.variables[species].units]
# Read in the CMIP7 dataset
ghg_set = Dataset(ghg_path(species), mode="r")
# Initialize the times array
times = np.array(ghg_set["time"][:])
# Find the index of the times array corresponding to the year 1850
YEAR1850 = 182.5
YEAR1850_INDEX = times.searchsorted(YEAR1850)
assert times[YEAR1850_INDEX] == YEAR1850
# Read in the concentration for the year 1850
ghg_conc = np.array(ghg_set[species][:])
year1850_ghg_conc = ghg_conc[YEAR1850_INDEX]
# Determine the mass mixing ratio
DRY_AIR_MOLAR_MASS = 28.97
species_scale = scale(ghg_set, species)
return year1850_ghg_conc * species_scale * molar_mass[species] / DRY_AIR_MOLAR_MASS
```
##### ACCESS-ESM1.6 CMIP6 piControl greenhouse gas concentration ancillaries
See [wiki/ACCESS_ESM1.5_CMIP6_piControl#3-well-mixed-ghgs](https://github.com/ACCESS-NRI/CMIP7-Input/wiki/ACCESS_ESM1.5_CMIP6_piControl#3-well-mixed-ghgs).
See also https://github.com/ACCESS-Community-Hub/CMIP6-Input-Scripts/blob/main/scripts/txz599/ACCESS-ESM_tools/ghg_conc/ghg.py for a simple script that was used for CMIP6.
##### UKESM CMIP7 greenhouse gas concentration ancillaries
See [MOSRS ancil #2416](https://code.metoffice.gov.uk/trac/ancil/ticket/2416)
##### UKESM CMIP6 greenhouse gas concentration ancillaries
See [MOSRS ancil wiki/CMIP6/ForcingData/GreenhouseGases](https://code.metoffice.gov.uk/trac/ancil/wiki/CMIP6/ForcingData/GreenhouseGases),
[ANCIL #923 closed defect (fixed): Incorporate GHGs into CMIP6 forcing suite](https://code.metoffice.gov.uk/trac/ancil/ticket/923) and
[wiki/UKCMIP6_Inputs](https://github.com/ACCESS-NRI/CMIP7-Input/wiki/UKCMIP6_Inputs).
### Where used:
In https://github.com/ACCESS-NRI/UM7/blob/dev-access-esm1.6/umbase_hg3/src/include/common/cruntimc.h
```
NAMELIST/RUN_Radiation/L_climat_aerosol, L_clim_aero_hgt, &
& L_HadGEM1_Clim_Aero, FW_STD, &
& A_SW_SEGMENTS,A_SW_SEG_SIZE,A_LW_SEGMENTS,A_LW_SEG_SIZE,CO2_MMR,&
...
& N2OMMR, CH4MMR, C11MMR, C12MMR, &
& O2MMR, C113MMR, HCFC22MMR, HFC125MMR, HFC134AMMR, IS_NCOL
```
In https://github.com/ACCESS-NRI/UM7/blob/dev-access-esm1.6/umbase_hg3/src/control/top_level/readlsta.F90
```
READ (5,RUN_Radiation) ! Radiation physics
```