Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CF Compliance error in SOCOL ccmi-2022 data (test batch) #10

Open
martinjuckes opened this issue Apr 8, 2021 · 5 comments
Open

CF Compliance error in SOCOL ccmi-2022 data (test batch) #10

martinjuckes opened this issue Apr 8, 2021 · 5 comments

Comments

@martinjuckes
Copy link
Contributor

The following command line can be used to run the cf-checker over a set of files:
for f in ls ../tmp//.nc ; do cfchecks $f > $(basename $f)__cf.txt 2>&1 ; done

Takes a few seconds for each small file, up to around 30 seconds for larger files.

Some A10dayPt and Amon files contain the same 3 errors:

ERROR: (4.3.3): Standard name of variable ps inconsistent with that of lev
ERROR: (4.3.3): formula_terms attribute only allowed on coordinate variables
ERROR: (4.3.3): Standard name of variable ps inconsistent with that of lev_bnds

bry_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
cf2cl2_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
cfcl3_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
ch2br2_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
ch2o_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
ch3br_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
ch3cl_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
ch3ooh_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
ch4_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
chbr3_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
clc_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
clono2_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
cly_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
co_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
h2o_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
hbr_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
hcl_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
hno3_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
meanage_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
n2o_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
noy_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
o3_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
sadice_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
sadnat_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
sadsulf_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
ta_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
tntrl_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
tntrs_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
ua_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
va_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
wap_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
zg_A10dayPt_SOCOL_refD1_gn_r1i1p1f1_20050101-20181221.nc__cf.txt:ERRORS detected: 3
ch4_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
cl_Amon_SOCOL_refD1_gn_r1i1p1f1_195912-201811.nc__cf.txt:ERRORS detected: 3
clc_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
co_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
h2o_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
hcl_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
meanage_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
n2o_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
no2_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
no_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
o3_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
o3strat_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
oh_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
ta_Amon_SOCOL_refD1_gn_r1i1p1f1_195912-201811.nc__cf.txt:ERRORS detected: 3
tntrl_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
tntrs_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
ua_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
va_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
wa_Amon_SOCOL_refD1_gn_r1i1p1f1_196001-201812.nc__cf.txt:ERRORS detected: 3
zg_Amon_SOCOL_refD1_gn_r1i1p1f1_195912-201811.nc__cf.txt:ERRORS detected:

@EugeneRozanov
Copy link

I do not understand this error because PS (Pa) should not be consistent with LEV (nondimensional) for the sigma or hybrid coordinate system.

@martinjuckes
Copy link
Contributor Author

HI @EugeneRozanov : ps and lev need to be consistent because of the reference to ps in the formula_terms attribute of the lev variable. lev is identified by standard_name=atmosphere_hybrid_sigma_pressure_coordinate, and for this vertical coordinate the ps variable referred to in the formula_terms must have standard_name=surface_air_pressure.

@martinjuckes
Copy link
Contributor Author

This appears to be caused by an error in the ps entry of https://github.com/cedadev/ccmi-2022/blob/main/Tables/CCMI2022_formula_terms.json ... and the error is repeated in ps. @ccmi1-test , @charliepascoe : I've created a pull request to correct the tables : #12 .. can you take a look?

@ccmi1-test
Copy link
Contributor

Hi Martin
I did look into the CF standards document (Appendix D) and, yes, I agree the standard is pretty clear that it should be 'surface_air_pressure'. I have created a pull request with the changes - that are really just a copy of modifications you put together in #12. But I have also added an attribute computed_standard_name to the sigma-like axes in CCMI2022_coordinate.json, as the CF standard seems to require this as well. Hopefully things are set right now.
@charliepascoe when you get a moment can you pull these?
Since all of CMIP6 seems to suffer from this same problem, can we ignore this violation for data sets that have already been uploaded to CEDA? As with the problems with tracking_id I do not believe this is the kind of error that will cause effects that can be seen by users.

@martinjuckes
Copy link
Contributor Author

See also PCMDI/cmip6-cmor-tables#338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants