NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

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

NOTE: The libcf mailing list is no longer active. The list archives are made available for historical reasons.

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
  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the libcf archives: