public class NetcdfReader extends Object implements EnvironmentDataSource
NetcdfReader netds = NetcdfReader.build("/path/mydata.nc");
 ...
 Date d = Data.valueOf("2005-05-15");  // May 15, 2005, midnight
 double ws[] = netds.getWaterSpeed(d, 30.115, -85.785, 50); // 3-d waterspeed vector at Gulf of Mex., 50 meters
 EnvironmentDataSource.LatitudeLongitudeRectangleAIR, AIR_EW, AIR_NS, AIR_PRESS, AIR_TEMP, AIR_UD, CURRENT, CURRENT_EW, CURRENT_NS, CURRENT_UD, DENS_ANOM, EW, NS, SALINITY, SEASTATE, SURF_ELEV, UD, WATER_TEMP| Modifier and Type | Method and Description | 
|---|---|
| static NetcdfReader | build(String uri) | 
| static NetcdfReader | build(URL url) | 
| double | getAirSpeed_u(Date d,
             double lat,
             double lon,
             double depth)Return the eastward current vector component from a NetCDF dataset at the specified
 time and location. | 
| double | getAirSpeed_v(Date d,
             double lat,
             double lon,
             double depth)Return the northward current vector component from a NetCDF dataset at the specified
 time and location. | 
| double[] | getAirSpeed(Date d,
           double lat,
           double lon,
           double depth)Return the 2 components of the 2d air speed vector from a NetCDF dataset at the specified
 time and location. | 
| EnvironmentDataSource.LatitudeLongitudeRectangle[] | getCoverage() | 
| double | getDensAnom(Date d,
           double lat,
           double lon,
           double depth)Return the (interpolated) density anomaly from a NetCDF dataset at the specified
 time and location. | 
| String | getDescription()Get the internally-provided description(s) of the NetcdfDatasets. | 
| double | getNamedValue(String name,
             Date d,
             double lat,
             double lon,
             double depth)Return the value of the named variable from a NetCDF dataset at the specified
 time and location. | 
| int | getParameterMask()Get the mask of parameter bits which are requested-of and supported-by this data set | 
| double | getSalinity(Date d,
           double lat,
           double lon,
           double depth)Return the (interpolated) water salinity from a NetCDF dataset at the specified
 time and location. | 
| double | getSurfEl(Date d,
         double lat,
         double lon,
         double depth)Return the (interpolated) surface elevation from a NetCDF dataset at the specified
 time and location. | 
| Date | getTimeBase(double lat,
           double lon)Get the absolute time base of the Netcdf dataset which covers the specified
 location. | 
| double | getVariable(int var,
           double lat,
           double lon,
           double depth,
           Date date) | 
| double | getVariable(int var,
           double lat,
           double lon,
           double depth,
           long time) | 
| double[] | getVariableAr(int var,
             double lat,
             double lon,
             double depth,
             Date date) | 
| double[] | getVariableAr(int var,
             double lat,
             double lon,
             double depth,
             long time) | 
| List<String> | getVariableList(double lat,
               double lon)Return a list of the variables in the Netcdf datasat which covers the specified
 location. | 
| double | getWaterSpeed_u(Date d,
               double lat,
               double lon,
               double depth)Return the eastward current vector component from a NetCDF dataset at the specified
 time and location. | 
| double | getWaterSpeed_v(Date d,
               double lat,
               double lon,
               double depth)Return the northward current vector component from a NetCDF dataset at the specified
 time and location. | 
| double | getWaterSpeed_w(Date d,
               double lat,
               double lon,
               double depth)Return the downward current vector component from a NetCDF dataset at the specified
 time and location. | 
| double[] | getWaterSpeed(Date d,
             double lat,
             double lon,
             double depth)Return the 3 components of the 3d current vector from a NetCDF dataset at the specified
 time and location. | 
| double | getWaterTemp(Date d,
            double lat,
            double lon,
            double depth)Return the (interpolated) water temperature from a NetCDF dataset at the specified
 time and location. | 
| void | setDescription(String s) | 
| void | setParamMask(int mask)Set the mask of parameter bits which this data set has been instructed to provide and
 can provide. | 
public static NetcdfReader build(String uri) throws IOException
IOExceptionpublic static NetcdfReader build(URL url) throws IOException
IOExceptionpublic EnvironmentDataSource.LatitudeLongitudeRectangle[] getCoverage()
getCoverage in interface EnvironmentDataSourcepublic int getParameterMask()
getParameterMask in interface EnvironmentDataSourcepublic void setParamMask(int mask)
setParamMask in interface EnvironmentDataSourcemask - public double getVariable(int var,
                 double lat,
                 double lon,
                 double depth,
                 Date date)
                   throws EnviroException
getVariable in interface EnvironmentDataSourceEnviroExceptionpublic double[] getVariableAr(int var,
                     double lat,
                     double lon,
                     double depth,
                     Date date)
                       throws EnviroException
getVariableAr in interface EnvironmentDataSourceEnviroExceptionpublic double getVariable(int var,
                 double lat,
                 double lon,
                 double depth,
                 long time)
                   throws EnviroException
getVariable in interface EnvironmentDataSourceEnviroExceptionpublic double[] getVariableAr(int var,
                     double lat,
                     double lon,
                     double depth,
                     long time)
                       throws EnviroException
getVariableAr in interface EnvironmentDataSourceEnviroExceptionpublic double getDensAnom(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double getSurfEl(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - (redundant) vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double getSalinity(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double getWaterTemp(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double[] getWaterSpeed(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double getWaterSpeed_u(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double getWaterSpeed_v(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double getWaterSpeed_w(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double[] getAirSpeed(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - (not used) vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double getAirSpeed_u(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - (not used) vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double getAirSpeed_v(Date d, double lat, double lon, double depth) throws Exception
d - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - (not used) vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic double getNamedValue(String name, Date d, double lat, double lon, double depth) throws Exception
name - variable name in datasetd - time coordinatelat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)depth - vertical location coordinate, downwards direction is positive, units = metersException - if parameters are outside of dataset rangepublic List<String> getVariableList(double lat, double lon) throws Exception
lat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)Exceptionpublic String getDescription()
getDescription in interface EnvironmentDataSourcepublic void setDescription(String s)
setDescription in interface EnvironmentDataSourcepublic Date getTimeBase(double lat, double lon) throws IOException
lat - latitude coordinate (decimal degrees)lon - longitude coordinate (decimal degrees)IOException