# vim:filetype=r:textwidth=80:expandtab:shiftwidth=4:softtabstop=4
useDynLib(oce, .registration=TRUE)

import(methods)
import(gsw)
importFrom("graphics", ".filled.contour", "abline", "arrows", "axis", "Axis",
           "axis.POSIXct", "box", "contour", "frame", "grid", "hist", "image",
           "layout", "lcm", "legend", "lines", "locator", "mtext", "pairs", "par",
           "plot", "plot.new", "plot.window", "points", "polygon", "rect",
           "segments", "smoothScatter", "strwidth", "text", "title", "xinch",
           "yinch")
importFrom("grDevices", "adjustcolor", "col2rgb", "colorRamp",
           "colorRampPalette", "contourLines", "gray", "hsv", "rgb")
importFrom("utils", "capture.output", "download.file", "read.delim", "unzip")
importFrom("stats", "approx", "approxfun", "coef", "confint", "cor", "cov",
           "fivenum", "frequency", "integrate", "is.ts", "kernel", "lm",
           "median", "na.exclude", "nls", "optim", "optimize", "predict",
           "printCoefmat", "quantile", "rnorm", "runmed", "sd", "smooth",
           "smooth.spline", "spectrum", "ts", "uniroot", "var",
           "weighted.mean", "window")
importFrom("utils", "data", "head", "flush.console", "read.csv", "read.table",
           "setTxtProgressBar", "str", "tail", "txtProgressBar", "write.table")
importFrom("testthat", "expect_equal")


