[libcf] [gridspec] Bug in make_hgrid --grid_name option

Hi folks,

FYI, there appears to be a bug in the latest version of the gridspec
tool make_hgrid (code_version = "libcf 1.0-alpha6-snapshot2010102623").
It throws a segmentation fault if you try to pass it a grid name longer
than 31 characters.

For example, this fails:

$ make_hgrid --nlon 192 --nlat 144 --nybnd 2 --nxbnd 2 --xbnd
"0.0,360.0" --ybnd "-90.0,90.0" --grid_name
gridspec_fx_HadGEM2-ES_atm_uvgrid
Segmentation fault

But this works:

$ make_hgrid --nlon 192 --nlat 144 --nybnd 2 --nxbnd 2 --xbnd
"0.0,360.0" --ybnd "-90.0,90.0" --grid_name
gridspec_fx_HadGEM2-ES_a_uvgrid

The easy workaround, of course, is to output to a tmp file and then do a
rename, e.g.

$ make_hgrid --nlon 192 --nlat 144 --nybnd 2 --nxbnd 2 --xbnd
"0.0,360.0" --ybnd "-90.0,90.0" --grid_name tmp
$ mv tmp.nc gridspec_fx_HadGEM2-ES_atm_uvgrid.nc

Or else leave out the --grid_name option and rename the default output
file (horizontal_grid.nc).

HTH

Phil