wiki:tickets/249

Version 155 (modified by rupert, 3 years ago) (diff)

--

Questionnaire to CIM Conversion

Intro

In order to translate from a questionnaire instance to CIM instances we need to have at least captured the information that is required to be a valid CIM instance. Of course there will be lots of additional optional CIM information that will be useful too but capturing this information (or not) in the questionnaire is a scientific decision. All the questions that the questionnaire asks can be represented in the CIM (otherwise why are people filling them in). This ticket is looking at the technical issues of translating from questionnaire instances to CIM instances.

The current version of the Questionnaire (that is being worked on) is 1.1. The current version of the CIM that is being targeted is 1.5. The plan is for the release version of 1.5 to be able to capture all the concepts in the questionnaire.

To Do

  1. update the tables below with the latest mappings : component [done], simulation, ensembles, grid, references, file, platform, responsible party, composition, conformance
  2. go through Mark E's cardinality info questions
  3. add support for grids (in progress)
  4. talk to Allyn about related simulation
  5. sort out times, dates and calendars including spatiotemporal constraints
  6. fix ensembles doc issue
  7. sort out model mods associated with a simulation with Allyn

Issues (depending on others)

  1. component/type/vocabulary server solution [Allyn emailed 21/09/10 ]
  2. component/genealogy/yearReleased : should this be a datetime? [Gerry ticket 803]
  3. Support for "special" components in the questionnaire [Gerry ticket 797]
  4. Implement Mark E's cardinality changes [Gerry ticket 663]
  5. duration should be mandatory in the questionnaire - need to ticket Gerry
  6. startpoint and endpoint. These must have values in the CIM.
  7. q2cim coupling does not match (transformations) temporal add order [Bryan ticketed 665]
  8. file dataObject@dataStatus is mandatory. Do I put complete here?
  9. file distribution@distributionFormat has the same value as storage/ipStorage@dataFormat in the questionnaire. Is that right? What is the difference?
  10. file CIM has a standardName (used in dataObject/content/topic) but the name you supply (CF in our case) is not part of an enumerated list.
  11. Simulation questionnaire duration start and end should be dates
  12. Simulation duration period should be integer? (can we guarantee this?)
  13. Simulation duration @units have more possible values in the questionnaire than the CIM. CIM is limited to days, months, years
  14. Simulation authorship. This is just text [Gerry ticket 798]

Decisions

  1. I've added the centre information as a responsible party to the simulation CIMObject and to the component/model CIMObject
  2. The questionnaire default responsible party "Unknown" is not output in the CIM
  3. The questionnaire responsible party URI is output in the CIM as a comment in case it is needed in the future
  4. Unlike the questionnaire, responsible parties will be added in-place in the CIM as there is no concept of a responsible party CIMObject that can be referenced. By adding the uri we can always remove redundancy in the future and others can avoid redundancy.
  5. The CIM output from the questionnaire will not have any information about simulation control runs so the control attribute will always be set to false
  6. The questionnaire requires one to add the type of conformance. The possible values are "Not Conformant", "Standard Config", "Via Combination", "Via Inputs", and "Via Model Mods". We already capture Not Confomant and Standard Config. I think we can work out the others as they are based on the actual conformances so I am going to ignore these in the CIM.

Q2CIM Translation

Text in bold in the tables indicates an unresolved issue

grid translation

