forked from OpenCPN/OpenCPN
-
Notifications
You must be signed in to change notification settings - Fork 0
Multi-layer GRIB support #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
sebastien-rosset
wants to merge
7
commits into
master
Choose a base branch
from
multi-grib-v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c232d74 to
17920eb
Compare
8a7e44c to
c68b527
Compare
Owner
Author
|
@rgleason, after quite a bit of code refactor, I'm able to load and show one GRIB layer. There is no interpolation across layers yet, but it's a good milestone. I need to fix the unit test issues on Linux and Windows, do error handling, check memory management.
|
c376813 to
a6f0102
Compare
Owner
Author
4dfe93c to
8540b90
Compare
894fa39 to
43ff11f
Compare
c7845a9 to
087e246
Compare
36 tasks
Each GRIB file can be loaded and enabled/disabled independently. Algorithms to perform data interpolation across GRIB layers. Merge strategy for combining GRIB records across layers. Add unit tests for the GRIB plugin. Add function to return GribRecord editionNumber. Add enum for HRRR model. Add code comments.
eec9067 to
08186fa
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Add Multi-Layer Support to GRIB Plugin
This PR introduces multi-layer support to the GRIB plugin, enabling users to load and manage multiple GRIB files independently. Each file can be toggled on/off and managed separately, while maintaining compatibility with existing functionality.
Key Changes
New Layer Architecture
GRIBLayerclass to encapsulate individual GRIB files and their settings. EachGribLayercan be associated with one GRIB file. For example, there might be one GRIB file for current and another file for wind. Or one GRIB file with 48 hour high accuracy wind forecast and another GRIB file with 7-day wind forecast at lower accuracy.GRIBLayerSetto manage multiple layers with shared functionality.HRRRmodel and another layer for theGFSmodel.GRIBFilefrom managing multiple files to single file per instance.Changes are in the data model and UI.
Code Organization
Split GRIB-related code into separate files for better maintainability:
grib_file.[h|cpp]
grib_layer.[h|cpp]
grib_layer_set.[h|cpp]
grib_timeline_record_set.h
Implementation Details
Migration Strategy
Migrated from single file to multi-layer architecture:
Key Method Updates
Updated core functionality to support layers:
Timeline Management
GribTimelineRecordSet* GetTimeLineRecordSet(wxDateTime time)Data Access
Index Management
GRIBFile::GribIdxArray& GetGribIdxArray()Testing Infrastructure
Added comprehensive test suite in
tests/directory:Test coverage includes:
Tasks
Backend
m_bGRIBActiveFilewithm_LayerSetwhich represents layer manager.m_bGRIBActiveFile->m_GribIdxArray➜m_LayerSet.GetGribIdxArray(). GribIdxArray is a structured array of integers, each representing a unique GRIB parameter and its vertical level information. This array is used to track what meteorological parameters are available in a GRIB file or layer.m_bGRIBActiveFile->GetRecordSetArrayPtr(). ArrayOfGribRecordSets is an array of GribRecordSets in a GRIB file.m_pGDialog->GetTimeLineRecordSet(time)➜m_pGDialog->m_LayerSet.GetTimeLineRecordSet(time)MagnitudeRecordUnit Tests
UI Changes
Draft implementation for OpenCPN#4228