Personal tools
You are here: Home Documentation Installer Documentation Adding data with Hybrid-Z coordinates Fixing the z axis of the xml
Document Actions

Fixing the z axis of the xml

by admin last modified 2007-11-07 08:48

How to edit the xml file and give correct information about the z axis


THe <grids> section of the XML file looks something like this:

<grids>
<grid-LONGITUDE-LATITUDE-id-c7893ce6b0>
    <link match="/lasdata/axes/LONGITUDE-x-id-c7893ce6b0" />
    <link match="/lasdata/axes/LATITUDE-y-id-c7893ce6b0" />
  </grid-LONGITUDE-LATITUDE-id-c7893ce6b0>
  <grid-LONGITUDE-LATITUDE-LAYER-id-c7893ce6b0>
    <link match="/lasdata/axes/LONGITUDE-x-id-c7893ce6b0" />
    <link match="/lasdata/axes/LATITUDE-y-id-c7893ce6b0" />
    <link match="/lasdata/axes/LAYER-z-id-c7893ce6b0" />
  </grid-LONGITUDE-LATITUDE-LAYER-id-c7893ce6b0>
</grids>
<axes>
  <LONGITUDE-x-id-c7893ce6b0 type="x" units="degrees_east">
    <arange start="1" size="500" step="9" />
  </LONGITUDE-x-id-c7893ce6b0>
  <LATITUDE-y-id-c7893ce6b0 type="y" units="degrees_north">
    <arange start="1" size="413" step="8" />
  </LATITUDE-y-id-c7893ce6b0>
  <LAYER-z-id-c7893ce6b0 type="z" units="layer">
    <arange start="1" size="32" step="1" />
  </LAYER-z-id-c7893ce6b0>
</axes>

All of this is fine, except for the references to LAYER and the range and stepsize of the LAYER axis.


Because the XML file is telling the User Interface what to show, we need to replace the Z axis with one based on the depths. If this is an ocean-wide dataset, we might use a Z axis from one of the standard ocean datasets such as Levitus.  These depths are borrowed from levitus_climatology.xml:

  <LAYER-z-id-c7893ce6b0 type="z"  units="METERS">
<v>0</v>
     <v>10</v>
     <v>20</v>
     <v>30</v>
     <v>50</v>
     <v>75</v>
     <v>100</v>
     <v>150</v>
     <v>200</v>
     <v>300</v>
     <v>400</v>
     <v>600</v>
     <v>800</v>
     <v>1000</v>
     <v>1200</v>
     <v>1500</v>
     <v>2000</v>
     <v>3000</v>
     <v>4000</v>
     <v>5000</v>
  </LAYER-z-id-c7893ce6b0>


If the data is in a limited region only, or if a regularly-spaced axis is desired, we'd use a different axis.  Ferret can tell us the range of values in the data. If the thickness variable is called lthk, then use an @SUM transformation to sum it over depth:


> ferret
yes? set data hybrid_temp
yes? stat lthk[z=@sum]
...
Minimum value: 5.4546
Maximum value: 9759.9

We might extend the depths to 10000 to show the entire range of this data.



Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: