We're updating the issue view to help you get more done. 

Modify the netCDF handler so that it builds a DMR response directly instead of using the DDS object.

Description

As a data provider, I want netCDF 4 files with groups to be accessible.

How: Modify the netCDF handler to build the DMR object by reading the netCDF data file (and not by using the DDS). Build the DMR so that it contains Groups. For DDS responses, transform the DMR to a DDS using the code in the DMR class.

A DMR holds information about every variable in a dataset. This includes all of the attributes for each variable. A general algorithm for building the DMR (which will need modification as we work on this) is:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Main function: For each variable in the data set Read information about the variable, including the name and type Switch (kind of variable) Scalar and Array variables: Make a DAP variable to represent the variable Read the attributes for that variable and add them to the variable Structure variable (may be called 'compound' or 'user defined') Call a helper function that returns the Structure with child variables Groups Call a helper function that returns the Group with child variables // note that Groups may not be variables in netCDF parlance, but D4Group is a BaseType // in DAP4 End of Switch Add the variable to the DMR. Helper function for Structures: For each variable in the Structure Read information about the variable, including the name and type Switch (kind of variable) Scalar and Array variables: Make a DAP variable to represent the variable Read the attributes for that variable and add them to the variable Structure variable (may be called 'compound' or 'user defined') Call a helper function that returns the Structure with child variables Groups Call a helper function that returns the Group with child variables // note that Groups may not be variables in netCDF parlance, but D4Group is a BaseType // in DAP4 End of Switch Return the variable // Helper function for Groups is very similar to the one for Structure

Status

Assignee

Slav Korolev

Reporter

James Gallagher

Priority

Medium

Labels

Story Points

None

Fix versions

Epic Link

None