-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Topology tolerance [AVD-1723] (#4099)
* Deduce correct topology-dimension from connectivities, and be tolerant on loading. * Added simple integration tests. * Review changes. * Review changes: use 'logging' module in place of 'warnings'. * Replace deprecated assertion method; check logged message levels. * Simplify logging tests; tidy synthetic file creation.
- Loading branch information
Showing
3 changed files
with
147 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
lib/iris/tests/stock/file_headers/minimal_bad_topology_dim.cdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Tolerant loading test example : the mesh has the wrong 'topology_dimension' | ||
// NOTE: *not* truly minimal, as we cannot (yet) handle data with no face coords. | ||
netcdf ${DATASET_NAME} { | ||
dimensions: | ||
NODES = ${NUM_NODES} ; | ||
FACES = ${NUM_FACES} ; | ||
FACE_CORNERS = 4 ; | ||
variables: | ||
int mesh_var ; | ||
mesh_var:cf_role = "mesh_topology" ; | ||
${TOPOLOGY_DIM_DEFINITION} | ||
mesh_var:node_coordinates = "mesh_node_x mesh_node_y" ; | ||
mesh_var:face_node_connectivity = "mesh_face_nodes" ; | ||
mesh_var:face_coordinates = "mesh_face_x mesh_face_y" ; | ||
float mesh_node_x(NODES) ; | ||
mesh_node_x:standard_name = "longitude" ; | ||
mesh_node_x:long_name = "Longitude of mesh nodes." ; | ||
mesh_node_x:units = "degrees_east" ; | ||
float mesh_node_y(NODES) ; | ||
mesh_node_y:standard_name = "latitude" ; | ||
mesh_node_y:long_name = "Latitude of mesh nodes." ; | ||
mesh_node_y:units = "degrees_north" ; | ||
float mesh_face_x(FACES) ; | ||
mesh_face_x:standard_name = "longitude" ; | ||
mesh_face_x:long_name = "Longitude of mesh nodes." ; | ||
mesh_face_x:units = "degrees_east" ; | ||
float mesh_face_y(FACES) ; | ||
mesh_face_y:standard_name = "latitude" ; | ||
mesh_face_y:long_name = "Latitude of mesh nodes." ; | ||
mesh_face_y:units = "degrees_north" ; | ||
int mesh_face_nodes(FACES, FACE_CORNERS) ; | ||
mesh_face_nodes:cf_role = "face_node_connectivity" ; | ||
mesh_face_nodes:long_name = "Maps every face to its corner nodes." ; | ||
mesh_face_nodes:start_index = 0 ; | ||
float data_var(FACES) ; | ||
data_var:mesh = "mesh_var" ; | ||
data_var:location = "face" ; | ||
} |