Skip to content

Show dimensions of data variables in structure reportΒ #51

@pp-mo

Description

@pp-mo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions