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

Show dimensions of data variables in structure report #51

Open
pp-mo opened this issue Apr 6, 2022 · 1 comment
Open

Show dimensions of data variables in structure report #51

pp-mo opened this issue Apr 6, 2022 · 1 comment

Comments

@pp-mo
Copy link
Owner

pp-mo commented Apr 6, 2022

I think this would be useful.
N.B. we have chosen so far to show only dimension names, not numbers, so you don't know how "big" things actually are.
But I still think it would still make sense to list dimensions of data variables, so we at least know the dimensionality, just as we identify the location dimensions within the mesh printouts.
For example, referencing this file (though it does also have some problems) ...

$ python -m ugrid_checks -seq unstructured_grid/lfric_ngvat_2D_1t_face_half_levels_main_conv_rain.nc 

File mesh structure
-------------------
Meshes
    "Mesh2d_half_levels"
        node("nMesh2d_half_levels_node")
            coordinates : "Mesh2d_half_levels_node_x", "Mesh2d_half_levels_node_y"
        edge("nMesh2d_half_levels_edge")
            edge_node_connectivity : "Mesh2d_half_levels_edge_nodes"
            coordinates : "Mesh2d_half_levels_edge_x", "Mesh2d_half_levels_edge_y"
        face("nMesh2d_half_levels_face")
            face_node_connectivity : "Mesh2d_half_levels_face_nodes"
            coordinates : "Mesh2d_half_levels_face_x", "Mesh2d_half_levels_face_y"

?? Connectivities with no mesh ??
    "Mesh2d_half_levels_face_edges" ("nMesh2d_half_levels_face", "nMesh2d_half_levels_vertex")
        cf_role = "face_edge_connectivity"

Mesh Data Variables
    "conv_rain"
        mesh : "Mesh2d_half_levels"
        location : "face"

So, that last bit could easily (and probably usefully) say :

Mesh Data Variables
    "conv_rain" ("time_counter", "nMesh2d_half_levels_face")
        mesh : "Mesh2d_half_levels"
        location : "face"

N.B. this would be different from how we report on connectivity/coordinate variables.
But I think that is reasonable, as the dimensions of those are mostly clear from their role
( except for : (a) dimension ordering ; (b) sizes of indexing dimensions -- which are anyway generally small )
Whereas in this case, for example, the change would show you that the data variable also has time as a dimension.

@pp-mo
Copy link
Owner Author

pp-mo commented Apr 6, 2022

NOTE: It's not probably not worth addressing this until #50 is sorted out, as this will presumably (eventually) include re-writing the structure report in terms of the structure-analysis object.

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

1 participant