Skip to content

Commit

Permalink
Simplify formatting for printing arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Feb 6, 2024
1 parent 62d161f commit d3a85cd
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions example/bmi_geospatial_ex.f90
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ program bmi_geospatial_ex

allocate(grid_shape(grid_rank))
status = h%get_grid_shape(grid_id, grid_shape)
write (*,"(a)") "Grid shape:"
do i = 1, size(grid_shape)
write (*,"(a, i3)") "-", grid_shape(i)
end do
write (*,"(a, *(x, i3))") "Grid shape:", grid_shape

g = bmi_heat_geo(h)

Expand All @@ -51,13 +48,11 @@ program bmi_geospatial_ex

allocate(ycoordinate(grid_shape(1)))
status = g%get_grid_coordinate(grid_id, names(1), ycoordinate)
write (*,"(a)") "Y-coordinate:"
write (*,"(*(x, f4.1))") ycoordinate
write (*,"(a, *(x, f4.1))") "Y-coordinate:", ycoordinate

allocate(xcoordinate(grid_shape(2)))
status = g%get_grid_coordinate(grid_id, names(2), xcoordinate)
write (*,"(a)") "X-coordinate:"
write (*,"(*(x, f4.1))") xcoordinate
write (*,"(a, *(x, f4.1))") "X-coordinate:", xcoordinate

status = g%get_grid_crs(grid_id, crs)
write (*,"(a, a30)") "CRS: ", crs
Expand Down

0 comments on commit d3a85cd

Please sign in to comment.