[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20000428: I want to write files as netCDF...I think



Lowell,

We don't normally handle support questions like this.

The netCDF mailing-list is the proper venue for questions like this (but
read on).

> To: address@hidden
> From: Lowell Bahner <address@hidden>
> Subject: I want to write files as netCDF...I think
> Organization: UCAR/Unidata
> Keywords: 200004281940.e3SJeTG28805

In the above message, you wrote:

> I am looking for guidance on writing output from an interpolator program
> into netCDF, CDF, or hdf format. We use the interpolator for computing
> water quality concentrations throughout Chesapeake Bay and tidal
> tributary river. The Bay and tribs are segmented into smaller segments
> that represent areas of similar environmental and biological conditions.
> Each segment is comprised of model cells that best represent that area
> (1000m x 1000m x 1m) for the main bay down to (10m x 10m x 1m) for some
> tidal fresh tributary segments. The current output files are ascii
> format, with some header records followed by data records:
> 
> Line 1>Input data file name
> Line 2>Data file description
> Line 3> 2 digit parameter code and parameter name
> Line 4>Start and end dates of data
> Line 5>Date and time data file was compiled
> Line 6>Number of data points, nearest neighbors, minimum neighbors,
> maximum vertical window, minimum vertical window, vertical window step
> increase size, maximum search radius, missing value
> Line 7>Name of interpolator used
> Line 8>Date and time of job
> Line 9>Bathymetry file used
> Line 10>Data region file used
> Line 11>Number of segments to interpolate
> Line 12>Cell description for this segment:number of surface cells in
> segment, segment id, segment name, cell e-w dimension in meters, cell
> n-s dimension in meters, cell vertical depth in meters
> Line 13+>cell easting, cell northing, cells deep, interpolated values
> from surface to bottom.
> 
> ===========================================
> C:\VOL3D\BDO970601.D3D
> CHESAPEAKE BAY BY CRUISE - Dissolved Oxygen - Linear Interpolated Data -
> 03JUN1997-12JUN1997
> DO,Dissolved Oxygen
> 06/03/1997,06/12/1997
> 06/10/1998:8:55
> 1254,4,1,4,0,.5,25000,-9
> Interpolator Model: Depth-Radius-Interpolator
> 6/17/98 10:24:26 AM
> cbay8.bth
> cbay8.reg
> 8
> 132,1001,CB1TF,1000,1000,1
> 403000,4384000,2,9.1,8.9
> 404000,4384000,5,9.1,8.9,8.8,8.8,8.8
> 404000,4383000,3,9.1,8.9,8.8
> 405000,4383000,8,10.3,9.9,9.5,8.8,8.8,8.8,8.8,8.8
> 405000,4382000,3,10.3,9.9,9.5
> 406000,4382000,1,9.9
> ...
> 
> etc for the rest of the file. Each column of cells (row in data set)
> defines the water quality from surface to bottom at a particular x,y
> location and by depth.
> 
> The goal is to be able to take the output from this interpolator into a
> standard file format for visualization and data sharing. The existing
> format was chosen to minimize file size by not creating a rectangular
> grid that would be mostly blanks, hence the variable length rows of data
> representing data from surface to depth.
> 
> Does one of the netCDF, CDF, or hdf formats lend to being used for this
> type data, and if so, can you give me a lead on how to proceed? The
> current interpolator is written in MS Visual Basic.

There no way to represent this kind of "sparse" data via the generic
netCDF standard.  You could do it if you adopted conventions for
representing such sparse data in a netCDF dataset and then incorporated
that knowledge in the code that would read the netCDF dataset.  This
would make the netCDF dataset unportable to "generic" programs,
however.

> 
> Thanks
> Lowell Bahner
> address@hidden
> T: 410-267-5671

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>