Physical range rules#

Every CMIP7 file ACCESS-MOPPy writes is checked against a physical range for its variable: a broad sanity envelope meant to catch a unit, sign or conversion mistake before the file reaches the ESGF, while still allowing plausible model extremes. This page is the rendered form of those rules — the same data the check itself reads.

See also

CMIP7 QC Validation runs the checks; Rendering the rules below shows how to get this table on the command line or as JSON.

Where the rules live#

src/access_moppy/resources/qc/cmip7_ranges.yml

Each variable carries a units string, a default block with min and max, and an optional experiments map holding per-experiment overrides:

variables:
  tas:
    units: K
    default:
      min: 180.0
      max: 330.0
    experiments:
      piControl:
        max: 325.0

How a rule is resolved#

For a file with global attributes variable_id and experiment_id:

  1. The default block for variable_id is taken as the starting point.

  2. If experiments holds an exact match for experiment_id, that block is merged over the default. Keys not restated in the override — min in the tas/piControl example above — keep their default value.

  3. Otherwise the experiment keys are treated as fnmatch patterns, so ssp* covers every SSP experiment. The longest matching pattern wins.

  4. The rule’s units must match the file’s units attribute. A mismatch is a failure, not a warning, because it means the range being applied is not the range the data is in.

  5. The observed minimum and maximum of the variable — computed once, with missing-value sentinels masked — are compared against the resolved bounds.

A range violation is reported as a warning: the file still passes QC, and the observed and allowed ranges are recorded in the batch report so a human can judge it. Only structural problems fail a file outright — all values missing, values containing infinity, or a units mismatch.

Variables with no rule are not range-checked. Variables present in the ACCESS-ESM1-6 mapping still receive the generic checks (non-missing, finite, declared units).

Rendering the rules#

moppy-qc --show-ranges prints the rules without touching any data, so you can see the bounds a file will be held to before you run anything:

# Every variable, as a table
moppy-qc --show-ranges

# Two variables, resolved for one experiment
moppy-qc --show-ranges --variable tas --variable pr --experiment piControl
variable  units       min  max  rule
--------  ----------  ---  ---  ---------
tas       K           180  325  piControl
pr        kg m-2 s-1  0    0.1  default

2 variable(s) from access_moppy/resources/qc/cmip7_ranges.yml
resolved for experiment_id=piControl

The rule column names the block the bounds came from: default, or the experiment key that overrode it.

Add --format json for the machine-readable form — the JSON that carries the ranges, ready to pipe into jq or attach to a data-quality record:

moppy-qc --show-ranges --variable tas --experiment piControl --format json
{
  "experiment_id": "piControl",
  "source": "access_moppy/resources/qc/cmip7_ranges.yml",
  "variable_count": 1,
  "variables": {
    "tas": {
      "units": "K",
      "default": {"min": 180.0, "max": 330.0},
      "experiments": {"piControl": {"max": 325.0}},
      "resolved": {
        "units": "K",
        "min": 180.0,
        "max": 325.0,
        "rule": "piControl"
      }
    }
  }
}

The resolved block is only present when --experiment is given.

The same payload is available from Python:

from access_moppy.qc import export_range_rules, format_range_rules_table

rules = export_range_rules(variables=["tas"], experiment_id="piControl")
print(rules["variables"]["tas"]["resolved"])
print(format_range_rules_table(rules))

Rules in force#

The table below is generated from cmip7_ranges.yml when the documentation is built, so it always shows the bounds this version of ACCESS-MOPPy applies. Type in the box to filter by variable name, unit or experiment.

