ERDDAP / erddap

ERDDAP is a scientific data server that gives users a simple, consistent way to download subsets of gridded and tabular scientific datasets in common file formats and make graphs and maps. ERDDAP is a Free and Open Source (Apache and Apache-like) Java Servlet from NOAA NMFS SWFSC Environmental Research Division (ERD).
Creative Commons Zero v1.0 Universal
84 stars 58 forks source link

EDDTableAggregateRows - override actual_range with min/max calculated on all chidren #150

Closed MarcoAlbaETT closed 4 months ago

MarcoAlbaETT commented 4 months ago

Description

In EDDTableAggregateRows class override actual_range in tSourceAtts Attributes with min/max values calculated on all chidren. This is to fix the problem about range for time,latitude,longitude and depth that is not the min/max of all the child but the range from the first child.

Fixes #145

Type of change

Please delete options that are not relevant.

Checklist before requesting a review

MarcoAlbaETT commented 4 months ago

I'm running this through the full test set.

Are the data_min and data_max changes needed to fix the min/max values problem?

Not really, but since I'm setting the actual_range and EDVTimeStamp is using that as first value, I think setting data_min and data_max is not needed.

ChrisJohnNOAA commented 4 months ago

@MarcoAlbaETT I have a test that ensures the new code is working here: https://github.com/ERDDAP/erddap/commit/532bb6640a0200a97fba92702cdd965054e19fe2

One thing to note, I'm using TS_SLEV_TAD_19 and TS_SLEV_TAD_1888 in the test which are different than the example in the issue.

MarcoAlbaETT commented 4 months ago

@ChrisJohnNOAA thank you very much for the test and sorry for not doing it

ChrisJohnNOAA commented 4 months ago

Thank you for doing the change!