QuestionnaireCIM1.5notes
gridgridSpec/esmModelGrid
grid/shortNamegridSpec/esmModelGrid/shortName
grid/longNamegridSpec/esmModelGrid/longName
grid/descriptiongridSpec/esmModelGrid/description
grid/attributes????Users can add their own name value pairs here. Proposal : remove this option.
grid/horizontalGridn/aShould this be horizontal properties of the grid, rather than a horizontal grid? Proposal : change the default name.
grid/horizontalGrid/shortName????The CIM has a gridTile shortName so this information could go there but this questionnaire input is a name associated with the horizontal properties of the grid. Proposal : remove this as an editable option.
grid/horizontalGrid/longName????The CIM has a gridTile shortName so this information could go there but this questionnaire input is a name associated with the horizontal properties of the grid. Proposal : remove this option.
[if discretization==other,N/A or compositeDiscretization==other]grid/horizontalGrid/descriptionWe would hope that people would describe why they have put other and perhaps N/A in this description, so it has a use in this case. So perhaps this is an argument for keeping this in the CIM and adding the information to the grid/description - see below
grid/horizontalGrid/description????The CIM has a gridTile description so this information could go there but there is no option to describe the horizontal properties of the grid separately from the vertical properties of the grid. Proposal : add this information to the CIM grid/description.
grid/horizontalGrid/attributes????Users can add their own name value pairs here. Proposal : remove this option.
grid/horizontalGrid/coordinateSystemn/a
grid/horizontalGrid/coordinateSystem/mnemonic????Is this mnemonic meant to describe the grid? If so, why is it different to the grid shortName? If not, what is it associated with? Proposal : remove this option.
grid/horizontalGrid/coordinateSystem/discretization [if discretization != composite,N/A]gridSpec/esmModelGrid/gridTile@discretizationCIM/gridSpec terminology uses horizontal properties to define the grid. Should we change this? Proposal : change to gridTile@horizontalDiscretization
grid/horizontalGrid/coordinateSystem/discretization [if discretization == N/A]n/aDo not provide the gridSpec/esmModelGrid/gridTile@discretization property in this case.
[if discretization==composite] grid/horizontalGrid/coordinateSystem/compositeDiscretizationgridSpec/esmModelGrid/gridTile@discretizationcompositeDiscretization is multi-valued so create a separate gridTile for each discretization entry
grid/horizontalGrid/coordinateSystem/resolutiongridSpec/esmModelGrid/gridTile/horizontalResolution
grid/horizontalGrid/coordinateSystem/refinementScheme????Presumably this is a property of a gridTile rather than a grid? Proposal : add a property gridSpec/esmModelGrid/gridTile/refinementScheme.
grid/horizontalGrid/coordinateSystem/typegridSpec/esmModelGrid@gridTypeValid CV values depend on choice of horizontal discretization. Again we are using horizontal properties to define the grid. Proposal : change to esmModelGrid@horizontalGridType
[if discretization==composite] grid/horizontalGrid/coordinateSystem/compositeGrid????Is this a grid name? Why is it not the same as the mnemonic and (more importantly) the grid shortName? Proposal : remove this option.
[if grid/horizontalGrid/coordinateSystem/type is *]????Depending on the grid type the grid resolution needs different attributes to be defined. Proposal : make a horizontalResolution container which can contain 1 to n name value pairs which conform to this CV. So gridSpec/esmModelGrid/gridTile/horizontalResolution/property @name="xx"/"yy". We could then make the existing horizontalResolution value an attribute. This structure presumably makes the nx and ny attributes of a gridTile redundant. Note, I will place the different values in the different tiles for a composite.'
grid/horizontalGrid/coordinateSystem/attributes????Users can add their own name value pairs here. Proposal : remove this option.
grid/horizontalGrid/extentn/aThis applies for the whole grid ignoring the number of tiles so should be associated with the grid rather than gridTile? If not, how does this work if compositegrid is selected? Proposal : add extent to esmModelGrid but I expect to be shot down :-)
grid/horizontalGrid/extent/LatMin????see above
grid/horizontalGrid/extent/LatMax????see above
grid/horizontalGrid/extent/LonMin????see above
grid/horizontalGrid/extent/LonMax????see above
grid/horizontalGrid/extent/attributes????Users can add their own name value pairs here. Proposal : remove this option.
grid/verticalGridn/aShould this be vertical properties of the grid, rather than a vertical grid? Proposal : change the default name.
grid/verticalGrid/shortName????The CIM has a gridTile shortName so this information could go there but this questionnaire input is a name associated with the vertical properties of the grid. Proposal : remove this as an editable option.
grid/verticalGrid/longName????The CIM has a gridTile shortName so this information could go there but this questionnaire input is a name associated with the vertical properties of the grid. Proposal : remove this option.
grid/verticalGrid/description????The CIM has a gridTile description so this information could go there but there is no option to describe the vertical properties of the grid separately from the horizontal properties of the grid. This description information may be used to explain why "other" has been chosen for a particular option. Proposal : add this information to grid/description.
grid/verticalGrid/attributes????Users can add their own name value pairs here. Proposal : remove this option.
grid/verticalGrid/coordinatesystemn/a
grid/verticalGrid/coordinateSystem/type????Is type actually equivalent to discretisation (in horizontal grid terms)? If that is the case I think this should be added in the same place. Proposal : add the following gridSpec/esmModelGrid/gridTile@verticalDiscretization and change the existing gridType attribute to horizontalDiscretization. Also I suggest that we change the mindmap names to be consistent.
grid/verticalGrid/coordinateSystem/coordinate????Is coordinate actually equivalent to type (in horizontal grid terms)? If so I think this property helps define the grid. Proposal : add an additional attributes like gridSpec/esmModelGrid@verticalGridType and change the existing gridType attribute to horizontalGridType. Also I suggest that we change the mindmap names to be consistent.
grid/verticalGrid/coordinateSystem/surfaceReference, partialSteps or hybridization????Proposal : make a verticalResolution container which can contain 1 to n name value pairs which conform to this CV. So gridSpec/esmModelGrid/gridTile/horizontalResolution/property @name="xx"/"yy". We could then make the existing verticalResolution value an attribute. Note, I would replicate the same vertical values in the different tiles for a composite.'
grid/verticalGrid/AtmosphericLevels or OceanicLevels????Why are we associating levels with components here? I would (naively) say that a grid should not be associated with a component; rather a component is associated with a grid. If this is really the way these things are distinguished then we could add an associated id or a type. My first reaction is that I would prefer to just add levels and have a load of associated properties. Proposal : add this information by modifying the verticalResolution element in the same way as the horizontalResolution element would be modified. The fact properties are associated with an ocean grid or atmos grid can be inferred by the component referencing the grid.
grid/verticalGrid/AtmosphericLevels or OceanicLevels/attributes????Users can add their own name value pairs here. Proposal : remove this option

