[gradsusr] [EXTERNAL] gadsdf: Error parsing time units in SDF file.

Adams, Jennifer M. (GSFC-610.2)[ADNET SYSTEMS INC] jennifer.m.adams at nasa.gov
Mon Mar 8 11:07:18 EST 2021


Hi, Mark –
I tried to use the ncdump output you sent to generate a dummy file with that time axis information and got the following error from ncgen: NetCDF: Bad chunk sizes. Your time axis length is size 25, but there is also this attribute:
time:_ChunkSizes = 1024 ;
So maybe that is the source of the problem?

Also, I am not sure whether this is true in your case, but I have seen package install commands for other flavors of unix try to use udunits2 instead of udunits1 for GrADS.  I updated the API in GrADS version 2.2.2 to use udunits2, but all other versions are likely to have issues if they are linked with udunits2. In the old builds, all the dependent libraries are statically linked, so it’s a little difficult to know what versions are included in the executables. The ‘q config’ output is helpful, but doesn’t list every single dependent library. It is a little easier to know what you’re working with using the newer versions that are dynamically linked. If the package install puts all the supplibs in place for you, then you might be able to build GrADS 2.2.2 from source without too much trouble.

The easiest route might be to use a simple xdfopen-style descriptor file to provide the time axis information so GrADS doesn’t have to inspect the time metadata at all and you’ll bypass that parsing error entirely.
http://cola.gmu.edu/grads/gadoc/SDFdescriptorfile.html

--Jennifer




--
Jennifer Miletta Adams
ADNET Systems, Inc.
NASA/GSFC, Code 610.2
Building 32, Room S159
(301) 614-6070


From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Mark Stanley <markst at wni.com>
Reply-To: GrADS Users Forum <gradsusr at gradsusr.org>
Date: Monday, March 8, 2021 at 10:19 AM
To: "gradsusr at gradsusr.org" <gradsusr at gradsusr.org>
Subject: [EXTERNAL] [gradsusr] gadsdf: Error parsing time units in SDF file.

I am very new to GrADS so I hope this is a simple issue to resolve, but the answer is eluding me I’m afraid. I am getting the error “gadsdf: Error parsing time units in SDF file.” if I attempt to use sdfopen to open a netCDF file which is able to be successfully opened by other installations of GrADS used by others at our office. Below is the config output of my GrADS installation as well as the truncated ncdump of the netCDF file I’m attempting to open (though we are getting the same error for other netCDF files we’ve tried).

For reference this installation was done through a package install (on CentOS 7.9) and not compiled from source, but it is the same version of GrADS as the one that is working on the same files.

++++++++++++++++++++++++++++++++++++++

ga-> q config
Config: v2.0.2 little-endian readline printim grib2 netcdf hdf4-sds hdf5 opendap-grids geotiff shapefile
Grid Analysis and Display System (GrADS) Version 2.0.2
Copyright (c) 1988-2011 by Brian Doty and the
Institute for Global Environment and Society (IGES)
This program is distributed WITHOUT ANY WARRANTY
See file COPYRIGHT for more information.

Built Wed Aug 13 04:53:19 UTC 2014 for x86_64-redhat-linux-gnu

