TrajectoryBuilderIF
class (=Factory class) in the NetCDF-Java library:
NetcdfDataset.openDataset(String location, boolean enhance, ucar.nc2.util.CancelTask cancelTask);
ii. Adding attributes to a dataset:
NcML-file
:
<variable name="latitude" shape="row" type="double"> </variable>
protected void augmentDataset( NetcdfDataset ncDataset, CancelTask cancelTask) throws IOException { this.conventionName = "ATDRadar"; NcMLReader.wrapNcML( ncDataset, "file:/MyResource/ATDRadar.ncml", cancelTask); }
NetCDF
file via Java
NetcdfFile
is through the NetcdfDataset.openFile
factory method: String filename = "/home/cocktail/noe/moldata/MR121-GSGSW/sim293K/TRAJ2_400ns+TRAJ1_604880ps.cdf"; NetcdfFile ncfile = null; try { ncfile = NetcdfDataset.openFile(filename, null); ... file_id = ncfile.getId(); //see ii. for details } catch (IOException ioe) { ... }
TrajectoryObsDataset
via public methods
TrajectoryObsDataset
interface provides access to a collection of trajectories. Each trajectory in the collection is then accessed through an instance of the TrajectoryObsDatatype
interface. As with TypedDataset
, some basic dataset discovery metadata is available for each trajectory:
public String getId(); public String getDescription(); public Date getStartDate(); public Date getEndDate(); public ucar.unidata.geoloc.LatLonRect getBoundingBox();
NetcdfFileWriteable
String filename = "testWrite.nc"; NetcdfFileWriteable ncfile = NetcdfFileWriteable.createNew(filename, false); // add dimensions Dimension latDim = ncfile.addDimension("lat", 64); Dimension lonDim = ncfile.addDimension("lon", 128); try { ncfile.create(); } catch (IOException e) {}
NetCDF
file via network NetcdfDataset.openFile
does the following:
OPeNDAP
(Open-source Project for a Network Data Access Protocol): provides software which makes local data accessible to remote locations regardless of local storage format.
OPeNDAP
server can serve an arbitrarily large collection of data.
OPeNDAP
software is composed of a core library, and a variety of libraries that each support a different data access API. The OPeNDAP
core is a set of C++ classes for building OPeNDAP
servers and OPeNDAP
clients.