Skip to content
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

Fix GRIB1 support #56

Open
3 tasks
pp-mo opened this issue Aug 12, 2016 · 1 comment
Open
3 tasks

Fix GRIB1 support #56

pp-mo opened this issue Aug 12, 2016 · 1 comment
Assignees
Labels
Dragon 🐉 Type: Technical Debt known issues left over from incomplete work
Milestone

Comments

@pp-mo
Copy link
Member

pp-mo commented Aug 12, 2016

The GRIB1 load translation code (here) is still using GribWrappers, which is the only thing preventing us throwing all the old loader code away, including the GribWrapper class.

Technical Debt summary :

  • fix: rewrite grib1 loading using iris_grib.message.GribMessage instead
  • legacy cost: clarity of main code structure; dread to maintain this (though little need has arisen)

[
In fact this is still the bulk of code in iris_grib.__init__.py, though no longer publicly exported.

  • globals CENTRE_TITLES, TIME_RANGE_INDICATORS, PROCESSING_TYPES, TIME_CODES_EDITION1 and unknown_string
  • classes GribDataProxy and GribWrapper
  • functions _longitude_is_cyclic and _message_values
    ]

There is still a slippery kludge that means when you load a GRIB1 message the 'field' argument in a callback becomes a GribWrapper instead of a GribMessage (here).

So, this is now the only thing that GribWrapper is still used for, and the only remaining occasion that a user might possibly be concerned about what a GribWrapper looks like.

We haven't addressed this yet because GRIB1 usage is very low.

We should rewrite the Grib1 loader to use the modern message object + throw away all the old GribWrapper-based processing.

Tasks

  1. Dragon Sub-Task 🦎
  2. Dragon Sub-Task 🦎
  3. Dragon Sub-Task 🦎
@pp-mo pp-mo mentioned this issue Aug 12, 2016
@pp-mo pp-mo added this to the v0.15.x milestone Sep 5, 2019
@pp-mo pp-mo added the Type: Technical Debt known issues left over from incomplete work label Sep 5, 2019
@lbdreyer lbdreyer modified the milestones: v0.15, v0.16.0 Dec 9, 2019
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Dec 15, 2023
@trexfeathers trexfeathers moved this to 📌 Prioritised in 🐉 Dragon Taming Feb 23, 2024
@trexfeathers trexfeathers moved this from 📌 Prioritised to 🛡 Championed in 🐉 Dragon Taming Feb 23, 2024
@pp-mo
Copy link
Member Author

pp-mo commented Apr 23, 2024

Strategy ideas ...

Scoping

  • We have a few grib1 files in the iris-test-data :
$ cd ...git/iris-test-data/test_data/GRIB
$ find . -iname "*.grib1"
./lambert/lambert.grib1
./rotated_uk/uk_wrongparam.grib1
./reduced/reduced_ll_missing.grib1
./reduced/reduced_ll.grib1
./shape_of_earth/global.grib1
./time_processed/time_bound.grib1
./gaussian/regular_gg.grib1

( N.B. all those contain only a single message )

  • We can inspect, from existing code, what types of data the existing grib load rules can support

    • use coverage analysis to see how our tests / testfiles cover the code as it is
  • we have some local test-case data + users to draw on ?

Strategy

  • Get some tests that ensure what kinds of GRIB1 data we can read, and the results.
  • write loading code using GribMessage for grib1, and compare against tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dragon 🐉 Type: Technical Debt known issues left over from incomplete work
Projects
Status: 🦎 Tamed
Status: No status
Development

No branches or pull requests

3 participants