erddap
erddap copied to clipboard
EDDTableAggregateRows should support derived variables
EDDTableFromFiles now supports derived variables https://coastwatch.pfeg.noaa.gov/erddap/download/setupDatasetsXml.html#scriptSourceNames It would be nice if EDDTableAggregateRows also supported derived variables (and perhaps also <sourceName>global:attName and <sourceName>variable:varName:attName variables).
Skills required: Java programming.
Difficulty: relatively easy. You'll have to figure out / understand how ERDDAP works, but the code to do this project is already in EDDTableFromFiles. You just need to copy and adapt it for EDDTableAggregateRows. Maybe 1 week of work after you are familiar with ERDDAP.
Mentor: Bob Simons (main author of ERDDAP)
Please also read the Programmer's Guide at https://coastwatch.pfeg.noaa.gov/erddap/download/setup.html#programmersGuide especially the "Judging Your Code Contributions" section.
For more specific information on where to get started, a good starting point for looking at the derived variables in EDDTableFromFiles is https://github.com/ERDDAP/erddap/blob/main/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTableFromFiles.java#L1039-L1054
A good place to start looking in EDDTableAggregateRows is this area.
As for general approach to the problem, I'd suggest writing a test (ideally using the new JUnit style we are migrating to) that creates an EDDTableAggregateRows. You can either call the constructor directly, or use one of the various oneFrom functions on EDD, like oneFromXmlFragment.