-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I am looking at the dmr from SimpleGroup file, when subsetting by variable name, and I notice that the DMR drops the dimensions when the dap4.ce has a slice on one of the variables. I did not do a very exhaustive testing, just some simple scenario as to when this occur.
Consider the URL following http://test.opendap.org/opendap/dap4/SimpleGroup.nc4.h5.dmr with the 3 following Constraint Expressions which return identical data:
?dap4.ce=/time;/Z;/Pressure. The DMR is:
<Dataset xmlns="http://xml.opendap.org/ns/DAP/4.0#" xml:base="http://test.opendap.org/opendap/dap4/SimpleGroup.nc4.h5" dapVersion="4.0" dmrVersion="1.0" name="SimpleGroup.nc4.h5">
<Dimension name="time" size="1"/>
<Dimension name="Z" size="1000"/>
<Float32 name="time">
<Dim name="/time"/>
</Float32>
<Float32 name="Z">
<Dim name="/Z"/>
</Float32>
<Float32 name="Pressure">
<Dim name="/Z"/>
<Map name="/Z"/>
</Float32>
<Attribute name="description" type="String">
<Value>A simple group for testing.</Value>
</Attribute>
</Dataset>?dap4.ce=/time[0:1:0];/Z[0:1:999];/Pressure
<?xml version="1.0" encoding="ISO-8859-1"?>
<Dataset xmlns="http://xml.opendap.org/ns/DAP/4.0#" xml:base="http://test.opendap.org/opendap/dap4/SimpleGroup.nc4.h5" dapVersion="4.0" dmrVersion="1.0" name="SimpleGroup.nc4.h5">
<Dimension name="Z" size="1000"/>
<Float32 name="time">
<Dim size="1"/>
</Float32>
<Float32 name="Z">
<Dim size="1000"/>
</Float32>
<Float32 name="Pressure">
<Dim name="/Z"/>
<Map name="/Z"/>
</Float32>
<Attribute name="description" type="String">
<Value>A simple group for testing.</Value>
</Attribute>
</Dataset>?dap4.ce=/time[0:1:0];/Z[0:1:999];/Pressure[0:1:999]. The DMR I get is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Dataset xmlns="http://xml.opendap.org/ns/DAP/4.0#" xml:base="http://test.opendap.org/opendap/dap4/SimpleGroup.nc4.h5" dapVersion="4.0" dmrVersion="1.0" name="SimpleGroup.nc4.h5">
<Float32 name="time">
<Dim size="1"/>
</Float32>
<Float32 name="Z">
<Dim size="1000"/>
</Float32>
<Float32 name="Pressure">
<Dim size="1000"/>
</Float32>
<Attribute name="description" type="String">
<Value>A simple group for testing.</Value>
</Attribute>
</Dataset>Expected behavior
Identical DMRs. Perhaps not in order in which variables are defined, but consistent Dim information. But in 2, time is no longer declared as a Dimension, and specially in 3 there are no declared Dimensions even though the data is the same. I think in particular, 3 can be a problem, since the DMR has no Dimensions.
Metadata
Metadata
Assignees
Labels
No labels