The top level grid component is ignored by the Q2CIM translator as it is going to be removed

ensembles translation

QuestionnaireCardinalityCIM1.5

references translation

QuestionnaireCardinalityCIM1.5notestds tag or attribute
mnemonic>>1citation/gmd:CI_Citation/gmd:title/gco:CharacterString
citation/gdm:CI_Citation/gmd:dateI leave this mandatory element empty
type
0citation/gmd:CI_Citation/gmd:presentationForm/gmd:CI_PresentationFormCode@codeListValueI leave the @codeList empty [ME - no date on interface]
link0...1citation/gmd:CI_Citation/gmd:otherCitationDetails/gco:CharacterString
citation1citation/gmd:CI_Citation/gmd:collectiveTitle/gco:CharacterString

file translation

QuestionnaireCardinalityCIM1.5notestds tag or attribute
filedataObject
dataObject@dataStatus='complete'I just set this to complete at the moment. I'm not sure what it means.
file/abbrev1dataObject/acronymCurrently optional in the questionnaire
file/description0...1dataObject/description
dataObject/storage
dataObject/storage/ipStorage
dataObject/storage/ipStorage@dataLocation='''''This is currently required. Just set this to empty stringfile_id
file/name1dataObject/storage/ipStorage/fileName
dataObject/storage/ipStorage/dataSize='0'Required in the CIM but not supplied in the Q
dataObject/storage/ipStorage/protocolRequired in the CIM but not supplied in the Q
dataObject/storage/ipStorage/hostRequired in the CIM but not supplied in the Q
file/link0...1dataObject/storage/ipStorage/path
file/format1dataObject/storage/ipStorage/dataFormat@value
dataObject/distributionRequired in the CIM
dataObject/distribution@distributionAccess='OnlineFileHTTP'Required in the CIM but not supplied in the Q
file/formatdataObject/distribution/distributionFormat@valueUsing the same value here as for storage
dataObject/distribution/responsiblePartyRequired in the CIM but not supplied in the Q
file/reference0...1dataObject/citationSee references translation table
file/variabledataObject/contentOne content element per file/variable
dataObject/content/topic
file/variable/name1dataObject/content/topic/namevariables/name
file/variable/unit1dataObject/content/topic/unitvariables/units
file/variable/cfname0...1dataObject/content/topic/standardName[@standard='CF']variables/vocabulary_name
file/variable/description0...1dataObject/content/topic/descriptionvariables
dataObject/content/aggregationRequired in the CIM but not supplied in the Q
dataObject/content/frequencyRequired in the CIM but not supplied in the Q
file/variable/reference0...1dataObject/content/citationSee references translation table

platform translation

QuestionnaireCardinalityCIM1.5Notes
platformplatform
name1platform/shortName and platform/longName and platform/machine/machineName
contact (responsible party)0...1platform/contact
Vendor1platform/machine/machineVendor
Maximum Processors0...1platform/machine/machineMaximumProcessors
Cores Per Processor0...1platform/machine/machineCoresPerProcessor
Processor type0...1platform/machine/machineProcessorType
Interconnect type0...1platform/machine/machineInterconnect
Hardware (type)0...1platform/machine/machineSystem
Operating System1platform/machine/machineOperatingSystem
Compiler1platform/compiler/compilerName
Compiler Version1platform/compiler/compilerVersion
platform/compiler/compilerLanguage
Extra information0...1platform/description

responsibleParty translation

QuestionnaireCardinalityCIM1.5Notestds tag or attribute
Responsible PartiesresponsibleParty
type(Contact,Lead Author,Funder,...)responsibleParty/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode@codeListcould be used:  http://wis.wmo.int/2006/catalogues/gmxCodelists.xml#CI_RoleCodeis used:  http://wis.wmo.int/2006/catalogues/gmxCodelists.xml#CI_RoleCode
type(Contact,Lead Author,Funder,...)responsibleParty/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode@codeListValuevalue examples: distributor, originator, pointOfContact,principalInvestigator,... from:  http://wis.wmo.int/2006/catalogues/gmxCodelists.xml#CI_RoleCode
uriresponsibleParty/CommentOutput questionnaire uri as a comment in case it is of benefit in the future.
Name [if isOrganisation==false]1responsibleParty/gmd:CI_ResponsibleParty/!gmd:individualName/!gco:CharacterStringUse individual name if isOrganisation is falseinstitute or institute_id
Name [if isOrganisation==true]1responsibleParty/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterStringUse organisation name if isOrganisation is trueinstitution
Abbreviation1responsibleParty/abbreviation[ME - this is a mandatory field in the Q form - I think the system should derive the abbreviation to keep it simple]
WebPage0...1responsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo
Email0...1responsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString
Address0...1responsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:deliveryPoint/gco:CharacterString

simulation translation

QuestionnaireCardinalityCIM1.5Notes
simulationsimulation
shortName1simulation/shortName
longName1simulation/longName
Model1simulation/model/reference (see reference table)reference to a model component
Platform1simulation/deployment/reference (see reference table)reference to a deployment
Ensemble Members1simulation/commentNot output yet. Allyn is looking into supporting this [ME - defaults to 1]
Description0...1simulation/rationale
Author1simulation/commentNot sure how to handle this [ME - Q allows three parties to be defined - contact is the key one; I'm not even sure what an author is in the context of a simulation]
ModelMods0...nOnly included via a conformance?
simulation/supports/reference (see reference table)reference to an experiment. This is already set up in the questionnaire
Conformance0...nconformance (see conformance table)a conformance to a numerical requirement
Durationsimulation/duration
Duration/Calendar?simulation/duration/[Calendar Value]Calendar can be 'daily-360, realCalendar, perpetualPeriod'. The CIM element takes this name
Duration/LengthUnitssimulation/duration/[Calendar Value]@units
simulation/duration/[Calendar Value]/range
simulation/duration/[Calendar Value]/range/closedDateRangeDon't know whether to use openDateRange or closedDateRange
Duration/startsimulation/duration/[Calendar Value]/range/closedDateRange/startDateShould be a date type
Duration/endsimulation/duration/[Calendar Value]/range/closedDateRange/endDateShould be a date type
Duration/durationWhat is this?
Related Simulation

composition translation

QuestionnaireCardinalityCIM1.5notes
component/componentProperties/componentPropertyAdd a new component property to the appropriate input component
componentInput/ShortName1component/componentProperties/componentProperty/shortName
componentInput/ShortNamecomponent/componentProperties/componentProperty/longName
componentInput/type1composition/coupling@purpose
componentInput/description0...1component/componentProperties/componentProperty/description
componentInput/units0...1component/componentProperties/componentProperty/units@value
componentInput/cfname0...1component/componentProperties/componentProperty/cfName
binding/couplingType1composition/coupling@type
binding/couplingFrequency1composition/coupling/timeProfile/rate
binding/couplingFrequencyUnits1composition/coupling/timeProfile@units
composition/coupling/couplingTarget/reference
binding/file1composition/coupling/couplingSource/reference
binding/variable1...ncomposition/coupling/couplingSource/reference
binding/component1composition/coupling/couplingSource/reference
binding/spatialRegridding==Conservative1composition/coupling/spatialRegridding@conservativeSpatialRegridding=true
binding/spatialRegridding==Non-Conservative1composition/coupling/spatialRegridding@conservativeSpatialRegridding=false
binding/spatialRegridding==None1
binding/temporalTransformation==TimeAccumulation1composition/coupling/timeTransformation@timeAccumulation=true
binding/temporalTransformation==TimeAverage1composition/coupling/timeTransformation@timeAverage=true
binding/temporalTransformation==Exact or LastAvailable? or Other or TimeInterpolation1composition/coupling/comment
binding/description0...1composition/coupling/description

conformance translation

QuestionnaireCardinalityCIM1.5Notes
simulation/conformancesimulationRun/conformance
HowConformed?=="Not Conformant"1simulationRun/conformance@conformant=falseHowConformed? is one of : Not Conformant, Standard Configuration, Via Input Mods, Via Model Mods, Via Combination
HowConformed?!="Not Conformant"1simulationRun/conformance@conformant=true
howConformedsimulationRun/comment
simulationRun/conformance/requirement/referenceThis questionnaire is set up so that a conformance is associated with a numerical requirement of an experiment so we can work out what it is referencing.
Notes0...1simulationRun/conformance/description
Model Modification0...nsimulationRun/conformance/source/referencereference the component associated with this modification
Model Modification/typesimulationRun/conformance/source/reference/change/detail@typeDoes not currently conform to the CIM enumerations.
Model Modification/mnemonicsimulationRun/conformance/source/reference/change/detail/comment
Model Modification/descriptionsimulationRun/conformance/source/reference/change/detail/description
Input Bindings0...nsimulationRun/conformance/source/referencereference the component property associated with this input binding. Input bindings have no model modification details

component translation

Questionnaire
Questionnaire datatypeQuestionnaire CardinalityCIM1.5CIM
Cardinality
notes + questions
"Special" ComponentmodelComponent/ componentProperties componentPropertyTo allow for a hierarchy of properties, the questionnaire allows certain tagged properties to be treated as restricted components. These components can only have a short and long name.
"Special" Component/ ShortNamemodelComponent/ componentProperties componentProperty/ shortName
"Special" Component/ LongNamemodelComponent/ componentProperties componentProperty/ longName
Componentn/a0..nmodelComponent0..nAll questionnaire components are assumed to be model components i.e. none are processor components.
Component/ ShortNamestring1modelComponent/ shortName1
Component/ LongNamestring1modelComponent/ longName1
Component/ TypeCV or User Defined string1modelComponent/ type/ @value1..2All components have a metafor type. Realm components, in addition, have a DRS type, hence the cardinality of 2.
modelComponent/ type/ vocabularyServer/ vocabularyNameAdd in a vocabulary name of metafor for metafor CV and DRS for realm names
modelComponent/ type/ vocabularyServer/ @hrefReference a Metafor SVN file?
Component/ Implementedboolean1n/an/aIndicates whether the component exists in the coupled model (or not). If not then all it's descendents also do not exist.
Component/ Responsible parties0..3see responsible parties table
n/an/aCIMRecord/ modelComponent/ childComponent0..nGenerated from questionnaire component hierarchy.
Component/ Attribute Container (paramgroup) name!=ComponentAttributen/aCIMRecord/ modelComponent/ componentProperties/ componentProperty @name=paramgroupTreat attribute containers as CIM properties if they are not the default container. Any parameters within these containers will be contained within the associated CIM property, leading to complex properties
Component/ Attribute Container (paramgroup) name==ComponentAttributen/an/aIgnore attribute containers if the name is ComponentName? + Attribute as this is a convenience for the questionnaire.
Component/ Attribute Container/ Constraintn/a0..1n/aconformance to these constraints will be checked in the validation stage
Component/ Attribute Container/ Attributen/a0..nCIMRecord/ modelComponent/ componentProperties componentProperty/All attributes are assumed to be componentProperties. I do not make use of scientificProperties or numericProperties.
Component/ Attribute Container/ Attribute/ NameCV or User Defined string1CIMRecord/ modelComponent/ componentProperties componentProperty/ shortName & longNameMapping name to both shortName and longName.
Component/ Attribute Container/ Attribute/ ValueCV or User Defined string1..nCIMRecord/ modelComponent/ componentProperties componentProperty/ valueA questionnaire value may contain more than one value in a "|" separated list. If there is more than one value then it has separate value elements in the CIM.
Component/ Attribute Container/ Attribute/ Value== N/An/an/aDo not output a property if its value is N/A
Component/ Genealogyn/a0..1n/a
Component/ Genealogy/ YearReleasedstring0..1modelComponent/releaseDateUse validator to make sure it is a datetime, restrict to a datetime in questionnaire, or relax the CIM rules?
Component/ Genealogy/ PreviousVersionstring0..1modelComponent/ documentGenealogy/ relationship/ documentRelationship[@type=''previousVersion"]/ target/ reference/ nameBit of a cludge as it is not a document reference that we are storing here. Perhaps use "name" instead?
Component/ Genealogy/ Improvementsstring0..1modelComponent/ documentGenealogy/ relationship/ documentRelationship/ description
Component/ AdditionalInformationstring0..1CIMRecord/ modelComponent/ description
Component/ References0..nsee references table0..n
n/aCIMRecord/ modelComponent@ documentVersionGenerated by the Questionnaire
n/aCIMRecord/ modelComponent/ documentCreationDateGenerated by the Questionnaire when the CIM document is created
n/aCIMRecord/ modelComponent/ documentIDGenerated by the questionnaire (using uuid for the model object)
n/aCIMRecord/ modelComponent @CIMVersionAdd current CIM version
Component/ InputRequirements0..nsee composition table
grid0..1see grid tablecomponent will reference the associated grid.