# ====================================================================
# Source code for cfdm_field
#
# cfdm_field.gv created with:
#
# $ dot -T svg cfdm_field.gv cfdm_field.svg
# ====================================================================

digraph {splines=ortho nodesep="+0.25"

node [
     style="filled,bold"
     shape=rectangle
     fillcolor="#C3FFC2"
     width=1.5
     height=0.7
     fontname="Arial"
     ]

# --------------------------------------------------------------------
# CF-netCDF variables
# --------------------------------------------------------------------
DomainVariable [
	       fillcolor="#C3FFFF"
	       label="CN::Domain\nVariable"
	       ]
DataVariable [
	     fillcolor="#C3FFFF"
	     label="CN::Data\nVariable"
	     ]

# --------------------------------------------------------------------
# CF data model constructs
# --------------------------------------------------------------------
Domain [
       label="<<construct>>\nDomain"
       ]
Field [				      
      label="<<construct>>\nField"
      ]
CellMethod [
	   label="<<construct>>\nCellMethod"
	   ]
DomainAxis [
	   label="<<construct>>\nDomainAxis"
	   ]
DomainAncillary [
	    label="<<construct>>\nDomainAncillary"
	    ]
CellMeasure [
	    label="<<construct>>\nCellMeasure"
	    ]
CoordinateReference [
		    label="<<construct>>\nCoordinateReference "
		    ]
AuxiliaryCoordinate [
		    label="<<construct>>\nAuxillaryCoordinate"
		    ]
DimensionCoordinate [
		    label="<<construct>>\nDimensionCoordinate"
		    ]
FieldAncillary [
	       label="<<construct>>\nFieldAncillary"
	       ]
GenericCoordinate [
		  label="<<abstract>>\nGeneric\nCoordinate\nConstruct"
		  fillcolor=white
		  ]

# --------------------------------------------------------------------
# Invisible nodes used to aid in layout
# --------------------------------------------------------------------
node [
     width=0
     height=0
     size=fixed
     shape=none
     label=""
     ]
route1
route2
route3
route4
route5
route6
route7
route8
route9

DataVariable -> Field [dir=back arrowtail=vee weight=100]

Field -> route8 [arrowtail=odiamond arrowhead=none dir=both weight=100]
route8 -> Domain [arrowtail=none arrowhead=vee dir=bothhead
                  headlabel="0..1  " weight=100 labelfontsize=11.0 weight=100]
route1 -> Field [arrowhead=diamond]
Field -> route2 [arrowtail=diamond arrowhead=none dir=both]
{rank=same; route1, Field, route2}

edge [arrowtail=vee
      arrowhead=diamond
      dir=both
      arrowsize=1.0
      fontname="Arial"
      labelfontsize=11.0
      ]

Domain -> GenericCoordinate [taillabel="0..*   " weight=100]
route2 -> CellMethod [arrowhead=vee arrowtail=none headlabel="0..*   "
                      weight=100]
route1 -> FieldAncillary [arrowhead=vee arrowtail=none headlabel="0..*  "
       	                  weight=100]
Domain -> DomainAxis [arrowtail=vee arrowhead=diamond taillabel="0..*  "]
{rank=same; Domain, DomainAxis}

route6 -> Domain [arrowtail=none]
{rank=same;route6, Domain}
route6 -> CoordinateReference [arrowtail=none arrowhead=vee headlabel="0..*  "]

Domain -> route7 [arrowtail=diamond arrowhead=none]
route7-> CellMeasure [headlabel="0..*  " arrowhead=vee arrowtail=none]
Domain -> DomainAncillary [headlabel="0..*  " arrowhead=vee arrowtail=diamond]
FieldAncillary -> Domain [label="uses      \nparent        "
                          arrowhead=vee arrowtail=none labelfontsize=11.0] 

DomainVariable -> route9 [dir=back arrowtail=vee]
route9 -> Domain [arrowtail=none arrowhead=none]

{rank=same; DomainVariable, DataVariable}
{rank=same; route9, FieldAncillary}


GenericCoordinate -> route4 [arrowhead=none arrowtail=empty weight=100]
route4 -> AuxiliaryCoordinate [dir=none]
{rank=same; route4, AuxiliaryCoordinate}
route4 -> route5 [dir=none]
route5 -> DimensionCoordinate [dir=none]
{rank=same; route5, DimensionCoordinate}
{rank=same;DomainAncillary, GenericCoordinate, route7, CellMeasure}

DomainAncillary -> CoordinateReference [arrowhead=none, arrowtail=vee
                                        taillabel="0..*      "
					labeldistance=1.1
				        weight=100]

CellMethod -> DomainAxis [taillabel="1..*  " weight=100]
GenericCoordinate -> route3 [arrowhead=none arrowtail=vee
                             taillabel="0..*      "
			     labeldistance=1.1
			     weight=100]
route3 -> CoordinateReference [dir=none]
{rank=same; CoordinateReference, DimensionCoordinate}

# --------------------------------------------------------------------
# Invisible edges used to aid in layout
# --------------------------------------------------------------------
DomainAxis -> AuxiliaryCoordinate [style=invis]
DomainAxis -> CellMeasure [style=invis weight=100]
CellMeasure -> AuxiliaryCoordinate [style=invis]
AuxiliaryCoordinate -> DimensionCoordinate[style=invis weight=100]

}
