Abstract
Environmental Observation and Forecasting Systems (EOFS) create new opportunities and challenges for generation and use of environmental data products. The number and diversity of these data products, however, has been artificially constrained by the lack of a simple descriptive language for expressing them. Data products that can be described simply in English take pages of obtuse scripts to generate. The scripts obfuscate the original intent of the data product, making it difficult for users and scientists to understand the overall product catalog. The problem is exacerbated by the evolution of modern EOFS into data product “factories” subject to reliability requirements and daily production schedules. New products must be developed and assimilated into the product suite as quickly as they are imagined. Reliability must be maintained despite changing hardware, changing software, changing file formats, and changing staff. We present a language for naturally expressing data product recipes over structured and unstructured computational grids of arbitrary dimension. Informed by relational database theory, we have defined a simple data model and a handful of operators that can be composed to express complex visualizations, plots, and transformations of gridded datasets. The language provides a medium for design, discussion, and development of new data products without commitment to particular data structures or algorithms. In this paper, we provide a formal description of the language and several examples of its use to express and analyze data products. The context of our research is the CORIE system, an EOFS supporting the study of the Columbia River Estuary.
Introduction: The Challenge of Environmental Data Factories
Modern Environmental Observation and Forecasting Systems (EOFS) have evolved into data "factories," producing gigabytes of gridded data daily. However, a significant bottleneck exists in transforming this raw data into meaningful products, such as salinity maps or temperature plots. Currently, researchers often rely on low-level C programs or brittle Perl scripts that are difficult to write, maintain, and understand. This creates a massive gap between a scientist's high-level intent (e.g., "calculate maximum salinity over depth") and the complex code required to execute it. This paper proposes a declarative domain-specific language (DSL) to bridge this gap, treating computational grids as first-class objects.
The Gridfield Model: A Relational Approach to Grids
The authors propose a formal data model centered on two primary concepts: Grids and Gridfields.
- Grids: These represent the topology—the connections between points, edges, and faces—of a dataset. Crucially, grids are treated as first-class citizens, allowing them to be defined and manipulated independently of the underlying data.
- Gridfields: These are functions that map data values (e.g., temperature, velocity) onto specific elements of a grid.
Inspired by relational algebra, the language defines four core operators:
- Bind: Associates raw data with a specific grid.
- Merge: Combines multiple gridfields where their grids intersect.
- Restrict: Filters the grid based on data values (similar to a SQL
WHEREclause). - Aggregate: Maps data from one grid to another and combines it (e.g., computing an average).
Application: The CORIE System
The primary application for this language is the CORIE system, a real-world forecasting system for the Columbia River Estuary. This system generates approximately 5GB of data daily, including physical properties like water velocity, temperature, salinity, and elevation.
The grids used in CORIE range from simple 1D time-series to complex 3D unstructured meshes representing the river's horizontal span and depth. By using the Cross Product operator, the language can build these complex 3D grids by combining simpler 1D and 2D components, exploiting structural regularity for faster computation.
Insights: Topology and Optimization
A central argument of the paper is that scientific data's distinguishing feature is its topology (connectivity) rather than its geometry (spatial coordinates). In this model, spatial coordinates are simply another piece of data mapped onto the topology.
Because the language is declarative, it allows for algebraic optimization. The system can automatically optimize "recipes" by, for example, "pushing" a filter (restrict) earlier in the process to reduce data volume. The paper demonstrates that the entire suite of over 100 daily data products for the CORIE system can be expressed using this small set of core operators. This not only makes the "intent" of the data product visible but also allows for efficiency gains by sharing intermediate results between different visualizations.
Conclusion and Future Work
While the language successfully simplifies the creation of data products, some limitations remain. It currently struggles with recursive tasks like calculating streamlines, which may require a future "fixpoint" operator. Additionally, integration with metadata for data discovery is a planned area for improvement. At the time of publication, a full implementation was underway using Haskell for logic and the Visualization Toolkit (VTK) for high-performance execution.
Summary updated