wiki:tickets/254

The questionnaire input needs to be checked for completeness. The Questionnaire can perform checks to do with ordinality but it can not check constraints between different parts of the Questionnaire. There is a validation stage which checks these more complicated constraints.

Here is the list of constraints that I've come across so far. Please add any that are missing and/or comment on existing constraints if you disagree with them. The three types for status are "Implemented", "Pending", "Proposed".

  • Implemented: means that it is already part of the questionnaire validation process.
  • Pending: means that it has been agreed (or is obvious) but has not yet been implemented.
  • Proposed: someone thinks that this should be a constraint but is not sure so it needs discussion.

The types of rules may be divided into several categories, each represented in one of the tables below.

Table 1: CMIP5 constraints not enforced by the Questionnaire

DescriptionStatusComment
Every unconstrained property, or constrained property with valid constraints, within a component, must have a valueImplementedWe can not check for this in the questionnaire by making all values mandatory as properties within constraints may or may not require a value depending on whether a constraint is met
Model Components' constraints must be complete and consistent.ImplementedSchematron rule.
Simulation 'Numerical Requirements' conformance conditions must each be complete and must all be met.ImplementedSchematron rule.
Model's initial condition inputs must be completely specified.ImplementedSchematron rule.
Model's initial condition inputs must specify either Units or CF value.ImplementedSchematron rule.
Text for Component/Genealogy?/improved is only meaningful if a Component/Genealogy?/previousVersion is provided.ImplementedSchematron rule.
In a Component Property, where the 'N/A' options in an exclusive list is chosen, it must not be possible to choose any other option.ImplementedSchematron rule.
Email required for citation contact author (specified by attribute)ImplementedSchematron rule.
Ensemble Characteristics must contain a unique combination of mods in which each mod is itself unique.ImplementedSchematron rule.
Ensemble Characteristics require that each DRS member name is unique independent of the arrangement of associated mods.ImplementedQuestionnaire does this(?)
Ensemble Characteristics must contain a Description for each ensemble.ImplementedSchematron rule.
Simulation's 'conformance' page: the specification of 'How this Simulation conformed' must be present and must be consistent with the (e.g.) input bindings and specifications provided.ImplementedSchematron rule.
Within a Platform, a 'compiler version' cannot be specified without there also being a 'compiler'.ImplementedSchematron rule.

Table 2: CIM constraints not enforced by schema

This category of constraint includes those unable to be completely specified by an XML schema document, due either to their complexity or to the arrangement of dependencies between entities.

DescriptionStatusComment
A composition may only link entities at the level of its immediate parent or lower. Pending Schematron rule.

Table 3: CMIP5 constraints enforced only by the Questionnaire

These rules replicate those included in the Questionnaire software and are intended to be applied to CIM documents originating outside the Questionnaire, and therefore not subject to these constraints on creation.

DescriptionStatusComment

Addendum: Machine-generated rules

These rules originate from a constraint-specification language and are compiled into the corresponding Schematron statements by code.

DescriptionStatusComment
In Aerosol Key Properties, where Method is Specific time stepping (operator splitting), values must be provided for both AdvectionTimeStep and PhysicalTimeStep.ImplementedSchematron rule.
In Aerosol Key Properties, where Method is Specific time stepping (integrated), values must be provided for TimeStep and SchemeType.ImplementedSchematron rule.
In Aerosol Emission And Conc, where 2D-Emissions Method is prescribed (climatology), values must be provided for ClimatologyType and SpeciesEmitted.ImplementedSchematron rule.
In Aerosol Emission And Conc, where 2D-Emissions Method is prescribed (spatially uniform), a value must be provided for SpeciesEmitted.ImplementedSchematron rule.
In Aerosol Emission And Conc, where 2D-Emissions Method is interactive, a value must be provided for SpeciesEmitted.ImplementedSchematron rule.
In Aerosol Emission And Conc, where 2D-Emissions Method is other, values must be provided for MethodCharacteristics and SpeciesEmitted.ImplementedSchematron rule.
In Aerosol Emission And Conc, values must be provided for both 3D-Emissions Method and SourceTypes.ImplementedSchematron rule.
In Aerosol Emission And Conc, where 3D-Emissions Method is prescribed (climatology), values must be provided for ClimatologyType and SpeciesEmitted.ImplementedSchematron rule.
In Aerosol Emission And Conc, where 3D-Emissions Method is prescribed (spatially uniform), a value must be provided for SpeciesEmitted.ImplementedSchematron rule.
In Aerosol Emission And Conc, where 3D-Emissions Method is interactive, a value must be provided for SpeciesEmitted.ImplementedSchematron rule.
In Aerosol Emission And Conc, where 3D-Emissions Method is other, values must be provided for MethodCharacteristics and SpeciesEmitted.ImplementedSchematron rule.
In AtmosConvectTurbulCloud, where the BoundaryLayerTurbulence SchemeName is Mellor-Yamada, a value must be specified for the ClosureOrder field.ImplementedSchematron rule.
In AtmosConvectTurbulCloud, where the DeepConvection SchemeType is Mass-Flux, a value must be specified for the SchemeMethod field.ImplementedSchematron rule.
In AtmosConvectTurbulCloud, where the ShallowConvection Method is separated, values must be specified for both the SchemeName and SchemeType fields.ImplementedSchematron rule.
In AtmosDynamicalCore, where the HorizontalDiscretization SchemeType is fixed grid, a value must be specified for the SchemeMethod field.ImplementedSchematron rule.
In AtmosDynamicalCore, where SchemeType is Fixed Grid and SchemeMethod is either Finite Differences or Centered Finite Differences, a value must be specified for the SchemeOrder field.ImplementedSchematron rule.
In AtmosKeyProperties, where the VolcanoesImplementation is via stratospheric aerosols optical thickness, a value must be specified for the VolcanoesImplementationMethod field.ImplementedSchematron rule.
In AtmosKeyProperties, where the OrographyType includes the type modified, a value must be specified for the OrographyChanges field.ImplementedSchematron rule.
In AerosolTransport, where the Method is specified to be a Specific Transport Scheme, values must be provided for each of the SchemeType, MassConservation and Convection fields.ImplementedSchematron rule.
In AerosolTransport, where the Turbulence Method is Specific Turbulence Scheme, a value must be specified in the Scheme field.ImplementedSchematron rule.
In Sea Ice Key Properties, where the SeaIceRepresentation SchemeType is Multi-Levels, a value must be specified in the Multi-LevelsScheme field.ImplementedSchematron rule.
In Sea Ice Key Properties, where the TimeSteppingFramework methods include Specific Time Step, a value must be specified for the TimeStep field.ImplementedSchematron rule.