Skip to content

Commit

Permalink
refactor: add zXxXy dimensions in print statement
Browse files Browse the repository at this point in the history
  • Loading branch information
yoctoyotta1024 committed Sep 11, 2024
1 parent e287cab commit 3fe2737
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pySD/gbxboundariesbinary_src/create_gbxboundaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,20 @@ def write_gridboxboundaries_binary(gridfile, zgrid, xgrid, ygrid, constsfile):
ndims, gbxindicies, gbxboundsdata = dimless_gridboxboundaries(
zgrid, xgrid, ygrid, COORD0
)
zxy = [len(zgrid) - 1, len(xgrid) - 1, len(ygrid) - 1]
zxy = [str(x) for x in zxy]
metastr = (
"Variables in this file are ndims in (z,x,y), then the "
+ str(np.prod(ndims))
+ " gridbox indicies followed by the"
+ " [zmin, zmax, xmin, xmax, ymin, ymax]"
+ " coordinates for each gridbox's boundaries"
+ " coordinates for each gridbox's boundaries."
+ " Grid has dimensions "
+ zxy[0]
+ "x"
+ zxy[1]
+ "x"
+ zxy[2]
)

ndata = [len(dt) for dt in [ndims, gbxindicies, gbxboundsdata]]
Expand Down

0 comments on commit 3fe2737

Please sign in to comment.