This version of GrADS has been configured with the following options:
  o Built on a LITTLE ENDIAN machine
  o Athena Widget GUI DISABLED
  o Command line editing ENABLED
      http://tiswww.case.edu/php/chet/readline/rltop.html<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftiswww.case.edu%2Fphp%2Fchet%2Freadline%2Frltop.html&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649365692%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=keuVtPPripQ9rP0JH1lkG8%2FWbw5XXVZ9M9fMQjDYyGg%3D&reserved=0>
  o printim command for image output ENABLED
      http://www.zlib.net<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.zlib.net%2F&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649375656%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=hGS4bOwJ0gU8D%2BQw7wSoaIUDBKRCI042Ai17Kxcw21o%3D&reserved=0>
      http://www.libpng.org/pub/png/libpng.html<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.libpng.org%2Fpub%2Fpng%2Flibpng.html&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649375656%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=3fUbMZ6cgt7jK7ma1HgjcmWfGrled%2BR05BZlzknC1hw%3D&reserved=0>
      http://www.libgd.org/Main_Page<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.libgd.org%2FMain_Page&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649385602%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=0YN1%2B9GSA5TOg7gT8sAcv0zBHKIN9h41HUe3%2FRXBEHY%3D&reserved=0>
  o GRIB2 interface ENABLED
      http://www.ijg.org<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ijg.org%2F&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649385602%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=iwbB%2Bz8Hv3CSXfHWUJ6bU6wU2DhUDj5zoHEk4vCpTaQ%3D&reserved=0>
      http://www.ece.uvic.ca/~mdadams/jasper<https://gcc02.safelinks.protection.outlook.com/?url=http:%2F%2Fwww.ece.uvic.ca%2F~mdadams%2Fjasper&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649395570%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=LDskyCdrsKv4Y8Chf%2FUulcbMZLDG1SF44Yaw5AYvzJM%3D&reserved=0>
      http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.nco.ncep.noaa.gov%2Fpmb%2Fcodes%2FGRIB2&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649395570%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=dnDSxwZ8xxLfEH6qu6ZggRw4XthWDRMiiIlYjJLcDM0%3D&reserved=0>
      g2clib-1.4.0
  o NetCDF interface ENABLED
      http://www.unidata.ucar.edu/software/netcdf<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.unidata.ucar.edu%2Fsoftware%2Fnetcdf&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649405520%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=iXzKXuuC3QfjayfVUEs5gpCyfQDfH%2FeBVC70UA%2F1iKA%3D&reserved=0>
      netcdf 4.3.3.1 of Dec 10 2015 16:44:18 $
  o OPeNDAP gridded data interface ENABLED
  o OPeNDAP station data interface DISABLED
  o HDF4 and HDF5 interfaces ENABLED
      http://hdfgroup.org<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fhdfgroup.org%2F&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649405520%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=yW7I4TRpnZ8Q3HWGsHO%2FczKkE0uIwQOob%2FyMGM5qYzc%3D&reserved=0>
      HDF 4.2r10
      HDF5 1.8.12
  o GeoTIFF and KML/TIFF output ENABLED
      http://www.libtiff.org<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.libtiff.org%2F&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649415479%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=eKedfpuWT57TvsmnTOqVJKYZMGqumIEx9newOU6gU%2Fg%3D&reserved=0>
      http://geotiff.osgeo.org<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeotiff.osgeo.org%2F&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649415479%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=y9JIYwMzEdEx6JEqhsNOsEYk5TJJMbVU8Oeg01DZtso%3D&reserved=0>
  o KML contour output ENABLED
  o Shapefile interface ENABLED
      http://shapelib.maptools.org<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fshapelib.maptools.org%2F&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649425424%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=8R0WvvpZEcoDv%2FyaKM%2BxDmtwyRLUcO4%2Be4shUp5K2UU%3D&reserved=0>

For additional information please consult http://iges.org/grads<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Figes.org%2Fgrads&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649425424%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=bNky3fq8qSHokf4bLkNIIRyTzzcxeiVTHuCuwbizAxg%3D&reserved=0>

++++++++++++++++++++++++++++++++++++++


# ncdump XinHong_Copernicus_Currents_Jan20.nc | more
netcdf XinHong_Copernicus_Currents_Jan20 {
dimensions:
time = 25 ;
depth = 1 ;
latitude = 61 ;
longitude = 61 ;
variables:
float utotal(time, depth, latitude, longitude) ;
utotal:_FillValue = 1.e+20f ;
utotal:least_significant_digit = 3 ;
utotal:long_name = "Eastward total velocity (Eulerian + Waves +
Tide)" ;
utotal:standard_name = "eastward_sea_water_velocity" ;
utotal:units = "ms-1" ;
utotal:_ChunkSizes = 1, 1, 1021, 2160 ;
float depth(depth) ;
depth:valid_min = 0.494025f ;
depth:valid_max = 0.494025f ;
depth:long_name = "Depth" ;
depth:standard_name = "depth" ;
depth:units = "m" ;
depth:positive = "down" ;
depth:_CoordinateAxisType = "Height" ;
depth:_CoordinateZisPositive = "down" ;
depth:axis = "Z" ;
float latitude(latitude) ;
latitude:valid_max = -12.f ;
latitude:valid_min = -17.f ;
latitude:long_name = "latitude coordinate" ;
latitude:standard_name = "latitude" ;
latitude:units = "degrees_north" ;
latitude:step = 0.08332825 ;
latitude:_CoordinateAxisType = "Lat" ;
latitude:axis = "Y" ;
double time(time) ;
time:units = "hours since 1950-01-01 0:0:0" ;
time:calendar = "standard" ;
time:long_name = "time" ;
time:standard_name = "time" ;
time:step = 1 ;
time:_ChunkSizes = 1024 ;
time:_CoordinateAxisType = "Time" ;
time:valid_min = 622827.5 ;
time:valid_max = 622851.5 ;
time:axis = "T" ;
float vtotal(time, depth, latitude, longitude) ;
vtotal:_FillValue = 1.e+20f ;
vtotal:least_significant_digit = 3 ;
vtotal:long_name = "Northward total velocity (Eulerian + Waves +
 Tide) " ;
