public class NetcdfDataset extends NetcdfFile
NetcdfDataset
extends the netCDF API, adding standard attribute parsing such as
scale and offset, and explicit support for Coordinate Systems.
A NetcdfDataset
wraps a NetcdfFile
, or is defined by an NcML document.
Be sure to close the dataset when done.
Using statics in NetcdfDatets
, best practice is to use try-with-resource:
try (NetcdfDataset ncd = NetcdfDatasets.openDataset(fileName)) { ... }
By default @code NetcdfDataset} is opened with all enhancements turned on. The default "enhance mode" can be set through setDefaultEnhanceMode(). One can also explicitly set the enhancements you want in the dataset factory methods. The enhancements are:
Automatic scale/offset processing has some overhead that you may not want to incur up-front. If so, open the
NetcdfDataset without ApplyScaleOffset
. The VariableDS data type is not promoted and the data is not
converted on a read, but you can call the convertScaleOffset() routines to do the conversion later.
NetcdfFile
Modifier and Type | Class and Description |
---|---|
static class |
NetcdfDataset.Builder<T extends NetcdfDataset.Builder<T>> |
static class |
NetcdfDataset.Enhance
Possible enhancements for a NetcdfDataset
|
Modifier and Type | Field and Description |
---|---|
protected static boolean |
fillValueIsMissing |
protected static boolean |
invalidDataIsMissing |
protected static boolean |
missingDataIsMissing |
cache, dimensions, gattributes, id, iosp, IOSP_MESSAGE_ADD_RECORD_STRUCTURE, IOSP_MESSAGE_CONVERT_RECORD_STRUCTURE, IOSP_MESSAGE_GET_NETCDF_FILE_FORMAT, IOSP_MESSAGE_RANDOM_ACCESS_FILE, IOSP_MESSAGE_REMOVE_RECORD_STRUCTURE, location, rootGroup, title, variables
Constructor and Description |
---|
NetcdfDataset()
Deprecated.
Use NetcdfDataset.builder()
|
NetcdfDataset(NetcdfFile.Builder<?> builder)
Deprecated.
Use NetcdfDataset.builder()
|
NetcdfDataset(NetcdfFile ncfile)
Deprecated.
Use NetcdfDataset.builder()
|
NetcdfDataset(NetcdfFile ncfile,
boolean enhance)
Deprecated.
Use NetcdfDataset.builder()
|
NetcdfDataset(NetcdfFile ncfile,
java.util.Set<NetcdfDataset.Enhance> mode)
Deprecated.
Use NetcdfDataset.builder()
|
Modifier and Type | Method and Description |
---|---|
static NetcdfDataset |
acquireDataset(DatasetUrl location,
boolean enhanceMode,
CancelTask cancelTask)
Deprecated.
use NetcdfDatasets.acquireDataset
|
static NetcdfDataset |
acquireDataset(DatasetUrl location,
CancelTask cancelTask)
Deprecated.
use NetcdfDatasets.acquireDataset
|
static NetcdfDataset |
acquireDataset(DatasetUrl location,
java.util.Set<NetcdfDataset.Enhance> enhanceMode,
CancelTask cancelTask)
Deprecated.
use NetcdfDatasets.acquireDataset
|
static NetcdfDataset |
acquireDataset(FileFactory fac,
DatasetUrl durl,
java.util.Set<NetcdfDataset.Enhance> enhanceMode,
int buffer_size,
CancelTask cancelTask,
java.lang.Object iospMessage)
Deprecated.
use NetcdfDatasets.acquireDataset
|
static NetcdfFile |
acquireFile(DatasetUrl location,
CancelTask cancelTask)
Deprecated.
use NetcdfDatasets.acquireFile
|
static NetcdfFile |
acquireFile(FileFactory factory,
java.lang.Object hashKey,
DatasetUrl location,
int buffer_size,
CancelTask cancelTask,
java.lang.Object spiObject)
Deprecated.
use NetcdfDatasets.acquireFile
|
CoordinateAxis |
addCoordinateAxis(VariableDS v)
Deprecated.
Use NetcdfDataset.builder()
|
void |
addCoordinateSystem(CoordinateSystem cs)
Deprecated.
Use NetcdfDataset.builder()
|
void |
addCoordinateTransform(CoordinateTransform ct)
Deprecated.
Use NetcdfDataset.builder()
|
Variable |
addVariable(Group g,
Variable v)
Deprecated.
Use NetcdfDataset.builder()
|
static NetcdfDataset.Builder<?> |
builder()
Get Builder for this class that allows subclassing.
|
static NetcdfDataset.Builder |
builder(NetcdfFile from) |
void |
check(java.util.Formatter f)
Deprecated.
do not use
|
void |
clearCoordinateSystems()
Deprecated.
Use NetcdfDataset.builder()
|
void |
close()
Close all resources (files, sockets, etc) associated with this dataset.
|
static void |
debugDump(java.io.PrintWriter out,
NetcdfDataset ncd)
Deprecated.
do not use
|
static void |
disableNetcdfFileCache()
Deprecated.
use NetcdfDatasets.disableNetcdfFileCache
|
void |
empty()
Deprecated.
Use NetcdfDataset.builder()
|
CoordSysBuilderIF |
enhance()
Deprecated.
Use NetcdfDataset.builder()
|
void |
enhance(java.util.Set<NetcdfDataset.Enhance> mode)
Deprecated.
Use NetcdfDataset.builder()
|
boolean |
enhanceNeeded(java.util.Set<NetcdfDataset.Enhance> want)
Deprecated.
Do not use.
|
CoordinateAxis |
findCoordinateAxis(AxisType type)
Retrieve the CoordinateAxis with the specified Axis Type.
|
CoordinateAxis |
findCoordinateAxis(java.lang.String fullName)
Retrieve the CoordinateAxis with the specified type.
|
CoordinateSystem |
findCoordinateSystem(java.lang.String name)
Retrieve the CoordinateSystem with the specified name.
|
CoordinateTransform |
findCoordinateTransform(java.lang.String name)
Retrieve the CoordinateTransform with the specified name.
|
AggregationIF |
getAggregation()
Deprecated.
Do not use.
|
java.lang.String |
getConventionUsed()
Get conventions used to analyse coordinate systems.
|
com.google.common.collect.ImmutableList<CoordinateAxis> |
getCoordinateAxes()
Get the list of all CoordinateAxis objects used by this dataset.
|
com.google.common.collect.ImmutableList<CoordinateSystem> |
getCoordinateSystems()
Get the list of all CoordinateSystem objects used by this dataset.
|
com.google.common.collect.ImmutableList<CoordinateTransform> |
getCoordinateTransforms()
Get the list of all CoordinateTransform objects used by this dataset.
|
static java.util.Set<NetcdfDataset.Enhance> |
getDefaultEnhanceMode() |
void |
getDetailInfo(java.util.Formatter f)
Show debug / underlying implementation details
|
static java.util.Set<NetcdfDataset.Enhance> |
getEnhanceAll() |
java.util.Set<NetcdfDataset.Enhance> |
getEnhanceMode()
Get the current state of dataset enhancement.
|
static java.util.Set<NetcdfDataset.Enhance> |
getEnhanceNone() |
java.lang.String |
getFileTypeDescription()
Get a human-readable description for this file type.
|
java.lang.String |
getFileTypeId()
Get the file type id for the underlying data source.
|
static boolean |
getFillValueIsMissing()
Deprecated.
do not use
|
static boolean |
getInvalidDataIsMissing()
Deprecated.
do not use
|
IOServiceProvider |
getIosp()
Deprecated.
do not use
|
long |
getLastModified()
Returns the time that the underlying file(s) were last modified.
|
static boolean |
getMissingDataIsMissing()
Deprecated.
do not use
|
static FileCacheIF |
getNetcdfFileCache()
Deprecated.
use NetcdfDatasets.getNetcdfFileCache
|
NetcdfFile |
getReferencedFile()
Deprecated.
Do not use
|
static void |
initNetcdfFileCache(int minElementsInMemory,
int maxElementsInMemory,
int period)
Deprecated.
use NetcdfDatasets.initNetcdfFileCache
|
static void |
initNetcdfFileCache(int minElementsInMemory,
int maxElementsInMemory,
int hardLimit,
int period)
Deprecated.
use NetcdfDatasets.initNetcdfFileCache
|
static void |
main(java.lang.String[] arg)
Deprecated.
use ucar.nc2.writer.Nccopy
|
static Array |
makeArray(DataType dtype,
java.util.List<java.lang.String> stringValues)
Deprecated.
use Array#makeArray directly
|
protected java.lang.Boolean |
makeRecordStructure()
Deprecated.
Use NetcdfDatasets.open() with IOSP_MESSAGE_ADD_RECORD_STRUCTURE
|
static NetcdfDataset |
openDataset(DatasetUrl location,
java.util.Set<NetcdfDataset.Enhance> enhanceMode,
int buffer_size,
CancelTask cancelTask,
java.lang.Object spiObject)
Deprecated.
use NetcdfDatasets.openDataset
|
static NetcdfDataset |
openDataset(java.lang.String location)
Deprecated.
use NetcdfDatasets.openDataset
|
static NetcdfDataset |
openDataset(java.lang.String location,
boolean enhance,
CancelTask cancelTask)
Deprecated.
use NetcdfDatasets.openDataset
|
static NetcdfDataset |
openDataset(java.lang.String location,
boolean enhance,
int buffer_size,
CancelTask cancelTask,
java.lang.Object spiObject)
Deprecated.
use NetcdfDatasets.openDataset
|
static NetcdfFile |
openFile(DatasetUrl location,
int buffer_size,
CancelTask cancelTask,
java.lang.Object spiObject)
Deprecated.
use NetcdfDatasets.openFile
|
static NetcdfFile |
openFile(java.lang.String location,
CancelTask cancelTask)
Deprecated.
use NetcdfDatasets.openFile
|
static java.util.Set<NetcdfDataset.Enhance> |
parseEnhanceMode(java.lang.String enhanceMode)
Deprecated.
this is moving to Ncml package
|
void |
reacquire()
Deprecated.
do not use
|
void |
release()
Deprecated.
do not use
|
void |
setAggregation(AggregationIF agg)
Deprecated.
Use NetcdfDataset.builder()
|
static void |
setDefaultEnhanceMode(java.util.Set<NetcdfDataset.Enhance> mode)
Set the default set of Enhancements to do for all subsequent dataset opens and acquires.
|
static void |
setFillValueIsMissing(boolean b)
Deprecated.
do not use
|
static void |
setInvalidDataIsMissing(boolean b)
Deprecated.
do not use
|
static void |
setMissingDataIsMissing(boolean b)
Deprecated.
do not use
|
void |
setReferencedFile(NetcdfFile ncfile)
Deprecated.
Use NetcdfDataset.builder()
|
void |
setValues(Variable v,
int npts,
double start,
double incr)
Deprecated.
use Variable.setValues()
|
void |
setValues(Variable v,
java.util.List<java.lang.String> values)
Deprecated.
use Variable.setValues()
|
static void |
shutdown()
Deprecated.
use NetcdfDatasets.shutdown
|
void |
sort()
Deprecated.
Use NetcdfDataset.builder()
|
boolean |
syncExtend()
Deprecated.
do not use
|
NetcdfDataset.Builder<?> |
toBuilder()
Turn into a mutable Builder.
|
protected java.lang.String |
toStringDebug(java.lang.Object o)
Access to iosp debugging info.
|
static NetcdfDataset |
wrap(NetcdfFile ncfile,
java.util.Set<NetcdfDataset.Enhance> mode)
Deprecated.
use NetcdfDatasets.wrap
|
addAttribute, addAttribute, addDimension, addGroup, addLocalFieldsToBuilder, addStringVariable, addVariable, addVariableAttribute, canonicalizeUriString, canOpen, findAttribute, findAttValueIgnoreCase, findDimension, findGlobalAttribute, findGlobalAttributeIgnoreCase, findGroup, findVariable, findVariable, findVariableByAttribute, finish, getCacheName, getDetailInfo, getDimensions, getFileTypeVersion, getGlobalAttributes, getId, getLocation, getRootGroup, getStructureIterator, getTitle, getUnlimitedDimension, getVariables, hasUnlimitedDimension, iospDeRegister, iospRegistered, makeFullName, makeFullName, makeFullNameSectionSpec, makeFullNameWithString, makeNameUnescaped, makeValidCDLName, makeValidCdmObjectName, makeValidPathName, makeValidSectionSpecName, open, open, open, open, open, open, openInMemory, openInMemory, openInMemory, openInMemory, read, readArrays, readAttributeDouble, readAttributeInteger, readData, readSection, readToByteChannel, readToOutputStream, registerIOProvider, registerIOProvider, registerIOProvider, registerIOProviderPreferred, removeDimension, removeRecordStructure, removeVariable, sendIospMessage, setCacheName, setDebugFlags, setFileCache, setId, setImmutable, setLocation, setProperty, setRootGroup, setTitle, showCached, showProxies, toNcml, toString, writeCDL, writeCDL, writeCDL, writeNcml, writeNcml
protected static boolean fillValueIsMissing
protected static boolean invalidDataIsMissing
protected static boolean missingDataIsMissing
@Deprecated public NetcdfDataset(NetcdfFile ncfile) throws java.io.IOException
ncfile
- NetcdfFile to transform.java.io.IOException
- on read error@Deprecated public NetcdfDataset(NetcdfFile ncfile, boolean enhance) throws java.io.IOException
ncfile
- NetcdfFile to transform, do not use independently after this.enhance
- if true, enhance with defaultEnhanceModejava.io.IOException
- on read error@Deprecated public NetcdfDataset(NetcdfFile ncfile, java.util.Set<NetcdfDataset.Enhance> mode) throws java.io.IOException
ncfile
- NetcdfFile to transform, do not use independently after this.mode
- set of enhance modes. If null, then nonejava.io.IOException
- on read error@Deprecated public NetcdfDataset()
@Deprecated public NetcdfDataset(NetcdfFile.Builder<?> builder)
public static java.util.Set<NetcdfDataset.Enhance> getEnhanceAll()
public static java.util.Set<NetcdfDataset.Enhance> getEnhanceNone()
public static java.util.Set<NetcdfDataset.Enhance> getDefaultEnhanceMode()
public static void setDefaultEnhanceMode(java.util.Set<NetcdfDataset.Enhance> mode)
mode
- the default set of Enhancements for open and acquire factory methods@Deprecated public static java.util.Set<NetcdfDataset.Enhance> parseEnhanceMode(java.lang.String enhanceMode)
String | Enhancements |
---|---|
All | ConvertEnums, ConvertUnsigned, ApplyScaleOffset, ConvertMissing, CoordSystems |
None | <empty> |
ConvertEnums | ConvertEnums |
ConvertUnsigned | ConvertUnsigned |
ApplyScaleOffset | ApplyScaleOffset |
ConvertMissing | ConvertMissing |
CoordSystems | CoordSystems |
IncompleteCoordSystems | CoordSystems |
true | Alias for "All" |
ScaleMissingDefer | Alias for "None" |
AllDefer | ConvertEnums, CoordSystems |
ScaleMissing | ConvertUnsigned, ApplyScaleOffset, ConvertMissing |
enhanceMode
- a string from the above table.enhanceMode
, or null
if there is no correspondence.@Deprecated public static void setFillValueIsMissing(boolean b)
b
- true if _FillValue are missing (default true)@Deprecated public static boolean getFillValueIsMissing()
@Deprecated public static void setInvalidDataIsMissing(boolean b)
b
- true if valid_range are missing (default true)@Deprecated public static boolean getInvalidDataIsMissing()
@Deprecated public static void setMissingDataIsMissing(boolean b)
b
- true if missing_data are missing (default true)@Deprecated public static boolean getMissingDataIsMissing()
@Deprecated public static void initNetcdfFileCache(int minElementsInMemory, int maxElementsInMemory, int period)
minElementsInMemory
- keep this number in the cachemaxElementsInMemory
- trigger a cleanup if it goes over this number.period
- (secs) do periodic cleanups every this number of seconds. set to < 0 to not cleanup@Deprecated public static void initNetcdfFileCache(int minElementsInMemory, int maxElementsInMemory, int hardLimit, int period)
minElementsInMemory
- keep this number in the cachemaxElementsInMemory
- trigger a cleanup if it goes over this number.hardLimit
- if > 0, never allow more than this many elements. This causes a cleanup to be done in
the calling thread.period
- (secs) do periodic cleanups every this number of seconds.@Deprecated public static void disableNetcdfFileCache()
@Deprecated public static void shutdown()
@Deprecated public static FileCacheIF getNetcdfFileCache()
@Deprecated public static NetcdfDataset wrap(NetcdfFile ncfile, java.util.Set<NetcdfDataset.Enhance> mode) throws java.io.IOException
ncfile
- wrap thismode
- using this enhance mode (may be null, meaning no enhance)java.io.IOException
- on io error@Deprecated public static NetcdfDataset openDataset(java.lang.String location) throws java.io.IOException
location
- location of filejava.io.IOException
- on read error@Deprecated public static NetcdfDataset openDataset(java.lang.String location, boolean enhance, CancelTask cancelTask) throws java.io.IOException
location
- location of fileenhance
- if true, use defaultEnhanceMode, else no enhancementscancelTask
- allow task to be cancelled; may be null.java.io.IOException
- on read error@Deprecated public static NetcdfDataset openDataset(java.lang.String location, boolean enhance, int buffer_size, CancelTask cancelTask, java.lang.Object spiObject) throws java.io.IOException
location
- location of fileenhance
- if true, use defaultEnhanceMode, else no enhancementsbuffer_size
- RandomAccessFile buffer size, if <= 0, use default sizecancelTask
- allow task to be cancelled; may be null.spiObject
- sent to iosp.setSpecial() if not nulljava.io.IOException
- on read error@Deprecated public static NetcdfDataset openDataset(DatasetUrl location, java.util.Set<NetcdfDataset.Enhance> enhanceMode, int buffer_size, CancelTask cancelTask, java.lang.Object spiObject) throws java.io.IOException
location
- location of fileenhanceMode
- set of enhancements. If null, then nonebuffer_size
- RandomAccessFile buffer size, if <= 0, use default sizecancelTask
- allow task to be cancelled; may be null.spiObject
- sent to iosp.setSpecial() if not nulljava.io.IOException
- on read error@Deprecated public static NetcdfDataset acquireDataset(DatasetUrl location, CancelTask cancelTask) throws java.io.IOException
location
- location of file, passed to FileFactorycancelTask
- allow task to be cancelled; may be null.java.io.IOException
- on read error@Deprecated public static NetcdfDataset acquireDataset(DatasetUrl location, boolean enhanceMode, CancelTask cancelTask) throws java.io.IOException
location
- location of file, passed to FileFactoryenhanceMode
- how to enhance. if null, then no enhancementcancelTask
- allow task to be cancelled; may be null.java.io.IOException
- on read error@Deprecated public static NetcdfDataset acquireDataset(DatasetUrl location, java.util.Set<NetcdfDataset.Enhance> enhanceMode, CancelTask cancelTask) throws java.io.IOException
location
- location of file, passed to FileFactoryenhanceMode
- how to enhance. if null, then no enhancementcancelTask
- allow task to be cancelled; may be null.java.io.IOException
- on read error@Deprecated public static NetcdfDataset acquireDataset(FileFactory fac, DatasetUrl durl, java.util.Set<NetcdfDataset.Enhance> enhanceMode, int buffer_size, CancelTask cancelTask, java.lang.Object iospMessage) throws java.io.IOException
fac
- if not null, use this factory if the file is not in the cache. If null, use the default factory.durl
- location of file, passed to FileFactoryenhanceMode
- how to enhance. if null, then no enhancementbuffer_size
- RandomAccessFile buffer size, if <= 0, use default sizecancelTask
- allow task to be cancelled; may be null.iospMessage
- sent to iosp.setSpecial() if not nulljava.io.IOException
@Deprecated public static NetcdfFile openFile(java.lang.String location, CancelTask cancelTask) throws java.io.IOException
location
- location of dataset.cancelTask
- use to allow task to be cancelled; may be null.java.io.IOException
- on read error@Deprecated public static NetcdfFile openFile(DatasetUrl location, int buffer_size, CancelTask cancelTask, java.lang.Object spiObject) throws java.io.IOException
This does not necessarily return a NetcdfDataset, or enhance the dataset; use NetcdfDatasets.openDataset() method for that.
location
- location of dataset. This may be a
buffer_size
- RandomAccessFile buffer size, if <= 0, use default sizecancelTask
- allow task to be cancelled; may be null.spiObject
- sent to iosp.setSpecial() if not nulljava.io.IOException
- on read error@Deprecated public static NetcdfFile acquireFile(DatasetUrl location, CancelTask cancelTask) throws java.io.IOException
location
- location of file, passed to FileFactorycancelTask
- allow task to be cancelled; may be null.java.io.IOException
- on read error@Deprecated public static NetcdfFile acquireFile(FileFactory factory, java.lang.Object hashKey, DatasetUrl location, int buffer_size, CancelTask cancelTask, java.lang.Object spiObject) throws java.io.IOException
factory
- if not null, use this factory to read the file. If null, use the default factory.hashKey
- if not null, use as the cache key, else use the locationlocation
- location of file, passed to FileFactorybuffer_size
- RandomAccessFile buffer size, if <= 0, use default sizecancelTask
- allow task to be cancelled; may be null.spiObject
- sent to iosp.setSpecial(); may be nulljava.io.IOException
- on read error@Deprecated public AggregationIF getAggregation()
@Deprecated public void setAggregation(AggregationIF agg)
agg
- the Aggregation objectpublic com.google.common.collect.ImmutableList<CoordinateSystem> getCoordinateSystems()
public java.lang.String getConventionUsed()
public java.util.Set<NetcdfDataset.Enhance> getEnhanceMode()
public com.google.common.collect.ImmutableList<CoordinateTransform> getCoordinateTransforms()
public com.google.common.collect.ImmutableList<CoordinateAxis> getCoordinateAxes()
@Deprecated public void clearCoordinateSystems()
public CoordinateAxis findCoordinateAxis(AxisType type)
type
- axis typepublic CoordinateAxis findCoordinateAxis(java.lang.String fullName)
fullName
- full escaped name of the coordinate axispublic CoordinateSystem findCoordinateSystem(java.lang.String name)
name
- String which identifies the desired CoordinateSystempublic CoordinateTransform findCoordinateTransform(java.lang.String name)
name
- String which identifies the desired CoordinateSystempublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface FileCacheable
close
in class NetcdfFile
java.io.IOException
- if error when closing@Deprecated public void release() throws java.io.IOException
NetcdfFile
release
in interface FileCacheable
release
in class NetcdfFile
java.io.IOException
@Deprecated public void reacquire() throws java.io.IOException
NetcdfFile
reacquire
in interface FileCacheable
reacquire
in class NetcdfFile
java.io.IOException
public long getLastModified()
FileCacheable
FileFactory
.getLastModified
in interface FileCacheable
getLastModified
in class NetcdfFile
long
value representing the time the file(s) were last modified or 0L
if the
last-modified time couldn't be determined for any reason.@Deprecated public void empty()
NetcdfFile
empty
in class NetcdfFile
@Deprecated public boolean syncExtend() throws java.io.IOException
NetcdfFile
syncExtend
in class NetcdfFile
java.io.IOException
- if error@Deprecated protected java.lang.Boolean makeRecordStructure()
NetcdfFile
makeRecordStructure
in class NetcdfFile
@Deprecated public void sort()
@Deprecated public NetcdfFile getReferencedFile()
@Deprecated public IOServiceProvider getIosp()
getIosp
in class NetcdfFile
@Deprecated public void setReferencedFile(NetcdfFile ncfile)
ncfile
- underlying "referenced file"protected java.lang.String toStringDebug(java.lang.Object o)
NetcdfFile
toStringDebug
in class NetcdfFile
o
- must be a Variable, Dimension, Attribute, or Group@Deprecated public void addCoordinateSystem(CoordinateSystem cs)
cs
- add this CoordinateSystem to the dataset@Deprecated public void addCoordinateTransform(CoordinateTransform ct)
ct
- add this CoordinateTransform to the dataset@Deprecated public CoordinateAxis addCoordinateAxis(VariableDS v)
v
- make this VariableDS into a CoordinateAxis@Deprecated public Variable addVariable(Group g, Variable v)
NetcdfFile
addVariable
in class NetcdfFile
g
- add to this group. If group is null, use root groupv
- add this Variable@Deprecated public CoordSysBuilderIF enhance() throws java.io.IOException
java.io.IOException
- on error@Deprecated public void enhance(java.util.Set<NetcdfDataset.Enhance> mode) throws java.io.IOException
mode
- how to enhancejava.io.IOException
- on error@Deprecated public boolean enhanceNeeded(java.util.Set<NetcdfDataset.Enhance> want)
want
- enhancements wanted@Deprecated public void setValues(Variable v, int npts, double start, double incr)
v
- for this variablenpts
- number of values, must = v.getSize()start
- starting valueincr
- increment@Deprecated public void setValues(Variable v, java.util.List<java.lang.String> values) throws java.lang.IllegalArgumentException
v
- for this variablevalues
- list of Stringsjava.lang.IllegalArgumentException
- if values array not correct size, or values wont parse to the correct type@Deprecated public static Array makeArray(DataType dtype, java.util.List<java.lang.String> stringValues) throws java.lang.NumberFormatException
dtype
- data type of the array.stringValues
- list of strings.java.lang.NumberFormatException
- if string values not parssable to specified data typepublic void getDetailInfo(java.util.Formatter f)
getDetailInfo
in class NetcdfFile
@Deprecated public static void debugDump(java.io.PrintWriter out, NetcdfDataset ncd)
out
- write herencd
- info about thispublic java.lang.String getFileTypeId()
NetcdfFile
getFileTypeId
in class NetcdfFile
public java.lang.String getFileTypeDescription()
NetcdfFile
getFileTypeDescription
in class NetcdfFile
@Deprecated public void check(java.util.Formatter f)
public NetcdfDataset.Builder<?> toBuilder()
NetcdfFile
toBuilder
in class NetcdfFile
public static NetcdfDataset.Builder<?> builder()
public static NetcdfDataset.Builder builder(NetcdfFile from)
@Deprecated public static void main(java.lang.String[] arg) throws java.io.IOException
ucar.nc2.dataset.NetcdfDataset -in fileIn -out fileOut
where:
arg
- -in java.io.IOException
- on read or write error