diff --git a/checksit/check.py b/checksit/check.py index 2d0eaf6f..d4da8e1d 100644 --- a/checksit/check.py +++ b/checksit/check.py @@ -17,6 +17,8 @@ from .make_specs import make_amof_specs AMOF_CONVENTIONS = ['"CF-1.6, NCAS-AMF-2.0.0"'] +GENERAL_CONVENTION_PREFIXES = ["NCAS-AMF", "NCAS-AMOF", "NCAS-GENERAL"] +RADAR_CONVENTION_PREFIXES = ["NCAS-RADAR"] IMAGE_EXTENSIONS = ["png", "jpg", "jpeg"] conf = get_config() @@ -271,8 +273,8 @@ def _get_ncas_specs( ) # NCAS-GENERAL file if any( - name in conventions - for name in ["NCAS-GENERAL", "NCAS-AMF", "NCAS-AMOF"] + name in conventions.upper() + for name in GENERAL_CONVENTION_PREFIXES ): if verbose: print("\nNCAS-AMOF file detected, finding correct spec files") @@ -375,8 +377,34 @@ def _get_ncas_specs( # don't need to do template check template = "off" - # NCAS-RADAR (coming soon...) - # if "NCAS-Radar" in conventions + # NCAS-Radar + elif any( + name in conventions.upper() + for name in RADAR_CONVENTION_PREFIXES + ): + version_number = ( + conventions[conventions.index("NCAS-") :] + .split("-")[2] + .split(" ")[0] + .replace('"', "") + ) + if version_number.count(".") == 1: + version_number = f"{version_number}.0" + template = "off" + spec_names = [ + "coordinate-variables", + "dimensions", + "global-attrs", + "global-variables", + "instrument-parameters", + "location-variables", + "moment-variables", + "radar-calibration", + "radar-parameters", + "sensor-pointing-variables", + "sweep-variables", + ] + specs = [f"ncas-radar-{version_number}/{spec}" for spec in spec_names] elif ( file_path.split(".")[-1].lower() in IMAGE_EXTENSIONS diff --git a/checksit/generic.py b/checksit/generic.py index 34832ffb..3742769c 100644 --- a/checksit/generic.py +++ b/checksit/generic.py @@ -204,7 +204,7 @@ def check_var_exists(dct, variables, skip_spellcheck=False): def check_dim_exists(dct, dimensions, skip_spellcheck=False): """ - Check that variables exist + Check that dimensions exist E.g. check-dim-exists:dimensions:time|latitude """ @@ -229,13 +229,42 @@ def check_dim_exists(dct, dimensions, skip_spellcheck=False): return errors, warnings -def check_var(dct, variable, defined_attrs, attr_rules=[], skip_spellcheck=False): +def check_dim_regex(dct, regex_dims, skip_spellcheck=False): + """ + Check dimension exists matching regex + + E.g. check-dime-regex:regex-dims:^string_length[^,]*$ + """ + errors = [] + warnings = [] + for regex_dim in regex_dims: + if regex_dim.endswith(":__OPTIONAL__"): + regex_dim = ":".join(regex_dim.split(":")[:-1]) + r = re.compile(regex_dim) + matches = list(filter(r.match, dct["dimensions"].keys())) + if len(matches) == 0: + warnings.append( + f"[dimension**************:{regex_dim}]: No dimension matching optional regex check in file. " + ) + else: + r = re.compile(regex_dim) + matches = list(filter(r.match, dct["dimensions"].keys())) + if len(matches) == 0: + errors.append( + f"[dimension**************:{regex_dim}]: No dimension matching regex check in file. " + ) + return errors, warnings + + +def check_var(dct, variable, defined_attrs, rules_attrs=None, skip_spellcheck=False): """ Check variable exists and has attributes defined. """ errors = [] warnings = [] + rules_attrs = rules_attrs or {} + if isinstance(variable, list): variable = variable[0] if ":__OPTIONAL__" in variable: @@ -282,21 +311,54 @@ def check_var(dct, variable, defined_attrs, attr_rules=[], skip_spellcheck=False f"[variable**************:{variable}]: Attribute '{attr_key}' must have definition '{attr_value}', " f"not '{dct['variables'][variable].get(attr_key).encode('unicode_escape').decode('utf-8')}'." ) - for rule_to_check in attr_rules: - if rule_to_check == "rule-func:check-qc-flags": + + for attr in rules_attrs: + if isinstance(attr, dict) and len(attr.keys()) == 1: + for key, value in attr.items(): + attr = f"{key}:{value}" + attr_key = attr.split(":")[0] + attr_rule = ":".join(attr.split(":")[1:]) + if attr_key not in dct["variables"][variable]: + errors.append( + f"[variable:**************:{variable}]: Attribute '{attr_key}' does not exist. " + f"{search_close_match(attr_key, dct['variables'][variable].keys()) if not skip_spellcheck else ''}" + ) + elif is_undefined(dct["variables"][variable].get(attr_key)): + errors.append( + f"[variable:**************:{variable}]: No value defined for attribute '{attr_key}'." + ) + elif attr_rule.startswith("rule-func:same-type-as"): + var_checking_against = attr_rule.split(":")[-1] rule_errors, rule_warnings = rules.check( - rule_to_check, + attr_rule, + dct["variables"][variable].get(attr_key), + context=dct["variables"][var_checking_against].get("type"), + label=f"[variables:******:{attr_key}]***", + ) + errors.extend(rule_errors) + warnings.extend(rule_warnings) + elif attr_rule.strip() == ("rule-func:check-qc-flags"): + rule_errors, rule_warnings = rules.check( + attr_rule, dct["variables"][variable].get("flag_values"), context=dct["variables"][variable].get("flag_meanings"), label=f"[variable******:{variable}]: ", ) errors.extend(rule_errors) warnings.extend(rule_warnings) + else: + rule_errors, rule_warnings = rules.check( + attr_rule, + dct["variables"][variable].get(attr_key), + label=f"[variables:******:{variable}] Value of attribute '{attr_key}' -", + ) + errors.extend(rule_errors) + warnings.extend(rule_warnings) else: if variable not in dct["variables"].keys(): errors.append( - f"[variable**************:{variable}]: Optional variable does not exist in file. " + f"[variable**************:{variable}]: Variable does not exist in file. " f"{search_close_match(variable, dct['variables'].keys()) if not skip_spellcheck else ''}" ) else: @@ -317,6 +379,49 @@ def check_var(dct, variable, defined_attrs, attr_rules=[], skip_spellcheck=False f"not '{dct['variables'][variable].get(attr_key)}'." ) + for attr in rules_attrs: + if isinstance(attr, dict) and len(attr.keys()) == 1: + for key, value in attr.items(): + attr = f"{key}:{value}" + attr_key = attr.split(":")[0] + attr_rule = ":".join(attr.split(":")[1:]) + if attr_key not in dct["variables"][variable]: + errors.append( + f"[variable:**************:{variable}]: Attribute '{attr_key}' does not exist. " + f"{search_close_match(attr_key, dct['variables'][variable].keys()) if not skip_spellcheck else ''}" + ) + elif is_undefined(dct["variables"][variable].get(attr_key)): + errors.append( + f"[variable:**************:{variable}]: No value defined for attribute '{attr_key}'." + ) + elif attr_rule.startswith("rule-func:same-type-as"): + var_checking_against = attr_rule.split(":")[-1] + rule_errors, rule_warnings = rules.check( + attr_rule, + dct["variables"][variable].get(attr_key), + context=dct["variables"][var_checking_against].get("type"), + label=f"[variables:******:{attr_key}]***", + ) + errors.extend(rule_errors) + warnings.extend(rule_warnings) + elif attr_rule.strip() == "rule-func:check-qc-flags": + rule_errors, rule_warnings = rules.check( + attr_rule, + dct["variables"][variable].get("flag_values"), + context=dct["variables"][variable].get("flag_meanings"), + label=f"[variable******:{variable}]: ", + ) + errors.extend(rule_errors) + warnings.extend(rule_warnings) + else: + rule_errors, rule_warnings = rules.check( + attr_rule, + dct["variables"][variable].get(attr_key), + label=f"[variables:******:{variable}] Value of attribute '{attr_key}' -", + ) + errors.extend(rule_errors) + warnings.extend(rule_warnings) + return errors, warnings @@ -414,3 +519,72 @@ def check_file_name(file_name, vocab_checks=None, rule_checks=None, **kwargs): ) return errors, warnings + + +def check_radar_moment_variables( + dct, exist_attrs=None, rule_attrs=None, one_of_attrs=None, skip_spellcheck=False +): + """ + Finds moment variables in radar file, runs checks against all those variables + """ + exist_attrs = exist_attrs or [] + rule_attrs = rule_attrs or {} + one_of_attrs = one_of_attrs or [] + + errors = [] + warnings = [] + + moment_variables = [] + for radarvariable, radarattributes in dct["variables"].items(): + if ( + isinstance(radarattributes, dict) + and "coordinates" in radarattributes.keys() + ): + moment_variables.append(radarvariable) + + for variable in moment_variables: + for attr in exist_attrs: + if attr not in dct["variables"][variable]: + errors.append( + f"[variable**************:{variable}]: Attribute '{attr}' does not exist. " + f"{search_close_match(attr, dct['variables'][variable]) if not skip_spellcheck else ''}" + ) + for attr in rule_attrs: + if isinstance(attr, dict) and len(attr.keys()) == 1: + for key, value in attr.items(): + attr = f"{key}:{value}" + attr_key = attr.split(":")[0] + attr_rule = ":".join(attr.split(":")[1:]) + if attr_key not in dct["variables"][variable]: + errors.append( + f"[variable:**************:{variable}]: Attribute '{attr_key}' does not exist. " + f"{search_close_match(attr_key, dct['variables'][variable].keys()) if not skip_spellcheck else ''}" + ) + elif is_undefined(dct["variables"][variable].get(attr_key)): + errors.append( + f"[variable:**************:{variable}]: No value defined for attribute '{attr_key}'." + ) + else: + rule_errors, rule_warnings = rules.check( + attr_rule, + dct["variables"][variable].get(attr_key), + label=f"[variables:******:{variable}] Value of attribute '{attr_key}' -", + ) + errors.extend(rule_errors) + warnings.extend(rule_warnings) + for attrs in one_of_attrs: + attr_options = attrs.split("|") + matches = 0 + for attr in attr_options: + if attr in dct["variables"][variable]: + matches += 1 + if matches == 0: + errors.append( + f"[variable:**************:{variable}]: One attribute of '{attr_options}' must be defined." + ) + elif matches > 1: + errors.append( + f"[variable:**************:{variable}]: Only one of '{attr_options}' should be defined, {matches} found." + ) + + return errors, warnings diff --git a/checksit/readers/cdl.py b/checksit/readers/cdl.py index 3db9aa8c..53c0ac45 100644 --- a/checksit/readers/cdl.py +++ b/checksit/readers/cdl.py @@ -152,7 +152,11 @@ def _construct_variables(self, content): variables[var_id] = current.copy() var_id, dtype, dimensions = self._parse_var_dtype_dims(line) - current = {"type": dtype, "dimension": ", ".join(dimensions)} + if dimensions == [""]: + dimensions = "--none--" + else: + dimensions = ", ".join(dimensions) + current = {"type": dtype, "dimension": dimensions} else: # key, value = [x.strip() for x in line.split(":", 1)[1].split("=", 1)] # Send last key and last value (from last iteration of loop) and line to get new value diff --git a/checksit/rules/rule_funcs.py b/checksit/rules/rule_funcs.py index f3560868..118fc679 100644 --- a/checksit/rules/rule_funcs.py +++ b/checksit/rules/rule_funcs.py @@ -362,13 +362,13 @@ def check_qc_flags(value, context, extras=None, label=""): ) # check there are at least two values and they start with 0 and 1 - if not len(value) > 2: + if not len(value) >= 2: errors.append(f"{label} There must be at least two QC flag values.") elif not (np.all(value[:2] == [0, 1]) or np.all(value[:2] == (0, 1))): errors.append(f"{label} First two QC flag_values must be '[0, 1]'.") # check there are at least two meanings and the first two are correct - if not len(meanings) > 2: + if not len(meanings) >= 2: errors.append( f"{label} There must be at least two QC flag meanings (space separated)." ) diff --git a/checksit/rules/rules.py b/checksit/rules/rules.py index bfbd9175..19106bf7 100644 --- a/checksit/rules/rules.py +++ b/checksit/rules/rules.py @@ -42,6 +42,10 @@ def __init__(self): "regex-rule": r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?", "example": "2023-11-17T15:00:00", }, + "datetimeZ": { + "regex-rule": r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z", + "example": "2023-11-17T15:00:00Z" + }, "datetime-or-na": { "regex-rule": r"(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?)|" + _NOT_APPLICABLE_RULES, @@ -111,7 +115,7 @@ def check(self, rule_lookup, value, context=None, label=""): rule_lookup = re.sub(f"^{rules_prefix}:", "", rule_lookup) - rule_lookup_list = rule_lookup.split(", ") + rule_lookup_list = rule_lookup.split("||") for i in rule_lookup_list: diff --git a/docs/source/conf.py b/docs/source/conf.py index b4733265..04d2456e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -7,7 +7,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'checksit' -copyright = '2023, Ag Stephens, Hugo Ricketts, Joshua Hampton' +copyright = '2024, Ag Stephens, Hugo Ricketts, Joshua Hampton' author = 'Ag Stephens, Hugo Ricketts, Joshua Hampton' release = '0.1' diff --git a/docs/source/dev/ncas_standard_specifics.rst b/docs/source/dev/ncas_standard_specifics.rst index 327e774d..23ae6138 100644 --- a/docs/source/dev/ncas_standard_specifics.rst +++ b/docs/source/dev/ncas_standard_specifics.rst @@ -27,6 +27,13 @@ function within ``checksit/make_specs.py``. However, if ``checksit`` cannot find version, or does not have permission to write into the ``specs/groups`` folder, then an error is raised. +NCAS-Radar +---------- + +Similarly to the NCAS-GENERAL standard above, if ``NCAS-Radar`` is in the ``Conventions`` global attribute +of a netCDF file, then ``checksit`` will use specs defined for the identifed version of the ``NCAS-Radar`` +data standard. + NCAS-IMAGE ---------- @@ -36,4 +43,4 @@ one of ``png``, ``jpg`` or ``jpeg`` (or uppercase versions), and the file has th ``checksit`` will find specs related to NCAS-IMAGE. The version of the standard is identified using the ``Instructions`` tag, and specs relating to either the ``photo`` or ``plot`` data product are selected depending on the file name. The data product spec is combined with a global tags spec file -that covers tags required by the standard regardless of which data product is used. \ No newline at end of file +that covers tags required by the standard regardless of which data product is used. diff --git a/docs/source/dev/where_does_checksit_do_it.rst b/docs/source/dev/where_does_checksit_do_it.rst index aab1917a..f0145906 100644 --- a/docs/source/dev/where_does_checksit_do_it.rst +++ b/docs/source/dev/where_does_checksit_do_it.rst @@ -118,6 +118,8 @@ checks, managed by the ``Rules`` class in ``checksit/rules/rules.py``. There are - ``r"v\d\.\d"`` * - "datetime" - ``r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?"`` + * - "datetimeZ" + - ``r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z"`` * - "datetime-or-na" - ``r"(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d+)?)" + _NOT_APPLICABLE_RULES`` * - "number" diff --git a/docs/source/specifics.rst b/docs/source/specifics.rst index 828992ad..f4d610d0 100644 --- a/docs/source/specifics.rst +++ b/docs/source/specifics.rst @@ -37,3 +37,25 @@ is the same as .. code-block:: checksit check -t off -s ncas-image-1.0.0/amof-image-global-attrs,ncas-image-1.0.0/amof-photo ncas-cam-9_cao_20231117_photo_v1.0.nc + +NCAS-Radar +---------- + +The NCAS-Radar standard is also recognised by ``checksit``\ , with the correct specs identified and +used if no template or spec options are specified. Unlike the NCAS-GENERAL and NCAS-IMAGE standards, +NCAS-Radar does not have specific data product specs, instead there are a number of different spec +files covering different areas of the standard. These spec files are: + +.. code-block:: + + coordinate-variables + dimensions + global-attrs + global-variables + instrument-parameters + location-variables + moment-variables + radar-calibration + radar-parameters + sensor-pointing-variables + sweep-variables diff --git a/requirements.txt b/requirements.txt index da22c4ea..0fbc454f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ cf-python netcdf4 pandas requests +numpy>=1,<2 diff --git a/specs/groups/ncas-amof-2.0.0/amof-acoustic-backscatter-winds.yml b/specs/groups/ncas-amof-2.0.0/amof-acoustic-backscatter-winds.yml index e2868761..21648153 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-acoustic-backscatter-winds.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-acoustic-backscatter-winds.yml @@ -165,8 +165,8 @@ var-requires10: - dimension:time, altitude - units:1 - long_name:Data Quality flag: Mean Winds - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires11: func: checksit.generic.check_var params: @@ -177,8 +177,8 @@ var-requires11: - dimension:time, altitude - units:1 - long_name:Data Quality flag: Eastward Wind Component (U) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires12: func: checksit.generic.check_var params: @@ -189,8 +189,8 @@ var-requires12: - dimension:time, altitude - units:1 - long_name:Data Quality flag: Northward Wind Component (V) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires13: func: checksit.generic.check_var params: @@ -201,8 +201,8 @@ var-requires13: - dimension:time, altitude - units:1 - long_name:Data Quality flag: Upward Air Velocity (W) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires14: func: checksit.generic.check_var params: @@ -213,8 +213,8 @@ var-requires14: - dimension:time, altitude - units:1 - long_name:Data Quality flag: Backscatter - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -225,8 +225,8 @@ var-requires15: - dimension:time, altitude - units:1 - long_name:Data Quality flag: Background Noise - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-aerosol-backscatter-radial-winds.yml b/specs/groups/ncas-amof-2.0.0/amof-aerosol-backscatter-radial-winds.yml index ea1a235a..b9eb6b20 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-aerosol-backscatter-radial-winds.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-aerosol-backscatter-radial-winds.yml @@ -123,8 +123,8 @@ var-requires8: - type:byte - units:1 - long_name:Data Quality flag: Radial Velocity of Scatterers Away From Instrument - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires9: func: checksit.generic.check_var params: @@ -134,8 +134,8 @@ var-requires9: - type:byte - units:1 - long_name:Data Quality flag: Backscatter - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-aerosol-backscatter.yml b/specs/groups/ncas-amof-2.0.0/amof-aerosol-backscatter.yml index e4485527..bc8284ab 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-aerosol-backscatter.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-aerosol-backscatter.yml @@ -206,8 +206,8 @@ var-requires13: - dimension:time, altitude - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-aerosol-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-aerosol-concentration.yml index 1cea91d6..3064bb6a 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-aerosol-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-aerosol-concentration.yml @@ -23,5 +23,5 @@ var-requires1: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-aerosol-extinction.yml b/specs/groups/ncas-amof-2.0.0/amof-aerosol-extinction.yml index cd506ea5..c88002ad 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-aerosol-extinction.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-aerosol-extinction.yml @@ -52,8 +52,8 @@ var-requires3: - dimension:time, altitude - units:1 - long_name:Data Quality flag: 355nm - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires4: func: checksit.generic.check_var params: @@ -64,8 +64,8 @@ var-requires4: - dimension:time, altitude - units:1 - long_name:Data Quality flag: 316nm - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-aerosol-no3-so4-nh3-org-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-aerosol-no3-so4-nh3-org-concentration.yml index 0db1b5fb..edd7894b 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-aerosol-no3-so4-nh3-org-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-aerosol-no3-so4-nh3-org-concentration.yml @@ -68,8 +68,8 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag: NO3 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires5: func: checksit.generic.check_var params: @@ -80,8 +80,8 @@ var-requires5: - dimension:time - units:1 - long_name:Data Quality flag: SO4 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires6: func: checksit.generic.check_var params: @@ -92,8 +92,8 @@ var-requires6: - dimension:time - units:1 - long_name:Data Quality flag: NH3 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires7: func: checksit.generic.check_var params: @@ -104,5 +104,5 @@ var-requires7: - dimension:time - units:1 - long_name:Data Quality flag: Organics - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-aerosol-optical-depth.yml b/specs/groups/ncas-amof-2.0.0/amof-aerosol-optical-depth.yml index e9321711..5f02ecdb 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-aerosol-optical-depth.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-aerosol-optical-depth.yml @@ -52,8 +52,8 @@ var-requires3: - dimension:time, index - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-aerosol-size-distribution.yml b/specs/groups/ncas-amof-2.0.0/amof-aerosol-size-distribution.yml index 49f8058d..73f8f446 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-aerosol-size-distribution.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-aerosol-size-distribution.yml @@ -159,8 +159,8 @@ var-requires11: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-boundary-layer-temperature-profiles.yml b/specs/groups/ncas-amof-2.0.0/amof-boundary-layer-temperature-profiles.yml index 196d47ff..0662956f 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-boundary-layer-temperature-profiles.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-boundary-layer-temperature-profiles.yml @@ -40,8 +40,8 @@ var-requires2: - dimension:time - units:1 - long_name:Data Quality flag: Surface Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires3: func: checksit.generic.check_var params: @@ -52,8 +52,8 @@ var-requires3: - dimension:time - units:1 - long_name:Data Quality flag: Surface Relative Humidity - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires4: func: checksit.generic.check_var params: @@ -64,8 +64,8 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag: Surface Pressure - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires5: func: checksit.generic.check_var params: @@ -76,8 +76,8 @@ var-requires5: - dimension:time - units:1 - long_name:Data Quality flag: Precipitation - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires6: func: checksit.generic.check_var params: @@ -88,8 +88,8 @@ var-requires6: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 1 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires7: func: checksit.generic.check_var params: @@ -100,8 +100,8 @@ var-requires7: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 2 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires8: func: checksit.generic.check_var params: @@ -112,8 +112,8 @@ var-requires8: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 3 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires9: func: checksit.generic.check_var params: @@ -124,8 +124,8 @@ var-requires9: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 4 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires10: func: checksit.generic.check_var params: @@ -136,8 +136,8 @@ var-requires10: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 5 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires11: func: checksit.generic.check_var params: @@ -148,8 +148,8 @@ var-requires11: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 6 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires12: func: checksit.generic.check_var params: @@ -160,8 +160,8 @@ var-requires12: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 7 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires13: func: checksit.generic.check_var params: @@ -172,8 +172,8 @@ var-requires13: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 8 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires14: func: checksit.generic.check_var params: @@ -184,8 +184,8 @@ var-requires14: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 9 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -196,8 +196,8 @@ var-requires15: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 10 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires16: func: checksit.generic.check_var params: @@ -208,8 +208,8 @@ var-requires16: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 11 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires17: func: checksit.generic.check_var params: @@ -220,8 +220,8 @@ var-requires17: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 12 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires18: func: checksit.generic.check_var params: @@ -232,8 +232,8 @@ var-requires18: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 13 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires19: func: checksit.generic.check_var params: @@ -244,8 +244,8 @@ var-requires19: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 14 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires20: func: checksit.generic.check_var params: @@ -256,8 +256,8 @@ var-requires20: - dimension:time - units:1 - long_name:Data Quality flag: Thermal stability of temperature receiver bank - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires21: func: checksit.generic.check_var params: @@ -268,8 +268,8 @@ var-requires21: - dimension:time - units:1 - long_name:Data Quality flag: Thermal stability of moisture receiver bank - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-brightness-temperature.yml b/specs/groups/ncas-amof-2.0.0/amof-brightness-temperature.yml index 7bb97193..cdc386b8 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-brightness-temperature.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-brightness-temperature.yml @@ -54,8 +54,8 @@ var-requires3: - dimension:time - units:1 - long_name:Data Quality flag: Surface Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires4: func: checksit.generic.check_var params: @@ -66,8 +66,8 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag: Surface Relative Humidity - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires5: func: checksit.generic.check_var params: @@ -78,8 +78,8 @@ var-requires5: - dimension:time - units:1 - long_name:Data Quality flag: Surface Pressure - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires6: func: checksit.generic.check_var params: @@ -90,8 +90,8 @@ var-requires6: - dimension:time - units:1 - long_name:Data Quality flag: Precipitation - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires7: func: checksit.generic.check_var params: @@ -102,8 +102,8 @@ var-requires7: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 1 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires8: func: checksit.generic.check_var params: @@ -114,8 +114,8 @@ var-requires8: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 2 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires9: func: checksit.generic.check_var params: @@ -126,8 +126,8 @@ var-requires9: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 3 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires10: func: checksit.generic.check_var params: @@ -138,8 +138,8 @@ var-requires10: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 4 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires11: func: checksit.generic.check_var params: @@ -150,8 +150,8 @@ var-requires11: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 5 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires12: func: checksit.generic.check_var params: @@ -162,8 +162,8 @@ var-requires12: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 6 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires13: func: checksit.generic.check_var params: @@ -174,8 +174,8 @@ var-requires13: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 7 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires14: func: checksit.generic.check_var params: @@ -186,8 +186,8 @@ var-requires14: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 8 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -198,8 +198,8 @@ var-requires15: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 9 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires16: func: checksit.generic.check_var params: @@ -210,8 +210,8 @@ var-requires16: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 10 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires17: func: checksit.generic.check_var params: @@ -222,8 +222,8 @@ var-requires17: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 11 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires18: func: checksit.generic.check_var params: @@ -234,8 +234,8 @@ var-requires18: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 12 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires19: func: checksit.generic.check_var params: @@ -246,8 +246,8 @@ var-requires19: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 13 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires20: func: checksit.generic.check_var params: @@ -258,8 +258,8 @@ var-requires20: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 14 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires21: func: checksit.generic.check_var params: @@ -270,8 +270,8 @@ var-requires21: - dimension:time - units:1 - long_name:Data Quality flag: Thermal stability of temperature receiver bank - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires22: func: checksit.generic.check_var params: @@ -282,8 +282,8 @@ var-requires22: - dimension:time - units:1 - long_name:Data Quality flag: Thermal stability of moisture receiver bank - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-ch4-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-ch4-concentration.yml index e1a33dca..ba0d8c5e 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-ch4-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-ch4-concentration.yml @@ -70,5 +70,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-cloud-base.yml b/specs/groups/ncas-amof-2.0.0/amof-cloud-base.yml index 2b8e7923..a949d12e 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-cloud-base.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-cloud-base.yml @@ -176,8 +176,8 @@ var-requires11: - dimension:time - units:1 - long_name:Data Quality flag: Cloud Base - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-cloud-coverage.yml b/specs/groups/ncas-amof-2.0.0/amof-cloud-coverage.yml index a614a43a..6ead4532 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-cloud-coverage.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-cloud-coverage.yml @@ -191,8 +191,8 @@ var-requires12: - dimension:time. layer_index - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-co-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-co-concentration.yml index 339a61c1..d07c9f39 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-co-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-co-concentration.yml @@ -70,5 +70,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-co-h2-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-co-h2-concentration.yml index e2b3590b..156555b2 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-co-h2-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-co-h2-concentration.yml @@ -132,8 +132,8 @@ var-requires8: - dimension:time - units:1 - long_name:Data Quality flag: CO - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires9: func: checksit.generic.check_var params: @@ -144,5 +144,5 @@ var-requires9: - dimension:time - units:1 - long_name:Data Quality flag: H2 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-co2-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-co2-concentration.yml index ea717271..95b34e33 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-co2-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-co2-concentration.yml @@ -70,5 +70,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-depolarisation-ratio.yml b/specs/groups/ncas-amof-2.0.0/amof-depolarisation-ratio.yml index 80cbd95f..e28bca5a 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-depolarisation-ratio.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-depolarisation-ratio.yml @@ -153,8 +153,8 @@ var-requires10: - dimension:time, index_of_range, index_of_angle - units:1 - long_name:Data Quality flag: Attenuated backscatter coefficient (Planar Polarised) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires11: func: checksit.generic.check_var params: @@ -165,8 +165,8 @@ var-requires11: - dimension:time, index_of_range, index_of_angle - units:1 - long_name:Data Quality flag: Attenuated backscatter coefficient (Cross Polarised) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires12: func: checksit.generic.check_var params: @@ -177,8 +177,8 @@ var-requires12: - dimension:time, index_of_range, index_of_angle - units:1 - long_name:Data Quality flag: Depolarisation R - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-dew-point.yml b/specs/groups/ncas-amof-2.0.0/amof-dew-point.yml index 5a209c0b..996ca2ad 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-dew-point.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-dew-point.yml @@ -99,5 +99,5 @@ var-requires6: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-file-name.yml b/specs/groups/ncas-amof-2.0.0/amof-file-name.yml index 13303941..c392120e 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-file-name.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-file-name.yml @@ -5,4 +5,4 @@ file-name-format: instrument: __URL__raw.githubusercontent.com/ncasuk/ncas-data-instrument-vocabs/__latest__/AMF_CVs/AMF_ncas_instrument.json:ncas_instrument:__all__ data_product: __vocabs__:AMF_CVs/2.0.0/AMF_product:product rule_checks: - platform: rule-func:ceda-platform, rule-func-warning:ncas-platform + platform: rule-func:ceda-platform||rule-func-warning:ncas-platform diff --git a/specs/groups/ncas-amof-2.0.0/amof-flux-components.yml b/specs/groups/ncas-amof-2.0.0/amof-flux-components.yml index 6c5db7e4..6ce042ba 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-flux-components.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-flux-components.yml @@ -1125,8 +1125,8 @@ var-requires74: - dimension:time - units:1 - long_name:Quality flag: Skew U - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires75: func: checksit.generic.check_var params: @@ -1137,8 +1137,8 @@ var-requires75: - dimension:time - units:1 - long_name:Quality flag: Skew V - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires76: func: checksit.generic.check_var params: @@ -1149,8 +1149,8 @@ var-requires76: - dimension:time - units:1 - long_name:Quality flag: Skew W - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires77: func: checksit.generic.check_var params: @@ -1161,8 +1161,8 @@ var-requires77: - dimension:time - units:1 - long_name:Quality flag: Skew Ts - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires78: func: checksit.generic.check_var params: @@ -1173,8 +1173,8 @@ var-requires78: - dimension:time - units:1 - long_name:Quality flag: Kurtosis U - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires79: func: checksit.generic.check_var params: @@ -1185,8 +1185,8 @@ var-requires79: - dimension:time - units:1 - long_name:Quality flag: Kurtosis V - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires80: func: checksit.generic.check_var params: @@ -1197,8 +1197,8 @@ var-requires80: - dimension:time - units:1 - long_name:Quality flag: Kurtosis W - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires81: func: checksit.generic.check_var params: @@ -1209,8 +1209,8 @@ var-requires81: - dimension:time - units:1 - long_name:Quality flag: Kurtosis Ts - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires82: func: checksit.generic.check_var params: @@ -1221,8 +1221,8 @@ var-requires82: - dimension:time - units:1 - long_name:Quality flag: Steady State Class WU - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires83: func: checksit.generic.check_var params: @@ -1233,8 +1233,8 @@ var-requires83: - dimension:time - units:1 - long_name:Quality flag: Steady State Class WV - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires84: func: checksit.generic.check_var params: @@ -1245,8 +1245,8 @@ var-requires84: - dimension:time - units:1 - long_name:Quality flag: Steady State Class WTs - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires85: func: checksit.generic.check_var params: @@ -1257,8 +1257,8 @@ var-requires85: - dimension:time - units:1 - long_name:Quality flag: WU - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires86: func: checksit.generic.check_var params: @@ -1268,8 +1268,8 @@ var-requires86: - type:byte - dimension:time - units:1 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-flux-estimates.yml b/specs/groups/ncas-amof-2.0.0/amof-flux-estimates.yml index 0156d38c..06710b85 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-flux-estimates.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-flux-estimates.yml @@ -172,8 +172,8 @@ var-requires11: - dimension:time - units:1 - long_name:Quality flag: Skew U - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires12: func: checksit.generic.check_var params: @@ -184,8 +184,8 @@ var-requires12: - dimension:time - units:1 - long_name:Quality flag: Skew V - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires13: func: checksit.generic.check_var params: @@ -196,8 +196,8 @@ var-requires13: - dimension:time - units:1 - long_name:Quality flag: Skew W - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires14: func: checksit.generic.check_var params: @@ -208,8 +208,8 @@ var-requires14: - dimension:time - units:1 - long_name:Quality flag: Skew Ts - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -220,8 +220,8 @@ var-requires15: - dimension:time - units:1 - long_name:Quality flag: Kurtosis U - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires16: func: checksit.generic.check_var params: @@ -232,8 +232,8 @@ var-requires16: - dimension:time - units:1 - long_name:Quality flag: Kurtosis V - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires17: func: checksit.generic.check_var params: @@ -244,8 +244,8 @@ var-requires17: - dimension:time - units:1 - long_name:Quality flag: Kurtosis W - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires18: func: checksit.generic.check_var params: @@ -256,8 +256,8 @@ var-requires18: - dimension:time - units:1 - long_name:Quality flag: Kurtosis Ts - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires19: func: checksit.generic.check_var params: @@ -268,8 +268,8 @@ var-requires19: - dimension:time - units:1 - long_name:Quality flag: Steady State Class WU - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires20: func: checksit.generic.check_var params: @@ -280,8 +280,8 @@ var-requires20: - dimension:time - units:1 - long_name:Quality flag: Steady State Class WV - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires21: func: checksit.generic.check_var params: @@ -292,8 +292,8 @@ var-requires21: - dimension:time - units:1 - long_name:Quality flag: Steady State Class WTs - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires22: func: checksit.generic.check_var params: @@ -304,8 +304,8 @@ var-requires22: - dimension:time - units:1 - long_name:Quality flag: WU - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires23: func: checksit.generic.check_var params: @@ -316,8 +316,8 @@ var-requires23: - dimension:time - units:1 - long_name:Quality flag: WV - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires24: func: checksit.generic.check_var params: @@ -328,8 +328,8 @@ var-requires24: - dimension:time - units:1 - long_name:Quality flag: WTs - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires25: func: checksit.generic.check_var params: @@ -340,5 +340,5 @@ var-requires25: - dimension:time - units:1 - long_name:Quality flag: General Turbulent Characteristic of W Class - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-full-troposphere-temperature-profiles.yml b/specs/groups/ncas-amof-2.0.0/amof-full-troposphere-temperature-profiles.yml index 2c0da287..b44ea97a 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-full-troposphere-temperature-profiles.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-full-troposphere-temperature-profiles.yml @@ -40,8 +40,8 @@ var-requires2: - dimension:time - units:1 - long_name:Data Quality flag: Surface Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires3: func: checksit.generic.check_var params: @@ -52,8 +52,8 @@ var-requires3: - dimension:time - units:1 - long_name:Data Quality flag: Surface Relative Humidity - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires4: func: checksit.generic.check_var params: @@ -64,8 +64,8 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag: Surface Pressure - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires5: func: checksit.generic.check_var params: @@ -76,8 +76,8 @@ var-requires5: - dimension:time - units:1 - long_name:Data Quality flag: Precipitation - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires6: func: checksit.generic.check_var params: @@ -88,8 +88,8 @@ var-requires6: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 1 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires7: func: checksit.generic.check_var params: @@ -100,8 +100,8 @@ var-requires7: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 2 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires8: func: checksit.generic.check_var params: @@ -112,8 +112,8 @@ var-requires8: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 3 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires9: func: checksit.generic.check_var params: @@ -124,8 +124,8 @@ var-requires9: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 4 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires10: func: checksit.generic.check_var params: @@ -136,8 +136,8 @@ var-requires10: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 5 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires11: func: checksit.generic.check_var params: @@ -148,8 +148,8 @@ var-requires11: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 6 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires12: func: checksit.generic.check_var params: @@ -160,8 +160,8 @@ var-requires12: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 7 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires13: func: checksit.generic.check_var params: @@ -172,8 +172,8 @@ var-requires13: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 8 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires14: func: checksit.generic.check_var params: @@ -184,8 +184,8 @@ var-requires14: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 9 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -196,8 +196,8 @@ var-requires15: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 10 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires16: func: checksit.generic.check_var params: @@ -208,8 +208,8 @@ var-requires16: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 11 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires17: func: checksit.generic.check_var params: @@ -220,8 +220,8 @@ var-requires17: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 12 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires18: func: checksit.generic.check_var params: @@ -232,8 +232,8 @@ var-requires18: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 13 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires19: func: checksit.generic.check_var params: @@ -244,8 +244,8 @@ var-requires19: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 14 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires20: func: checksit.generic.check_var params: @@ -256,8 +256,8 @@ var-requires20: - dimension:time - units:1 - long_name:Data Quality flag: Thermal stability of temperature receiver bank - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires21: func: checksit.generic.check_var params: @@ -268,8 +268,8 @@ var-requires21: - dimension:time - units:1 - long_name:Data Quality flag: Thermal stability of moisture receiver bank - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-global-attrs.yml b/specs/groups/ncas-amof-2.0.0/amof-global-attrs.yml index 24b843ce..f81c2e46 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-global-attrs.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-global-attrs.yml @@ -4,7 +4,7 @@ required-global-attrs: vocab_attrs: source: __URL__raw.githubusercontent.com/ncasuk/ncas-data-instrument-vocabs/__latest__/AMF_CVs/AMF_ncas_instrument.json:ncas_instrument:__all__:description rules_attrs: - platform: rule-func:ceda-platform, rule-func-warning:ncas-platform + platform: rule-func:ceda-platform||rule-func-warning:ncas-platform Conventions: regex:CF-1.6,\sNCAS-AMF-2.0.0 instrument_manufacturer: rule-func:string-of-length:2+ instrument_model: rule-func:string-of-length:3+ diff --git a/specs/groups/ncas-amof-2.0.0/amof-h2-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-h2-concentration.yml index e106b0d6..0d6cff3a 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-h2-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-h2-concentration.yml @@ -70,5 +70,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-halocarbon-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-halocarbon-concentration.yml index d5c74f53..e8fafd01 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-halocarbon-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-halocarbon-concentration.yml @@ -534,8 +534,8 @@ var-requires36: - dimension:time - units:1 - long_name:Data Quality flag: CCl4 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires37: func: checksit.generic.check_var params: @@ -546,8 +546,8 @@ var-requires37: - dimension:time - units:1 - long_name:Data Quality flag: CHBr3 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires38: func: checksit.generic.check_var params: @@ -558,8 +558,8 @@ var-requires38: - dimension:time - units:1 - long_name:Data Quality flag: CH2I2 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires39: func: checksit.generic.check_var params: @@ -570,8 +570,8 @@ var-requires39: - dimension:time - units:1 - long_name:Data Quality flag: CH2ICl - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires40: func: checksit.generic.check_var params: @@ -582,8 +582,8 @@ var-requires40: - dimension:time - units:1 - long_name:Data Quality flag: CHBrCl2 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires41: func: checksit.generic.check_var params: @@ -594,8 +594,8 @@ var-requires41: - dimension:time - units:1 - long_name:Data Quality flag: CH2Br2 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires42: func: checksit.generic.check_var params: @@ -606,8 +606,8 @@ var-requires42: - dimension:time - units:1 - long_name:Data Quality flag: CHCl3 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires43: func: checksit.generic.check_var params: @@ -618,8 +618,8 @@ var-requires43: - dimension:time - units:1 - long_name:Data Quality flag: CH3I - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires44: func: checksit.generic.check_var params: @@ -630,5 +630,5 @@ var-requires44: - dimension:time - units:1 - long_name:Data Quality flag: CH2BrCl - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-iwv-lwp.yml b/specs/groups/ncas-amof-2.0.0/amof-iwv-lwp.yml index 38931840..028c94f9 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-iwv-lwp.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-iwv-lwp.yml @@ -38,8 +38,8 @@ var-requires2: - dimension:time - units:1 - long_name:Data Quality flag: Surface Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires3: func: checksit.generic.check_var params: @@ -50,8 +50,8 @@ var-requires3: - dimension:time - units:1 - long_name:Data Quality flag: Surface Relative Humidity - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires4: func: checksit.generic.check_var params: @@ -62,8 +62,8 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag: Surface Pressure - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires5: func: checksit.generic.check_var params: @@ -74,8 +74,8 @@ var-requires5: - dimension:time - units:1 - long_name:Data Quality flag: Precipitation - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires6: func: checksit.generic.check_var params: @@ -86,8 +86,8 @@ var-requires6: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 1 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires7: func: checksit.generic.check_var params: @@ -98,8 +98,8 @@ var-requires7: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 2 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires8: func: checksit.generic.check_var params: @@ -110,8 +110,8 @@ var-requires8: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 3 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires9: func: checksit.generic.check_var params: @@ -122,8 +122,8 @@ var-requires9: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 4 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires10: func: checksit.generic.check_var params: @@ -134,8 +134,8 @@ var-requires10: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 5 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires11: func: checksit.generic.check_var params: @@ -146,8 +146,8 @@ var-requires11: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 6 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires12: func: checksit.generic.check_var params: @@ -158,8 +158,8 @@ var-requires12: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 7 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires13: func: checksit.generic.check_var params: @@ -170,8 +170,8 @@ var-requires13: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 8 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires14: func: checksit.generic.check_var params: @@ -182,8 +182,8 @@ var-requires14: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 9 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -194,8 +194,8 @@ var-requires15: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 10 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires16: func: checksit.generic.check_var params: @@ -206,8 +206,8 @@ var-requires16: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 11 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires17: func: checksit.generic.check_var params: @@ -218,8 +218,8 @@ var-requires17: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 12 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires18: func: checksit.generic.check_var params: @@ -230,8 +230,8 @@ var-requires18: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 13 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires19: func: checksit.generic.check_var params: @@ -242,8 +242,8 @@ var-requires19: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 14 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires20: func: checksit.generic.check_var params: @@ -254,8 +254,8 @@ var-requires20: - dimension:time - units:1 - long_name:Data Quality flag: Thermal stability of temperature receiver bank - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires21: func: checksit.generic.check_var params: @@ -266,5 +266,5 @@ var-requires21: - dimension:time - units:1 - long_name:Data Quality flag: Thermal stability of moisture receiver bank - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-liquid-water-content.yml b/specs/groups/ncas-amof-2.0.0/amof-liquid-water-content.yml index fcdfbaa8..daf468fc 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-liquid-water-content.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-liquid-water-content.yml @@ -22,5 +22,5 @@ var-requires1: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-mean-co2-h2o.yml b/specs/groups/ncas-amof-2.0.0/amof-mean-co2-h2o.yml index 0adfc48e..a5dd9fc7 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-mean-co2-h2o.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-mean-co2-h2o.yml @@ -198,8 +198,8 @@ var-requires12: - dimension:time - units:1 - long_name:Data Quality flag: Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires13: func: checksit.generic.check_var params: @@ -210,8 +210,8 @@ var-requires13: - dimension:time - units:1 - long_name:Data Quality flag: Pressure - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires14: func: checksit.generic.check_var params: @@ -222,8 +222,8 @@ var-requires14: - dimension:time - units:1 - long_name:Data Quality flag: Carbon Dioxide concentration - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -234,5 +234,5 @@ var-requires15: - dimension:time - units:1 - long_name:Data Quality flag: Water Vapor concentration - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-mean-winds-profile.yml b/specs/groups/ncas-amof-2.0.0/amof-mean-winds-profile.yml index 4a2d3224..2981f34e 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-mean-winds-profile.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-mean-winds-profile.yml @@ -211,8 +211,8 @@ var-requires13: - dimension:time, altitude - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-mean-winds.yml b/specs/groups/ncas-amof-2.0.0/amof-mean-winds.yml index 01da663e..513aabda 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-mean-winds.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-mean-winds.yml @@ -225,8 +225,8 @@ var-requires14: - dimension:time - units:1 - long_name:Data Quality flag: Sonic Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -237,8 +237,8 @@ var-requires15: - dimension:time - units:1 - long_name:Data Quality flag: Wind Speed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires16: func: checksit.generic.check_var params: @@ -249,8 +249,8 @@ var-requires16: - dimension:time - units:1 - long_name:Data Quality flag: Wind Direction - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires17: func: checksit.generic.check_var params: @@ -261,8 +261,8 @@ var-requires17: - dimension:time - units:1 - long_name:Data Quality flag: Eastward Wind Component (U) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires18: func: checksit.generic.check_var params: @@ -273,8 +273,8 @@ var-requires18: - dimension:time - units:1 - long_name:Data Quality flag: Northward Wind Component (V) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires19: func: checksit.generic.check_var params: @@ -285,5 +285,5 @@ var-requires19: - dimension:time - units:1 - long_name:Data Quality flag: Upward Air Velocity Component (W) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-moisture-profiles.yml b/specs/groups/ncas-amof-2.0.0/amof-moisture-profiles.yml index a767a51f..2e3434ac 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-moisture-profiles.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-moisture-profiles.yml @@ -55,8 +55,8 @@ var-requires3: - dimension:time - units:1 - long_name:Data Quality flag: Surface Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires4: func: checksit.generic.check_var params: @@ -67,8 +67,8 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag: Surface Relative Humidity - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires5: func: checksit.generic.check_var params: @@ -79,8 +79,8 @@ var-requires5: - dimension:time - units:1 - long_name:Data Quality flag: Surface Pressure - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires6: func: checksit.generic.check_var params: @@ -91,8 +91,8 @@ var-requires6: - dimension:time - units:1 - long_name:Data Quality flag: Precipitation - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires7: func: checksit.generic.check_var params: @@ -103,8 +103,8 @@ var-requires7: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 1 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires8: func: checksit.generic.check_var params: @@ -115,8 +115,8 @@ var-requires8: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 2 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires9: func: checksit.generic.check_var params: @@ -127,8 +127,8 @@ var-requires9: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 3 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires10: func: checksit.generic.check_var params: @@ -139,8 +139,8 @@ var-requires10: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 4 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires11: func: checksit.generic.check_var params: @@ -151,8 +151,8 @@ var-requires11: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 5 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires12: func: checksit.generic.check_var params: @@ -163,8 +163,8 @@ var-requires12: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 6 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires13: func: checksit.generic.check_var params: @@ -175,8 +175,8 @@ var-requires13: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 7 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires14: func: checksit.generic.check_var params: @@ -187,8 +187,8 @@ var-requires14: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 8 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -199,8 +199,8 @@ var-requires15: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 9 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires16: func: checksit.generic.check_var params: @@ -211,8 +211,8 @@ var-requires16: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 10 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires17: func: checksit.generic.check_var params: @@ -223,8 +223,8 @@ var-requires17: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 11 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires18: func: checksit.generic.check_var params: @@ -235,8 +235,8 @@ var-requires18: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 12 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires19: func: checksit.generic.check_var params: @@ -247,8 +247,8 @@ var-requires19: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 13 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires20: func: checksit.generic.check_var params: @@ -259,8 +259,8 @@ var-requires20: - dimension:time - units:1 - long_name:Data Quality flag: Receiver channel 14 failed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires21: func: checksit.generic.check_var params: @@ -271,8 +271,8 @@ var-requires21: - dimension:time - units:1 - long_name:Data Quality flag: Thermal stability of temperature receiver bank - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires22: func: checksit.generic.check_var params: @@ -283,8 +283,8 @@ var-requires22: - dimension:time - units:1 - long_name:Data Quality flag: Thermal stability of moisture receiver bank - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-n2o-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-n2o-concentration.yml index f9130672..77599d78 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-n2o-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-n2o-concentration.yml @@ -70,5 +70,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-n2o-sf6-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-n2o-sf6-concentration.yml index a9dadcb8..4105e9f5 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-n2o-sf6-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-n2o-sf6-concentration.yml @@ -128,8 +128,8 @@ var-requires8: - dimension:time - units:1 - long_name:Data Quality flag: N2O - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires9: func: checksit.generic.check_var params: @@ -140,5 +140,5 @@ var-requires9: - dimension:time - units:1 - long_name:Data Quality flag: SF6 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-no2-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-no2-concentration.yml index b680fce4..febb0549 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-no2-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-no2-concentration.yml @@ -70,5 +70,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-nox-noxy-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-nox-noxy-concentration.yml index 883f78e1..06c16cd6 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-nox-noxy-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-nox-noxy-concentration.yml @@ -248,8 +248,8 @@ var-requires16: - dimension:time - units:1 - long_name:Data Quality flag: NO - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires17: func: checksit.generic.check_var params: @@ -260,8 +260,8 @@ var-requires17: - dimension:time - units:1 - long_name:Data Quality flag: NO2 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires18: func: checksit.generic.check_var params: @@ -272,8 +272,8 @@ var-requires18: - dimension:time - units:1 - long_name:Data Quality flag: NOx - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires19: func: checksit.generic.check_var params: @@ -284,5 +284,5 @@ var-requires19: - dimension:time - units:1 - long_name:Data Quality flag: NOy - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-o2n2-concentration-ratio.yml b/specs/groups/ncas-amof-2.0.0/amof-o2n2-concentration-ratio.yml index d0f72781..df63c9f4 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-o2n2-concentration-ratio.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-o2n2-concentration-ratio.yml @@ -22,5 +22,5 @@ var-requires1: - dimension:time - units:1 - long_name:Data Quality Flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-o3-concentration-profile.yml b/specs/groups/ncas-amof-2.0.0/amof-o3-concentration-profile.yml index 38d6e317..2694eb27 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-o3-concentration-profile.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-o3-concentration-profile.yml @@ -86,8 +86,8 @@ var-requires5: - dimension:time, altitude - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-o3-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-o3-concentration.yml index d3806f08..b99037d5 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-o3-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-o3-concentration.yml @@ -70,5 +70,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-oh-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-oh-concentration.yml index 526f7f0c..69ffc04d 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-oh-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-oh-concentration.yml @@ -64,5 +64,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-particle-size-distribution.yml b/specs/groups/ncas-amof-2.0.0/amof-particle-size-distribution.yml index c0aebf2a..22c4493f 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-particle-size-distribution.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-particle-size-distribution.yml @@ -145,8 +145,8 @@ var-requires10: - dimension:time - units:1 - long_name:Data Quality flag: Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires11: func: checksit.generic.check_var params: @@ -157,8 +157,8 @@ var-requires11: - dimension:time - units:1 - long_name:Data Quality flag: Pressure - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires12: func: checksit.generic.check_var params: @@ -169,8 +169,8 @@ var-requires12: - dimension:time, index - units:1 - long_name:Data Quality flag: Instrument Counts - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires13: func: checksit.generic.check_var params: @@ -181,8 +181,8 @@ var-requires13: - dimension:time, index - units:1 - long_name:Data Quality flag: Ambient Particle Number per Channel - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-peroxyacetyl-nitrate-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-peroxyacetyl-nitrate-concentration.yml index 38ed41f9..f088d155 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-peroxyacetyl-nitrate-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-peroxyacetyl-nitrate-concentration.yml @@ -70,5 +70,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag: - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-pm-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-pm-concentration.yml index da1d5b07..d21657a2 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-pm-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-pm-concentration.yml @@ -144,8 +144,8 @@ var-requires9: - dimension:time - units:1 - long_name:Data Quality flag: PM1 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires10: func: checksit.generic.check_var params: @@ -156,8 +156,8 @@ var-requires10: - dimension:time - units:1 - long_name:Data Quality flag: PM2.5 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires11: func: checksit.generic.check_var params: @@ -168,8 +168,8 @@ var-requires11: - dimension:time - units:1 - long_name:Data Quality flag: PM4 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires12: func: checksit.generic.check_var params: @@ -180,8 +180,8 @@ var-requires12: - dimension:time - units:1 - long_name:Data Quality flag: PM10 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires13: func: checksit.generic.check_var params: @@ -192,8 +192,8 @@ var-requires13: - dimension:time - units:1 - long_name:Data Quality flag: Total PM - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires14: func: checksit.generic.check_var params: @@ -204,8 +204,8 @@ var-requires14: - dimension:time - units:1 - long_name:Data Quality flag: Total Number - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -216,8 +216,8 @@ var-requires15: - dimension:time - units:1 - long_name:Data Quality flag: Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires16: func: checksit.generic.check_var params: @@ -228,8 +228,8 @@ var-requires16: - dimension:time - units:1 - long_name:Data Quality flag: Relative Humidity - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires17: func: checksit.generic.check_var params: @@ -240,5 +240,5 @@ var-requires17: - dimension:time - units:1 - long_name:Data Quality flag: Pressure - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-radiation.yml b/specs/groups/ncas-amof-2.0.0/amof-radiation.yml index d649f399..59f67fc6 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-radiation.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-radiation.yml @@ -85,8 +85,8 @@ var-requires5: - dimension:time - units:1 - long_name:Data Quality flag: upwelling shortwave - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires6: func: checksit.generic.check_var params: @@ -97,8 +97,8 @@ var-requires6: - dimension:time - units:1 - long_name:Data Quality flag: downwelling shortwave - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires7: func: checksit.generic.check_var params: @@ -109,8 +109,8 @@ var-requires7: - dimension:time - units:1 - long_name:Data Quality flag: upwelling longwave - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires8: func: checksit.generic.check_var params: @@ -121,8 +121,8 @@ var-requires8: - dimension:time - units:1 - long_name:Data Quality flag: downwelling longwave - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires9: func: checksit.generic.check_var params: @@ -133,8 +133,8 @@ var-requires9: - dimension:time - units:1 - long_name:Data Quality flag: Body Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires10: func: checksit.generic.check_var params: @@ -145,5 +145,5 @@ var-requires10: - dimension:time - units:1 - long_name:Data Quality flag: sensor cleaning - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-rain-lwc-velocity-reflectivity.yml b/specs/groups/ncas-amof-2.0.0/amof-rain-lwc-velocity-reflectivity.yml index 27817bec..65c3c9d6 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-rain-lwc-velocity-reflectivity.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-rain-lwc-velocity-reflectivity.yml @@ -115,8 +115,8 @@ var-requires7: - dimension:time, altitude - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-size-concentration-spectra.yml b/specs/groups/ncas-amof-2.0.0/amof-size-concentration-spectra.yml index fc4253b4..a6ee5a30 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-size-concentration-spectra.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-size-concentration-spectra.yml @@ -69,8 +69,8 @@ var-requires4: - dimension:time, altitude, index_bin - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-snr-winds.yml b/specs/groups/ncas-amof-2.0.0/amof-snr-winds.yml index 9dda624a..605d0246 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-snr-winds.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-snr-winds.yml @@ -281,8 +281,8 @@ var-requires18: - dimension:time, altitude - units:1 - long_name:Data Quality flag: Mean Winds - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires19: func: checksit.generic.check_var params: @@ -293,8 +293,8 @@ var-requires19: - dimension:time, altitude - units:1 - long_name:Data Quality flag: SNR Beam 1 (back panel) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires20: func: checksit.generic.check_var params: @@ -305,8 +305,8 @@ var-requires20: - dimension:time, altitude - units:1 - long_name:Data Quality flag: SNR Beam 2 (side panel) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires21: func: checksit.generic.check_var params: @@ -317,8 +317,8 @@ var-requires21: - dimension:time, altitude - units:1 - long_name:Data Quality flag: SNR Beam 3 (vertical beam from centre panel) - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires22: func: checksit.generic.check_var params: @@ -329,8 +329,8 @@ var-requires22: - dimension:time - units:1 - long_name:Data Quality flag: Rain Detected - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-so2-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-so2-concentration.yml index 4acb587c..f29aac81 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-so2-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-so2-concentration.yml @@ -70,5 +70,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-soil.yml b/specs/groups/ncas-amof-2.0.0/amof-soil.yml index 5e8c71c6..020dfb64 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-soil.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-soil.yml @@ -55,8 +55,8 @@ var-requires3: - dimension:time, index - units:1 - long_name:Data Quality flag: Soil Heat Flux - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires4: func: checksit.generic.check_var params: @@ -67,8 +67,8 @@ var-requires4: - dimension:time, index - units:1 - long_name:Data Quality flag: Soil Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires5: func: checksit.generic.check_var params: @@ -79,8 +79,8 @@ var-requires5: - dimension:time, index - units:1 - long_name:Data Quality flag: Soil Water Potential - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags dims-requires: func: checksit.generic.check_dim_exists params: diff --git a/specs/groups/ncas-amof-2.0.0/amof-solar-actinic-flux.yml b/specs/groups/ncas-amof-2.0.0/amof-solar-actinic-flux.yml index ebf993ef..9aa61402 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-solar-actinic-flux.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-solar-actinic-flux.yml @@ -78,5 +78,5 @@ var-requires5: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-sonde.yml b/specs/groups/ncas-amof-2.0.0/amof-sonde.yml index 13d9f1d8..a02d105b 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-sonde.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-sonde.yml @@ -164,5 +164,5 @@ var-requires10: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-surface-met.yml b/specs/groups/ncas-amof-2.0.0/amof-surface-met.yml index 57bed308..f9bd7ea8 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-surface-met.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-surface-met.yml @@ -212,8 +212,8 @@ var-requires13: - dimension:time - units:1 - long_name:Data Quality flag: Temperature - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires14: func: checksit.generic.check_var params: @@ -224,8 +224,8 @@ var-requires14: - dimension:time - units:1 - long_name:Data Quality flag: Relative Humidity - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires15: func: checksit.generic.check_var params: @@ -236,8 +236,8 @@ var-requires15: - dimension:time - units:1 - long_name:Data Quality flag: Pressure - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires16: func: checksit.generic.check_var params: @@ -248,8 +248,8 @@ var-requires16: - dimension:time - units:1 - long_name:Data Quality flag: Wind Speed - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires17: func: checksit.generic.check_var params: @@ -260,8 +260,8 @@ var-requires17: - dimension:time - units:1 - long_name:Data Quality flag: Wind From Direction - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires18: func: checksit.generic.check_var params: @@ -272,8 +272,8 @@ var-requires18: - dimension:time - units:1 - long_name:Data Quality flag: Radiation - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires19: func: checksit.generic.check_var params: @@ -284,8 +284,8 @@ var-requires19: - dimension:time - units:1 - long_name:Data Quality flag: Precipitation - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires20: func: checksit.generic.check_var params: @@ -296,8 +296,8 @@ var-requires20: - dimension:time - units:1 - long_name:Data Quality Flag: Downwelling Total Irradiance - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires21: func: checksit.generic.check_var params: @@ -308,5 +308,5 @@ var-requires21: - dimension:time - units:1 - long_name:Data Quality Flag: Net Total Irradiance - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-tgm-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-tgm-concentration.yml index 2e028518..9fb3f030 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-tgm-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-tgm-concentration.yml @@ -70,5 +70,5 @@ var-requires4: - dimension:time - units:1 - long_name:Data Quality flag - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-amof-2.0.0/amof-voc-concentration.yml b/specs/groups/ncas-amof-2.0.0/amof-voc-concentration.yml index 30bdf36c..83dbbfa3 100644 --- a/specs/groups/ncas-amof-2.0.0/amof-voc-concentration.yml +++ b/specs/groups/ncas-amof-2.0.0/amof-voc-concentration.yml @@ -1034,8 +1034,8 @@ var-requires68: - dimension:time - units:1 - long_name:Data Quality flag: C2H6 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires69: func: checksit.generic.check_var params: @@ -1046,8 +1046,8 @@ var-requires69: - dimension:time - units:1 - long_name:Data Quality flag: C2H4 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires70: func: checksit.generic.check_var params: @@ -1058,8 +1058,8 @@ var-requires70: - dimension:time - units:1 - long_name:Data Quality flag: C3H8 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires71: func: checksit.generic.check_var params: @@ -1070,8 +1070,8 @@ var-requires71: - dimension:time - units:1 - long_name:Data Quality flag: C3H6 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires72: func: checksit.generic.check_var params: @@ -1082,8 +1082,8 @@ var-requires72: - dimension:time - units:1 - long_name:Data Quality flag: C4H10 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires73: func: checksit.generic.check_var params: @@ -1094,8 +1094,8 @@ var-requires73: - dimension:time - units:1 - long_name:Data Quality flag: C2H2 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires74: func: checksit.generic.check_var params: @@ -1106,8 +1106,8 @@ var-requires74: - dimension:time - units:1 - long_name:Data Quality flag: C5H12 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires75: func: checksit.generic.check_var params: @@ -1118,8 +1118,8 @@ var-requires75: - dimension:time - units:1 - long_name:Data Quality flag: C5H8 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags var-requires76: func: checksit.generic.check_var params: @@ -1130,5 +1130,5 @@ var-requires76: - dimension:time - units:1 - long_name:Data Quality flag: C6H6 - attr_rules: - - rule-func:check-qc-flags + rules_attrs: + - flag_values: rule-func:check-qc-flags diff --git a/specs/groups/ncas-image-v1.0/amof-image-global-attrs.yml b/specs/groups/ncas-image-v1.0/amof-image-global-attrs.yml index 12c41ace..4a6f3abd 100644 --- a/specs/groups/ncas-image-v1.0/amof-image-global-attrs.yml +++ b/specs/groups/ncas-image-v1.0/amof-image-global-attrs.yml @@ -15,12 +15,12 @@ required-global-attrs: XMP-xmpRights:WebStatement: regex-warning:http://www.nationalarchives.gov.uk/doc/open-government-licence/ XMP-photoshop:Credit: regex-warning:National\sCentre\sfor\sAtmospheric\sScience\s\(NCAS\) # Source of the image - XMP-dc:Title: regex-rule:title, regex-rule-warning:title-data-product, rule-func:title_check + XMP-dc:Title: regex-rule:title||regex-rule-warning:title-data-product||rule-func:title_check # Instrument Scientist’s Details XMP-dc:Creator: rule-func-warning:list_of_names - XMP-iptcCore:CreatorWorkEmail: regex-rule-warning:ncas-email, regex-rule:valid-email - XMP-iptcExt:CreatorIdentifier: rule-func:validate_orcid_ID, rule-func-warning:url_checker + XMP-iptcCore:CreatorWorkEmail: regex-rule-warning:ncas-email||regex-rule:valid-email + XMP-iptcExt:CreatorIdentifier: rule-func:validate_orcid_ID||rule-func-warning:url_checker # Principal Investigator’s Details - XMP-iptcExt:ContributorName: regex-rule-warning:name-format, regex-rule-warning:name-characters - XMP-iptcExt:ContributorIdentifier: rule-func:validate_orcid_ID, rule-func-warning:url_checker - XMP-iptcExt:ContributorRole: regex:Project\sPrincipal\sInvestigator \ No newline at end of file + XMP-iptcExt:ContributorName: regex-rule-warning:name-format||regex-rule-warning:name-characters + XMP-iptcExt:ContributorIdentifier: rule-func:validate_orcid_ID||rule-func-warning:url_checker + XMP-iptcExt:ContributorRole: regex:Project\sPrincipal\sInvestigator diff --git a/specs/groups/ncas-image-v1.0/amof-photo.yml b/specs/groups/ncas-image-v1.0/amof-photo.yml index de31d3e2..f64e57bf 100644 --- a/specs/groups/ncas-image-v1.0/amof-photo.yml +++ b/specs/groups/ncas-image-v1.0/amof-photo.yml @@ -4,9 +4,9 @@ required-global-attrs: rules_attrs: # Location of a camera or an instrument (photo) XMP-iptcExt:LocationCreatedLocationName: regex-rule-warning:location - XMP-iptcExt:LocationCreatedGPSAltitude: regex-rule-warning:altitude-image-warning, regex-rule:altitude-image - XMP-iptcExt:LocationCreatedGPSLatitude: regex-rule:latitude-image, rule-func:latitude - XMP-iptcExt:LocationCreatedGPSLongitude: regex-rule:longitude-image, rule-func:longitude + XMP-iptcExt:LocationCreatedGPSAltitude: regex-rule-warning:altitude-image-warning||regex-rule:altitude-image + XMP-iptcExt:LocationCreatedGPSLatitude: regex-rule:latitude-image||rule-func:latitude + XMP-iptcExt:LocationCreatedGPSLongitude: regex-rule:longitude-image||rule-func:longitude # (Relation for photos) XMP-dc:Relation: regex-warning:(((i|I)sPartOf\shttps://catalogue.ceda.ac.uk/uuid/)|((i|I)sFormatOf\shttps://catalogue.ceda.ac.uk/uuid/))[a-z0-9]{32} XMP-dc:Relation: rule-func-warning:relation_url_checker diff --git a/specs/groups/ncas-image-v1.0/amof-plot.yml b/specs/groups/ncas-image-v1.0/amof-plot.yml index 935f5fff..c865b252 100644 --- a/specs/groups/ncas-image-v1.0/amof-plot.yml +++ b/specs/groups/ncas-image-v1.0/amof-plot.yml @@ -4,9 +4,9 @@ required-global-attrs: rules_attrs: # Location of a camera or an instrument (plots) XMP-iptcExt:LocationShownLocationName: regex-rule-warning:location - XMP-iptcExt:LocationShownGPSAltitude: regex-rule-warning:altitude-image-warning, regex-rule:altitude-image - XMP-iptcExt:LocationShownGPSLatitude: regex-rule:latitude-image, rule-func:latitude - XMP-iptcExt:LocationShownGPSLongitude: regex-rule:longitude-image, rule-func:longitude + XMP-iptcExt:LocationShownGPSAltitude: regex-rule-warning:altitude-image-warning||regex-rule:altitude-image + XMP-iptcExt:LocationShownGPSLatitude: regex-rule:latitude-image||rule-func:latitude + XMP-iptcExt:LocationShownGPSLongitude: regex-rule:longitude-image||rule-func:longitude # (For plots only) XMP-iptcExt:TemporalCoverageFrom: rule-func:validate-image-date-time XMP-iptcExt:TemporalCoverageTo: rule-func:validate-image-date-time diff --git a/specs/groups/ncas-radar-1.0.0/coordinate-variables.yml b/specs/groups/ncas-radar-1.0.0/coordinate-variables.yml new file mode 100644 index 00000000..08fab02f --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/coordinate-variables.yml @@ -0,0 +1,26 @@ +var-requires0: + func: checksit.generic.check_var + params: + variable: + - time + defined_attrs: + - type:double + - dimension:time + - standard_name:time + rules_attrs: + - long_name: rule-func:match-one-of:time_in_seconds_since_volume_start|time_since_time_reference + - units: regex:seconds since \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z +var-requires1: + func: checksit.generic.check_var + params: + variable: + - range + defined_attrs: + - type:float + - standard_name:projection_range_coordinate + - axis:radial_range_coordinate + rules_attrs: + - dimension: rule-func:match-one-of:range|sweep, range + - units: rule-func:match-one-of:metres|meters + - long_name: rule-func:string-of-length:5+ + - spacing_is_constant: rule-func:match-one-of:true|false diff --git a/specs/groups/ncas-radar-1.0.0/dimensions.yml b/specs/groups/ncas-radar-1.0.0/dimensions.yml new file mode 100644 index 00000000..23d1c0c4 --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/dimensions.yml @@ -0,0 +1,13 @@ +dims-requires: + func: checksit.generic.check_dim_exists + params: + dimensions: + - time + - range + - sweep + +dim-requires1: + func: checksit.generic.check_dim_regex + params: + regex_dims: + - ^string_length[^,]*$ diff --git a/specs/groups/ncas-radar-1.0.0/global-attrs.yml b/specs/groups/ncas-radar-1.0.0/global-attrs.yml new file mode 100644 index 00000000..5c156353 --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/global-attrs.yml @@ -0,0 +1,44 @@ +required-gloabl-attrs: + func: checksit.generic.check_global_attrs + params: + defined_attrs: + - title + - institution + - references + - history + - comment + - instrument_manufacturer + - instrument_model + - instrument_serial_number + - instrument_software + - instrument_software_version + - creator_name + - processing_software_version + - project + - project_principal_investigator + - licence + - acknowledgement + - geospatial_bounds + - platform_altitude + - location_keywords + - processing_software_url + vocab_attrs: + source: __URL__raw.githubusercontent.com/ncasuk/ncas-data-instrument-vocabs/__latest__/AMF_CVs/AMF_ncas_instrument.json:ncas_instrument:__all__:description + instrument_name: __URL__raw.githubusercontent.com/ncasuk/ncas-data-instrument-vocabs/__latest__/AMF_CVs/AMF_ncas_instrument.json:ncas_instrument:__all__ + rules_attrs: + platform_is_mobile: rule-func:match-one-of:true|false + instrument_pid: regex-rule:valid-url-or-na + creator_email: regex-rule:valid-email + creator_url: regex-rule:valid-url||rule-func-warning:validate-orcid-ID + processing_level: rule-func:match-one-of:1|2|3 + last_revised_date: regex-rule:datetime + project_principal_investigator_email: regex-rule:valid-email + project_principal_investigator_url: regex-rule:valid-url||rule-func-warning:validate-orcid-ID + platform: rule-func:ceda-platform||rule-func-warning:ncas-platform + deployment_mode: rule-func:match-one-of:land|sea|air + time_coverage_start: regex-rule:datetimeZ + time_coverage_end: regex-rule:datetimeZ + regex_attrs: + Conventions: ^(NCAS-Radar-1\.0|CfRadial-1\.4) (NCAS-Radar-1\.0|CfRadial-1\.4) instrument_parameters radar_parameters radar_calibration$ + product_version: ^v\d+\.\d+\.\d+$ + diff --git a/specs/groups/ncas-radar-1.0.0/global-variables.yml b/specs/groups/ncas-radar-1.0.0/global-variables.yml new file mode 100644 index 00000000..796db67c --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/global-variables.yml @@ -0,0 +1,43 @@ +var-requires0: + func: checksit.generic.check_var + params: + variable: + - time_coverage_start + defined_attrs: + - type:char + rules_attrs: + - dimension: regex:string_length[^,]* +var-requires1: + func: checksit.generic.check_var + params: + variable: + - time_coverage_end + defined_attrs: + - type:char + rules_attrs: + - dimension: regex:string_length[^,]* +var-optional0: + func: checksit.generic.check_var + params: + variable: + - platform_type:__OPTIONAL__ + defined_attrs: + - type:char + rules_attrs: + - dimension: regex:string_length[^,]* +var-optional1: + func: checksit.generic.check_var + params: + variable: + - time_reference:__OPTIONAL__ + defined_attrs: + - type:char + rules_attrs: + - dimension: regex:string_length[^,]* +var-optional2: + func: checksit.generic.check_var + params: + variable: + - volume_number:__OPTIONAL__ + defined_attrs: + - type:int diff --git a/specs/groups/ncas-radar-1.0.0/instrument-parameters.yml b/specs/groups/ncas-radar-1.0.0/instrument-parameters.yml new file mode 100644 index 00000000..87e4ab7d --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/instrument-parameters.yml @@ -0,0 +1,166 @@ +dims-optional: + func: checksit.generic.check_dim_exists + params: + dimensions: + - frequency:__OPTIONAL__ + - n_prts:__OPTIONAL__ + +var-optional0: + func: checksit.generic.check_var + params: + variable: + - frequency:__OPTIONAL__ + defined_attrs: + - dimension:frequency + - type:float + - units:s-1 + +var-optional1: + func: checksit.generic.check_var + params: + variable: + - follow_mode:__OPTIONAL__ + defined_attrs: + - type:char + rules_attrs: + - dimension: regex:^sweep, string_length[^,]*$ + +var-optional2: + func: checksit.generic.check_var + params: + variable: + - pulse_width:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + - units:seconds + +var-requries3: + func: checksit.generic.check_var + params: + variable: + - rx_range_resolution:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + rules_attrs: + - units: rule-func:match-one-of:meters|metres + +var-optional4: + func: checksit.generic.check_var + params: + variable: + - prt_mode:__OPTIONAL__ + defined_attrs: + - type:char + rules_attrs: + - dimension: regex:^sweep, string_length[^,]*$ + +var-optional5: + func: checksit.generic.check_var + params: + variable: + - prt:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + - units:seconds + +var-optional6: + func: checksit.generic.check_var + params: + variable: + - prt_ratio:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + +var-optional7: + func: checksit.generic.check_var + params: + variable: + - prt_sequence:__OPTIONAL__ + defined_attrs: + - dimension:time, n_prts + - type:float + - units:seconds + +var-optional8: + func: checksit.generic.check_var + params: + variable: + - polarization_mode:__OPTIONAL__ + defined_attrs: + - type:char + rules_attrs: + - dimension: regex:^sweep, string_length[^,]*$ + +var-optional9: + func: checksit.generic.check_var + params: + variable: + - polarization_sequence:__OPTIONAL__ + defined_attrs: + - dimension:sweep, n_prts + - type:char + +var-optional10: + func: checksit.generic.check_var + params: + variable: + - nyquist_velocity:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + rules_attrs: + - units: rule-func:match-one-of:m/s|m s-1 + +var-optional11: + func: checksit.generic.check_var + params: + variable: + - unambiguous_range:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + rules_attrs: + - units: rule-func:match-one-of:meters|metres + +var-optional12: + func: checksit.generic.check_var + params: + variable: + - n_samples:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:int + +var-optional13: + func: checksit.generic.check_var + params: + variable: + - radar_measured_sky_noise:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + - units:dBm + +var-optional14: + func: checksit.generic.check_var + params: + variable: + - radar_measured_cold_noise:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + - units:dBm + +var-optional15: + func: checksit.generic.check_var + params: + variable: + - radar_measured_hot_noise:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + - units:dBm diff --git a/specs/groups/ncas-radar-1.0.0/location-variables.yml b/specs/groups/ncas-radar-1.0.0/location-variables.yml new file mode 100644 index 00000000..984de776 --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/location-variables.yml @@ -0,0 +1,27 @@ +var-requires0: + func: checksit.generic.check_var + params: + variable: + - latitude + defined_attrs: + - type:double + rules_attrs: + - dimension: rule-func:match-one-of:--none--|time +var-requires1: + func: checksit.generic.check_var + params: + variable: + - longitude + defined_attrs: + - type:double + rules_attrs: + - dimension: rule-func:match-one-of:--none--|time +var-requires2: + func: checksit.generic.check_var + params: + variable: + - altitude + defined_attrs: + - type:double + rules_attrs: + - dimension: rule-func:match-one-of:--none--|time diff --git a/specs/groups/ncas-radar-1.0.0/moment-variables.yml b/specs/groups/ncas-radar-1.0.0/moment-variables.yml new file mode 100644 index 00000000..d992ff6b --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/moment-variables.yml @@ -0,0 +1,10 @@ +var-requires: + func: checksit.generic.check_radar_moment_variables + params: + exist_attrs: + - units + - long_name + rule_attrs: + - coordinates: rule-func:match-one-of:elevation azimuth range|elevation azimuth range heading roll pitch rotation tilt + one_of_attrs: + - standard_name|proposed_standard_name diff --git a/specs/groups/ncas-radar-1.0.0/radar-calibration.yml b/specs/groups/ncas-radar-1.0.0/radar-calibration.yml new file mode 100644 index 00000000..961a5422 --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/radar-calibration.yml @@ -0,0 +1,501 @@ +dims-optional: + func: checksit.generic.check_dim_exists + params: + dimensions: + - r_calib:__OPTIONAL__ + +var-optional1: + func: checksit.generic.check_var + params: + variable: + - r_calib_index:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:byte + +var-optional2: + func: checksit.generic.check_var + params: + variable: + - r_calib_time:__OPTIONAL__ + defined_attrs: + - type:char + - units:UTC + rules_attrs: + - dimension: regex:^r_calib, string_length[^,]*$ + +var-optional3: + func: checksit.generic.check_var + params: + variable: + - r_calib_pulse_width:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:seconds + +var-optional4: + func: checksit.generic.check_var + params: + variable: + - r_calib_antenna_gain_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional5: + func: checksit.generic.check_var + params: + variable: + - r_calib_antenna_gain_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional6: + func: checksit.generic.check_var + params: + variable: + - r_calib_xmit_power_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional7: + func: checksit.generic.check_var + params: + variable: + - r_calib_xmit_power_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional8: + func: checksit.generic.check_var + params: + variable: + - r_calib_two_way_waveguide_loss_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional9: + func: checksit.generic.check_var + params: + variable: + - r_calib_two_way_waveguide_loss_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional10: + func: checksit.generic.check_var + params: + variable: + - r_calib_two_way_radome_loss_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional11: + func: checksit.generic.check_var + params: + variable: + - r_calib_two_way_radome_loss_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional12: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_mismatch_loss:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional13: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_mismatch_loss_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional14: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_mismatch_loss_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional15: + func: checksit.generic.check_var + params: + variable: + - r_calib_radar_constant_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional16: + func: checksit.generic.check_var + params: + variable: + - r_calib_radar_constant_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional17: + func: checksit.generic.check_var + params: + variable: + - r_calib_probert_jones_correction:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional18: + func: checksit.generic.check_var + params: + variable: + - r_calib_dielectric_factor_used:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + +var-optional19: + func: checksit.generic.check_var + params: + variable: + - r_calib_noise_hc:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional20: + func: checksit.generic.check_var + params: + variable: + - r_calib_noise_vc:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional21: + func: checksit.generic.check_var + params: + variable: + - r_calib_noise_hx:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional22: + func: checksit.generic.check_var + params: + variable: + - r_calib_noise_vx:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional23: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_gain_hc:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional24: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_gain_vc:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional25: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_gain_hx:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional26: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_gain_vx:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional27: + func: checksit.generic.check_var + params: + variable: + - r_calib_base_1km_hc:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBZ + +var-optional28: + func: checksit.generic.check_var + params: + variable: + - r_calib_base_1km_vc:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBZ + +var-optional29: + func: checksit.generic.check_var + params: + variable: + - r_calib_base_1km_hx:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBZ + +var-optional30: + func: checksit.generic.check_var + params: + variable: + - r_calib_base_1km_vx:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBZ + +var-optional31: + func: checksit.generic.check_var + params: + variable: + - r_calib_sun_power_hc:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional32: + func: checksit.generic.check_var + params: + variable: + - r_calib_sun_power_vc:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional33: + func: checksit.generic.check_var + params: + variable: + - r_calib_sun_power_hx:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional34: + func: checksit.generic.check_var + params: + variable: + - r_calib_sun_power_vx:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional35: + func: checksit.generic.check_var + params: + variable: + - r_calib_noise_source_power_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional36: + func: checksit.generic.check_var + params: + variable: + - r_calib_noise_source_power_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional37: + func: checksit.generic.check_var + params: + variable: + - r_calib_power_measure_loss_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional38: + func: checksit.generic.check_var + params: + variable: + - r_calib_power_measure_loss_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional39: + func: checksit.generic.check_var + params: + variable: + - r_calib_coupler_forward_loss_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional40: + func: checksit.generic.check_var + params: + variable: + - r_calib_coupler_forward_loss_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional41: + func: checksit.generic.check_var + params: + variable: + - r_calib_zdr_correction:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional42: + func: checksit.generic.check_var + params: + variable: + - r_calib_ldr_correction_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional43: + func: checksit.generic.check_var + params: + variable: + - r_calib_ldr_correction_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dB + +var-optional44: + func: checksit.generic.check_var + params: + variable: + - r_calib_system_phidp:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:degrees + +var-optional45: + func: checksit.generic.check_var + params: + variable: + - r_calib_test_power_h:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional46: + func: checksit.generic.check_var + params: + variable: + - r_calib_test_power_v:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + - units:dBm + +var-optional47: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_slope_hc:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + +var-optional48: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_slope_vc:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + +var-optional49: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_slope_hx:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + +var-optional50: + func: checksit.generic.check_var + params: + variable: + - r_calib_receiver_slope_vx:__OPTIONAL__ + defined_attrs: + - dimension:r_calib + - type:float + diff --git a/specs/groups/ncas-radar-1.0.0/radar-parameters.yml b/specs/groups/ncas-radar-1.0.0/radar-parameters.yml new file mode 100644 index 00000000..f64d0d67 --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/radar-parameters.yml @@ -0,0 +1,70 @@ +var-optional0: + func: checksit.generic.check_var + params: + variable: + - radar_antenna_gain_h:__OPTIONAL__ + defined_attrs: + - dimension:--none-- + - type:float + - units:dB + +var-optional1: + func: checksit.generic.check_var + params: + variable: + - radar_antenna_gain_v:__OPTIONAL__ + defined_attrs: + - dimension:--none-- + - type:float + - units:dB + +var-optional2: + func: checksit.generic.check_var + params: + variable: + - radar_beam_width_h:__OPTIONAL__ + defined_attrs: + - dimension:--none-- + - type:float + - units:degrees + +var-optional3: + func: checksit.generic.check_var + params: + variable: + - radar_beam_width_v:__OPTIONAL__ + defined_attrs: + - dimension:--none-- + - type:float + - units:degrees + +var-optional4: + func: checksit.generic.check_var + params: + variable: + - radar_receiver_bandwidth:__OPTIONAL__ + defined_attrs: + - dimension:--none-- + - type:float + - units:s-1 + +var-optional5: + func: checksit.generic.check_var + params: + variable: + - radar_measured_transmit_power_h:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + - units:dBm + +var-optional6: + func: checksit.generic.check_var + params: + variable: + - radar_measured_transmit_power_v:__OPTIONAL__ + defined_attrs: + - dimension:time + - type:float + - units:dBm + diff --git a/specs/groups/ncas-radar-1.0.0/sensor-pointing-variables.yml b/specs/groups/ncas-radar-1.0.0/sensor-pointing-variables.yml new file mode 100644 index 00000000..3985161e --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/sensor-pointing-variables.yml @@ -0,0 +1,24 @@ +var-requires0: + func: checksit.generic.check_var + params: + variable: + - azimuth + defined_attrs: + - type:float + - dimension:time + - units:degrees + - standard_name:ray_azimuth_angle + - long_name:azimuth_angle_from_true_north + - axis:radial_azimuth_coordinate +var-requires1: + func: checksit.generic.check_var + params: + variable: + - elevation + defined_attrs: + - type:float + - dimension:time + - units:degrees + - standard_name:ray_elevation_angle + - long_name:elevation_angle_from_horizontal_plane + - axis:radial_elevation_coordinate diff --git a/specs/groups/ncas-radar-1.0.0/sweep-variables.yml b/specs/groups/ncas-radar-1.0.0/sweep-variables.yml new file mode 100644 index 00000000..c189523e --- /dev/null +++ b/specs/groups/ncas-radar-1.0.0/sweep-variables.yml @@ -0,0 +1,41 @@ +var-requires0: + func: checksit.generic.check_var + params: + variable: + - sweep_number + defined_attrs: + - type:int + - dimension:sweep +var-requires1: + func: checksit.generic.check_var + params: + variable: + - sweep_mode + defined_attrs: + - type:char + rules_attrs: + - dimension: regex:sweep, string_length[^,]* +var-requires2: + func: checksit.generic.check_var + params: + variable: + - fixed_angle + defined_attrs: + - type:float + - dimension:sweep +var-optional0: + func: checksit.generic.check_var + params: + variable: + - sweep_start_ray_index:__OPTIONAL__ + defined_attrs: + - type:int + - dimension:sweep +var-optional1: + func: checksit.generic.check_var + params: + variable: + - sweep_end_ray_index:__OPTIONAL__ + defined_attrs: + - type:int + - dimension:sweep diff --git a/tests/test_generic.py b/tests/test_generic.py index dc48519a..1ef8d273 100644 --- a/tests/test_generic.py +++ b/tests/test_generic.py @@ -266,6 +266,54 @@ def test_check_dim_exists(): assert warnings == [] +def test_check_dim_regex(): + dct = { + "dimensions": { + "first_dim": {}, + "second_dim": {}, + } + } + # Test function correctly identifies no matching dimension + dim_regex = [r"^third_.*$"] + errors, warnings = cg.check_dim_regex(dct, dim_regex) + assert errors == ["[dimension**************:^third_.*$]: No dimension matching regex check in file. "] + assert warnings == [] + + # Test function correctly identifies no matching optional dimensions + dim_regex = [r"^third_.*$:__OPTIONAL__"] + errors, warnings = cg.check_dim_regex(dct, dim_regex) + assert errors == [] + assert warnings == ["[dimension**************:^third_.*$]: No dimension matching optional regex check in file. "] + + # Test function correctly identifies one and multiple matching dimensions + dim_regex = [r"first_.*$"] + errors, warnings = cg.check_dim_regex(dct, dim_regex) + assert errors == [] + assert warnings == [] + + dim_regex = [r"^[^_]*_dim$"] + errors, warnings = cg.check_dim_regex(dct, dim_regex) + assert errors == [] + assert warnings == [] + + # Test function correctly idenfies one and multiple matching optional dimensions + dim_regex = [r"second_.*$:__OPTIONAL__"] + errors, warnings = cg.check_dim_regex(dct, dim_regex) + assert errors == [] + assert warnings == [] + + dim_regex = [r"^[^_]*_dim$:__OPTIONAL__"] + errors, warnings = cg.check_dim_regex(dct, dim_regex) + assert errors == [] + assert warnings == [] + + # Test function correctly handles multiple regex checks + dim_regex = [r"first_.*$", r"^third_.*$:__OPTIONAL__"] + errors, warnings = cg.check_dim_regex(dct, dim_regex) + assert errors == [] + assert warnings == ["[dimension**************:^third_.*$]: No dimension matching optional regex check in file. "] + + def test_check_var(): # Test that the function correctly identifies missing variables dct = { @@ -278,7 +326,7 @@ def test_check_var(): variable = "var3" defined_attrs = ["long_name:Variable 3", "units:s"] errors, warnings = cg.check_var(dct, variable, defined_attrs, skip_spellcheck=True) - assert errors == ["[variable**************:var3]: Optional variable does not exist in file. "] + assert errors == ["[variable**************:var3]: Variable does not exist in file. "] assert warnings == [] # Test that the function correctly handles optional variables @@ -339,7 +387,7 @@ def test_check_var(): variable = "var2" dct = {"variables": {}} errors, warnings = cg.check_var(dct, variable, defined_attrs) - assert errors == ["[variable**************:var2]: Optional variable does not exist in file. "] + assert errors == ["[variable**************:var2]: Variable does not exist in file. "] assert warnings == [] @@ -414,3 +462,39 @@ def test_check_file_name(): errors, warnings = cg.check_file_name(file_name, vocab_checks, rule_checks) assert errors == [] assert warnings == [] + + +def test_check_radar_moment_variables(): + dct = { + "variables": { + "var1": { # moment variable + "coordinates": "some coordinates", + "attribute1": "attribute1_value", + "attribute2": "attribute2_value", + "attribute3": "attribute3_value", + }, + "var2": { # moment variable + "coordinates": "some other coordinates", + "attribute1": "attribute1_value", + "attribute2": "not_attribute2_value", + }, + "var3": { # not moment variable + "attribute1": "attribute1_value", + }, + }, + } + # Test for existence of some attributes in moment variables + exist_attrs = ["attribute1", "attribute2", "attribute3"] + errors, warnings = cg.check_radar_moment_variables(dct, exist_attrs = exist_attrs, skip_spellcheck = True) + assert errors == ["[variable**************:var2]: Attribute 'attribute3' does not exist. "] + assert warnings == [] + + # Test rule attrs and one_of_attrs + rule_attrs = ["attribute1:regex:attribute1_value", "attribute2:regex:attribute2_value"] + one_of_attrs = ["attribute3|attribute4"] + errors, warnings = cg.check_radar_moment_variables(dct, rule_attrs = rule_attrs, one_of_attrs = one_of_attrs) + assert errors == [ + "[variables:******:var2] Value of attribute 'attribute2' - Value 'not_attribute2_value' does not match regular expression: 'attribute2_value'.", + "[variable:**************:var2]: One attribute of '['attribute3', 'attribute4']' must be defined." + ] + assert warnings == [] diff --git a/tests/test_readers.py b/tests/test_readers.py index b1419bb5..a8975c8e 100644 --- a/tests/test_readers.py +++ b/tests/test_readers.py @@ -44,6 +44,7 @@ def test_cdl_reader_netcdf(): assert sorted(d.keys()) == sorted(["global_attributes", "dimensions", "variables", "inpt"]) assert list(d["global_attributes"].keys()) == ["test_attribute_name"] assert d["global_attributes"]["test_attribute_name"] == "test_attribute_value" - assert list(d["variables"].keys()) == ["T"] + assert list(d["variables"].keys()) == ["T", "P"] assert sorted(d["dimensions"].keys()) == sorted(["x", "y", "z"]) - assert d["inpt"] == ncfile \ No newline at end of file + assert d["variables"]["P"]["dimension"] == "--none--" + assert d["inpt"] == ncfile diff --git a/tests/test_rules.py b/tests/test_rules.py index 15811663..f24c1178 100644 --- a/tests/test_rules.py +++ b/tests/test_rules.py @@ -307,6 +307,13 @@ def test_datetime_rule(rules): assert not re.fullmatch(rules['datetime']['regex-rule'], '2022-01-01T00:00') assert not re.fullmatch(rules['datetime']['regex-rule'], '2022-01-01') +def test_datetimeZ_rule(rules): + assert re.fullmatch(rules['datetimeZ']['regex-rule'], '2023-11-17T15:00:00Z') + assert re.fullmatch(rules['datetimeZ']['regex-rule'], '2023-11-17T15:00:00.000Z') + assert not re.fullmatch(rules['datetimeZ']['regex-rule'], '2023-11-17T15:00:00') + assert not re.fullmatch(rules['datetimeZ']['regex-rule'], '2023-11-17 15:00:00Z') + assert not re.fullmatch(rules['datetimeZ']['regex-rule'], '2023-11-17T15:00Z') + def test_datetime_or_na_rule(rules): assert re.fullmatch(rules['datetime-or-na']['regex-rule'], '2022-01-01T00:00:00') assert re.fullmatch(rules['datetime-or-na']['regex-rule'], '2022-01-01T00:00:00.123') diff --git a/tests/testdata/netcdf/test_netcdf.nc b/tests/testdata/netcdf/test_netcdf.nc index 27f90ca7..39481514 100644 Binary files a/tests/testdata/netcdf/test_netcdf.nc and b/tests/testdata/netcdf/test_netcdf.nc differ