vtotal:standard_name = "northward_sea_water_velocity" ;
vtotal:units = "ms-1" ;
vtotal:_ChunkSizes = 1, 1, 1021, 2160 ;
float longitude(longitude) ;
longitude:valid_min = 148.f ;
longitude:long_name = "longitude coordinate" ;
longitude:standard_name = "longitude" ;
longitude:units = "degrees_east" ;
longitude:step = 0.08332825 ;
longitude:_CoordinateAxisType = "Lon" ;
longitude:valid_max = 153.f ;
longitude:axis = "X" ;

// global attributes:
:product = "GLOBAL_ANALYSIS_FORECAST_PHY_001_024" ;
:producer = "CMEMS - Global Monitoring and Forecasting Centre" ;
:title = "hourly mean merged surface currents from oceanic circu
lation, tides and waves" ;
:area = "GLOBAL" ;
:quality_information_document = "http://marine.copernicus.eu/doc<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarine.copernicus.eu%2Fdoc&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649435394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=dIR%2BOMvDk1%2FnnYt3j401L3%2BEg0dmrjmQCQ%2BcRiXlBE8%3D&reserved=0>
uments/QUID/CMEMS-GLO-QUID-001-024.pdf" ;
:Conventions = "CF-1.6" ;
:credit = "E.U. Copernicus Marine Service Information (CMEMS)" ;
:contact = "servicedesk.cmems at mercator-ocean.eu<mailto:servicedesk.cmems at mercator-ocean.eu>" ;
:references = "http://marine.copernicus.eu<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarine.copernicus.eu%2F&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649435394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=NMIR1JdlA5iMiOoSghx9d7wn4ELTbsNUTSb47UF6fgQ%3D&reserved=0>" ;
:source = "MERCATOR PSY4QV3R1, mfwamglo, FES2014" ;
:licence = "http://marine.copernicus.eu/services-portfolio/servi<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarine.copernicus.eu%2Fservices-portfolio%2Fservi&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649445348%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=D8C5WR7B68Eo3XxgM0hE8fi1jcs8wHQJmU9og36elD8%3D&reserved=0>
ce-commitments-and-licence/" ;
:dataset = "global-analysis-forecast-phy-001-024-hourly-merged-u
-v" ;
:product_user_manual = "http://marine.copernicus.eu/documents/PU<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarine.copernicus.eu%2Fdocuments%2FPU&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7Cdfecefcd2c414d9da30408d8e2458bef%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637508135649445348%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=jMMxmpxPKNiG%2FBeWKPFL%2BwWgSjuy2WiosX0GubnaU0Q%3D&reserved=0>
M/CMEMS-GLO-PUM-001-024.pdf" ;
:institution = "MERCATOR OCEAN" ;
:julian_day_unit = "hours since 1950-01-01 00:00:00" ;
:FROM_ORIGINAL_FILE__latitude_min = -80 ;
:FROM_ORIGINAL_FILE__latitude_max = 90. ;
:FROM_ORIGINAL_FILE__longitude_min = -180. ;
:FROM_ORIGINAL_FILE__longitude_max = 179.91667175293 ;
:_CoordSysBuilder = "ucar.nc2.dataset.conv.CF1Convention" ;
:comment = "" ;
:history = "Data extracted from dataset http://localhost:8080/th
redds/dodsC/global-analysis-forecast-phy-001-024-hourly-merged-uv" ;
data:


++++++++++++++++++++++++++++++++++++++


Thank you in advance for the help.


Kind regards

Mark Stanley
Weathernews Inc.
markst at wni.com<mailto:markst at wni.com>

Ephesians 3:20
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20210308/c9b88eb7/attachment-0001.html>


More information about the gradsusr mailing list