question regarding proper use of ncdfvdfcreate and ncdf2vdf for CF-compliant netCDF files

3 posts / 0 new
Last post
alex.hoffmann
question regarding proper use of ncdfvdfcreate and ncdf2vdf for CF-compliant netCDF files
Hello, I have just installed VAPOR to give it a try to see if it suits me better than other tools that struggle to cope with the amount of data I am trying to visualize. My post may be a bit premature as I have not gone extensively through the documentation yet, but so far I fail to produce a VDC that I can load into VAPOR. Maybe the answer is obvious. I have CF-compliant netCDF files (header dump below) with stretched x,y and z coordinates (though stretching is not necessarily relevant), a time dimension, and a _FillValue attribute to mask missing data (topography) - pretty straightforward. I have tried various variants of the following commands: ncdfvdfcreate [-vdc2] -vars so2new -timedims date [-timevars date] [-missing -9.9e+32] netCDF_PIC_002.nc netCDF_PIC_002.vdf ncdf2vdf -vars so2new [-missattr _FillValue] [-timedims date] netCDF_PIC_002.nc netCDF_PIC_002.vdf The first returns: Created VDF file: Num time steps : 1 3D Variable names : so2new 2DXY Variable names : 2DXZ Variable names : 2DYZ Variable names : Excluded 3D Variable names : Excluded 2D Variable names : Coordinate extents : 0 0 0 1 0.678571 0.857143 where I am not sure if this is what one should expect for the coordinate extents, I doubt it. The second returns: Processing VDC time step 0 Only 2D and 3D variables supported Error reading netCDF variable "so2new" at time step 0 Processing variable so2new, data range (3.40282e+38, -3.40282e+38) Failed to copy 1 variables or: Processing VDC time step 0 Only 2D and 3D variables supported Error reading netCDF variable "so2new" at time step 0 File closed before exactly 288 slices written Processing variable so2new, data range (0.000725805, 0.000725805) Failed to copy 1 variables or, alternatively, is done within a fraction of a second without a message and without creating a data directory. Is it obvious what I am doing wrong? Many thanks in advance, best wishes, Lex ncdump: netcdf netCDF_PIC_002 { dimensions: lon = 336 ; lat = 228 ; lev = 288 ; date = UNLIMITED ; // (1 currently) [-> can be larger] variables: float lon(lon) ; [raw x/y/z dimensions stored in m, scale_factor and add_offset for conversion into lon/lat] lon:long_name = "longitude" ; lon:units = "degrees_east " ; lon:scale_factor = 1.164429e-05f ; lon:add_offset = -71.94173f ; float lat(lat) ; lat:long_name = "latitude " ; lat:units = "degrees_north" ; lat:scale_factor = 8.995351e-06f ; lat:add_offset = -39.42615f ; float lev(lev) ; lev:long_name = "height" ; lev:units = "m" ; lev:positive = "up" ; float date(date) ; date:long_name = "date" ; date:units = "minutes since 2012-02-08 00:00:00 -04:00" ; date:add_offset = 480.f ; [...] float so2new(date, lev, lat, lon) ; so2new:long_name = "sulfur_dioxide " ; so2new:units = "gram kg-1" ; so2new:scale_factor = 1000.f ; so2new:add_offset = 0.f ; so2new:_FillValue = -9.9e+32f ; [...]
alex.hoffmann
SOLVED. It seems to work without further attributes, i.e. only: ncdfvdfcreate -timedims date -timevars date netCDF_PIC_002.nc netCDF_PIC_002.vdf ncdf2vdf -timedims date -timevars date netCDF_PIC_002.nc netCDF_PIC_002.vdf
m.yunus

Thank you for this, this also helps me.