exportMethods(plot)
exportMethods(subset)
exportMethods(summary)
export(abbreviateTimeLabels,
       approx3d,
       argShow,
       beamName,
       bound125,
       addColumn,
       adpEnsembleAverage,
       airRho,
       angleRemap,
       applyMagneticDeclination,
       argoGrid,
       argoNames2oceNames,
       as.adp,
       as.argo,
       as.cm,
       as.coastline,
       as.ctd,
       as.echosounder,
       as.gps,
       as.ladp,
       as.lisst,
       as.lobo,
       as.met,
       as.oce,
       as.rsk,
       as.sealevel,
       as.section,
       as.topo,
       as.unit,
       as.windrose,
       beamUnspreadAdp,
       beamToXyz,
       beamToXyzAdp,
       beamToXyzAdv,
       binmapAdp,
       binAverage,
       binApply1D,
       binApply2D,
       binCount1D,
       binCount2D,
       binMean1D,
       binMean2D,
       bcdToInteger,
       byteToBinary,
       cnvName2oceName,
       coastlineBest,
       colormap,
       coriolis,
       ctdAddColumn,
       ctdDecimate,
       ctdFindProfiles,
       ctdTrim,
       ctdUpdateHeader,
       ctimeToSeconds,
       coastlineCut,
       composite,
       curl,
       dataLabel,
       decimate,
       decodeHeaderNortek,
       decodeTime,
       despike,
       detrend,
       download.amsr,
       download.coastline,
       download.met,
       download.topo,
       drawDirectionField,
       drawIsopycnals,
       drawPalette,
       eclipticalToEquatorial,
       enuToOther,
       enuToOtherAdp,
       enuToOtherAdv,
       equatorialToLocalHorizontal,
       errorbars,
       fillGap,
       findBottom,
       findInOrdered,
       firstFinite,
       formatCI,
       formatPosition,
       fullFilename,
       geodGc,
       geodDist,
       geodXy,
       geodXyInverse,
       GMTOffsetFromTz,
       grad,
       gravity,
       handleFlags,
       imagep,
       interpBarnes,
       integerToAscii,
       integrateTrapezoid,
       julianDay,
       julianCenturyAnomaly,
       landsatAdd,
       landsatTrim,
       latFormat,
       latlonFormat,
       lonlat2utm,
       lonlat2map,
       lonFormat,
       lowpass,
       magneticField,
       makeFilter,
       makeSection,
       mapArrows,
       mapAxis,
       mapContour,
       mapCoordinateSystem,
       mapDirectionField,
       mapGrid,
       mapImage,
       mapLines,
       mapLocator,
       mapLongitudeLatitudeXY,
       mapMeridians,
       mapPlot,
       mapPoints,
       mapPolygon,
       mapScalebar,
       mapText,
       mapTissot,
       mapZones,
       map2lonlat,
       matchBytes,
       matrixShiftLongitude,
       matrixSmooth,
       metNames2oceNames,
       moonAngle,
       numberAsHMS,
       numberAsPOSIXct,
       ODF2oce,
       ODFNames2oceNames,
       oce.approx, oceApprox,
       oce.as.raw,
       oce.as.POSIXlt,
       oce.axis.POSIXct,
       oce.colorsGebco, oceColorsGebco,
       oce.colorsPalette, oceColorsPalette,
       oce.colorsJet, oceColorsJet,
       oce.colorsTwo, oceColorsTwo,
       oce.colors9A, oceColors9A,
       oce.colors9B, oceColors9B,
       oce.colorsViridis, oceColorsViridis,

       oce.colorsCDOM, oce.colorsChlorophyll, oce.colorsDensity,
       oce.colorsFreesurface, oce.colorsOxygen, oce.colorsPAR, oce.colorsPhase,
       oce.colorsSalinity, oce.colorsTemperature, oce.colorsTurbidity,
       oce.colorsVelocity, oce.colorsVorticity,
 
       oceColorsCDOM, oceColorsChlorophyll, oceColorsDensity,
       oceColorsFreesurface, oceColorsOxygen, oceColorsPAR, oceColorsPhase,
       oceColorsSalinity, oceColorsTemperature, oceColorsTurbidity,
       oceColorsVelocity, oceColorsVorticity,

       oceCRS,
 
       oceGetData, oceDeleteData, oceSetData,
       oceGetMetadata, oceDeleteMetadata, oceSetMetadata,
       oce.debug, oceDebug,
       oce.edit, oceEdit,
       oce.filter, oceFilter,
       oce.magic, oceMagic,
       oce.convolve, oceConvolve,
       oce.contour, oceContour,
       oce.grid,
       oceNames2whpNames,
       oceUnits2whpUnits,
       oce.plot.ts,
       oce.pmatch, ocePmatch,
       oce.smooth, oceSmooth,
       oce.spectrum, oceSpectrum,
       oce.write.table,
       parseLatLon,
       plotPolar,
       plotTaylor,
       predict.tidem,
       "processingLog<-",
       processingLogAppend,
       processingLogShow,
       plotInset,
       plotSticks,
       plotTS,
       plotScan,
       plotProfile,
       prettyPosition,
       pwelch,
       rangeExtended,
       rangeLimit,
       read.ad2cp,
       read.adp,
       read.adp.rdi,
       read.adp.sontek,
       read.adp.sontek.serial,
       read.adv,
       read.adv.nortek,
       read.adv.sontek.serial,
       read.adv.sontek.adr,
       read.adv.sontek.text,
       read.amsr,
       read.aquadopp, # wrapper for read.adp.nortek()
       read.aquadoppProfiler, # wrapper for read.adp.nortek()
       read.aquadoppHR, # wrapper for read.adp.nortek()
       read.bremen,
       read.cm,
       read.coastline,
       read.coastline.shapefile,
       read.coastline.openstreetmap,
       read.ctd,
       read.ctd.sbe,
       read.ctd.woce,
       read.ctd.odf,
       ## read.ctd.odv,
       read.ctd.itp,
       read.argo,
       read.echosounder,
       read.g1sst,
       read.gps,
       read.index,
       read.landsat,
       read.lisst,
       read.lobo,
       read.met,
       read.topo,
       read.netcdf,
       read.oce,
       read.odf,
       read.rsk,
       read.sealevel,
       read.section,
       renameData,
       rescale,
       resizableLabel,
       retime,
       rsk2ctd,
       rskPatm,
       rskToc,
       ##rskTrim,
       runlm,
       secondsToCtime,
       sectionAddCtd,
       sectionAddStation,
       sectionGrid,
       sectionSmooth,
       sectionSort,
       shiftLongitude,
       showMetadataItem,
       siderealTime,
       standardDepths,
       sunAngle,
       swAbsoluteSalinity,
       swAlpha,
       swAlphaOverBeta,
       swBeta,
       swConservativeTemperature,
       swCSTp,
       swDepth,
       swZ,
       swDynamicHeight,
       swLapseRate,
       swN2,
       swPressure,
       swRho,
       swRrho,
       swSCTp,
       swSigma,
       swSigmaT,
       swSigmaTheta,
       swSigma0, swSigma1, swSigma2, swSigma3, swSigma4,
       swSoundAbsorption,
       swSoundSpeed,
       swSpecificHeat,
       swSpice,
       swSTrho,
       swTFreeze,
       swThermalConductivity,
       swTheta,
       swTSrho,
       swViscosity,
       subtractBottomVelocity,
       standardizeLongitude,
       T68fromT90,
       T90fromT48,
       T90fromT68,
       threenum,
       tidem,
       tidemAstron,
       tidemVuf,
       titleCase,
       toEnu,
       toEnuAdp,
       toEnuAdv,
       topoInterpolate,
       trimString,
       unabbreviateYear,
       undriftTime,
       ungrid,
       unwrapAngle,
       useHeading,
       vectorShow,
       velocityStatistics,
       webtide,
       window.oce,
       woceNames2oceNames,
       write.ctd,
       unduplicateNames,
       unitFromString,
       unitFromStringRsk,
       usrLonLat,
       utm2lonlat,
       xyzToEnu,
       xyzToEnuAdp,
       xyzToEnuAdv)

S3method(head, oce)
S3method(predict, tidem)
S3method(tail, oce)
S3method(window, oce)

exportClasses(oce, adp, adv, amsr, bremen, cm, coastline, ctd, argo, ladp, landsat, lisst, lobo, met, odf, sealevel, section, rsk, tidem, topo, windrose)

