Uploaded image for project: 'Hyrax Data Server'
  1. HYRAX-756

get_dmrpp fails on datasets where variables are not in the root group

    Details

    • Type: Bug
    • Status: Done (View workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: DataUse-18.2
    • Component/s: None
    • Labels:
      None

      Description

      Take a look at the grid_1 and grind_2 datasets in data/dmrpp.

      The problem is likely that the FQN() method of libdap does not include the group parts of the path. If it did, those names/paths could then be passed directly to the HDF5 library.

      For DMRs that are built from files with groups, the names are munged. However, an attribute is added that provides the original full name. See below. Unfortunately, two new variables are added (sometimes, all the time?) named `lon` and `lat`.

      [nori:data jimg$] ./get_dmrpp.sh dmrpp/grid_2_2d.h5
      DMR: 
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <Dataset xmlns="http://xml.opendap.org/ns/DAP/4.0#" dapVersion="4.0" dmrVersion="1.0" name="grid_2_2d.h5">
          <Dimension name="lat" size="4"/>
          <Dimension name="lon" size="8"/>
          <Float32 name="GeoGrid1_temperature">
              <Dim name="/lat"/>
              <Dim name="/lon"/>
              <Attribute name="units" type="String">
                  <Value>K</Value>
              </Attribute>
              <Attribute name="origname" type="String">
                  <Value>temperature</Value>
              </Attribute>
              <Attribute name="fullnamepath" type="String">
                  <Value>/HDFEOS/GRIDS/GeoGrid1/Data Fields/temperature</Value>
              </Attribute>
              <Attribute name="orig_dimname_list" type="String">
                  <Value>YDim XDim</Value>
              </Attribute>
          </Float32>
          <Float32 name="GeoGrid2_temperature">
              <Dim name="/lat"/>
              <Dim name="/lon"/>
              <Attribute name="units" type="String">
                  <Value>K</Value>
              </Attribute>
              <Attribute name="origname" type="String">
                  <Value>temperature</Value>
              </Attribute>
              <Attribute name="fullnamepath" type="String">
                  <Value>/HDFEOS/GRIDS/GeoGrid2/Data Fields/temperature</Value>
              </Attribute>
              <Attribute name="orig_dimname_list" type="String">
                  <Value>YDim XDim</Value>
              </Attribute>
          </Float32>
          <String name="StructMetadata_0">
              <Attribute name="origname" type="String">
                  <Value>StructMetadata.0</Value>
              </Attribute>
              <Attribute name="fullnamepath" type="String">
                  <Value>/HDFEOS INFORMATION/StructMetadata.0</Value>
              </Attribute>
          </String>
          <Float32 name="lon">
              <Dim name="/lon"/>
              <Attribute name="units" type="String">
                  <Value>degrees_east</Value>
              </Attribute>
          </Float32>
          <Float32 name="lat">
              <Dim name="/lat"/>
              <Attribute name="units" type="String">
                  <Value>degrees_north</Value>
              </Attribute>
          </Float32>
          <Attribute name="HDFEOS" type="Container"/>
          <Attribute name="HDFEOS_ADDITIONAL" type="Container"/>
          <Attribute name="HDFEOS_ADDITIONAL_FILE_ATTRIBUTES" type="Container"/>
          <Attribute name="HDFEOS_GRIDS" type="Container"/>
          <Attribute name="HDFEOS_GRIDS_GeoGrid1" type="Container"/>
          <Attribute name="HDFEOS_GRIDS_GeoGrid1_Data_Fields" type="Container"/>
          <Attribute name="HDFEOS_GRIDS_GeoGrid2" type="Container"/>
          <Attribute name="HDFEOS_GRIDS_GeoGrid2_Data_Fields" type="Container"/>
          <Attribute name="HDFEOS_INFORMATION" type="Container">
              <Attribute name="HDFEOSVersion" type="String">
                  <Value>HDFEOS_5.1.13</Value>
              </Attribute>
              <Attribute name="fullnamepath" type="String">
                  <Value>/HDFEOS INFORMATION</Value>
              </Attribute>
          </Attribute>
      </Dataset>
      

      You can see the tool does not work with the munged name, but does work with the full name (although I used a different variable in the two cases)

      Error: HDF5 dataset '/GeoGrid1_temperature' cannot be opened.
      [nori:data jimg$] ./build_dmrpp -f dmrpp/grid_2_2d.h5 -d '/HDFEOS INFORMATION/StructMetadata.0' -v
      Storage: contiguous
          Addr: 5304
          Size: 32000
      

        Attachments

          Activity

            People

            • Assignee:
              jimg James Gallagher
              Reporter:
              jimg James Gallagher
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h