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

Support CF formatted netCDF #15

Open
BSchilperoort opened this issue Oct 2, 2023 · 1 comment
Open

Support CF formatted netCDF #15

BSchilperoort opened this issue Oct 2, 2023 · 1 comment

Comments

@BSchilperoort
Copy link
Contributor

In a CF formatted netCDF, coordinates contain a "bounds" dim, which denote the left and right bounds of the interval. This should be supported by this plugin, and would actually save us from computing the bounds ourselves.

@DWesl
Copy link

DWesl commented Jul 23, 2024

In a CF formatted netCDF, coordinate variables might reference a "bounds" variable, which contains the boundaries of the cell, usually the lower and upper boundaries of a 1-D coordinate variable on a rectangular grid.
This should be supported by this plugin, and would actually save us from computing the bounds ourselves.

SGRID conventions allow for "face" and "node" dimensions, which you should be able to use in a similar manner.

Stripping all the attributes leaves something like this:

dimensions:
    face_x = 5;
    face_y = 5;
    edge_x = 6;
    edge_y = 6;

variables:
    float flux(face_y, face_x);
    float face_y(face_y);
    float face_x(face_x);
    float edge_x(edge_x);
    float edge_y(edge_y);

data:
    edge_x = { 0, 1, 2, 3, 4, 5 };
    edge_y = { 0, 1, 2, 3, 4, 5 };
    face_x = { 0.5, 1.5, 2.5, 3.5, 4.5 };
    face_y = { 0.5, 1.5, 2.5, 3.5, 4.5 };

CF-formatted data might also give you cell areas, which is likely what you want the boundaries for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants