Code Monkey home page Code Monkey logo

Comments (2)

pp-mo avatar pp-mo commented on August 19, 2024

If I understand right, what this represents is a cloud fractional coverage, for all the atmosphere between ground level and the 800 hPa level.

So I think this is a problem from Iris' point of view, because Iris data-model is all aligned with netcdf-CF rules, and CF just does not provide a means of describing what is intended here.
In CF terms this information "should" translate into a one-point vertical coordinate with a point value and bounds. However, CF expects upper and lower bound values to have common units and meaning, whereas here the correct upper bound is a pressure value, but the lower bound (ground level) can not be given as a (fixed) pressure.

So the key problem is how should this data appear in Iris ?
I can think of a few possibilities :

  • use a nominal fixed pressure value for the lower surface, e.g. 1000 hPa (standard) or 100e6 (improbably large); .. or ..
  • .. define a new (Iris-specific) nonstandard phenomenon identity meaning 'cloud below given level', and load with a pressure point-value only (no bounds or equal-value bounds)
  • and (optionally) add case-specific metadata to track metadata adjustments

Such solutions can be potentially be implemented by extending iris-grib. However, a user-code-specific solution is obviously more flexible as you don't need to resolve the core problem in a generally acceptable way.
You can modify low-level data before translating, with a callback function or via iris_grib.load_pairs_from_fields (see docs).

It really depends on what you then need to do with the data.
If you just needs a means of loading (working around the load error), I think I would just set the type and value of the second fixed surface to that of the first in this case, using a load callback.
That will yield a cube that apparently has a specific cloud fraction value between levels of 800 to 800 hPa, which is nonsensical but at least no original information is lost.

What kind of solution do you need ?

from iris-grib.

marfel avatar marfel commented on August 19, 2024

Just wanted to note that I just ran into the exact same problem. For me, it would be enough to change the second fixed surface to look like the first, as you suggested. How would such a callback look like?

from iris-grib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.