<!--  JMGRIB: Joint METOC XML format for grid data DTD -->
<!--  Created: 20010416   Revised: 20020808 -->



<!ENTITY % Times "
	baseTime NMTOKEN #REQUIRED
	forecastPeriod NMTOKEN #IMPLIED
	insertTime NMTOKEN #IMPLIED
">


<!ENTITY % Lat "NMTOKEN #REQUIRED">


<!ENTITY % Lon "NMTOKEN #REQUIRED">


<!-- This is the root element of the JMGRIB header. It encloses all meta-information about a GRIB record. -->

<!ELEMENT GribDesc (Center, Model, Parameter, Layer, Projection, Data)>


<!ATTLIST GribDesc
	%Times;
	GRIBVer NMTOKEN '1'
>


<!-- Originating center identification -->

<!ELEMENT Center EMPTY>


<!ATTLIST Center
	centerSubcenterId NMTOKEN #REQUIRED
	description CDATA #IMPLIED
>


<!-- Identification of a process that created the gridded data. -->

<!ELEMENT Model EMPTY>


<!ATTLIST Model
	id NMTOKEN #REQUIRED
	description CDATA #IMPLIED
>


<!-- An environmental parameter -->

<!ELEMENT Parameter EMPTY>


<!-- Attributes define a parameter, see GRIB Table 2. -->

<!ATTLIST Parameter
	code ID #REQUIRED
	description CDATA #REQUIRED
	units NMTOKEN #REQUIRED
>


<!-- Geophysical layer to which the gridded data pertain. -->

<!ELEMENT Layer EMPTY>


<!ATTLIST Layer
	code NMTOKEN #REQUIRED
	typeCode NMTOKEN '1'
	lower NMTOKEN #IMPLIED
	upper NMTOKEN #IMPLIED
>


<!-- The <code>Projection</code>
 element describes the
projection and the grid. This element roughly corresponds to the Grid
Description Section (GDS) of a GRIB record. -->

<!ELEMENT Projection (Proj-Mercator | Proj-LatLon | Proj-LambertConf)>


<!ATTLIST Projection
	code NMTOKEN #IMPLIED
	name NMTOKEN #IMPLIED
	maxRows NMTOKEN #REQUIRED
	maxColumns NMTOKEN #REQUIRED
	gridID NMTOKEN #IMPLIED
	earthShape NMTOKEN '0'
	vectorComponent NMTOKEN '1'
	scanCode NMTOKEN #REQUIRED
	firstPoint NMTOKEN #REQUIRED
>


<!-- Latitude-Longitude Grid is also called Equidistant-Cylindrical or Plate Carree projection grid. -->

<!ELEMENT Proj-LatLon EMPTY>


<!ATTLIST Proj-LatLon
	latFirst %Lat;
	lonFirst %Lon;
	latLast %Lat;
	lonLast %Lon;
	latIncr NMTOKEN #IMPLIED
	lonIncr NMTOKEN #IMPLIED
>


<!-- Mercator grid is a conformal cylindrical projection grid. -->

<!ELEMENT Proj-Mercator EMPTY>


<!ATTLIST Proj-Mercator
	latFirst %Lat;
	lonFirst %Lon;
	latLast %Lat;
	lonLast %Lon;
	latStandard %Lat;
	latIncr NMTOKEN #IMPLIED
	lonIncr NMTOKEN #IMPLIED
>


<!-- Lambert-Conformal grid is a conformal conic projection grid. -->

<!ELEMENT Proj-LambertConf EMPTY>


<!ATTLIST Proj-LambertConf
	latFirst %Lat;
	lonFirst %Lon;
	lonOrientation %Lon;
	latStandard1 %Lat;
	latStandard2 %Lat;
	pole (North | South | Both) 'North'
	latSouthernPole %Lat;
	lonSouthernPole %Lon;
	xIncr NMTOKEN #IMPLIED
	yIncr NMTOKEN #IMPLIED
>


<!-- Description of the data values: scale factors, minimum and maximum values, etc. The element corresponds to BDS Octets 0-11 and PDS Octets 27-28. -->

<!ELEMENT Data EMPTY>


<!ATTLIST Data
	binScaleF NMTOKEN #IMPLIED
	decScaleF NMTOKEN #IMPLIED
	refValue NMTOKEN #IMPLIED
	bitsPerV NMTOKEN #IMPLIED
	trailingBits NMTOKEN #IMPLIED
	integerData (integerData) #IMPLIED
>


<!-- A collection of GRIB parameters -->

<!ELEMENT Parameters (Parameter*)>

<!ENTITY Grib-Parameters "
<Parameters><Parameter code=&#x22;P001&#x22; description=&#x22;Pressure&#x22; units=&#x22;Pa&#x22;>
<Parameter code=&#x22;P011&#x22; description=&#x22;Temperature&#x22; units=&#x22;K&#x22;>
</Parameters>
">


<!-- <code>GribRef</code>
 - a <em>reference</em>
 to an external GRIB record -->

<!ELEMENT GribRef EMPTY>


<!ATTLIST GribRef
	href CDATA #REQUIRED
>


<!-- <code>GribRecord</code>
 - a GRIB record, BASE64-encoded -->

<!ELEMENT GribRecord (#PCDATA)>


<!-- <code>GribValues</code>
 contains a sequence of
whitespace-separated IEEE floating-point numbers in the text format.
The numbers represent gridded values, in the same order as they appear
in the Binary Data Section of a GRIB record. A <code>NaN</code>
 can be
used to represent &quot;missing&quot; values. -->

<!ELEMENT GribValues (#PCDATA)>


<!-- <code>Pt</code>
 - a single datum on a 5-dimensional grid -->

<!ELEMENT Pt EMPTY>


<!ATTLIST Pt
	LatLon NMTOKENS #REQUIRED
	parID IDREF #REQUIRED
	v NMTOKENS #REQUIRED
>
<!-- ]> -->

