ARGODEV-171: convert retr_region.m
Jira Issue
ARGODEV-171 (https://jira.ceh.ac.uk/browse/ARGODEV-171)
Python Implementation
Refactored some copied code out of get_region and retr_region (see here)
Will also throw an error if, for some reason, we get no data
Testing
Tests:
- Checks that we get 6 arrays back (latitude, longitude, dates, potential temperature, pressure, salinity)
- Checks that the shape of the data is how we expect it to be
- Check that we can fetch different combinations of data (ctd/bottle/argo)
- Check that, if we only ask for n data points we only get n data points
- Check that an exceptions is raised if we don't get back any data
Old Matlab Implementation
After finding the best historical data, according to space and time, we need to fetch the corresponding ocean characteristic data. At this point, OWC knows the indices of the data points it wants to use.
We then use these indices to fetch only the relevant ocean characteristic data