Skip to content

Commit

Permalink
New version of XML schema file (cf-convention#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbarring committed Mar 25, 2024
1 parent 419c899 commit 444f308
Showing 1 changed file with 120 additions and 0 deletions.
120 changes: 120 additions & 0 deletions Data/schema-files/cf-standard-name-table-2.0.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com) by Bob Drach (UNIV OF CA LLNL) -->
<!--W3C Schema generated by XMLSPY v5 rel. 2 U (http://www.xmlspy.com)-->
<!--March 2024 Updated by Lars Bärring (SMHI Rossby Centre).-->
<!--See issue cf-convention.github.io/#457 for overview, and specific issue references in the documentation attributes.-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified">

<xs:element name="alias">
<xs:annotation>
<xs:documentation>The alias element contains one or more entry_id element(s) with the id of the entry containing the definition. It is intended as a mechanism for modifying standard names in a backward compatible fashion. Typically, there is one entry_id, but in a few instances there are two entry_id, for example if a standard name is divided into upwards and downwards alternatives (issue cf-conventions/#509).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="entry_id" maxOccurs="2"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
</xs:element>

<xs:element name="amip" type="xs:string">
<xs:annotation>
<xs:documentation>AMIP identifier</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="canonical_units" type="xs:string">
<xs:annotation>
<xs:documentation>Standard SI units for this variable. In a netCDF file, the variable should have units that are translatable to the canonical units.</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="contact" type="xs:string">
<xs:annotation>
<xs:documentation>The person or institution that is responsible for maintaining the standard name table.</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="conventions" type="xs:string">
<xs:annotation>
<xs:documentation>Conventions string: "CF-StandardNameTable-X" where X is the version number (issue cf-conventions/#500).</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="description" type="xs:string">
<xs:annotation>
<xs:documentation>A textual description of the variable.</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="entry">
<xs:annotation>
<xs:documentation>An entry element contains the description, units, and correspondence to other standard name schemes, for one variable.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element ref="description"/>
<xs:element ref="canonical_units"/>
<xs:element ref="grib" minOccurs="0"/>
<xs:element ref="amip" minOccurs="0"/>
</xs:all>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
</xs:element>

<xs:element name="entry_id" type="xs:IDREF">
<xs:annotation>
<xs:documentation>See alias.</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="first_published_date" type="xs:dateTime">
<xs:annotation>
<xs:documentation>Datetime when the standard name table was first published (issue cf-conventions/#511).</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="grib" type="xs:string">
<xs:annotation>
<xs:documentation>GRIB parameter code. ECMWF codes start with 'E', NCEP codes with 'N'. Standard FM92 codes are not prefaced.</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="institution" type="xs:string">
<xs:annotation>
<xs:documentation>Institution that maintains the standard name table.</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="last_modified" type="xs:dateTime">
<xs:annotation>
<xs:documentation>Datetime when last modified.</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="version_number" type="xs:string">
<xs:annotation>
<xs:documentation>Version number of the standard name table.</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="standard_name_table">
<xs:annotation>
<xs:documentation>Top level element of the table.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="version_number"/>
<xs:element ref="conventions"/>
<xs:element ref="first_published_date"/>
<xs:element ref="last_modified"/>
<xs:element ref="institution"/>
<xs:element ref="contact"/>
<xs:element ref="entry" maxOccurs="unbounded"/>
<xs:element ref="alias" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

0 comments on commit 444f308

Please sign in to comment.