VariableUnitsDefault min Default maxExperiment overrides
agesscyr01000000
aragmol m-3010
areacellam20100000000000
areacellom20100000000000
baresoilFrac%0100
basin1010
bigthetaodegC-340
bigthetaogadegC-340
c3PftFrac%0100
c4PftFrac%0100
cLandkg m-201000
cLeafkg m-201000
cLitterkg m-201000
cProductkg m-201000
cRootkg m-201000
cSoilkg m-201000
cSoilFastkg m-201000
cSoilMediumkg m-201000
cSoilSlowkg m-201000
cVegkg m-201000
calcosmol m-3010
chlkg m-300.01
chloskg m-300.01
ci101
cl%0100
clikg kg-100.02
clivikg m-201000
clt%0100
clwkg kg-100.02
clwvikg m-201000
co2mol mol-100.02
co23Dkg kg-100.02
cropFrac%0100
cropFracC3%0100
depthom012000
detocmol m-300.1
dfemol m-301e-06
dfeosmol m-301e-06
dissicmol m-300.005
dissicosmol m-300.005
epc100mol m-2 s-1-0.0010.001
evskg m-2 s-1-0.050.05
evspsblkg m-2 s-1-0.050.05
evspsblsoikg m-2 s-1-0.050.05
evspsblvegkg m-2 s-1-0.050.05
expcmol m-2 s-1-0.0010.001
expcalcmol m-2 s-1-0.0010.001
fBNFkg m-2 s-1-0.00010.0001
fDeforestToProductkg m-2 s-1-0.00010.0001
fNdepkg m-2 s-1-0.00010.0001
fNgaskg m-2 s-1-0.00010.0001
fNleachkg m-2 s-1-0.00010.0001
fNlosskg m-2 s-1-0.00010.0001
fNnetminkg m-2 s-1-0.00010.0001
fNupkg m-2 s-1-0.00010.0001
fProductDecompkg m-2 s-1-0.00010.0001
fgco2kg m-2 s-1-1e-061e-06
ficeberg2dkg m-2 s-100.1
friverkg m-2 s-100.1
fsfemol m-2 s-1-0.0010.001
fsithermkg m-2 s-100.1
fsnmol m-2 s-1-0.0010.001
gppkg m-2 s-1-0.00010.0001
grassFrac%0100
grassFracC3%0100
grassFracC4%0100
grazmol m-3 s-1-1e-061e-06
hfdsW m-2-50005000
hfevapdsW m-2-50005000
hfgeouW m-2010
hfibthermds2dW m-2-50005000
hflsW m-2-50005000
hflsoW m-2-50005000
hfraindsW m-2-50005000
hfrunoffds2dW m-2-50005000
hfsifrazilW m-2-50005000
hfsifrazil2dW m-2-50005000
hfsnthermds2dW m-2-50005000
hfssW m-2-50005000
hfssoW m-2-50005000
hur%0100
hurs%0100
hursmax%0100
hursmin%0100
hus100.08
huss100.08
intdickg m-20100000
intpockg m-201000
intppmol m-2 s-1-0.0010.001
intppnitratemol m-2 s-1-0.0010.001
intuawkg m-1 s-1-20000002000000
intvawkg m-1 s-1-20000002000000
lai1020
landCoverFrac%0100
masscellokg m-2012000000
mckg m-2 s-1-0.10.1
mlotstm07000
mlotstsqm2050000000
mrfslikg m-2010000
mrfsokg m-2010000
mrrokg m-2 s-100.1
mrrobkg m-2 s-100.1
mrroskg m-2 s-100.1
mrsflkg m-2010000
mrsllkg m-2010000
mrsokg m-2010000
mrsofckg m-2010000
mrsolkg m-2010000
mrsoskg m-2010000
msftbarotkg s-1-50000000000005000000000000
msftmrhokg s-1-50000000000005000000000000
msftmzkg s-1-50000000000005000000000000
msftyrhokg s-1-50000000000005000000000000
msftyzkg s-1-50000000000005000000000000
nLandkg m-20100
nLitterkg m-20100
nMineralkg m-20100
nProductkg m-20100
nSoilkg m-20100
nVegkg m-20100
nbpkg m-2 s-1-0.00010.0001
nepkg m-2 s-1-0.00010.0001
no3mol m-300.1
no3osmol m-300.1
nppkg m-2 s-1-0.00010.0001
o2mol m-300.7
obvfsqs-2-1e-060.001
ocontempdiffW m-2-50005000
ocontempmintdegC kg m-2-100000500000
ocontemppsmadvectW m-2-50005000
ocontemptendW m-2-50005000
od440aer1010
od550aer1010
od550dust1010
opottempmintdegC kg m-2-100000500000
orogm-5009000
osaltdiffkg m-2 s-1-0.10.1
osaltpsmadvectkg m-2 s-1-0.10.1
osalttendkg m-2 s-1-0.10.1
pboPa0150000000
pfullPa0120000
ph1610
phalfPa0120000
phos1610
phycmol m-300.1
phycosmol m-300.1
po4mol m-300.01
prkg m-2 s-100.1
prckg m-2 s-100.1
prrakg m-2 s-100.1
prrckg m-2 s-100.1
prsnkg m-2 s-100.1
prsnckg m-2 s-100.1
prwkg m-20150
psPa30000120000
pslPa80000110000
psoPa0150000000
rakg m-2 s-1-0.00010.0001
residualFrac%0100
rhkg m-2 s-1-0.00010.0001
rldsW m-2-1001500
rldscsW m-2-1001500
rlntdsW m-2-1001500
rlsW m-2-1001500
rlusW m-2-1001500
rluscsW m-2-1001500
rlutW m-2-1001500
rlutcsW m-2-1001500
rootdm020
rsdoW m-2-1001500
rsdoabsorbW m-2-1001500
rsdsW m-2-1001500
rsdscsW m-2-1001500
rsdtW m-201500
rsntdsW m-2-1001500
rssW m-2-1001500
rsusW m-2-1001500
rsuscsW m-2-1001500
rsutW m-2-1001500
rsutcsW m-2-1001500
rtmtW m-2-50005000
sblkg m-2 s-1-0.050.05
sci101
sfcWindm s-10150
sfcWindmaxm s-10150
sfriverkg m-2 s-100.1
sftgif%0100
sftlf%0100
sftof%0100
shrubFrac%0100
siages0320000000
siareaacrosslinem2 s-1-1000000010000000
siarean1e6 km2030
siareas1e6 km2030
siconc%0100
siconca%0100
sidconcdyns-1-1e-051e-05
sidconcths-1-1e-051e-05
sidivvels-1-1e-051e-05
sidmassdynkg m-2 s-1-0.10.1
sidmassevapsublkg m-2 s-1-0.10.1
sidmassgrowthbotkg m-2 s-1-0.10.1
sidmassgrowthsikg m-2 s-1-0.10.1
sidmassgrowthwatkg m-2 s-1-0.10.1
sidmassmeltbotkg m-2 s-1-0.10.1
sidmassmeltlatkg m-2 s-1-0.10.1
sidmassmelttopkg m-2 s-1-0.10.1
sidmassthkg m-2 s-1-0.10.1
sidmasstranxkg s-1-50000000000005000000000000
sidmasstranykg s-1-50000000000005000000000000
siextentn1e6 km2030
siextents1e6 km2030
sifbm-2020
siflfwbotkg m-2 s-100.1
siflswdtopW m-2-50005000
siflswutopW m-2-50005000
simasskg m-2050000
simassacrosslinekg s-1-50000000000005000000000000
sisnconc%0100
sisndmassmeltkg m-2 s-1-0.10.1
sisndmasssikg m-2 s-1-0.10.1
sisndmasssnfkg m-2 s-1-0.10.1
sisnhcJ m-201000000000
sisnmassnkg01e+16
sisnmassskg01e+16
sisnthickm020
sispeedm s-10150
sistrxdtopN m-2-1010
sistrxubotN m-2-1010
sistrydtopN m-2-1010
sistryubotN m-2-1010
sitempbotK220280
sitemptopK220280
sithickm020
sitimefrac101
sium s-1-150150
sivm s-1-150150
sivolm050
sivoln1e3 km30100
sivols1e3 km30100
slthickm0100
snc%0100
snwkg m-2050000
so0.001050
sob0.001050
soga0.001050
somintg m-20500000
sos0.001060
sosga0.001060
spco2Pa0300
taK150350
talkmol m-300.005
tasK180330piControl: max 325
tasmaxK180350
tasminK150340
tauuPa-1010
tauuoN m-2-1010
tauvPa-1010
tauvoN m-2-1010
thetaodegC-340
thetaogadegC-340
thkcellom010000
tobdegC-340
tosdegC-345
tosgadegC-345
tossqdegC202500
trankg m-2 s-1-0.050.05
treeFrac%0100
treeFracBdlDcd%0100
treeFracBdlEvg%0100
treeFracNdlDcd%0100
treeFracNdlEvg%0100
tsK150370
tslK150350
uam s-1-150150
uasm s-1-150150
umokg s-1-50000000000005000000000000
uom s-1-150150
vam s-1-150150
vasm s-1-150150
vegFrac%0100
vegHeightm0100
vmokg s-1-50000000000005000000000000
vom s-1-150150
volcellom301e+16
wapPa s-1-2020
wetlandFrac%0100
wfokg m-2 s-100.1
wmokg s-1-50000000000005000000000000
wom s-1-0.010.01
zfullm080000
zgm-50080000
zg500m40007000
zoocmol m-300.1
zoocosmol m-300.1
zosm-2020
zossqm20400
zostogam-2020
ztpm030000

Note

299 variables carry a physical-range rule.

Changing a rule#

Bounds are deliberately broad. If a variable trips its range for a physical reason — a warmer scenario, a different experiment — add or widen an experiment override rather than loosening the default, and open a pull request so every ACCESS-MOPPy user gets the corrected rule. See Extending rules for the editing workflow.