[gembud] max grids

I'm running wrf-ems and processing my data to gempak.  I'm also adding some
fields with gddiag, but I'm running into an annoying problem.  The maximum
number of grids gempak can do is about 30,000, but something is setting the
max grids in my file to 6344, so my gddiag script blows up while adding new
grids.  I have no idea where 6344 is being set.  The postprocessing perl
script in the wrf-ems package says 29999, so I'm stumped.  Is 6344 buried
somewhere in the source code?  Changing maxgrd in gddiag doesn't work,