NRLMMD-GEOIPS / geoips

Main Geolocated Information Processing System code base with basic functionality enabled.
https://nrlmmd-geoips.github.io/geoips/
Other
15 stars 12 forks source link

Generalize how we handle 3+ dimensional data in GeoIPS #801

Open evrose54 opened 1 month ago

evrose54 commented 1 month ago

Requested Update

Description

Currently GeoIPS really only handles 2D data, in the format of (x, y). This assumption makes it easy for all plugins to know the input format and shape of incoming data. However, with the addition of OVERCAST, we need to consider how to handle 3D data (z, y, x) at any point. Additionally, #427 adds a 3rd dimension, but in this case it's time. We could add custom logic to necessary plugins, however that would become cumbersome and hard to maintain. Instead, we should consider a generic approach to handling 3+ dimensional data, so plugins know the order of the dimensions, as well as what to do with them. This probably requires discussion.

Background and Motivation

This issue stems from a conversation @jsolbrig and I had on #763 about how I handled 3D Data (z, y, x) in the unprojected_image output formatter. I added custom logic to loop over each vertical slice of the data, and while this works, there are likely different dimensions that will be supplied (time, y, x), different ordering of dimensions (x, y, z), and other complexities that we'll need to address. Instead of adding custom logic for each use case, we should generalize where possible.

Alternative Solutions

Add custom logic for each use case to plugins which are affected by your product (not recommended).

Code to demonstrate issue

763 geoips/plugins/modules/output_formatters/unprojected_image.py:call.

Checklist for Completion

evrose54 commented 1 month ago

Additionally, we could handle 3+ dimensional data in different manners. For example, the code I implemented in unprojected_imagery on PR #763 takes vertical cross sections of the data. However we could also take horizontal (latitudinal) cross sections of the data, or longitudinal cross sections of the data, which would result in different outputs.