[{"path":[]},{"path":"https://dankelley.github.io/oce/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"interest fostering open welcoming environment, contributors maintainers pledge making participation project community harassment-free experience everyone, regardless age, body size, disability, ethnicity, gender identity expression, level experience, nationality, personal appearance, race, religion, sexual identity orientation.","code":""},{"path":"https://dankelley.github.io/oce/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes creating positive environment include: Using welcoming inclusive language respectful differing viewpoints experiences Gracefully accepting constructive criticism Focusing best community Showing empathy towards community members Examples unacceptable behavior participants include: use sexualized language imagery unwelcome sexual attention advances Trolling, insulting/derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical electronic address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://dankelley.github.io/oce/CODE_OF_CONDUCT.html","id":"our-responsibilities","dir":"","previous_headings":"","what":"Our Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Project maintainers responsible clarifying standards acceptable behavior expected take appropriate fair corrective action response instances unacceptable behavior. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, ban temporarily permanently contributor behaviors deem inappropriate, threatening, offensive, harmful.","code":""},{"path":"https://dankelley.github.io/oce/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within project spaces public spaces individual representing project community. Examples representing project community include using official project e-mail address, posting via official social media account, acting appointed representative online offline event. Representation project may defined clarified project maintainers.","code":""},{"path":"https://dankelley.github.io/oce/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported contacting project team kelley.dan@gmail.com. project team review investigate complaints, respond way deems appropriate circumstances. project team obligated maintain confidentiality regard reporter incident. details specific enforcement policies may posted separately. Project maintainers follow enforce Code Conduct good faith may face temporary permanent repercussions determined members project’s leadership.","code":""},{"path":"https://dankelley.github.io/oce/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 1.4, available http://contributor-covenant.org/version/1/4","code":""},{"path":"https://dankelley.github.io/oce/README_developers.html","id":null,"dir":"","previous_headings":"","what":"How to build oce through a Makefile","title":"How to build oce through a Makefile","text":"following works well. can help target (called ocequick perhaps) skips CHECK action.","code":"OCEVSN=$(shell awk '/Version/{print($$2)}' oce/DESCRIPTION) oce: force     cd oce ; Rscript -e \"roxygen2::roxygenise()\"     R CMD BUILD oce     R CMD CHECK --as-cran oce_${OCEVSN}.tar.gz     R CMD INSTALL oce_${OCEVSN}.tar.gz"},{"path":[]},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"1. Introduction to Oce","text":"Oceanographers must deal measurements made wide variety instruments, task complicated tendency instrument manufacturers invent new data formats suite new measurement capabilities. Many manufacturers provide software scanning data files producing overview plots, somewhat limited use researchers work several instrument types time, need move beyond standardized engineering plots specialized scientific plots statistical analyses.","code":""},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"architecture-of-oce-objects","dir":"Articles","previous_headings":"","what":"Architecture of oce objects","title":"1. Introduction to Oce","text":"need scan diverse data files one motivation creation oce, equal goal make easy work data system. accomplished partly provision specialized generic (overloaded) functions work data, partly providing accessor methods make convenient reach inside data objects (see next section). illustrated Figure 1, oce object contains three slots: data, list containing actual data, e.g., CTD object (see also vignette CTD data), contain pressure, temperature, etc. metadata, list containing information data, units, data-quality flags, sampling locations, etc. processingLog, list documents object created possibly changed thereafter.","code":""},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"accessing-data-in-oce-objects","dir":"Articles","previous_headings":"","what":"Accessing data in oce objects","title":"1. Introduction to Oce","text":"detailed analysis, users may want access data within oce objects. possible descend object using “slot” “list” notation (e.g. d@data$salinity yields salinity within oce object named d), approach recommended, two reasons. First, direct access makes user’s code brittle changes object structure (sometimes necessary track changes measurement technologies, analysis methods). , second, direct access limited actually stored file, might user wants – example, record might contain electrical conductivity salinity. preferred approach use [[ notation, derives generic “Extract” method accessing parts object. permits accessing just data stored object, also quantities can computed data (e.g. salinity, temperature, pressure conductivity stored). general introduction provided details provided individual object classes e.g. ctd class. notation simple. example, suppose d object stores salinity either data slot metadata slot. , extract salinity present object, compute salinity, object’s contents sufficient compute salinity. [[ method first looks metadata slot, item found , proceeds look data slot. two-step scheme helpful frees user know data stored. example, ctd object, latitude might stored metadata (CTD profile) data slot (slantwise sampling glider). [[ notation helpful several reasons, among two prominent. can give valuable performance enhancements cases, e.g. data landsat class stored two byte-level arrays, yields marked improvement 8-byte arrays R generally uses 64-bit machine. [[ assembles byte-scale chunks conventional R numerical matrix, can quite convenient users wish operate data without learning assemble bytes. provides uniformity notation can helpful users. oce, objects derived data files tend hold just information files, derived information. example, example, CTD datasets often provide -situ temperature potential temperature (since latter measured). -situ temperature found e.g. d[[\"temperature\"]], seems natural write d[[\"theta\"]] get potential temperature. done, ctd version [[ first looks data slot, returns theta found , may sometimes case (depending choice person created dataset). However, found, [[ calls swTheta() calculate value, returns result. Finally, also possible extract entirety either metadata data slot, e.g. yields full data slot, list elements can accessed conventional way, e.g. ctd object, retrieves temperature. addition , [[ special entry can reveal just data object, also data can computed object. returns list items named metadata, metadataDerived, data dataDerived. Derived items specific just object class, also data stored within particular object. example, reveals square buoyancy frequency can retrieved ctd[[\"N2\"]], say temperature removed, \"N2\" listed. Exercise 1. Show removing temperature built-\"ctd\" dataset makes [[\"?\"]] indicate N2 longer available.","code":"?`[[,oce-method` ?`[[,ctd-method` S <- d[[\"salinity\"]] data <- d[[\"data\"]] data$temperature library(oce) data(ctd) ctd[[\"?\"]]"},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"modifying-data-in-oce-objects","dir":"Articles","previous_headings":"","what":"Modifying data in oce objects","title":"1. Introduction to Oce","text":"several schemes modifying data within oce objects. example, analogy [[ notation previous section, following store excess freezing temperature ctd object. information notation provided works within data slot. store within metadata slot, consider using e.g. sets “scientist”. archival work, important store reasons changing things object. Two functions provided purpose: oceSetData oceSetMetadata. example, better way change scientist might write better way store temperatureAboveFreezing illustrates notation, opposed [[<- notation, permits specification unit originalName, , together note, displayed summary(ctd).","code":"data(ctd) ctd[[\"temperatureAboveFreezing\"]] <- ctd[[\"temperature\"]] - swTFreeze(ctd) ?\"[[<-,oce-method\" ctd[[\"metadata\"]]$scientist <- \"Dalhousie Oceanography 4120/5120 Class of 2003\" ctd <- oceSetMetadata(ctd,     name = \"scientist\",     value = \"Dalhousie Oceanography 4120/5120 Class of 2003\",     note = \"give credit where it's due\" ) ctd <- oceSetData(ctd,     name = \"temperatureAboveFreezing\",     value = ctd[[\"temperature\"]] - swTFreeze(ctd),     unit = list(unit = expression(degree * C), scale = \"ITS-90\"),     originalName = \"-\",     note = \"add temperatureAboveFreezing, for ice-related calculations\" )"},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"oce-functions","dir":"Articles","previous_headings":"","what":"Oce functions","title":"1. Introduction to Oce","text":"uniformity various oce objects helps users build skill examining modifying objects. Fine-scale control provided throughout oce, best way learn start simplest tools defaults. example, following read CTD file named \"station1.cnv\", summarize contents, plot overview data, profiles, TS diagram, map (Figure 2). reader stop now try file . pattern work fairly wide variety file types, read.oce() examines file name contents try discover . example, read.oce() given name file created Acoustic Doppler Profiler, return object inheriting class \"adp\", summary() plot() calls tailored type, e.g. graph show images time-distance variation measured velocity components. Notes oce function names. just illustrated, general function read dataset ends .oce, name signal returned object class oce. Depending file contents, d also additional class, e.g. file contains CTD data, object inherit two classes, oce ctd, second used tailor graphics passing control ctd variant generic plot function (use help(\"plot,ctd-method\") learn ). Generally, oce functions employ “camel case” naming convention, function described several words named stringing words together, capitalizing first letter second subsequent words. example, ctdFindProfiles() locates individual profiles within ctd object holds data acquired cyclic raising lowering CTD instrument. Function names begin oce cases natural name conflict function base R system package commonly used Oceanographers. example, oceContour() function provides alternative contour() graphics package.","code":"library(oce) d <- read.oce(\"station1.cnv\") summary(d) plot(d)"},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"calculation-of-seawater-properties","dir":"Articles","previous_headings":"","what":"Calculation of seawater properties","title":"1. Introduction to Oce","text":"oce package provides many functions dealing seawater properties. Perhaps used swRho(S,T,p), computes seawater density ρ=ρ(S,T,p)\\rho=\\rho(S, T, p), SS salinity, TT -situ temperature ∘^\\circC (-90 scale), pp seawater pressure, .e. excess atmospheric pressure, dbar. (similar functions starts letters sw designate relate seawater properties.) result number order 10001000kg/m3^3. many purposes, Oceanographers prefer use density anomaly σ=ρ−1000\\sigma=\\rho-1000kg/m3^3, provided swSigma(salinity,temperature,pressure), adiabatic cousin σθ\\sigma_\\theta, provided swSigmaTheta(). functions can use either UNESCO GSW (TEOS-10) formulation seawater properties, choice set argument called eos. noted oce uses gsw package GSW calculations. Caution: results obtained eos=\"gsw\" oce functions may differ results obtained using gsw functions directly, due unit conventions. example, swCSTp(..., eos=\"gsw\") reports conductivity ratio consistency UNESCO formulation, however underlying gsw function gsw::gsw_C_from_SP() reports conductivity mS/cm. partial list seawater functions follows: swAlpha() thermal expansion coefficient α=−ρ0−1∂ρ/∂T\\alpha=-\\rho_0^{-1}\\partial\\rho/\\partial T swAlphaOverBeta() α/β\\alpha/\\beta swBeta() haline compression coefficient β=ρ0−1∂ρ/∂S\\beta=\\rho_0^{-1}\\partial\\rho/\\partial S swConductivity() conductivity SS, TT pp swDepth() depth pp latitude swDynamicHeight() dynamic height swLapseRate() adiabatic lapse rate swN2() buoyancy frequency swRho() density ρ\\rho SS, TT pp swSCTp() salinity conductivity, temperature pressure swSTrho() salinity temperature density swSigma() ρ−1000\\rho-1000,kg/m3^3 swSigmaT() σ\\sigma pp set zero temperature unaltered swSigmaTheta() forσ\\sigma pp set zero temperature altered adiabatically swSoundSpeed() speed sound swSpecificHeat() specific heat swSpice(), spiciness0(), spiciness1() spiciness2() quantities used watermass research swTFreeze() freezing temperature swTSrho() temperature salinity density swTheta() potential temperature θ\\theta swViscosity() viscosity Details examples provided documentation functions. following exercise may help readers prefer learn . (Answers provided end document.) Exercise 2. . density seawater parcel pressure 100 dbar, salinity 34 PSU temperature 10∘^\\circC? b. temperature parcel raised adiabatically surface? c. density raised adiabatically surface? d. density lowered 100m, increasing pressure 200 dbar? e. Draw blank TT-SS diagram SS 30 40 PSU TT -2 20∘^\\circC.","code":""},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"ctd-data","dir":"Articles","previous_headings":"","what":"CTD data","title":"1. Introduction to Oce","text":"read.oce function recognizes wide variety CTD data formats, associated plot function can produce many types graphical display. addition, several functions aid analysis data. See ctd vignette dealing CTD data.","code":""},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"section-plots","dir":"Articles","previous_headings":"","what":"Section plots","title":"1. Introduction to Oce","text":"commands plot summary diagram containing sections TT, SS, σθ\\sigma_\\theta, along chart indicating station locations. addition overview diagrams, section variant generic plot function can also create individual plots individual properties (use help(\"plot,section-method\") learn ). section datasets supplied pre-gridded format, also common different pressure levels station. cases, sectionGrid() may used, e.g. following produces Figure 4. ship travelling westward Mediterranean towards North America, taking 124 stations total; stationId value selects last stations section, ship headed toward northwest, crossing isobaths (perhaps, Gulf Stream) nearly right angles. Figure 4. Portion CTD section designated A03, showing Gulf Sream region. square cruise track corresponds zero distance section. Exercise 3. Draw TT-SS diagram section data, using black symbols east 30W gray symbols west, thus highlighting Mediterranean-derived waters. Use handleFlags() (see using data-quality flags) discard questionable data, use accessor function [[. Exercise 4. Plot dynamic height geostrophic velocity across Gulf Stream. (Hint: use swDynamicHeight() function.)","code":"data(section) plot(section, which = c(1, 2, 3, 99)) library(oce) #> Loading required package: gsw data(section) GS <- subset(section, 102 <= stationId & stationId <= 124) GSg <- sectionGrid(GS, p = seq(0, 1600, 25)) plot(GSg, which = c(1, 99), map.xlim = c(-85, -(64 + 13 / 60)))"},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"maps","dir":"Articles","previous_headings":"","what":"Maps","title":"1. Introduction to Oce","text":"Oce several functions facilitate drawing maps. variety projections provided, mathematics projection handled behind scenes sf package. introduction drawing maps provided ?mapPlot, map projection vignette provides much detail.","code":""},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"sea-level-data","dir":"Articles","previous_headings":"","what":"Sea-level data","title":"1. Introduction to Oce","text":"following code graphs built-dataset sea-level time series (Figure 9). top panel provides overview entire data set. second panel narrowed recent month, reveal spring-neap cycles tide mixed. third panel log spectrum, tidal constituents indicated. section variant generic plot function provides possibilities plotting, including cumulative spectrum can quite informative (use help(\"plot,sealevel-method\") learn ). Figure 9. Sea-level timeseries measured 2003 Halifax Harbour. Exercise 5. Illustrate Halifax sea-level variations Hurricane Juan, near end September, 2003. preliminary version tidal analysis provided tidem function provided version package, readers cautioned results certain change future version. (problems involve phase inference satellite nodes.) Exercise 6. Plot de-tided Halifax sea level Autumn 2003, see whether Hurricane Juan visible. (Hint: use predict results tidem.)","code":"library(oce) data(sealevel) plot(sealevel)"},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"acoustic-doppler-profiler-data","dir":"Articles","previous_headings":"","what":"Acoustic Doppler Profiler data","title":"1. Introduction to Oce","text":"following commands produce Figure 10, showing one velocity component currents measured St Lawrence Estuary Internal Wave Experiment. plot type just one many provided adp variant generic plot function (see ?\"plot,adp-method\"). See adp vignette much acoustic Doppler profiler data. Figure 10. Measurements made bottom-mounted ADP St Lawrence Estuary. line near surface indicates pressure measured ADP.","code":"library(oce) data(adp) plot(adp, which = 1) lines(adp[[\"time\"]], adp[[\"pressure\"]], lwd = 2)"},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"handling-data-quality-flags","dir":"Articles","previous_headings":"","what":"Handling data-quality flags","title":"1. Introduction to Oce","text":"Archives CTD/bottle Argo drifter measurements commonly supply data-quality flags provide indication trust put individual data points. Oce flexible scheme dealing flags, also inserting flags data type; see using data-quality flags vignette ..","code":""},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"working-in-non-english-languages","dir":"Articles","previous_headings":"","what":"Working in non-English languages","title":"1. Introduction to Oce","text":"Many oce plotting functions produce axis labels can displayed languages English. time writing, French, German, Spanish, Mandarin supported least rudimentary way. Setting language can done general system level, within R, indicated (results shown). translated items found online dictionaries, may incorrect oceanographic usage. Readers can help translation effort, knowledge nautical words Pitch Roll technical terms Absolute Salinity Potential Temperature written various languages.","code":"library(oce) Sys.setenv(LANGUAGE = \"fr\") data(ctd) plot(ctd)"},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"extending-oce","dir":"Articles","previous_headings":"","what":"Extending oce","title":"1. Introduction to Oce","text":"oce object structure can used basis new object types. advantage basic operations oce carry new types. example, accessing operator [[ summary function work expected, aspects handling data-quality flags units. details setting classes inherit oce provided subclassing vignette.","code":""},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"the-future-of-oce","dir":"Articles","previous_headings":"","what":"The future of oce","title":"1. Introduction to Oce","text":"present version oce can handle data types authors using research. New data types added need arises work, authors also happy add data types likely prove useful Oceanographic community. (data types need restricted Physical Oceanography, authors need help dealing types data, given research focus.) Two principles guide addition data types functions: () need, perceived authors contributors (b) ease additions can made. One might call development--triage, analogy scheme used Emergency Rooms organize medical effort efficiently.","code":""},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"development-website","dir":"Articles","previous_headings":"","what":"Development website","title":"1. Introduction to Oce","text":"site https://github.com/dankelley/oce provides window development goes CRAN releases package. Readers requested visit site report bugs, suggest new features, just see oce development coming along. Note development branch used authors work, updated frequently must considered unstable, least spots changed given day. Official CRAN releases derive master branch, done code considered reasonable stability quality. common pattern open-source software.","code":""},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"solutions-to-exercises","dir":"Articles","previous_headings":"","what":"Solutions to exercises","title":"1. Introduction to Oce","text":"Exercise 1. Show removing temperature built-\"ctd\" dataset makes [[\"?\"]] indicate N2 longer available. may demonstrated . Exercise 2. Seawater properties. UNESCO system may write Gibbs SeaWater system, use eos=\"gws\" must supply longitude latitude arguments sw*() calls also .ctd() call. Exercise 3. Draw TT-SS diagram section data, using black symbols east 30W gray symbols west, thus highlighting Mediterranean-derived waters. Use handleFlags() (see using data-quality flags) discard questionable data, use accessor function [[. use Gibbs SeaWater system, .ctd() needs location information. Exercise 4. Plot dynamic height geostrophic velocity across Gulf Stream. (Hint: use swDynamicHeight function.) (Try ?swDynamicHeight hints smoothing.) Exercise 5. Halifax sea-level Hurricane Juan, near end September, 2003. web search tell Hurricane Juan hit midnight, 2003-sep-28. first author can verify strongest winds occurred bit midnight – time moved room without windows, fear flying glass. Exercise 6. Plot de-tided Halifax sea level Autumn 2003, see whether Hurricane Juan visible. (Hint: use predict results tidem.) spike reveals surge 1.5m, 29th September, 2003.","code":"library(oce) data(ctd) \"N2\" %in% ctd[[\"?\"]]$dataDerived #> [1] TRUE ctd@data$temperature <- NULL # erase temperature \"N2\" %in% ctd[[\"?\"]]$dataDerived #> [1] FALSE library(oce) swRho(34, 10, 100, eos = \"unesco\") #> [1] 1026.624 swTheta(34, 10, 100, eos = \"unesco\") #> [1] 9.988599 swRho(34, swTheta(34, 10, 100, eos = \"unesco\"), 0, eos = \"unesco\") #> [1] 1026.173 swRho(34, swTheta(34, 10, 100, 200, eos = \"unesco\"), 200, eos = \"unesco\") #> [1] 1027.074 plotTS(as.ctd(c(30, 40), c(-2, 20), rep(0, 2)), eos = \"unesco\", grid = TRUE, col = \"white\") library(oce) data(section) s <- handleFlags(section, flags = list(c(1, 3:9))) ctd <- as.ctd(s[[\"salinity\"]], s[[\"temperature\"]], s[[\"pressure\"]],     longitude = s[[\"longitude\"]], latitude = s[[\"latitude\"]] ) col <- ifelse(s[[\"longitude\"]] > -30, \"black\", \"gray\") plotTS(ctd, col = col, eos = \"gsw\") library(oce) data(section) GS <- subset(section, 102 <= stationId & stationId <= 124) dh <- swDynamicHeight(GS) #> Warning in regularize.values(x, y, ties, missing(ties), na.rm = na.rm): #> collapsing to unique 'x' values par(mfrow = c(2, 1), mar = c(3, 3, 1, 1), mgp = c(2, 0.7, 0)) plot(dh$distance, dh$height, type = \"l\", xlab = \"\", ylab = \"Dyn. Height [m]\") grid() # 1e3 metres per kilometre latMean <- mean(GS[[\"latitude\"]]) f <- coriolis(latMean) g <- gravity(latMean) v <- diff(dh$height) / diff(dh$distance) * g / f / 1e3 plot(dh$distance[-1], v, type = \"l\", xlab = \"Distance [km]\", ylab = \"Velocity [m/s]\") grid() abline(h = 0, col = \"red\") library(oce) data(sealevel) # Focus on 2003-Sep-28 to 29th, the time when Hurricane Juan caused flooding plot(sealevel, which = 1, xlim = as.POSIXct(c(\"2003-09-24\", \"2003-10-05\"), tz = \"UTC\")) abline(v = as.POSIXct(\"2003-09-29 04:00:00\", tz = \"UTC\"), col = \"red\") mtext(\"Juan\", at = as.POSIXct(\"2003-09-29 04:00:00\", tz = \"UTC\"), col = \"red\") library(oce) data(sealevel) m <- tidem(sealevel) #> Note: the tidal record is too short to fit for constituents: SA, PI1, S1, PSI1, GAM2, H1, H2, T2, R2 oce.plot.ts(sealevel[[\"time\"]], sealevel[[\"elevation\"]] - predict(m),     ylab = \"Detided sealevel [m]\",     xlim = c(as.POSIXct(\"2003-09-20\"), as.POSIXct(\"2003-10-08\")) )"},{"path":"https://dankelley.github.io/oce/articles/A_oce.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"1. Introduction to Oce","text":"Kelley, Dan E. Oceanographic Analysis R. 1st ed. 2018. New York, NY: Springer New York : Imprint: Springer, 2018. https://doi.org/10.1007/978-1-4939-8844-0. Kelley, Dan E., Clark Richards, Chantelle Layton. “Oce: R Package Oceanographic Analysis.” Journal Open Source Software 7, . 71 (March 3, 2022): 3594. https://doi.org/10.21105/joss.03594.","code":""},{"path":"https://dankelley.github.io/oce/articles/B_ctd.html","id":"pre-trimmed-data","dir":"Articles","previous_headings":"","what":"Pre-trimmed data","title":"2. Analysis of CTD data","text":"Many object types supported oce come built-data. example, data(ctd) yields CTD profile trimmed just downcast portion sampling. (See next section learn trimming.) summary plot (Figure 2) created follows. Figure 2. overview ctd dataset. Accessing data within ctd object can done directly, e.g. ctd@data$pressure holds pressure record, usually better use accessor function provided oce. function named [[, takes character string argument, e.g. ctd[[\"pressure\"]] yields pressure column. accessor notation preferable direct access simpler user. example, several oce objects store data single-byte two-byte chunks, match raw format used instruments, accessor function takes care translating values sometimes called “science” units. Exercise 1. Plot profile σθ\\sigma_\\theta N2N^2 within pycnocline built-ctd data set. (Hint: use subset().)","code":"library(oce) data(ctd) summary(ctd) #> CTD Summary #> ----------- #>  #> * Instrument:          SBE 25 #> * Temp. serial no.:    1140 #> * Cond. serial no.:    832 #> * File:                \"/Users/kelley/git/oce/create_data/ctd/ctd.cnv\" #> * Original file:       c:\\seasoft3\\basin\\bed0302.hex #> * Start time:          2003-10-15 15:38:38 #> * Sample interval:     1 s #> * Cruise:              Halifax Harbour #> * Vessel:              Divcom3 #> * Station:             Stn 2 #> * Mean Location:       44.684N 63.644W #> * Data Overview #>  #>                               Min.   Mean   Max.   Dim. NAs OriginalName #>     scan                      130    220    310    181  0   \"scan\"       #>     timeS [s]                 129    219    309    181  0   \"timeS\"      #>     pressure [dbar]           1.48   22.885 44.141 181  0   \"pr\"         #>     depth [m]                 1.468  22.698 43.778 181  0   \"depS\"       #>     temperature [°C, IPTS-68] 2.919  7.5063 14.237 181  0   \"t068\"       #>     salinity [PSS-78]         29.916 31.219 31.498 181  0   \"sal00\"      #>     flag                      0      0      0      181  0   \"flag\"       #>  #> * Processing Log #>  #>     - 2018-11-14 20:03:47 UTC: `create 'ctd' object` #>     - 2018-11-14 20:03:47 UTC: `read.ctd.sbe(file = file, debug = 10, processingLog = processingLog)` #>     - 2018-11-14 20:03:47 UTC: `oce.edit(x = ctd, item = \"startTime\", value = as.POSIXct(gsub(\"1903\",     \"2003\", format(ctd[[\"startTime\"]])), tz = \"UTC\") + 4 * 3600,     reason = \"file had year=1903, instead of 2003\", person = \"Dan Kelley\")` plot(ctd)"},{"path":"https://dankelley.github.io/oce/articles/B_ctd.html","id":"raw-data","dir":"Articles","previous_headings":"","what":"Raw data","title":"2. Analysis of CTD data","text":"Practicing Oceanographers may wondering CTD cast used preceding section trimmed equilibration-phase upcast-phase data. Spurious data phases must trimmed first step processing. example, consider following code. Figure 3. Scanwise plot ctdRaw sample data set. Note spike start, equilibration phase downcast, spurious freshening signal near start upcast. produces two-panel plot (Figure 3) data time-series, revealing just desired downcast, also earlier equilibration phase later upcast. x-axis Figure 3 scan number, convenient index extraction downcast portion profile essentially manual method, e.g. proceeding sequence commands method making decisions based plotted information probably robust method trimming data. However, quick work, users may satisfied results automatic downcast detection, e.g. noted ctdTrim() inserts entries object’s log file, details trimming done recorded together data. profile trimmed, one may wish use ctd.decimate() smooth data interpolate smoothed results uniformly-spaced pressure values. Taking things together, quick visual examination CTD file takes just one line code:","code":"data(ctdRaw) plotScan(ctdRaw) plotScan(ctdTrim(ctdRaw, \"range\",     parameters = list(item = \"scan\", from = 140, to = 250) )) plotScan(ctdTrim(ctdRaw, \"range\",     parameters = list(item = \"scan\", from = 150, to = 250) )) ctdTrimmed <- ctdTrim(ctdRaw) plot(ctdDecimate(ctdTrim(read.ctd(\"stn123.cnv\"))))"},{"path":"https://dankelley.github.io/oce/articles/B_ctd.html","id":"woce-archive-data","dir":"Articles","previous_headings":"","what":"WOCE archive data","title":"2. Analysis of CTD data","text":"package harder time scanning headers data files WOCE archive format Seabird format illustrated previous examples. mainly front-line researchers tend work Seabird format, partly WOCE format odd. example, first line WOCE file form CTD,20060609WHPOSIODAM (BOTTLE,...). Scanning item left comma difficult (although variants two shown, e.g. CTDO sometimes occurs). part right comma difficult. first part date (yyyymmdd) problem. things start get tricky. example provided, text contains division institute (WHPO), institute (SIO), initial investigator (DAM). problem dividers separate items, seem standards item lengths. Rather spend great deal time coding special cases (e.g. scanning see string WHOI occurs header line), approach taken oce ignore issues relating quirky headers, assumption users can scan human-written headers high skill. Quite commonly, CTD profiles taken cruise collected together sequence files given directory. real-world example, one might visit website mentioned code provided , download expand zip file, enter directory thus formed, run code get overall TS plot CTD stations cruise. (Caution: link seems change time time.) [[ notation explained Section 3, example conveys gist, permits accessing data, derived data, within object. , lines connect points within given profile. can useful method quick scan looking outliers. Another colour-code profiles, although gets confusing large datasets, case method following exercise might useful. Exercise 2. (advanced) Make multi-file plot summarizing TS relationship collection CTD datasets, plot file showing overall relationship gray individual profile black.","code":"library(oce) # http://cchdo.ucsd.edu/data/7971/ar18_58JH19941029_ct1.zip # setwd(\"~/Downloads/ar18_58JH19941029_ct1\") files <- list.files(pattern = \"*.csv$\", full.names = TRUE) for (i in seq_along(files)) {     x <- read.ctd(files[i])     if (i == 1) {         plotTS(x, Slim = c(31, 35.5), Tlim = c(-2, 10), type = \"o\")     } else {         points(x[[\"salinity\"]], x[[\"potential temperature\"]])         lines(x[[\"salinity\"]], x[[\"potential temperature\"]])     } }"},{"path":"https://dankelley.github.io/oce/articles/B_ctd.html","id":"solutions-to-exercises","dir":"Articles","previous_headings":"","what":"Solutions to exercises","title":"2. Analysis of CTD data","text":"Exercise 1. Plot profile σθ\\sigma_\\theta N2N^2 within pycnocline built-ctd data set. (Hint: use subset().) Although one may argue limits pycnocline, illustration let us say 5 dbar 12 dbar range. One way Another Exercise 2. (advanced) Make multi-file plot summarizing TS relationship collection CTD datasets, plot file showing overall relationship gray individual profile black. code provided creates 91 PNG files, names ar18_01.png, ar18_02.png, etc. Loading view permits quick paging file list easy way spot suspicious data, since plot station number top. (Users trying example bear mind fairly large dataset, processing take minute.)","code":"library(oce) data(ctd) pycnocline <- ctdTrim(ctd, \"range\",     parameters = list(item = \"pressure\", from = 5, to = 12) ) plotProfile(pycnocline, which = \"density+N2\") library(oce) data(ctd) pycnocline <- subset(ctd, 5 <= pressure & pressure <= 12) plotProfile(pycnocline, which = \"density+N2\") library(oce) # http://cchdo.ucsd.edu/data/7971/ar18_58JH19941029_ct1.zip # setwd(\"~/Downloads/ar18_58JH19941029_ct1\") files <- list.files(pattern = \"*.csv$\", full.names = TRUE) n <- length(files) ctds <- vector(\"list\", n) # to hold the CTD objects station <- vector(\"list\", n) for (i in 1:n) {     ctds[[i]] <- read.ctd(files[i])     station[[i]] <- ctds[[i]][[\"station\"]] } sal <- unlist(lapply(1:n, function(i) ctds[[i]][[\"salinity\"]])) tem <- unlist(lapply(1:n, function(i) ctds[[i]][[\"temperature\"]])) pre <- unlist(lapply(1:n, function(i) ctds[[i]][[\"pressure\"]])) overall <- as.ctd(sal, tem, pre) png(\"ar18_%02d.png\") for (i in 1:n) {     plotTS(overall, col = \"gray\")     lines(ctds[[i]][[\"salinity\"]], ctds[[i]][[\"potential temperature\"]])     mtext(station[i], side = 3, line = 0) } dev.off()"},{"path":"https://dankelley.github.io/oce/articles/C_adp.html","id":"reading-adp-files","dir":"Articles","previous_headings":"","what":"Reading adp files","title":"3. Analysis of acoustic-Doppler data","text":"Acoustic Doppler profiling instruments called ADCPs manufacturers ADPs others. class name adp used oce, handle types. important realize many data formats data type, files normally dense binary format read text editor. necessary use software work files. Although oce can handle many file formats, although authors best keep changes file formats (least popular instruments), users sometimes forced use manufacturer software read data, least convert format can manually read R, converted adp object using .adp() function. Suppose f character string naming data file. many cases, read file, read.oce look inside file try guess format. work, one try e.g. , , try determine subtype adp file provided. fails, might help try specialized function, read.adp.rdi() RDI file, read.adp.nortek() Nortek file, read.adp.sontek() Sontek file. (Actually, can handle variety sub-formats). read. functions called just single argument naming file, entire dataset read . can slow large files (e.g. taking order 0.1s per Mb), can help use argument, e.g. 138Mb file author’s computer, takes 15.2s user time, takes 0.2s. also possible window data, using arguments, (like ) can integers count ensembles (“profiles”) POSIX time (see ?read.adp). example, adp dataset provided oce read f defined . also illustrates possibly specify location instrument; processing done create data(adp) explained due course. +Note: Users familiar ADP data may noticed combination many file types dealing ADP data. include: .ENR, raw data received ADP, .ENS, similar .ENR also contain data merged file types without processing, .ENX, merged data processed including calculations transformed data including east, north, vertical velocities, .STA, short term average measurements, .LTA, long term average measurements.","code":"d <- read.oce(f) d <- read.adp(f) f <- \"/data/archive/sleiwex/2008/moorings/m09/adp/rdi_2615/raw/adp_rdi_2615.000\" dall <- read.oce(f) d100 <- read.oce(f, by = 100) read.oce(f,     from = as.POSIXct(\"2008-06-26\", tz = \"UTC\"),     to = as.POSIXct(\"2008-06-27\", tz = \"UTC\"),     by = \"60:00\",     latitude = 47.88126, longitude = -69.73433 )"},{"path":"https://dankelley.github.io/oce/articles/C_adp.html","id":"summarizing-adp-data","dir":"Articles","previous_headings":"","what":"Summarizing adp data","title":"3. Analysis of acoustic-Doppler data","text":"generic function summary provides useful overview adp data object. example, (results shown goal encourage user try !) shows sort information normally present RDI file. manufacturer types somewhat different summaries, metadata data differ instrument instrument. cases, vector holding time (named time), another holding distance instrument centre measurement bin, measured along line equidistant beams (named distance), along array holding velocity (named v). (arrays may include, RDI case, q data quality, backscatter amplitude, g percentage goodness.) Note summary reveals instrument set record beam coordinates, processing done convert enu (east-north-) coordinates. Exercise 1. Determine name metadata item holds coordinate system adp object. completing Exercise 1, user notice latitude longitude available metadata built-, moored, adp dataset. noted dataset ship-based adp dataset, latitude longitude included. Instead, data include firstLatitude, firstLongitude, lastLatitude, lastLongitude, provide indication ship drift sampling.","code":"data(adp) summary(adp)"},{"path":"https://dankelley.github.io/oce/articles/C_adp.html","id":"changing-coordinate-systems","dir":"Articles","previous_headings":"","what":"Changing coordinate systems","title":"3. Analysis of acoustic-Doppler data","text":"critical analysts aware coordinate system adp dataset, simply systems different. oce calls beam system, velocities acoustic beams measured along slant angle beam. data may combined (using transformation matrix part metadata displayed summary() function) oce calls xyz system Cartesian fixed instrument. Since instruments record heading, pitch, roll, xyz velocities can converted easily enu velocities. applications, scientific focus primarily enu data, good idea calculate study data stages processing. Thus, although toEnu() function convert data measured coordinate system enu variant, many analysts something along lines declination illustrated value used creating data(adp) dataset. (Compensating declination necessary compasses calibrated particular place time, compasses way “knowing” local angle true north magnetic north.)","code":"beam <- read.oce(f) xyx <- beamToXyz(beam) enu <- xyzToEnu(xyz, declination = -18.1)"},{"path":"https://dankelley.github.io/oce/articles/C_adp.html","id":"plotting","dir":"Articles","previous_headings":"","what":"Plotting","title":"3. Analysis of acoustic-Doppler data","text":"generic plot() function specialized handle adp objects variety simple helpful ways. type plot determined argument. default create multi-panel image plot shows time-space dependence velocity component. number panels depends number beams used instrument, one label indicating component name. example,  velocity panels named east, north , along one named error, estimate velocity-inference error. Options plot variant can used control distance instrument shown (can useful visualizing data upward- downward-aligned instruments), colours used represent signals, etc. Dozens plot types also provided; see ?\"plot,adp-method\" details – warned complex plot requires many arguments! dealing ship-based adp data, order get true east, north, velocity, user must remove speed ship. , use subtractBottomVelocity() function, subtracts bottom tracking velocities adp object. Exercise 2. Create u-v scatterplot. Exercise 3. Write steps plot east, north, velocity without speed ship file named COR2019002_20190818T064815_007_000000.ENS.","code":"plot(adp)"},{"path":"https://dankelley.github.io/oce/articles/C_adp.html","id":"subsetting","dir":"Articles","previous_headings":"","what":"Subsetting","title":"3. Analysis of acoustic-Doppler data","text":"Adp data can subsetted wide variety ways, e.g.  plots data within 20m instrument. See ?\"subset,adp-method\" subsetting. Exercise 4. Plot adp data first half sampling interval.","code":"plot(subset(adp, distance < 20))"},{"path":"https://dankelley.github.io/oce/articles/C_adp.html","id":"accessing-data-within-adp-objects","dir":"Articles","previous_headings":"","what":"Accessing data within adp objects","title":"3. Analysis of acoustic-Doppler data","text":"oce objects share common framework, -called “slots” metadata, data, processing log. possible examine, modify, elements slots using base R constructs, usually better use oce accessor functions. details provided ?\"[[,adp-method\" ?\"[[<-,adp-method\", examples suffice sketch general pattern. example, extracts times distances profiles within data(adp), array holding velocities extract Altering values uses [[ left assignment operator, commonly required simple work, best readers focus first accessing data. exercises may help . fields contained adp objects, particularly amplitude, correlation, percent good fields (, q, g) stored raw-type. done primarily save memory space, expanded fields numeric types can slow get large quickly. However, actually work numbers, users can extract “numeric” version supplying second argument [[ function, e.g. advantage returning object matrix dimensions original (note functions like .numeric() typically discard dimension information, thereby converting array vector). Exercise 5. Plot time series mid-depth depth-averaged eastward velocities. Exercise 6. Perform eigen-analysis eastward northward velocity. Exercise 7. Plot time series pressure variations, reveal tidal height.","code":"time <- adp[[\"time\"]] distance <- adp[[\"distance\"]] v <- adp[[\"v\"]] a <- adp[[\"a\", \"numeric\"]]"},{"path":"https://dankelley.github.io/oce/articles/C_adp.html","id":"solutions-to-exercises","dir":"Articles","previous_headings":"","what":"Solutions to exercises","title":"3. Analysis of acoustic-Doppler data","text":"Exercise 1. Determine name metadata item holds coordinate system adp object. Solution. adp loaded text, may names metadata : (results shown), keen eye notice two elements relate coordinates: comparison output summary(adp) reveals former coordinate system data originally measured, latter coordinate system transformed data. Using reveals steps data transformation. Exercise 2. Create u-v scatterplot. Solution.  Exercise 3. Write steps plot east, north, velocity without speed ship file named COR2019002_20190818T064815_007_000000.ENS. Solution. Exercise 4. Plot adp data first half sampling interval. Solution. (results shown) Exercise 5. Plot time series mid-depth depth-averaged eastward velocities. Solution.  , oce.plot.ts() used instead basic R function plot(), provides margin note detailed time interval. Exercise 6. Perform eigen-analysis eastward northward velocity. Solution. Note action equivalent principal component analysis, might wiser use analysis, yields principal axes advantage associated methods, including plotting. Exercise 7. Plot time series pressure variations, reveal tidal height. Solution.  matter interest, tidal analysis may done list undetermined tidal constituents long, tidal record short (see ?tidem). fitted constituents follows (Note fitted M2, S2, Rayleigh criterion prevents inferring , conventional tidal analysis favours M2 S2 time series short fit one semi-diurnal constituent.) useful step might draw tidal fit along data. makes sense construct finer time grid, get smooth curve, following (see ?predict.tidem).","code":"sort(names(adp[[\"metadata\"]])) adp[[\"originalCoordinate\"]] #> [1] \"beam\" adp[[\"oceCoordinate\"]] #> [1] \"enu\" processingLogShow(adp) #> * Processing Log #>  #>     - 2019-08-12 15:29:36 UTC: `read.oce(\"/data/archive/sleiwex/2008/moorings/m09/adp/rdi_2615/raw/adp_rdi_2615.000\", ...)` #>     - 2019-08-12 15:29:36 UTC: `beamToXyzAdp(x = beam)` #>     - 2019-08-12 15:29:36 UTC: `xyzToEnuAdp(x, declination=-18.1, debug=0)` plot(adp, which = \"uv\") library(oce) adcp <- read.adp(\"COR2019002_20190818T064815_007_000000.ENS\") enu <- toEnu(adcp) removeShipSpeed <- subtractBottomVelocity(enu) plot(removeShipSpeed, which = 1:3) plot(subset(adp, time < median(adp[[\"time\"]]))) time <- adp[[\"time\"]] v <- adp[[\"v\"]] # The second index is for bin number, the third for beam number midIndex <- dim(v)[2] / 2 eastMid <- v[, midIndex, 1] # third index is beam distance <- adp[[\"distance\"]][midIndex] oce.plot.ts(time, eastMid, ylab = \"Eastward velocity [m/s]\") # Depth mean; note that na.rm, is passed by apply() to mean() eastMean <- apply(v[, , 1], 1, mean, na.rm = TRUE) lines(time, eastMean, col = 2) u <- adp[[\"v\"]][, , 1] v <- adp[[\"v\"]][, , 2] ok <- is.finite(u) & is.finite(v) # remove NA values u <- u[ok] v <- v[ok] eigen(cov(data.frame(u, v))) #> eigen() decomposition #> $values #> [1] 0.48350161 0.01557049 #>  #> $vectors #>           [,1]       [,2] #> [1,] 0.5441538 -0.8389855 #> [2,] 0.8389855  0.5441538 pr <- prcomp(data.frame(u, v)) pr #> Standard deviations (1, .., p=2): #> [1] 0.6953428 0.1247818 #>  #> Rotation (n x k) = (2 x 2): #>         PC1        PC2 #> u 0.5441538 -0.8389855 #> v 0.8389855  0.5441538 time <- adp[[\"time\"]] pressure <- adp[[\"pressure\"]] oce.plot.ts(time, pressure) m <- tidem(as.sealevel(pressure, time)) #> Note: the tidal record is too short to fit for constituents: SA, SSA, MSM, MM, MSF, MF, ALP1, 2Q1, SIG1, Q1, RHO1, O1, TAU1, BET1, NO1, CHI1, PI1, P1, S1, PSI1, PHI1, THE1, J1, SO1, OO1, UPS1, OQ2, EPS2, 2N2, MU2, N2, NU2, GAM2, H1, H2, MKS2, LDA2, L2, T2, S2, R2, K2, MSN2, ETA2, MO3, M3, SO3, MK3, SK3, MN4, M4, SN4, MS4, MK4, S4, SK4, 2SK5, 2MN6, M6, 2MS6, 2MK6, 2SM6, MSK6, M8 summary(m) #> tidem summary #> ------------- #>  #> Call: #> tidem(t = as.sealevel(pressure, time)) #> RMS misfit to data:  0.06615227  #>  #> Fitted Model: #>         Freq Amplitude Phase       p     #> Z0    0.0000   39.0465   0.0 < 2e-16 *** #> K1    0.0418    0.0689 334.9   0.089 .   #> M2    0.0805    1.1730 203.8 4.6e-16 *** #> 2MK5  0.2028    0.0312 112.8   0.417     #> 3MK7  0.2833    0.0265  87.8   0.618     #> --- #> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> * Processing Log #>  #>     - 2024-09-24 10:33:18 UTC: `create 'tidem' object` #>     - 2024-09-24 10:33:18 UTC: `tidem(t = as.sealevel(pressure, time))` oce.plot.ts(time, pressure, type = \"p\", col = \"blue\") timePredict <- seq(min(time), max(time), length.out = 200) pressurePredict <- predict(m, timePredict) lines(timePredict, pressurePredict, col = \"red\")"},{"path":"https://dankelley.github.io/oce/articles/D_map_projections.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"4. Using map projections","text":"Map projections provide methods representing three-dimensional surface earth two-dimensional plots. Although oceanographers likely familiar basic ideas map projection, may find helpful consult wide literature topic, whether learn details individual projections get advice best choice projection particular task. Snyder (1987), Snyder (1993) Snyder Voxland (1994) excellent sources topics, first last available free online. Oce handles map projections calling sf_project function sf R package, notation representing projection borrowed sf. system familiar many readers, used R packages, widely software called PROJ, interfaces python programming languages (PROJ contributors, 2020). Since oce uses inverse projections graphical work, PROJ projections inverses incorporated oce. Furthermore, projections omitted oce witnessed cause problems oce developer’s computers, including infinite loops core dumps. See help oce function mapPlot list available projections, advice choosing . must ensure sf package installed examples provided vignette work. package installed, may installed far many projections illustrate . See https://dankelley.github.io/r/2015/04/03/oce-proj.html blog item provides examples available projections. Note problem spurious horizontal lines. can result coastline segments cross edge plotting area, getting rid tricky enough heart longest-lived bug oce issue list, .e. https://github.com/dankelley/oce/issues/388. instances function coastlineCut() can help, provisional subject change.","code":"install.packages(\"sf\")"},{"path":"https://dankelley.github.io/oce/articles/D_map_projections.html","id":"avoiding-projections-for-small-regions","dir":"Articles","previous_headings":"","what":"Avoiding projections for small regions","title":"4. Using map projections","text":"map views span tens hundreds kilometers, may sufficient plot directly, rectilinear longitude-latitude space, appropriate aspect ratio circular islands appear circular plot. see need setting aspect ratio, consider following view North America. Distorted North American view, without control aspect ratio. Readers familiar region notice coastline shapes distorted. solution problem set asp argument plot() value appropriate general latitude view (45N, case). North American view, distortion limited choice aspect ratio. Although approach exactly taxing, effort setting aspect ratio setting line-type plots can spared using generic plot() function coastline objects, follows. North American view, drawn mapPlot(). Note plot transferred specialized method coastline object (defined oce package) means arguments addition normal plot function. example, second third arguments specify central spot interest, fourth suggested diagonal span, kilometres. (span always obeyed exactly, results also depend aspect ratio plot device.) graphs shown share common strength: axes longitude latitude orthogonal, scale along axis linear. makes easy readers identify location features diagrams. However, using linear axes large-scale views leads distortions coastline shapes relative feature sizes, motivates use map projections. (Readers question previous sentence encouraged consult references bibliography.)","code":"library(oce) #> Loading required package: gsw data(coastlineWorld) lon <- coastlineWorld[[\"longitude\"]] lat <- coastlineWorld[[\"latitude\"]] par(mar = c(4, 4, 0.5, 0.5)) plot(lon, lat,     type = \"l\",     xlim = c(-130, -50), ylim = c(40, 50) ) par(mar = c(4, 4, 0.5, 0.5)) plot(lon, lat,     type = \"l\",     xlim = c(-130, -50), ylim = c(40, 50), asp = 1 / cos(45 * pi / 180) ) plot(coastlineWorld, clongitude = -90, clatitude = 45, span = 7000)"},{"path":[]},{"path":"https://dankelley.github.io/oce/articles/D_map_projections.html","id":"world-views","dir":"Articles","previous_headings":"Choosing a map projection","what":"World views","title":"4. Using map projections","text":"makes sense switch coarser coastline file examples follow, plotting detailed coastline world view leads scribbling effect obscures large-scale coastline shapes. function used produce maps projections mapPlot, default arguments produces World coastline default (Mollweide) projection. Note land coloured example, sometimes yield odd-looking plots, bug projections handled oce. default plot uses Mollweide projection (see Snyder references bibliography), set default value \"+proj=moll\" mapPlot. Another popular world view Robinson projection, used Rand McNally, National Geographic Society, groups. Exercise 1. Plot world Robinson projection, using gray shading land. Exercise 2. Plot image world topography Mollweide projection.","code":"data(coastlineWorld) par(mar = c(1.5, 1.5, 0.5, 0.5)) mapPlot(coastlineWorld, col = \"lightgray\")"},{"path":"https://dankelley.github.io/oce/articles/D_map_projections.html","id":"polar-views","dir":"Articles","previous_headings":"Choosing a map projection","what":"Polar views","title":"4. Using map projections","text":"views (world-spanning projections) substantial distortion high latitudes. Stereographic projection offers solution problem, e.g. following (employs trick latitude limit, specifying image point side planet, pole ). Polar view stereographic projection. , region interest defined longitudelim latitudelim, instead clongitude, clatitude span. Note latitude limit set extend past pole, way making plot include pole. See table documentation mapPlot listing arguments, citations external resources explain mean. Exercise 3. Draw view Antarctica Southern Ocean.","code":"par(mar = c(1.5, 1.5, 0.5, 0.5)) mapPlot(coastlineWorld,     longitudelim = c(-180, 180), latitudelim = c(60, 90),     projection = \"+proj=stere +lat_0=90 +lat_ts=90\", col = \"gray\" )"},{"path":"https://dankelley.github.io/oce/articles/D_map_projections.html","id":"mid-latitude-views","dir":"Articles","previous_headings":"Choosing a map projection","what":"Mid-latitude views","title":"4. Using map projections","text":"Lambert Conformal view often used maps span wide longitudinal ranges, e.g. map Canada may produced follows. Canada Lambert Conformal projection. , lat_1 lat_2, latitudes projection cone intersects earth, set span southern Canada northern USA, lon_0, meridian vertical plot, chosen lie near middle continent. Exercise 4. Plot eastern North Atlantic using Universal Transverse Mercator projection. Exercise 5. Plot eastern North Atlantic using Albers Equal-Area Conic projection.","code":"par(mar = c(1.5, 1.5, 0.5, 0.5)) mapPlot(coastlineWorld,     longitudelim = c(-130, -55), latitudelim = c(45, 70),     projection = \"+proj=lcc +lat_1=50 +lat_2=65 +lon_0=-100\", col = \"gray\" )"},{"path":"https://dankelley.github.io/oce/articles/D_map_projections.html","id":"adding-to-map-plots","dir":"Articles","previous_headings":"","what":"Adding to map plots","title":"4. Using map projections","text":"Several functions provided oce draw additional features maps. include mapText adding text, mapPoints adding points, mapLines adding lines, mapContour adding contours, mapImage adding images. requires map drawn first mapPlot. interfaces similar enough base-R functions readers can decide accomplish common tasks. Exercise 6. Plot world Goode projection, superimposing sea surface temperature contours.","code":""},{"path":"https://dankelley.github.io/oce/articles/D_map_projections.html","id":"solutions-to-exercises","dir":"Articles","previous_headings":"","what":"Solutions to exercises","title":"4. Using map projections","text":"Exercise 1. Plot world Robinson projection, using gray shading land. World coastline Robinson projection (exercise 1). Exercise 2. Plot image world topography Mollweide projection. Note adjustment margins required fit colorbar. World topography Mollweide projection (exercise 2). Exercise 3. Draw view Antarctica Southern Ocean. Antarctica (exercise 3). Exercise 4. Plot eastern North Atlantic using Universal Transverse Mercator projection. Zone 20 includes Nova Scotia, also good place centre view. Eastern Canadian waters shown Universal Transverse Mercator projection. Exercise 5. Plot eastern North Atlantic using Albers Equal-Area Conic projection. solution given , note lon_0 argument set central value longitudelim. makes 60∘60^\\circW line vertical plot. settings lat_1 lat_2 locations cone intersects earth, distortion minimized latitudes. Note lines constant longitude changed, compared Mercator view. may informative compare relative ratio area Nova Scotia (45∘45^\\circN) Ungava Bay (60∘60^\\circN) Albers Equal-Area projection, Mercator projection shown previous diagram. Eastern North Atlantic Albers equal-area projection (exercise 5). Exercise 6. Plot world Goode projection, superimposing sea surface temperature contours. Note temperature provided ocedata package. SST contours Goode projection (exercise 6)","code":"par(mar = rep(0.5, 4)) mapPlot(coastlineWorld, col = \"lightgray\", projection = \"+proj=robin\") par(mar = c(1.5, 1, 1.5, 1)) data(topoWorld) topo <- decimate(topoWorld, 2) # coarsen grid: 4X faster plot lon <- topo[[\"longitude\"]] lat <- topo[[\"latitude\"]] z <- topo[[\"z\"]] cm <- colormap(name = \"gmt_globe\") drawPalette(colormap = cm) mapPlot(coastlineWorld, projection = \"+proj=moll\", grid = FALSE, col = \"lightgray\") mapImage(lon, lat, z, colormap = cm) par(mar = c(1.5, 1.5, 0.5, 0.5)) mapPlot(coastlineWorld,     longitudelim = c(-180, 180), latitudelim = c(-130, -50),     projection = \"+proj=stere +lat_0=-90\", col = \"gray\", grid = 15 ) par(mar = c(1.5, 1.5, 0.5, 0.5)) mapPlot(coastlineWorld,     col = \"lightgray\",     projection = \"+proj=utm +zone=20\",     longitudelim = c(-85, -45), latitudelim = c(40, 60) ) par(mar = c(1.5, 1.5, 0.5, 0.5)) mapPlot(coastlineWorld,     col = \"lightgray\",     projection = \"+proj=aea +lat_1=45 +lat_2=55 +lon_0=-65\",     longitudelim = c(-85, -45), latitudelim = c(40, 60) ) par(mar = rep(0.5, 4)) mapPlot(coastlineWorld, projection = \"+proj=goode\", col = \"lightgray\") if (requireNamespace(\"ocedata\", quietly = TRUE)) {     data(levitus, package = \"ocedata\")     mapContour(levitus[[\"longitude\"]], levitus[[\"latitude\"]], levitus[[\"SST\"]]) }"},{"path":"https://dankelley.github.io/oce/articles/D_map_projections.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"4. Using map projections","text":"PROJ contributors. “PROJ Coordinate Transformation Software Library.” Open Source Geospatial Foundation, 2020. https://proj.org/ Snyder, John P. “Map Projections-Working Manual.” Washington: U.S. Geological survey professional paper 1395, 1987. Snyder, John Parr. “Flattening Earth: Two Thousand Years Map Projections.” Chicago, IL: University Chicago Press, 1993. https://press.uchicago.edu/ucp/books/book/chicago/F/bo3632853.html Snyder, John P., Philip M. Voxland. “Album Map Projections.” U. S. Geological Survey Professional Paper. Washington, DC, USA: U. S. Department Interior: U. S. Geological Survey, 1994. https://pubs.er.usgs.gov/publication/pp1453","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/articles/E_flags.html","id":"flag-context","dir":"Articles","previous_headings":"Overview","what":"Flag context","title":"5. Dealing with data-quality flags","text":"common oceanographers link data “flags” indicate data quality. scheme permits retention original measurements, assumption still hold value, time providing indication problems. Using flags superior simply deleting suspicious data, changing recorded values NA, lets analysts try recover difficulty, perhaps switching another sensor, reducing weights individual data averaging operations, etc. Another advantage using flags simply discarding bad data flags can nuanced; e.g. distinguishing unchecked data, data thought good, data suspected bad, data sure faulty, etc. Flags sometimes determined automated analysis data (e.g. range checks individual fields, departures gravitational stability, loops TS diagrams, etc.). common analyst use tests starting point processing incorporates study graphical displays, comparison related measurements, etc.","code":""},{"path":"https://dankelley.github.io/oce/articles/E_flags.html","id":"flag-conventions","dir":"Articles","previous_headings":"Overview","what":"Flag conventions","title":"5. Dealing with data-quality flags","text":"frustrating aspect oceanographic analysis different data archiving agencies employ different systems flags. example, World Hydrographic Programme designates good bottle/CTD data flag value 2, whereas World Ocean Database (might available https://www.ncei.noaa.gov/data/oceans/woa/WOD/CODES/TXT/Definition_of_Quality_Flags.txt, although link failed tested 2021-06-26) uses 0 good data. Analysts must aware scheme used particular dataset. also good lookout particular values data, oceanographers sometimes set suspicious values non-physical values easy recognize, e.g. -999, -99.99, similar, sometimes coded values may contradict formal flags, present.","code":""},{"path":"https://dankelley.github.io/oce/articles/E_flags.html","id":"flag-storage","dir":"Articles","previous_headings":"Overview","what":"Flag storage","title":"5. Dealing with data-quality flags","text":"Data-quality flags stored flags entry metadata slot oce objects. entry list, containing items names matching names data elements stored data slot. Oce functions assume flags data one--one correspondence, flags must dimensionality data.","code":""},{"path":"https://dankelley.github.io/oce/articles/E_flags.html","id":"flag-inspection","dir":"Articles","previous_headings":"Overview","what":"Flag inspection","title":"5. Dealing with data-quality flags","text":"possible inspect flags using e.g. see flags corresponding , simpler notation also provided, e.g.  returning flags salinity data. (Note suffix notation; without , salinity data returned.)","code":""},{"path":"https://dankelley.github.io/oce/articles/E_flags.html","id":"flag-creation","dir":"Articles","previous_headings":"Overview","what":"Flag creation","title":"5. Dealing with data-quality flags","text":"Although possible set alter flags directly, much better use oce functions , () create dimensionality name conflicts data (b) record actions object’s processingLog slot. Creating flags usually three-step process: Use initializeFlagScheme establish mapping flag numerical value flag meaning. step strictly necessary, useful stores flag scheme within metadata slot object, form documentation. step may done given object, changing flag scheme middle processing invites errors. Use initializeFlags set space flag storage, initialize values (normally code indicating either unchecked data acceptable data). may done per data item. Use setFlags assign individual flag values individual data. may used repeatedly given object. Indeed, illustrated later document, common call function within loop displays graph, invites user click points flagged, displays new graph, etc. Note reading operations set flags automatically, data file already holds flags. example, read.argo can , Argo data fixed flag scheme, archived Argo data often come flag values already inserted.","code":""},{"path":"https://dankelley.github.io/oce/articles/E_flags.html","id":"handling-flags","dir":"Articles","previous_headings":"Overview","what":"Handling flags","title":"5. Dealing with data-quality flags","text":"setting flags, analysts free extract flag values use purpose comes mind. Simple cases may handled oce function named handleFlags, set respond particular flag values particular actions. reasonable defaults different data types, can detect flag scheme set setFlagScheme. default action setting data flagged bad NA value may suffice many plotting analysis situations.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/articles/E_flags.html","id":"ctd-range-checks","dir":"Articles","previous_headings":"Sample working procedure","what":"CTD range checks","title":"5. Dealing with data-quality flags","text":"(section expansion Example 1 shown ?\"setFlags,ctd-method\".) oce package provides dataset contains anomalous values revealed clearly summary plot (Figure 1): Figure 1. Summary plot raw CTD profile. Figure 1 shows, ctdTrim removes anomalous data examining variation pressure signal time, may also interest see well simple range checks can perform cleaning data. Salinity certainly negative, oceanographic setting common relax criterion somewhat, perhaps insisting Absolute Salinity SAS_A exceed 2525g/kg. value might work situations well, said upper limit 4040g/kg. Similarly, might make sense bound temperature , say, −2∘-2^\\circC 40∘40^\\circC application throughout much world ocean. criteria can supplied setFlags various ways, simplest create logical vectors, e.g. , used avoid inserting salinity temperature namespace, also common use e.g. Since goal illustrate setting multiple flags, badS badT values used. first step copy original data, flag operations alter ctdRaw: Work flow best documented flag scheme established, “WHP CTD exchange” scheme reasonable choice; using stores note scheme metadata slot qc. Importantly, however, store flag values. next step initialize flag values. example, set flag storage salinity temperature, use e.g. create storage, initialize entries \"acceptable\" value (, flag scheme, number 2). storage initialized given variable, calls initializeFlags effect, apart warning. Note entirely possible use initializeFlags numerical value third argument. One advantage using initializeFlagScheme clarifies code, bigger advantage embeds scheme within object, second analyst examine later clear meanings numerical codes. important, much agreement within oceanographic community flag scheme use, many data types (Argo exception). stage, individual data can flagged setFlags. function can called number times. Continuing along example, may mark bad salinities can see flag got inserted using summary(qc), brevity another method : Now, temperature flags may inserted Readers use summary(qc) get details flags handled, many bad salinities temperatures flagged. qc plotted plot(qc), results match plot(ctdRaw). setting flags effect plots, alters flags data. One step required test whether procedure cleaned data significantly: must “handle” flags, using Comparing Figure 1 summary plot qch (Figure 2), constructed Figure 2. Summary plot range-checked CTD profile. shows significant improvements. downcast upcast can seen quite clearly now, although salinity suspiciously low turnaround point. Setting flag pressure increase time isolate downcast somewhat, although smoothing required. Another issue related path instrument may held surface equilibrate. , flag set remove data. However, noted ctdTrim can used address issues relating instrument movement.","code":"library(oce) data(ctdRaw) plot(ctdRaw) badS <- with(ctdRaw[[\"data\"]], salinity < 25 | 40 < salinity) badT <- with(ctdRaw[[\"data\"]], temperature < -2 | 40 < temperature) salinity <- ctdRaw[[\"salinity\"]] temperature <- ctdRaw[[\"temperature\"]] bad <- (salinity < 25 | 40 < salinity) | (temperature < -2 | 40 < temperature) qc <- ctdRaw qc <- initializeFlagScheme(qc, \"WHP CTD\") qc <- initializeFlags(qc, \"salinity\", 2) qc <- initializeFlags(qc, \"temperature\", 2) qc <- setFlags(qc, \"salinity\", badS, value = \"bad\") names(qc[[\"flags\"]]) #> [1] \"salinity\"    \"temperature\" qc <- setFlags(qc, \"temperature\", badT, value = \"bad\") qch <- handleFlags(qc, flags = list(c(1, 3:9))) plot(qch)"},{"path":"https://dankelley.github.io/oce/articles/E_flags.html","id":"interactive-editing-of-ctd-profiles","dir":"Articles","previous_headings":"Sample working procedure","what":"Interactive editing of CTD profiles","title":"5. Dealing with data-quality flags","text":"(section expansion Example 2 shown ?\"setFlags,ctd-method\".) ctd dataset provided oce package similar ctdRaw, except downcast data provided. Even , still points might considered suspicious. common way find points plot TS diagrams, looking decreases density depth. Running following code interactive session demonstrate simple way use TS diagram identify suspicious data. Pasting R console show plot lines measurements made successive depths. Clicking point flag , point disappear plot. Clicking right plot frame exit procedure, qc ctd object flags set, data set NA flags indicate bad data. simple matter extend simple example shiny application displays data. example, panels profiles, well TS plot. system track clicks panels, taking appropriate actions. sensible staged procedure, clicking (brushing) one panel cause replot panels, selected data indicated way, analyst choose whether go next stage, clicking button indicate bad data. Another button might provided undo operations, show original data comparison. point wide variety flag operations handled easily R, oce.","code":"options(eos = \"gsw\") data(ctd) qc <- ctd qc <- initializeFlagScheme(qc, \"WHP CTD\") qc <- initializeFlags(qc, \"salinity\", 2) Sspan <- diff(range(qc[[\"SA\"]])) Tspan <- diff(range(qc[[\"CT\"]])) n <- length(qc[[\"SA\"]]) par(mfrow = c(1, 1)) plotTS(qc, type = \"o\") message(\"Click on bad points; quit by clicking to right of plot\") for (i in seq_len(n)) {     xy <- locator(1)     if (xy$x > par(\"usr\")[2]) {         break     }     i <- which.min(abs(qc[[\"SA\"]] - xy$x) / Sspan + abs(qc[[\"CT\"]] - xy$y) / Tspan)     qc <- setFlags(qc, \"salinity\", i = i, value = \"bad\")     qc <- handleFlags(qc)     plotTS(qc, type = \"o\") }"},{"path":"https://dankelley.github.io/oce/articles/E_flags.html","id":"hydrographic-sections","dir":"Articles","previous_headings":"Sample working procedure","what":"Hydrographic sections","title":"5. Dealing with data-quality flags","text":"flag-handling functions work variety oce objects. example, sections, built sequence ctd profiles, handled easily functions names ctd case. simple example, following shows clean “A03” Atlantic section provided oce. Temperature-salinity diagram section data, flags ignored (top) handled (bottom). Note, , archiving agency evidently flagged just wild data (e.g. salinity near 2626g/kg) also data anomalous subtle ways (e.g. cleaning several points stood data cloud, 10∘10^\\circC). fact, flags data set, archived hydrographic data sets, result multifaceted inspection scheme demanding useful simple range checks.","code":"data(section) s <- handleFlags(section, flags = list(c(1, 3:9))) par(mfrow = c(2, 1)) plotTS(section) plotTS(s)"},{"path":"https://dankelley.github.io/oce/articles/E_flags.html","id":"acoustic-doppler-profiler-data","dir":"Articles","previous_headings":"","what":"Acoustic-Doppler profiler data","title":"5. Dealing with data-quality flags","text":"now, reader able understand following use data-quality flags adp dataset. Note small difference (8h 20h) (gray) bad data identified instrument identified scheme illustrated ; look near 8h 20h. However, altering values G V4 reveal schemes differ. Near-surface eastward component ADP velocity, unaltered (top) handling flags (bottom). Note, , initializeFlagScheme used, author unaware common notation data. values used G V4 provided colleagues Bedford Institute Oceanography.","code":"data(adp) v <- adp[[\"v\"]] i2 <- array(FALSE, dim = dim(v)) # construct array to match 'v' g <- adp[[\"g\", \"numeric\"]] G <- 25 # for percent-good field, named 'g' V4 <- 0.45 # for error velocity field, in beam 4 for (k in 1:3) {     i2[, , k] <- ((g[, , k] + g[, , 4]) < G) | (v[, , 4] > V4) } adpQC2 <- initializeFlags(adp, \"v\", 2) adpQC2 <- setFlags(adpQC2, \"v\", i2, 3) adpClean2 <- handleFlags(adpQC2, flags = list(3), actions = list(\"NA\")) par(mfrow = c(2, 1)) plot(subset(adp, distance > 35), which = \"u1\") # original plot(subset(adpClean2, distance > 35), which = \"u1\") # altered"},{"path":"https://dankelley.github.io/oce/articles/F_subclassing.html","id":"a-drifting-buoy","dir":"Articles","previous_headings":"","what":"A drifting buoy","title":"6. Subclassing oce objects","text":"Data buoy number 4201703 downloaded http://www.coriolis.eu.org/Data-Products/Data-selection 2022-01-09, deselecting data types except “Drifting buoy”, selecting data window south Nova Scotia area similar province, expanding tarball created website focussing downloaded file named \"drifting-buoys-4201703.csv“. many data source data file, subset used : starting 300 samples just five data fields: time (called t brevity), longitude (lon), latitude (lat), temperature (Tatm) atmospheric pressure (Patm). set trimmed removing data ensembles temperature reported. result 146 observations 5 variables. (Note spaced uniformly time, feature importance end document.) data combined data frame named db packaged RDA file, overview provided follows. showing create new subclass, first shown data also stored foundational class package.","code":"library(oce) #> Loading required package: gsw load(system.file(\"extdata\", \"drifter.rda\", package = \"oce\")) str(db) #> 'data.frame':    146 obs. of  5 variables: #>  $ t   : POSIXct, format: \"2021-11-01 21:04:00\" \"2021-11-01 23:04:00\" ... #>  $ lon : num  -62.7 -62.8 -62.8 -62.8 -62.8 ... #>  $ lat : num  42.5 42.5 42.5 42.6 42.6 ... #>  $ Tatm: num  19.2 19.2 19.2 19.2 19.2 ... #>  $ Patm: num  1013 1014 1015 1016 1017 ..."},{"path":"https://dankelley.github.io/oce/articles/F_subclassing.html","id":"using-the-base-oce-class","dir":"Articles","previous_headings":"","what":"Using the base oce class","title":"6. Subclassing oce objects","text":"base class named \"oce\", new object type can created point, summary() method reveal much: populate object data metadata summary informative Note, however, ID listed summary(). general form function set focus contents data slot, metadata slot. (Extending summary() described later.) Objects oce-class automatically methods, besides summary(). example, accessing operator [[ works object just created: can also use default plot() function show interdependence entries data slot. Figure 1. Demonstration base-level plot(). Although plot provides useful overview data, something analyst consider publishing. get useful plot types, must create new subclass specialized plot() method.","code":"o <- new(\"oce\") summary(o) #> * Processing Log #>  #>     - 2024-09-24 10:33:47 UTC: `Create oce object` o <- oceSetData(o, \"time\", db$t) o <- oceSetData(o, \"longitude\", db$lon) o <- oceSetData(o, \"latitude\", db$lat) o <- oceSetMetadata(o, \"ID\", 4201703) summary(o) #> * Time: 2021-11-01 21:04:00 to 2021-11-08 06:00:00 (146 samples, mean increment 1.054713 hour) #> * Data Overview #>  #>               Min.                Mean                Max.                Dim. NAs #>     time      2021-11-01 21:04:00 2021-11-05 01:06:37 2021-11-08 06:00:00 146  0   #>     longitude -63.011             -62.775             -62.636             146  0   #>     latitude  41.932              42.305              42.572              146  0   #>  #> * Processing Log #>  #>     - 2024-09-24 10:33:47 UTC: `Create oce object` #>     - 2024-09-24 10:33:48 UTC: `oceSetData(object = o, name = \"time\", value = db$t)` #>     - 2024-09-24 10:33:48 UTC: `oceSetData(object = o, name = \"longitude\", value = db$lon)` #>     - 2024-09-24 10:33:48 UTC: `oceSetData(object = o, name = \"latitude\", value = db$lat)` #>     - 2024-09-24 10:33:48 UTC: `oceSetMetadata(object = o, name = \"ID\", value = 4201703)` str(o[[\"latitude\"]]) #>  num [1:146] 42.5 42.5 42.5 42.6 42.6 ... plot(o, pch = 20, cex = 0.5)"},{"path":"https://dankelley.github.io/oce/articles/F_subclassing.html","id":"creating-a-new-subclass","dir":"Articles","previous_headings":"","what":"Creating a new subclass","title":"6. Subclassing oce objects","text":"reasonable name new subclass might \"drifter\". choice, class can defined single line code: executed, user can create new object subclass Although simple add data metadata previous section, convenient supply information new() used. accomplish , must set initialization function, follows. method takes away choice put things (data metadata), saving users make decision, possibly breaking code. Also, note error checking used , attempt use new(\"drifter\") without providing time, etc., produces error message, shown . setup, may now create object can use rest vignette: used next three subsections, showing specialize plot() method, summary() method, [[ accessor. Note use setMethod() instance.","code":"drifter <- setClass(Class = \"drifter\", contains = \"oce\") d <- new(\"drifter\") setMethod(     f = \"initialize\",     signature = \"drifter\",     definition = function(.Object, time, longitude, latitude, ID = \"unknown\") {         if (missing(time)) {             stop(\"In new(drifter) : must provide 'time'\", call. = FALSE)         }         if (missing(longitude)) {             stop(\"In new(drifter) : must provide 'longitude'\", call. = FALSE)         }         if (missing(latitude)) {             stop(\"In new(drifter) : must provide 'latitude'\", call. = FALSE)         }         .Object@data$time <- time         .Object@data$longitude <- longitude         .Object@data$latitude <- latitude         .Object@metadata$ID <- ID         .Object@processingLog$time <- presentTime()         .Object@processingLog$value <- \"create 'drifter' object\"         return(.Object)     } ) d <- new(\"drifter\") Error: In new(drifter) : must provide 'time' d <- new(\"drifter\", time = db$t, longitude = db$lon, latitude = db$lat, ID = 4201703)"},{"path":"https://dankelley.github.io/oce/articles/F_subclassing.html","id":"specializing-the-plot-function","dir":"Articles","previous_headings":"Creating a new subclass","what":"Specializing the plot() function","title":"6. Subclassing oce objects","text":"f, signature definition arguments follow pattern previous example, readers focus last . , three plot types provided, selected argument called . first two give time-series plots drifter longitude latitude, third shows trajectory. three plot types fairly rudimentary, ... argument can used customization, following example. Figure 2. Demonstration specialized plot().","code":"setMethod(     f = \"plot\",     signature = signature(\"drifter\"),     definition = function(x, which = 1, ...) {         lonlab <- expression(\"Longitude [\" * degree * \"E]\")         latlab <- expression(\"Latitude [\" * degree * \"N]\")         if (which == 1) {             oce.plot.ts(x[[\"time\"]], x[[\"longitude\"]],                 ylab = lonlab, ...             )         } else if (which == 2) {             oce.plot.ts(x[[\"time\"]], x[[\"latitude\"]],                 ylab = latlab, ...             )         } else if (which == 3) {             asp <- 1 / cos(mean(range(x[[\"latitude\"]]) * pi / 180))             plot(x[[\"longitude\"]], x[[\"latitude\"]],                 asp = asp, xlab = lonlab, ylab = latlab, ...             )         } else {             stop(\"In plot,drifter-method : try which=1, 2 or 3\", call. = FALSE)         }     } ) par(mar = c(3.3, 3.3, 1, 1), mgp = c(2, 0.7, 0)) layout(matrix(c(1, 3, 2, 3), nrow = 2, byrow = TRUE)) plot(d, which = 1, drawTimeRange = FALSE) plot(d, which = 2, drawTimeRange = FALSE) plot(d, which = 3)"},{"path":"https://dankelley.github.io/oce/articles/F_subclassing.html","id":"specializing-the-summary-function","dir":"Articles","previous_headings":"Creating a new subclass","what":"Specializing the summary() function","title":"6. Subclassing oce objects","text":", sole purpose add indication ID drifter. rest information provided base-level summary() function suffice summarize rest. , example follows.","code":"setMethod(     f = \"summary\",     signature = \"drifter\",     definition = function(object, ...) {         cat(\"CTD Summary\\n-----------\\n\\n\")         cat(\"* ID:          \", object[[\"ID\"]], \"\\n\", sep = \"\")         invisible(callNextMethod())     } ) summary(d) #> CTD Summary #> ----------- #>  #> * ID:          4201703 #> * Time: 2021-11-01 21:04:00 to 2021-11-08 06:00:00 (146 samples, mean increment 1.054713 hour) #> * Data Overview #>  #>               Min.                Mean                Max.                Dim. NAs #>     time      2021-11-01 21:04:00 2021-11-05 01:06:37 2021-11-08 06:00:00 146  0   #>     longitude -63.011             -62.775             -62.636             146  0   #>     latitude  41.932              42.305              42.572              146  0   #>  #> * Processing Log #>  #>     - 2024-09-24 10:33:49 UTC: `create 'drifter' object`"},{"path":"https://dankelley.github.io/oce/articles/F_subclassing.html","id":"specializing-the-accessor","dir":"Articles","previous_headings":"Creating a new subclass","what":"Specializing the [[ accessor","title":"6. Subclassing oce objects","text":"variation drifter position provides information ocean velocity, sufficient interest might worth adding [[. may done follows. test, can plot velocity components. Figure 3. Velocities inferred drifter motion. acf() function, computes lagged autocorrelation, can shed light periodicity velocity signals (see Exercise 3), follows. Figure 4. Autocorrelation analysis drifter velocities, showing also M2 period.","code":"setMethod(     f = \"[[\",     signature(x = \"drifter\", i = \"ANY\", j = \"ANY\"),     definition = function(x, i, j, ...) {         if (i == \"velocity\") {             D <- function(x) {                 dx <- diff(x)                 c(dx[1], dx)             }             lat <- x[[\"latitude\"]]             lon <- x[[\"longitude\"]]             dt <- D(as.numeric(x[[\"time\"]])) # seconds             scalex <- 111.12e3 # m per degree latitude             scaley <- scalex * cos(lat * pi / 180)             u <- scalex * D(lon) / dt             v <- scaley * D(lat) / dt             list(u = u, v = v)         } else {             callNextMethod()         }     } ) uv <- d[[\"velocity\"]] par(mfrow = c(2, 1)) oce.plot.ts(d[[\"time\"]], uv$u, ylab = \"Eastward velo. [m/s]\", grid = TRUE) oce.plot.ts(d[[\"time\"]], uv$v, ylab = \"Northward vel. [m/s]\", grid = TRUE) data(tidedata) M2period <- 1 / with(tidedata$const, freq[[which(name == \"M2\")]]) uv <- d[[\"velocity\"]] par(mfrow = c(2, 1), mar = c(3, 3, 1, 1), mgp = c(2, 0.7, 0)) acf(uv$u, main = \"\", ylab = \"u ACF\") abline(v = M2period, col = 2) acf(uv$v, main = \"\", ylab = \"v ACF\") abline(v = M2period, col = 2)"},{"path":"https://dankelley.github.io/oce/articles/F_subclassing.html","id":"summary","dir":"Articles","previous_headings":"","what":"Summary","title":"6. Subclassing oce objects","text":"illustrated , setMethod() function key altering generic functions plot(), summary() [[. details works explained numerous manuals, books, websites, impatient readers can save time simply copying expanding code provided previous sections.","code":""},{"path":"https://dankelley.github.io/oce/articles/F_subclassing.html","id":"appendix-exercises-for-the-reader","dir":"Articles","previous_headings":"","what":"Appendix: exercises for the reader","title":"6. Subclassing oce objects","text":"Add atmospheric temperature pressure (contained source RDA file) drifter object initialization function. sure check provided , choose, let optional. Think useful plot types, add plot() method. final lagged-autocorrelation function, use approx() get new time-series constant sampling rate. lagged-autocorrelation function, add line local Coriolis period. alternative lagged-autocorrelation method, test periodicity velocity using nls(), supplied sinusoidal function adjustable amplitude, phase, frequency.","code":""},{"path":"https://dankelley.github.io/oce/articles/H_tides.html","id":"the-univariate-case-sea-level","dir":"Articles","previous_headings":"","what":"The Univariate Case (Sea Level)","title":"8. Tidal Analysis","text":"FIXME Dan write material . material ‘’ vignette, go . Possibly material vignettes go , also. material OAR might useful. October, Dan probably write material.","code":""},{"path":"https://dankelley.github.io/oce/articles/H_tides.html","id":"the-bivariate-case-current-components","dir":"Articles","previous_headings":"","what":"The Bivariate Case (Current Components)","title":"8. Tidal Analysis","text":"tidal forcing causes sea level go (according prescribed constituent frequencies), result ocean also currents driven tidal variations. (horizontal) currents scalar (.e. 1D) time series, approach using tidem() can applied separately considering harmonic analysis “u” “v” (e.g. east/west north/south) velocity components. common approach bivariate time series, using classical fitting method least squares, combine horizontal velocity components single complex velocity, e.g. U(t)=u(t)+iv(t) U(t) = u(t) + v(t) results analysis now describe combined fit two related components. common summary result fit describe “tidal ellipse”, horizontal ellipse traced tidal constituents – major minor axes ellipse describe size two orthogonal components phases u/v oscillations determine ellipse “orientation”, angle. Due use lm(), oce package able perform complex analysis. However, python package Utide can analysis, thanks reticulate package R easy run R python code simultaneously, passing variables back--forth two systems.","code":""},{"path":"https://dankelley.github.io/oce/articles/H_tides.html","id":"setting-up-a-python-environment-to-do-tidal-analysis","dir":"Articles","previous_headings":"The Bivariate Case (Current Components)","what":"Setting up a python environment to do tidal analysis","title":"8. Tidal Analysis","text":"many different ways set configure python environment oceanography. python expert, take advice grain salt, competent oceanographers know use python seem prefer “miniconda” distribution, uses conda package manager (can also use development-oriented package repository conda-forge). Whenever setting new miniconda install, use instructions provided University Hawaii Currents group, found . completeness ’ll just repeat steps followed . install nearly identical MacOS Linux. opportunity try full install normal Windows OS, even Windows use Windows Subsystem Linux (WSL) scientific coding (essentially just terminal Ubuntu installation embedded Windows). Copied directly UH page, follow install python miniconda environment:","code":""},{"path":"https://dankelley.github.io/oce/articles/H_tides.html","id":"install-miniconda-base","dir":"Articles","previous_headings":"The Bivariate Case (Current Components) > Setting up a python environment to do tidal analysis","what":"Install Miniconda base","title":"8. Tidal Analysis","text":"begin, install current 64-bit Python 3 Miniconda base matches operating system. use shell script version (*.sh) installer, GUI version (*.pkg Mac). don’t even need browser download installer. Open terminal window can run commands. can download Mac installer executing: machine Intel processor, : machine M1 M2 chip (“Apple Silicon”, uses ARM architecture).","code":"curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh"},{"path":"https://dankelley.github.io/oce/articles/H_tides.html","id":"for-linux","dir":"Articles","previous_headings":"The Bivariate Case (Current Components) > Setting up a python environment to do tidal analysis > Install Miniconda base","what":"For Linux:","title":"8. Tidal Analysis","text":"downloading, use bash interpreter execute shell script, like : substituting corresponding file name Apple Silicon Linux. use “sudo”; execute script normal user, let installation occur default location home directory. Use spacebar page user agreement, hit return, “yes” accept . suggest answering “” : take care manually minute, installer finished. running zsh, bash? Linux, almost certainly bash. older Mac, might bash. newer Mac, Catalina later, probably zsh. banner top Mac terminal window show one using. can also get list processes running terminal, including either bash zsh, executing: says “-bash”, ignore hyphen; just bash. running zsh, execute, command line: running bash: Either way, command tell modifying file, “.zshrc” “.zprofile” running zsh, otherwise either “.bash_profile” “.bashrc”. Note name file modified; might need later. Next, put configuration entries .condarc file cutting pasting following lines terminal. (backslashes line continuations.) might need hit “return” pasting, last command executed: (recommending subset configuration options described https://gist.github.com/ocefpaf/863fc5df6ed8444378fbb1211ad8feb1.) Now quit terminal application completely (necessary OSX; Linux need close terminal window open new one), restart , check conda executable found. Execute: Depending shell running, return either path starts home directory followed miniconda3/condabin/conda (running bash), multiple lines shell code defining conda function (running zsh).","code":"curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-MacOSX-x86_64.sh Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no] ps ~/miniconda3/bin/conda init zsh ~/miniconda3/bin/conda init bash ~/miniconda3/bin/conda config --add channels conda-forge ~/miniconda3/bin/conda config --set channel_priority strict ~/miniconda3/bin/conda config --set auto_activate_base false ~/miniconda3/bin/conda config --append create_default_packages ipython \\          --append create_default_packages pip \\          --append create_default_packages \"blas=*=openblas\" which conda"},{"path":"https://dankelley.github.io/oce/articles/H_tides.html","id":"making-a-conda-environment-for-tidal-analysis","dir":"Articles","previous_headings":"The Bivariate Case (Current Components) > Setting up a python environment to do tidal analysis > Install Miniconda base","what":"Making a conda environment for tidal analysis","title":"8. Tidal Analysis","text":"point, next step simply create conda “environments” can used write/run python code. environment approach containerizing workflows somewhat foreign R world, fairly standard python. honest, like simplicity R package ecosystem, though see advantages keeping python environments associated projects. create environment can used tidal analysis, following: creates conda environment called “tides” installs packages “utide” “pandas” (needed R python date conversions) dependencies. Note intend use environment command line (e.g. starting python, python IDE Jupyter), necessary “activate” environment : use environment R script, isn’t necessary.","code":"conda create -n tides utide pandas conda activate tides"},{"path":"https://dankelley.github.io/oce/articles/H_tides.html","id":"using-reticulate-to-run-the-utide-python-package-in-r","dir":"Articles","previous_headings":"The Bivariate Case (Current Components)","what":"Using reticulate to run the Utide python package in R","title":"8. Tidal Analysis","text":"Now python requirements installed, can call package R using reticulate package. First, load libraries set conda environment want use reticulate: functions associated python libraries can loaded R workspace import() function, like: can load example “tidalCurrent” dataset included oce: last line converts R POSIX format time pandas “datetime”, needed Utide. can perform tidal analysis using Utide coef() function: produces list coef fields: Making tidal prediction based fit, easy using utide reconstruct() function: Let’s make plots show works! can visualize tidal constituent ellipses, first creating function draw ellipse, looping constituents fit adding hodograph currents:","code":"library(oce) library(reticulate) use_condaenv(\"tides\") utide <- import(\"utide\") pandas <- import(\"pandas\") np <- import(\"numpy\") data(tidalCurrent) t <- tidalCurrent$time u <- np$array(tidalCurrent$u) v <- np$array(tidalCurrent$v) tpy <- pandas$to_datetime(as.numeric(t), unit = \"s\", utc = TRUE) coef <- utide$solve(tpy, u, v,     lat = 45, nodal = FALSE, trend = FALSE, method = \"ols\",     conf_int = \"linear\", Rayleigh_min = 0.95 ) ## solve: matrix prep ... solution ... done. names(coef) ##  [1] \"aux\"      \"diagn\"    \"g\"        \"g_ci\"     \"Lsmaj\"    \"Lsmaj_ci\" ##  [7] \"Lsmin\"    \"Lsmin_ci\" \"name\"     \"nI\"       \"nNR\"      \"nR\"       ## [13] \"PE\"       \"SNR\"      \"theta\"    \"theta_ci\" \"umean\"    \"vmean\"    ## [19] \"weights\" tide <- utide$reconstruct(t = tpy, coef = coef) ## prep/calcs ... done. par(mfrow = c(2, 1)) oce.plot.ts(t, u) lines(t, tide[\"u\"], col = 2) legend(\"bottomleft\", c(\"data\", \"fit\"), lty = 1, col = 1:2, bg = \"white\") oce.plot.ts(t, v) lines(t, tide[\"v\"], col = 2) ellipse <- function(xc = 0, yc = 0, Lmaj, Lmin, phi, ...) {     th <- seq(0, 2 * pi, 0.01)     x <- xc + Lmaj * cos(th) * cos(phi) - Lmin * sin(th) * sin(phi)     y <- yc + Lmaj * cos(th) * sin(phi) + Lmin * sin(th) * cos(phi)     lines(x, y, ...) } par(mfrow = c(1, 1)) plot(u, v, asp = 1) grid() for (i in seq_along(coef$name)) {     ellipse(coef$umean, coef$vmean, coef$Lsmaj[i], coef$Lsmin[i], coef$theta[i] * pi / 180, lwd = 3, col = i) }"},{"path":"https://dankelley.github.io/oce/articles/H_tides.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"8. Tidal Analysis","text":"Kelley, Dan E. Oceanographic Analysis R. 1st ed. 2018. New York, NY: Springer New York : Imprint: Springer, 2018. https://doi.org/10.1007/978-1-4939-8844-0. Kelley, Dan E., Clark Richards, Chantelle Layton. “Oce: R Package Oceanographic Analysis.” Journal Open Source Software 7, . 71 (March 3, 2022): 3594. https://doi.org/10.21105/joss.03594.","code":""},{"path":"https://dankelley.github.io/oce/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dan Kelley. Author, maintainer. Clark Richards. Author. Chantelle Layton. Contributor.            curl() coauthor British Geological Survey. Contributor, copyright holder.           magnetic-field subroutine","code":""},{"path":"https://dankelley.github.io/oce/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kelley D, Richards C (2024). oce: Analysis Oceanographic Data. R package version 1.8-4, https://dankelley.github.io/oce/.","code":"@Manual{,   title = {oce: Analysis of Oceanographic Data},   author = {Dan Kelley and Clark Richards},   year = {2024},   note = {R package version 1.8-4},   url = {https://dankelley.github.io/oce/}, }"},{"path":[]},{"path":"https://dankelley.github.io/oce/index.html","id":"why-use-r-for-oceanographic-analysis","dir":"","previous_headings":"","what":"Why use R for oceanographic analysis?","title":"Analysis of Oceanographic Data","text":"R language popular many branches science, Oceanography exception. broad statistical support, R natural choice oceanographers biological, chemical geological sub-disciplines. However, physical oceanographers remained attached Matlab, widely adopted 1990s. Lately, changing, oceanographers turn open-source systems Python R. particular strength R provision many powerful well-vetted packages handling specialized calculations. oce package prime example.","code":""},{"path":"https://dankelley.github.io/oce/index.html","id":"what-the-oce-package-provides","dir":"","previous_headings":"","what":"What the oce package provides","title":"Analysis of Oceanographic Data","text":"oce package handles wide variety tasks come analysis Oceanographic data. addition present README file, brief sketch package written core developers (Kelley Dan E., Clark Richards Chantelle Layton, 2022. oce: R package Oceanographic Analysis. Journal Open Source Software, 7(71), 3594), primary developer uses package extensively book place R oceanographic analysis (Kelley, Dan E., 2018. Oceanographic Analysis R. New York. Springer-Verlag ISBN 978-1-4939-8844-0). Details oce functions provided within R help system, package webpage.","code":""},{"path":"https://dankelley.github.io/oce/index.html","id":"installing-oce","dir":"","previous_headings":"","what":"Installing oce","title":"Analysis of Oceanographic Data","text":"Stable versions oce available CRAN, may installed within R, way packages. However, CRAN version updated times year (pursuant policy), many users install \"develop\" branch instead. branch may updated several times per day, authors fix bugs add features motivated day--day usage. branch favoured users need new features wish contribute Oce development. easy way install \"develop\" branch execute following commands R. readers also install Ocedata, ","code":"remotes::install_github(\"dankelley/oce\", ref=\"develop\") remotes::install_github(\"dankelley/ocedata\", ref=\"main\")"},{"path":"https://dankelley.github.io/oce/index.html","id":"evolution-of-oce","dir":"","previous_headings":"","what":"Evolution of oce","title":"Analysis of Oceanographic Data","text":"Oce emphatically open-source system, participation users important. Git used version control Oce source code, GitHub host code. Users invited take part development process, suggesting features, reporting bugs, just watching others things. Oceanography collaborative discipline, makes sense evolution Oce similarly collaborative.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/index.html","id":"ctd","dir":"","previous_headings":"Examples using built-in datasets","what":"CTD","title":"Analysis of Oceanographic Data","text":"","code":"library(oce) data(ctd) plot(ctd, which=c(1,2,3,5), type=\"l\", span=150)"},{"path":"https://dankelley.github.io/oce/index.html","id":"acoustic-doppler-profiler","dir":"","previous_headings":"Examples using built-in datasets","what":"Acoustic Doppler profiler","title":"Analysis of Oceanographic Data","text":"","code":"library(oce) data(adp) plot(adp)"},{"path":"https://dankelley.github.io/oce/index.html","id":"sealevel-and-tides","dir":"","previous_headings":"Examples using built-in datasets","what":"Sealevel and tides","title":"Analysis of Oceanographic Data","text":"","code":"library(oce) data(sealevel) m <- tidem(sealevel) par(mfrow=c(2, 1)) plot(sealevel, which=1) plot(m)"},{"path":"https://dankelley.github.io/oce/index.html","id":"echosounder","dir":"","previous_headings":"Examples using built-in datasets","what":"Echosounder","title":"Analysis of Oceanographic Data","text":"","code":"library(oce) data(echosounder) plot(echosounder, which=2, drawTimeRange=TRUE, drawBottom=TRUE)"},{"path":"https://dankelley.github.io/oce/index.html","id":"map","dir":"","previous_headings":"Examples using built-in datasets","what":"Map","title":"Analysis of Oceanographic Data","text":"","code":"library(oce) par(mar=rep(0.5, 4)) data(endeavour, package=\"ocedata\") data(coastlineWorld, package=\"oce\") mapPlot(coastlineWorld, col=\"gray\") mapPoints(endeavour$longitude, endeavour$latitude, pch=20, col=\"red\")"},{"path":"https://dankelley.github.io/oce/index.html","id":"landsat-image","dir":"","previous_headings":"Examples using built-in datasets","what":"Landsat image","title":"Analysis of Oceanographic Data","text":"","code":"library(ocedata) library(oce) data(landsat) plot(landsat)"},{"path":"https://dankelley.github.io/oce/reference/CTD_BCD2014666_008_1_DN.ODF.gz.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample ctd File in .odf Format — CTD_BCD2014666_008_1_DN.ODF.gz","title":"Sample ctd File in .odf Format — CTD_BCD2014666_008_1_DN.ODF.gz","text":"location approximately 30km southeast Halifax Harbour, \"Station 2\" Halifax Line Scotian Shelf.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/CTD_BCD2014666_008_1_DN.ODF.gz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample ctd File in .odf Format — CTD_BCD2014666_008_1_DN.ODF.gz","text":"","code":"ctd <- read.ctd(system.file(\"extdata\", \"CTD_BCD2014666_008_1_DN.ODF.gz\", package=\"oce\")) #> Warning: \"conductivity\" (code name \"CRAT_01\") is a conductivity ratio, which has no units, but the file lists \"s/m\" as a unit. Consult ?read.odf to see how to rectify this error. plot(ctd)"},{"path":"https://dankelley.github.io/oce/reference/GMTOffsetFromTz.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine Time Offset From Timezone — GMTOffsetFromTz","title":"Determine Time Offset From Timezone — GMTOffsetFromTz","text":"data https://www.timeanddate.com/time/zones/ hand-edited develop code, may errors.  Also, note contradict; examine code, see commented-portions represent solving conflicting definitions choosing common timezone abbreviation less common one.","code":""},{"path":"https://dankelley.github.io/oce/reference/GMTOffsetFromTz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine Time Offset From Timezone — GMTOffsetFromTz","text":"","code":"GMTOffsetFromTz(tz)"},{"path":"https://dankelley.github.io/oce/reference/GMTOffsetFromTz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine Time Offset From Timezone — GMTOffsetFromTz","text":"tz timezone, e.g. UTC.","code":""},{"path":"https://dankelley.github.io/oce/reference/GMTOffsetFromTz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Determine Time Offset From Timezone — GMTOffsetFromTz","text":"Number hours offset, e.g. AST yields 4.","code":""},{"path":"https://dankelley.github.io/oce/reference/GMTOffsetFromTz.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Determine Time Offset From Timezone — GMTOffsetFromTz","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/GMTOffsetFromTz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Determine Time Offset From Timezone — GMTOffsetFromTz","text":"","code":"library(oce) cat(\"Atlantic Standard Time is \", GMTOffsetFromTz(\"AST\"), \"hours after UTC\") #> Atlantic Standard Time is  4 hours after UTC"},{"path":"https://dankelley.github.io/oce/reference/ODF2oce.html","id":null,"dir":"Reference","previous_headings":"","what":"Create ODF Object From Output of read_ODF in ODF package — ODF2oce","title":"Create ODF Object From Output of read_ODF in ODF package — ODF2oce","text":"August 11, 2015, ODF::read_ODF returns list 9 elements, one named DATA, data.frame() containing columnar data, others headers various sorts.  present function constructs oce object data, facilitating processing plotting general oce functions. involves storing 8 headers verbatim odfHeaders metadata slot, also copying header information standard names (e.g.  metadata@longitude copy metadata@odfHeader$EVENT_HEADER$INITIAL_LATITUDE).  DATA, stored data slot, renaming ODF oce convention using ODFNames2oceNames().","code":""},{"path":"https://dankelley.github.io/oce/reference/ODF2oce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create ODF Object From Output of read_ODF in ODF package — ODF2oce","text":"","code":"ODF2oce(ODF, coerce = TRUE, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/ODF2oce.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create ODF Object From Output of read_ODF in ODF package — ODF2oce","text":"ODF list returned read_ODF ODF package coerce logical value indicating whether coerce return value appropriate object type, possible. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get .","code":""},{"path":"https://dankelley.github.io/oce/reference/ODF2oce.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create ODF Object From Output of read_ODF in ODF package — ODF2oce","text":"oce object, possibly coerced subtype.","code":""},{"path":"https://dankelley.github.io/oce/reference/ODF2oce.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Create ODF Object From Output of read_ODF in ODF package — ODF2oce","text":"function may change ODF package changes.  Since ODF released yet, affect users except involved development oce ODF.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ODF2oce.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create ODF Object From Output of read_ODF in ODF package — ODF2oce","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ODFListFromHeader.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a List of odf Header Metadata — ODFListFromHeader","title":"Create a List of odf Header Metadata — ODFListFromHeader","text":"Create List odf Header Metadata","code":""},{"path":"https://dankelley.github.io/oce/reference/ODFListFromHeader.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a List of odf Header Metadata — ODFListFromHeader","text":"","code":"ODFListFromHeader(header)"},{"path":"https://dankelley.github.io/oce/reference/ODFListFromHeader.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a List of odf Header Metadata — ODFListFromHeader","text":"header Vector character strings, holding header","code":""},{"path":"https://dankelley.github.io/oce/reference/ODFListFromHeader.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a List of odf Header Metadata — ODFListFromHeader","text":"list holding metadata, item names matching ODF header, except duplicates transformed use unduplicateNames().","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ODFNames2oceNames.html","id":null,"dir":"Reference","previous_headings":"","what":"Translate ODF CODE Strings to oce Variable Names — ODFNames2oceNames","title":"Translate ODF CODE Strings to oce Variable Names — ODFNames2oceNames","text":"Translate ODF CODE strings oce variable names. done differently data names quality-control (QC) names.","code":""},{"path":"https://dankelley.github.io/oce/reference/ODFNames2oceNames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Translate ODF CODE Strings to oce Variable Names — ODFNames2oceNames","text":"","code":"ODFNames2oceNames(   ODFnames,   columns = NULL,   PARAMETER_HEADER = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/ODFNames2oceNames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Translate ODF CODE Strings to oce Variable Names — ODFNames2oceNames","text":"ODFnames vector character values hold ODF names. columns Optional list containing name correspondances, described read.ctd.odf(). PARAMETER_HEADER Optional list containing information data variables. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/ODFNames2oceNames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Translate ODF CODE Strings to oce Variable Names — ODFNames2oceNames","text":"list relating ODF names oce names (see “Examples”).","code":""},{"path":"https://dankelley.github.io/oce/reference/ODFNames2oceNames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Translate ODF CODE Strings to oce Variable Names — ODFNames2oceNames","text":"following table gives recognized ODF code names variables, along translated names used oce objects. Note code names appended strings \"_01\", \"_02\", etc, repeats. converted name \"_01\" item shown , e.g. \"_02\" suffix 2 added oce name, etc. QC items (get stored flags object's metadata slots) assigned names match parameters refer.  parsing ODF files, assumed QC items refer data items precede .  pattern seem documented, held files examined author, similar assumption made software systems.  QC items CODE values either start \"QQQQ\" equal \"Q<CODE>\", <CODE> matches corresponding data item. code shown list transferred oce object without renaming, apart adjustment suffix numbers. following code seen data files Bedford Institute Oceanography: ALTB, PHPH QCFF.","code":""},{"path":"https://dankelley.github.io/oce/reference/ODFNames2oceNames.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Translate ODF CODE Strings to oce Variable Names — ODFNames2oceNames","text":"sources describe ODF format, see documentation odf.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ODFNames2oceNames.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Translate ODF CODE Strings to oce Variable Names — ODFNames2oceNames","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ODFNames2oceNames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Translate ODF CODE Strings to oce Variable Names — ODFNames2oceNames","text":"","code":"ODFNames2oceNames(\"TEMP_01\")$names # \"temperature\" #> [1] \"temperature\""},{"path":"https://dankelley.github.io/oce/reference/T68fromT90.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert From ITS-90 to IPTS-68 Temperature — T68fromT90","title":"Convert From ITS-90 to IPTS-68 Temperature — T68fromT90","text":"Today's instruments typically record -90 scale, old datasets IPTS-68 scale. T90fromT68() converts IPTS-68 -90 scale, using Saunders' (1990) formula, T68fromT90() reverse. difference IPTS-68 -90 values typically millidegrees (see ‘Examples’), seldom visible typical temperature profile, may interest precise work.  Mostly historical interest, T90fromT48() provided convert -48 system -90.","code":""},{"path":"https://dankelley.github.io/oce/reference/T68fromT90.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert From ITS-90 to IPTS-68 Temperature — T68fromT90","text":"","code":"T68fromT90(temperature)"},{"path":"https://dankelley.github.io/oce/reference/T68fromT90.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert From ITS-90 to IPTS-68 Temperature — T68fromT90","text":"temperature numeric vector temperatures]\\(^\\circ\\)C -90 scale.","code":""},{"path":"https://dankelley.github.io/oce/reference/T68fromT90.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert From ITS-90 to IPTS-68 Temperature — T68fromT90","text":"Corresponding temperatures \\(^\\circ\\)C IPTS-68 scale.","code":""},{"path":"https://dankelley.github.io/oce/reference/T68fromT90.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert From ITS-90 to IPTS-68 Temperature — T68fromT90","text":"P. M. Saunders, 1990. international temperature scale 1990, -90.  WOCE Newsletter, volume 10, September 1990, page 10. http://www.nodc.noaa.gov/woce/wdiu/wocedocs/newsltr/news10/contents.htm","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/T68fromT90.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert From ITS-90 to IPTS-68 Temperature — T68fromT90","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/T68fromT90.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert From ITS-90 to IPTS-68 Temperature — T68fromT90","text":"","code":"library(oce) T68 <- seq(3, 20, 1) T90 <- T90fromT68(T68) sqrt(mean((T68-T90)^2)) #> [1] 0.003027144"},{"path":"https://dankelley.github.io/oce/reference/T90fromT48.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert From ITS-48 to ITS-90 Temperature — T90fromT48","title":"Convert From ITS-48 to ITS-90 Temperature — T90fromT48","text":"Today's instruments typically record -90 scale, old datasets IPTS-68 scale. T90fromT68() converts IPTS-68 -90 scale, using Saunders' (1990) formula, T68fromT90() reverse. difference IPTS-68 -90 values typically millidegrees (see ‘Examples’), seldom visible typical temperature profile, may interest precise work.  Mostly historical interest, T90fromT48() provided convert -48 system -90.","code":""},{"path":"https://dankelley.github.io/oce/reference/T90fromT48.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert From ITS-48 to ITS-90 Temperature — T90fromT48","text":"","code":"T90fromT48(temperature)"},{"path":"https://dankelley.github.io/oce/reference/T90fromT48.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert From ITS-48 to ITS-90 Temperature — T90fromT48","text":"temperature Vector temperatures \\(^\\circ\\)C IPTS-48 scale.","code":""},{"path":"https://dankelley.github.io/oce/reference/T90fromT48.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert From ITS-48 to ITS-90 Temperature — T90fromT48","text":"Corresponding temperatures \\(^\\circ\\)C -90 scale.","code":""},{"path":"https://dankelley.github.io/oce/reference/T90fromT48.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert From ITS-48 to ITS-90 Temperature — T90fromT48","text":"P. M. Saunders, 1990. international temperature scale 1990, -90.  WOCE Newsletter, volume 10, September 1990, page 10. http://www.nodc.noaa.gov/woce/wdiu/wocedocs/newsltr/news10/contents.htm","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/T90fromT48.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert From ITS-48 to ITS-90 Temperature — T90fromT48","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/T90fromT48.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert From ITS-48 to ITS-90 Temperature — T90fromT48","text":"","code":"library(oce) T68 <- seq(3, 20, 1) T90 <- T90fromT68(T68) sqrt(mean((T68-T90)^2)) #> [1] 0.003027144"},{"path":"https://dankelley.github.io/oce/reference/T90fromT68.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert From IPTS-68 to ITS-90 Temperature — T90fromT68","title":"Convert From IPTS-68 to ITS-90 Temperature — T90fromT68","text":"Today's instruments typically record -90 scale, old datasets IPTS-68 scale. T90fromT68() converts IPTS-68 -90 scale, using Saunders' (1990) formula, T68fromT90() reverse. difference IPTS-68 -90 values typically millidegrees (see ‘Examples’), seldom visible typical temperature profile, may interest precise work.  Mostly historical interest, T90fromT48() provided convert -48 system -90.","code":""},{"path":"https://dankelley.github.io/oce/reference/T90fromT68.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert From IPTS-68 to ITS-90 Temperature — T90fromT68","text":"","code":"T90fromT68(temperature)"},{"path":"https://dankelley.github.io/oce/reference/T90fromT68.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert From IPTS-68 to ITS-90 Temperature — T90fromT68","text":"temperature numeric vector temperatures \\(^\\circ\\)C IPTS-68 scale.","code":""},{"path":"https://dankelley.github.io/oce/reference/T90fromT68.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert From IPTS-68 to ITS-90 Temperature — T90fromT68","text":"Corresponding temperatures \\(^\\circ\\)C -90 scale.","code":""},{"path":"https://dankelley.github.io/oce/reference/T90fromT68.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert From IPTS-68 to ITS-90 Temperature — T90fromT68","text":"P. M. Saunders, 1990. international temperature scale 1990, -90.  WOCE Newsletter, volume 10, September 1990, page 10. http://www.nodc.noaa.gov/woce/wdiu/wocedocs/newsltr/news10/contents.htm","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/T90fromT68.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert From IPTS-68 to ITS-90 Temperature — T90fromT68","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/T90fromT68.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert From IPTS-68 to ITS-90 Temperature — T90fromT68","text":"","code":"library(oce) T68 <- seq(3, 20, 1) T90 <- T90fromT68(T68) sqrt(mean((T68-T90)^2)) #> [1] 0.003027144"},{"path":"https://dankelley.github.io/oce/reference/abbreviateTimeLabels.html","id":null,"dir":"Reference","previous_headings":"","what":"Abbreviate a Vector of Times by Removing Commonalities — abbreviateTimeLabels","title":"Abbreviate a Vector of Times by Removing Commonalities — abbreviateTimeLabels","text":"Abbreviate vector times removing commonalities (e.g. year)","code":""},{"path":"https://dankelley.github.io/oce/reference/abbreviateTimeLabels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Abbreviate a Vector of Times by Removing Commonalities — abbreviateTimeLabels","text":"","code":"abbreviateTimeLabels(t, ...)"},{"path":"https://dankelley.github.io/oce/reference/abbreviateTimeLabels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Abbreviate a Vector of Times by Removing Commonalities — abbreviateTimeLabels","text":"t vector times. ... optional arguments passed format(), e.g. format.","code":""},{"path":"https://dankelley.github.io/oce/reference/abbreviateTimeLabels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Abbreviate a Vector of Times by Removing Commonalities — abbreviateTimeLabels","text":"None.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/abbreviateTimeLabels.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Abbreviate a Vector of Times by Removing Commonalities — abbreviateTimeLabels","text":"Dan Kelley, help Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/ad2cpCodeToName.html","id":null,"dir":"Reference","previous_headings":"","what":"Map AD2CP ID Code to oce Name — ad2cpCodeToName","title":"Map AD2CP ID Code to oce Name — ad2cpCodeToName","text":"explained Nortek (2022, section 6.1, page 80), AD2CP files use hexadecimal (R, \"raw\") code indicate nature data chunk, read.adp.ad2cp() uses present function analyses AD2CP files.","code":""},{"path":"https://dankelley.github.io/oce/reference/ad2cpCodeToName.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map AD2CP ID Code to oce Name — ad2cpCodeToName","text":"","code":"ad2cpCodeToName(code = NULL, prefix = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/ad2cpCodeToName.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map AD2CP ID Code to oce Name — ad2cpCodeToName","text":"code raw (corresponding integer) vector indicating IDs interest, NULL get summary possible values. prefix logical value indicating whether show raw value prefix (e.g. \"0x1c=echosounder\" opposed \"echosounder\").","code":""},{"path":"https://dankelley.github.io/oce/reference/ad2cpCodeToName.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Map AD2CP ID Code to oce Name — ad2cpCodeToName","text":"indication mapping.  code NULL, data frame.  Otherwise, character vector relevant mappings, raw form code linked name, example.","code":""},{"path":"https://dankelley.github.io/oce/reference/ad2cpCodeToName.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map AD2CP ID Code to oce Name — ad2cpCodeToName","text":"mapping code (hex decimal) oce name follows.","code":""},{"path":"https://dankelley.github.io/oce/reference/ad2cpCodeToName.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Map AD2CP ID Code to oce Name — ad2cpCodeToName","text":"Nortek . “Signature Integration 55|250|500|1000kHz.” Nortek , March 31, 2022.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ad2cpCodeToName.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Map AD2CP ID Code to oce Name — ad2cpCodeToName","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ad2cpCodeToName.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map AD2CP ID Code to oce Name — ad2cpCodeToName","text":"","code":"stopifnot(ad2cpCodeToName(0x15) == \"0x15=burst\")"},{"path":"https://dankelley.github.io/oce/reference/ad2cpHeaderValue.html","id":null,"dir":"Reference","previous_headings":"","what":"Infer an Item From a Nortek AD2CP File Header — ad2cpHeaderValue","title":"Infer an Item From a Nortek AD2CP File Header — ad2cpHeaderValue","text":"Infer Item Nortek AD2CP File Header","code":""},{"path":"https://dankelley.github.io/oce/reference/ad2cpHeaderValue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Infer an Item From a Nortek AD2CP File Header — ad2cpHeaderValue","text":"","code":"ad2cpHeaderValue(x, key, item, numeric = TRUE, default)"},{"path":"https://dankelley.github.io/oce/reference/ad2cpHeaderValue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Infer an Item From a Nortek AD2CP File Header — ad2cpHeaderValue","text":"x adp object holds AD2CP data. key Character value identifies particular line file header. item Character value indicating name item sought. numeric Logical value indicating whether convert return value string numerical value. default Optional value used item found header, header NULL (case split-file lacks initial header information)","code":""},{"path":"https://dankelley.github.io/oce/reference/ad2cpHeaderValue.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Infer an Item From a Nortek AD2CP File Header — ad2cpHeaderValue","text":"String number interpreted x[[\"text\"]], NULL, desired item found , x required class variety.","code":""},{"path":"https://dankelley.github.io/oce/reference/ad2cpHeaderValue.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Infer an Item From a Nortek AD2CP File Header — ad2cpHeaderValue","text":"","code":"if (file.exists(\"a.ad2cp\")) {     d <- read.oce(\"a.ad2cp\")     # The examples start with the line in x[[\"text\"]][[1]]; note that in the second     # example, it would be insuficient to use a key of \"BEAMCFGLIST\", because that will     # yield 4 lines, and the function is not designed to handle that.      # ID,STR=\\\"Signature1000\\\",SN=123456     type <- ad2cpHeaderValue(d, \"ID\", \"STR\", numeric=FALSE)     serialNumber <- ad2cpHeaderValue(d, \"ID\", \"SN\")      # BEAMCFGLIST,BEAM=1,THETA=25.00,PHI=0.00,FREQ=1000,BW=25,BRD=1,HWBEAM=1,ZNOM=60.00     beam1Angle <- ad2cpHeaderValue(d, \"BEAMCFGLIST,BEAM=1\", \"THETA\")     frequency <- ad2cpHeaderValue(d, \"BEAMCFGLIST,BEAM=1\", \"FREQ\", default=NA) }"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ad2cpHeaderValue.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Infer an Item From a Nortek AD2CP File Header — ad2cpHeaderValue","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/addSpine.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a Spine to a section Object — addSpine","title":"Add a Spine to a section Object — addSpine","text":"purpose permit plotting xtype=\"spine\", section plot display distance stations projected onto spine.","code":""},{"path":"https://dankelley.github.io/oce/reference/addSpine.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a Spine to a section Object — addSpine","text":"","code":"addSpine(section, spine, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/addSpine.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a Spine to a section Object — addSpine","text":"section section object. spine either list data frame, containing numeric items named longitude latitude, defining path along spine. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/addSpine.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add a Spine to a section Object — addSpine","text":"section object spine added.","code":""},{"path":"https://dankelley.github.io/oce/reference/addSpine.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add a Spine to a section Object — addSpine","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/addSpine.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a Spine to a section Object — addSpine","text":"","code":"library(oce) data(section) eastern <- subset(section, longitude < (-65)) spine <- list(     longitude = c(-74.5, -69.2, -55),     latitude = c(38.6, 36.25, 36.25) ) easternWithSpine <- addSpine(eastern, spine) # plot(easternWithSpine, which=\"map\") # plot(easternWithSpine, xtype=\"distance\", which=\"temperature\") # plot(easternWithSpine, xtype=\"spine\", which=\"temperature\")"},{"path":"https://dankelley.github.io/oce/reference/adp-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Acoustic-Doppler Profiler Data — adp-class","title":"Class to Store Acoustic-Doppler Profiler Data — adp-class","text":"class stores data acoustic Doppler profilers. manufacturers call ADCPs, others call ADPs; shorter form used analogy ADVs.","code":""},{"path":"https://dankelley.github.io/oce/reference/adp-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Acoustic-Doppler Profiler Data — adp-class","text":"data oce objects, data slot adp objects list containing main data object. key items stored slot include time, distance, v, along angles heading, pitch roll. metadata oce objects, metadata slot adp objects list containing information data object . Examples common interest include oceCoordinate, orientation, frequency, beamAngle. processingLog oce objects, processingLog slot adp objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/adp-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Acoustic-Doppler Profiler Data — adp-class","text":"Although [[<- operator may permit modification contents adp objects (see [[<-,adp-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/adp-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Acoustic-Doppler Profiler Data — adp-class","text":"full contents data metadata slots adp object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,adp-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,adp-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":"https://dankelley.github.io/oce/reference/adp-class.html","id":"reading-creating-adp-objects","dir":"Reference","previous_headings":"","what":"Reading/creating adp objects","title":"Class to Store Acoustic-Doppler Profiler Data — adp-class","text":"metadata slot contains various items relating dataset, including source file name, sampling rate, velocity resolution, velocity maximum value, .  particular particular instrument types, prudent researchers take moment examine whole contents metadata, either summary form (str(adp[[\"metadata\"]])) detail (adp[[\"metadata\"]]).  Perhaps useful general properties adp[[\"bin1Distance\"]] (distance, metres, sensor bottom first bin), adp[[\"cellSize\"]] (cell height, metres, vertical direction, along beam), adp[[\"beamAngle\"]] (angle, degrees, beams imaginary centre line bisects beam pairs). diagram provided indicates coordinate-axis beam-numbering conventions three- four-beam ADP devices, viewed though reader looking towards beams emitted transducers.  bin geometry four-beam profiler illustrated , adp[[\"beamAngle\"]] equal 20 degrees, adp[[\"bin1Distance\"]] equal 2m, adp[[\"cellSize\"]] equal 1m.   diagram, viewer plane containing two beams shown, two visible beams separated 40 degrees.  Circles indicate centres range-gated bins within beams.  lines enclosing circles indicate coverage beams spread plus minus 2.5 degrees centreline.  Note adp[[\"oceCoordinate\"]] stores present coordinate system object, possible values \"beam\", \"xyz\", \"sfm\" \"enu\".  (confused adp[[\"originalCoordinate\"]], stores coordinate system used original data file.) data slot holds standardized items, many vary instrument instrument.  One standard item adp[[\"v\"]], three-dimensional numeric array velocities m/s.  matrix, first index indicates time, second bin number, third beam number. meaning beams number depends whether object beam coordinates, frame coordinates, earth coordinates.  example, earth coordinates, beam 1 eastward component velocity. Thus, example, plots image eastward component velocity function time (x axis) distance sensor (y axis), since adp dataset earth coordinates. Note semidurnal tidal signal, pattern missing data ocean surface (gray blotches top). Corresponding velocity array two arrays type raw, identical dimension, accessed adp[[\"\"]] adp[[\"q\"]], holding measures signal strength data quality (referred \"correlation\" documentation), respectively.  (exact meanings depend particular type instrument, assumed users familiar enough instruments know meanings practical consequences terms data-quality assessment, etc.) addition arrays, time-based vectors.  vector adp[[\"time\"]] (length equal first index adp[[\"v\"]], etc.) holds times observation.  Depending type instrument configuration, may also corresponding vectors sound speed (adp[[\"soundSpeed\"]]), pressure (adp[[\"pressure\"]]), temperature (adp[[\"temperature\"]]), heading (adp[[\"heading\"]]) pitch (adp[[\"pitch\"]]), roll (adp[[\"roll\"]]), depending setup instrument. precise meanings data items depend instrument type.  instruments v (velocity), q (measure data quality) (measure backscatter amplitude, also called echo intensity). Teledyne-RDI profilers additional item g (percent-good). VmDas-equipped Teledyne-RDI profilers additional navigation data, details listed table ; note RDI documentation (reference 2) RDI gui use inconsistent names items. Teledyne-RDI profilers, four three-dimensional arrays holding beamwise data.  , first index indicates time, second bin number, third beam number (coordinate number, data xyz, sfm, enu coordinate systems).  list , quoted phrases quantities defined Figure 9 reference 1. v velocity m/s, inferred two-byte signed integer values (multiplied scale factor stored velocityScale metadata). q \"correlation magnitude\" one-byte quantity stored type raw object. values may range 0 255. \"backscatter amplitude\", also known \"echo intensity\" one-byte quantity stored type raw object. values may range 0 255. g \"percent good\" one-byte quantity stored raw object.  values may range 0 100. Finally, vector adp[[\"distance\"]] indicates bin distances sensor, measured metres along imaginary centre line bisecting beam pairs.  length vector equals dim(adp[[\"v\"]])[2].","code":"library(oce) data(adp) t <- adp[[\"time\"]] d <- adp[[\"distance\"]] eastward <- adp[[\"v\"]][,,1] imagep(t, d, eastward, missingColor=\"gray\")"},{"path":"https://dankelley.github.io/oce/reference/adp-class.html","id":"teledyne-rdi-sentinel-v-adcps","dir":"Reference","previous_headings":"","what":"Teledyne-RDI Sentinel V ADCPs","title":"Class to Store Acoustic-Doppler Profiler Data — adp-class","text":"2016-09-27 provisional support TRDI \"SentinelV\" ADCPs, 5 beam ADCPs vertical centre beam. Relevant vertical beam fields called adp[[\"vv\"]], adp[[\"va\"]], adp[[\"vq\"]], adp[[\"vg\"]] analogy standard 4-beam fields.","code":""},{"path":"https://dankelley.github.io/oce/reference/adp-class.html","id":"accessing-and-altering-information-within-adp-objects","dir":"Reference","previous_headings":"","what":"Accessing and altering information within adp objects","title":"Class to Store Acoustic-Doppler Profiler Data — adp-class","text":"Extracting values Matrix data may accessed illustrated , e.g.  adp object named adv, data provided adp[[\"v\"]], adp[[\"\"]], adp[[\"q\"]].  convenience, last two can accessed numeric (opposed raw) values e.g.  adp[[\"\", \"numeric\"]].  vectors accessed similar way, e.g. adp[[\"heading\"]], etc.  Quantities metadata slot also available name, e.g. adp[[\"velocityResolution\"]], etc. Assigning values. follows standard form, e.g. increase velocity data 1 cm/s, use adp[[\"v\"]] <- 0.01 + adp[[\"v\"]]. Overview contents show method (e.g. show(d)) displays information ADP object named d.","code":""},{"path":"https://dankelley.github.io/oce/reference/adp-class.html","id":"dealing-with-suspect-data","dir":"Reference","previous_headings":"","what":"Dealing with suspect data","title":"Class to Store Acoustic-Doppler Profiler Data — adp-class","text":"many possibilities confusion adp devices, owing partly flexibility manufacturers provide setup.  Prudent users undertake many tests trusting details data.  mean currents expected direction, expected magnitude, based observations physical constraints? phasing currents expected?  signals suspect, incorrect scale account ?  transformation matrix incorrect? Might data exceeded maximum value, “wrapped around” smaller values?  Time spent building confidence data quality seldom time wasted.","code":""},{"path":"https://dankelley.github.io/oce/reference/adp-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Class to Store Acoustic-Doppler Profiler Data — adp-class","text":"Teledyne-RDI, 2007. WorkHorse commands output data format. P/N 957-6156-00 (November 2007). Teledyne-RDI, 2012. VmDas User's Guide, Ver. 1.46.5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/adp.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample adp Data — adp","title":"Sample adp Data — adp","text":"degraded subsample measurements made upward-pointing, moored, ADP manufactured Teledyne-RDI, part St Lawrence Internal Wave Experiment (SLEIWEX).","code":""},{"path":"https://dankelley.github.io/oce/reference/adp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample adp Data — adp","text":"","code":"data(adp)"},{"path":"https://dankelley.github.io/oce/reference/adp.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample adp Data — adp","text":"file came SLEIWEX-2008 experiment.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/adp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample adp Data — adp","text":"","code":"# \\donttest{ library(oce) data(adp)  # Velocity components.  (Note: we should probably trim some bins at top.) plot(adp)   # Note that tides have moved the mooring. plot(adp, which = 15:18)  # }"},{"path":"https://dankelley.github.io/oce/reference/adpAd2cpFileTrim.html","id":null,"dir":"Reference","previous_headings":"","what":"Trim an AD2CP File — adpAd2cpFileTrim","title":"Trim an AD2CP File — adpAd2cpFileTrim","text":"Create AD2CP file copying first n data chunks (regions starting 0xa5, etc) another file. can useful supplying small sample files bug reports.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpAd2cpFileTrim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trim an AD2CP File — adpAd2cpFileTrim","text":"","code":"adpAd2cpFileTrim(infile, n = 100L, outfile, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/adpAd2cpFileTrim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trim an AD2CP File — adpAd2cpFileTrim","text":"infile name AD2CP file. n integer indicating number data chunks keep. default keep 100 chunks, common choice sample files. outfile optional name new AD2CP file created. supplied, default used, adding _trimmed base filename, e.g. infile \".ad2cp\" outfile a_trimmed.ad2cp. debug integer value indicating level debugging. 1L, brief indication given processing steps. > 1L, information given data chunk, can yield extensive output.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpAd2cpFileTrim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trim an AD2CP File — adpAd2cpFileTrim","text":"adpAd2cpFileTrim() returns name output file, outfile, provided constructed.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpAd2cpFileTrim.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Trim an AD2CP File — adpAd2cpFileTrim","text":"","code":"# Can only be run by the developer, since it uses a private file. f  <- \"~/Dropbox/oce_secret_data/ad2cp/byg_trimmed.ad2cp\" if (file.exists(f))     adpAd2cpFileTrim(f, 100L) # this file is already trimmed to 200 chunks"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/adpAd2cpFileTrim.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trim an AD2CP File — adpAd2cpFileTrim","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/adpConvertRawToNumeric.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Raw to Numeric Values in an adp Object — adpConvertRawToNumeric","title":"Convert Raw to Numeric Values in an adp Object — adpConvertRawToNumeric","text":"Convert variables adp object raw numeric format.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpConvertRawToNumeric.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Raw to Numeric Values in an adp Object — adpConvertRawToNumeric","text":"","code":"adpConvertRawToNumeric(   object = NULL,   variables = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/adpConvertRawToNumeric.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Raw to Numeric Values in an adp Object — adpConvertRawToNumeric","text":"object adp object. variables variables stored adp object dimensional v stored raw format. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpConvertRawToNumeric.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Raw to Numeric Values in an adp Object — adpConvertRawToNumeric","text":"adpConvertRawToNumeric returns adp object whose specified variables converted raw numerical format.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/adpConvertRawToNumeric.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Raw to Numeric Values in an adp Object — adpConvertRawToNumeric","text":"Jaimie Harbin Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/adpConvertRawToNumeric.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Raw to Numeric Values in an adp Object — adpConvertRawToNumeric","text":"","code":"library(oce) data(adp) adp[[\"a\"]][, , 1][, 1] #>  [1] 99 9d 9f 87 8a 99 9c 96 91 91 92 99 94 94 96 9c 98 a7 a2 94 92 8d 90 8f 90 ADP <- adpConvertRawToNumeric(adp) ADP[[\"a\"]][, , 1][, 1] #>  [1] 153 157 159 135 138 153 156 150 145 145 146 153 148 148 150 156 152 167 162 #> [20] 148 146 141 144 143 144"},{"path":"https://dankelley.github.io/oce/reference/adpEnsembleAverage.html","id":null,"dir":"Reference","previous_headings":"","what":"Ensemble Average an adp Object in Time — adpEnsembleAverage","title":"Ensemble Average an adp Object in Time — adpEnsembleAverage","text":"Ensemble averaging adp objects often necessary reduce uncertainty velocity estimates single pings. Many types ADPs can configured perform ensemble averaging data collection, due memory limitations long deployments. cases instrument memory limited, may desirable perform ensemble averaging post-processing, thereby reducing overall size data set decreasing uncertainty velocity estimates (averaging Doppler noise).","code":""},{"path":"https://dankelley.github.io/oce/reference/adpEnsembleAverage.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ensemble Average an adp Object in Time — adpEnsembleAverage","text":"","code":"adpEnsembleAverage(x, n = 5, leftover = FALSE, na.rm = TRUE, ...)"},{"path":"https://dankelley.github.io/oce/reference/adpEnsembleAverage.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ensemble Average an adp Object in Time — adpEnsembleAverage","text":"x adp object. n number pings average together. leftover logical value indicating proceed cases n divide evenly number ensembles x. leftover FALSE (default) extra ensembles end x ignored. Otherwise, used create final ensemble returned value. na.rm logical value indicating whether NA values stripped computation proceeds ... extra arguments passed mean() function.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpEnsembleAverage.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ensemble Average an adp Object in Time — adpEnsembleAverage","text":"new adp object ensembles averaged specified. E.g. adp object 100 pings n=5 number rows data arrays reduced factor 5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/adpEnsembleAverage.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Ensemble Average an adp Object in Time — adpEnsembleAverage","text":"Clark Richards Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/adpEnsembleAverage.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ensemble Average an adp Object in Time — adpEnsembleAverage","text":"","code":"library(oce) data(adp) adpAvg <- adpEnsembleAverage(adp, n = 2) plot(adpAvg)"},{"path":"https://dankelley.github.io/oce/reference/adpFlagPastBoundary.html","id":null,"dir":"Reference","previous_headings":"","what":"Flag adp Data Past Water Column Boundary — adpFlagPastBoundary","title":"Flag adp Data Past Water Column Boundary — adpFlagPastBoundary","text":"Flag variables dimension v adp object beyond water column boundary retaining existing flags. Currently, operation can performed adp objects contain bottom ranges. Commonly, handleFlags() used remove data.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpFlagPastBoundary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Flag adp Data Past Water Column Boundary — adpFlagPastBoundary","text":"","code":"adpFlagPastBoundary(   x = NULL,   fields = NULL,   df = 20,   trim = 0.15,   good = 1,   bad = 4,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/adpFlagPastBoundary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Flag adp Data Past Water Column Boundary — adpFlagPastBoundary","text":"x adp object containing bottom ranges. fields variable contained within x indicating field flag. NULL (default) adpFlagPastBoundary() applies flag fields dimensionality v data slot. df degrees freedom use smoothing spline operation. trim scale factor boundary trimming (see “Details”). good number stored flags indicate good data. bad number stored flags indicate bad data. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpFlagPastBoundary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Flag adp Data Past Water Column Boundary — adpFlagPastBoundary","text":"adpFlagPastBoundary returns adp object flags adjusted specified fields data beyond water column boundary.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpFlagPastBoundary.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Flag adp Data Past Water Column Boundary — adpFlagPastBoundary","text":"object's oceCoordinate \"beam\", works using smooth.spline() time-dependent bottom ranges, beam--beam. oceCoordinate \"enu\", \"xyz\", \"\", smooth.spline() used time-dependent bottom range averaged across beams. df value present function passed smooth.spline(), way control smoothness.  done, data within distance \\(1-trim\\) multiplied bottom range flagged bad.  default value trim 0.15, close value (0.134) \\(1-cos(angle*pi/180)\\), angle=30 beam angle degrees.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/adpFlagPastBoundary.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Flag adp Data Past Water Column Boundary — adpFlagPastBoundary","text":"Jaimie Harbin, Clark Richards, Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/adpRdiFileTrim.html","id":null,"dir":"Reference","previous_headings":"","what":"Trim an RDI adp File — adpRdiFileTrim","title":"Trim an RDI adp File — adpRdiFileTrim","text":"Create RDI adp file copying first n data chunks (starting byte 0x7f 0x7f) another file. can useful supplying small sample files bug reports.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpRdiFileTrim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trim an RDI adp File — adpRdiFileTrim","text":"","code":"adpRdiFileTrim(infile, n = 100L, outfile, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/adpRdiFileTrim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trim an RDI adp File — adpRdiFileTrim","text":"infile name RDI file. n integer indicating number data chunks keep. default keep 100 chunks, common choice sample files. outfile optional name new RDI file created. supplied, default used, adding _trimmed base filename, e.g. infile \".000\" outfile a_trimmed.000. debug integer value indicating level debugging. 0, read.adp.rdi() proceeds quietly, except issuing warnings errors necessary.  1, R code read.adp.rdi() produces messages.  2, also underlying C/C++ code produces message time possible ensemble detected.  3, C/C++ code also produces information details ensemble.  Levels 2 3 mainly use developers.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpRdiFileTrim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trim an RDI adp File — adpRdiFileTrim","text":"adpRdiFileTrim() returns name output file, outfile, provided constructed.","code":""},{"path":"https://dankelley.github.io/oce/reference/adpRdiFileTrim.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Trim an RDI adp File — adpRdiFileTrim","text":"","code":"# Can only be run by the developer, since it uses a private file. file  <- \"~/data/archive/sleiwex/2008/moorings/m09/adp/rdi_2615/raw/adp_rdi_2615.000\" if (file.exists(file)) {     adpRdiFileTrim(file, 9L, \"test.000\") }"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/adpRdiFileTrim.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trim an RDI adp File — adpRdiFileTrim","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/adp_rdi.000.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample adp File in RDI Format — adp_rdi.000","title":"Sample adp File in RDI Format — adp_rdi.000","text":"Sample adp File RDI Format","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/adp_rdi.000.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample adp File in RDI Format — adp_rdi.000","text":"","code":"read.oce(system.file(\"extdata\", \"adp_rdi.000\", package=\"oce\")) #> adp object, from file \"/private/var/folders/8b/l4h64m1j22v5pb7vj049ff140000gn/T/RtmpFbPNQ2/temp_libpath17ff52acea456/oce/extdata/adp_rdi.000\", with data slot containing: #>    distance[1:84]: 2.23, 2.73, ..., 43.23, 43.73 #>    time[1:9]: 2008-06-25 10:00:00, 2008-06-25 10:00:10, ..., 2008-06-25 10:01:10, 2008-06-25 10:01:20 #>    pressure[1:9]: -0.244, -0.224, ..., -0.238, -0.266 #>    temperature[1:9]: 12.06, 12.06, ..., 12.10, 12.11 #>    salinity[1:9]: 35, 35, ..., 35, 35 #>    depth[1:9]: 0, 0, ..., 0, 0 #>    soundSpeed[1:9]: 1497, 1497, ..., 1497, 1497 #>    heading[1:9]: 278.14, 277.31, ..., 277.47, 276.98 #>    pitch[1:9]: 1.4212, 1.2412, ..., 1.1610, 1.1209 #>    roll[1:9]: -2.39, -2.49, ..., -2.38, -2.35 #>    headingStd[1:9]: 1, 0, ..., 0, 1 #>    pitchStd[1:9]: 0.2, 0.1, ..., 0.1, 0.1 #>    rollStd[1:9]: 0.1, 0.0, ..., 0.1, 0.1 #>    pressureStd[1:9]:  76, 100, ..., 97, 87 #>    xmitCurrent[1:9]: 61, 61, ..., 61, 61 #>    xmitVoltage[1:9]: 155, 155, ..., 155, 155 #>    ambientTemp[1:9]: 103, 103, ..., 103, 103 #>    pressurePlus[1:9]: 77, 77, ..., 77, 77 #>    pressureMinus[1:9]: 76, 77, ..., 77, 77 #>    attitudeTemp[1:9]: 101, 101, ..., 101, 101 #>    attitude[1:9]: 130, 130, ..., 130, 130 #>    contaminationSensor[1:9]: 159, 159, ..., 159, 159"},{"path":"https://dankelley.github.io/oce/reference/adv-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Acoustic-Doppler Velocimeter Data — adv-class","title":"Class to Store Acoustic-Doppler Velocimeter Data — adv-class","text":"class holds data acoustic-Doppler velocimeters.","code":""},{"path":"https://dankelley.github.io/oce/reference/adv-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Class to Store Acoustic-Doppler Velocimeter Data — adv-class","text":"file containing ADV data usually recognized Oce, read.oce() usually read data.  , one may use general ADV function read.adv() specialized variants read.adv.nortek(), read.adv.sontek.adr() read.adv.sontek.text(). ADV data may plotted plot,adv-method() function, generic function may called simply plot(x), x adv object. Statistical summaries ADV data provided generic function summary,adv-method(). Conversion beam xyz coordinates may done beamToXyzAdv(), xyz enu (east north ) may done xyzToEnuAdv().  toEnuAdv() may used transfer either beam xyz enu.  Enu may converted coordinates (e.g. aligned coastline) enuToOtherAdv().","code":""},{"path":"https://dankelley.github.io/oce/reference/adv-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Acoustic-Doppler Velocimeter Data — adv-class","text":"data oce objects, data slot adv objects list containing main data object. key items stored slot include time v. metadata oce objects, metadata slot adv objects list containing information data object . Examples common interest include frequency, oceCordinate, frequency. processingLog oce objects, processingLog slot adv objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/adv-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Acoustic-Doppler Velocimeter Data — adv-class","text":"Although [[<- operator may permit modification contents adv objects (see [[<-,adv-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/adv-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Acoustic-Doppler Velocimeter Data — adv-class","text":"full contents data metadata slots adv object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,adv-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,adv-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/adv-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Class to Store Acoustic-Doppler Velocimeter Data — adv-class","text":"","code":"data(adv) adv[[\"v\"]] <- 0.001 + adv[[\"v\"]] # add 1mm/s to all velocity components"},{"path":"https://dankelley.github.io/oce/reference/adv.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample adv Data — adv","title":"Sample adv Data — adv","text":"adv object sampling measurements made Nortek Vector acoustic Doppler velocimeter deployed part St Lawrence Internal Wave Experiment (SLEIWEX).  Various identifying features redacted.","code":""},{"path":"https://dankelley.github.io/oce/reference/adv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample adv Data — adv","text":"","code":"data(adv)"},{"path":"https://dankelley.github.io/oce/reference/adv.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample adv Data — adv","text":"file came SLEIWEX-2008 experiment.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/adv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample adv Data — adv","text":"","code":"# \\donttest{ library(oce) data(adv)  # Velocity time-series plot(adv)   # Spectrum of upward component of velocity, with ``turbulent'' reference line s <- spectrum(adv[[\"v\"]][, 3], plot = FALSE) plot(log10(s$freq), log10(s$spec), type = \"l\") for (a in seq(-20, 20, by = 1)) {     abline(a = a, b = -5 / 3, col = \"gray\", lty = \"dotted\") }  # }"},{"path":"https://dankelley.github.io/oce/reference/advSontekAdrFileTrim.html","id":null,"dir":"Reference","previous_headings":"","what":"Trim a Sontek ADR adv File — advSontekAdrFileTrim","title":"Trim a Sontek ADR adv File — advSontekAdrFileTrim","text":"Create Sontek ADR adv (acoustic Doppler velocimeter) file copying header plus first n data chunks (recognized three-byte sequence 0xA5, 0x11, `0x3c') new file. can useful supplying small sample files bug reports.","code":""},{"path":"https://dankelley.github.io/oce/reference/advSontekAdrFileTrim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trim a Sontek ADR adv File — advSontekAdrFileTrim","text":"","code":"advSontekAdrFileTrim(infile, n = 100, outfile, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/advSontekAdrFileTrim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trim a Sontek ADR adv File — advSontekAdrFileTrim","text":"infile name Sontek ADR adp file. n integer indicating number data chunks keep. default keep 100 chunks, common choice sample files. outfile optional name new Sontek ADR adp file created. supplied, default used, adding _trimmed base filename, e.g. infile \"x.adr\" outfile x_trimmed.adr. debug integer value indicating level debugging. 1L, brief indication given processing steps. > 1L, information given data chunk, can yield extensive output.","code":""},{"path":"https://dankelley.github.io/oce/reference/advSontekAdrFileTrim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trim a Sontek ADR adv File — advSontekAdrFileTrim","text":"advSontekAdrFileTrim() returns name output file, outfile, provided constructed.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/airRho.html","id":null,"dir":"Reference","previous_headings":"","what":"Air Density — airRho","title":"Air Density — airRho","text":"Compute \\(\\rho\\), -situ density dry air.","code":""},{"path":"https://dankelley.github.io/oce/reference/airRho.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Air Density — airRho","text":"","code":"airRho(temperature, pressure, humidity)"},{"path":"https://dankelley.github.io/oce/reference/airRho.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Air Density — airRho","text":"temperature -situ temperature, \\(^\\circ\\)C. pressure numeric value pressure Pa (kPa used public weather forecasts). humidity ignored present","code":""},{"path":"https://dankelley.github.io/oce/reference/airRho.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Air Density — airRho","text":"-situ dry-air density, kg/m\\(^3\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/airRho.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Air Density — airRho","text":"eventually proper equation state, now just uses dry-air formula posted wikipedia (.e. trustworthy).","code":""},{"path":"https://dankelley.github.io/oce/reference/airRho.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Air Density — airRho","text":"https://en.wikipedia.org/wiki/Density_of_air National Oceanographic Atmospheric Agency, 1976.  U.S. Standard Atmosphere, 1976.  NOAA-S/T 76-1562.  (PDF document may available http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770009539_1977009539.pdf http://www.dtic.mil/cgi-bin/GetTRDoc?Location=U2&doc=GetTRDoc.pdf&AD=ADA035728 although neither link proven reliable.)","code":""},{"path":"https://dankelley.github.io/oce/reference/airRho.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Air Density — airRho","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/airRho.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Air Density — airRho","text":"","code":"degC <- seq(0, 30, length.out = 100) p <- seq(98, 102, length.out = 100) * 1e3 contour(x = degC, y = p, z = outer(degC, p, airRho), labcex = 1)"},{"path":"https://dankelley.github.io/oce/reference/amsr-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store AMSR-2 Satellite Data — amsr-class","title":"Class to Store AMSR-2 Satellite Data — amsr-class","text":"class stores data AMSR-2 satellite.","code":""},{"path":"https://dankelley.github.io/oce/reference/amsr-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Class to Store AMSR-2 Satellite Data — amsr-class","text":"Advanced Microwave Scanning Radiometer (AMSR-2) current operation Japan Aerospace Exploration Agency (JAXA) GCOM-W1 space craft, launched May 2012. Data processed Remote Sensing Systems. satellite completes ascending descending pass local daytime nighttime hours respectively. daily file contains 7 daytime 7 nighttime maps variables named follows within data slot amsr objects: timeDay, SSTDay, LFwindDay (wind 10m sensed 10.7GHz band), MFwindDay (wind 10m sensed 18.7GHz), vaporDay, cloudDay, rainDay, along similarly-named items end Night. See reference 1 additional information instrument, cite data source paper, etc. bands stored raw() form, save storage. accessor function [[,amsr-method can provide values raw form physical units; plot,amsr-method(), summary,amsr-method() work physical units.","code":""},{"path":"https://dankelley.github.io/oce/reference/amsr-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store AMSR-2 Satellite Data — amsr-class","text":"data oce objects, data slot amsr objects list containing main data object. metadata oce objects, metadata slot amsr objects list containing information data object . Examples common interest include  longitude latitude, define grid. processingLog oce objects, processingLog slot amsr objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/amsr-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store AMSR-2 Satellite Data — amsr-class","text":"Although [[<- operator may permit modification contents amsr objects (see [[<-,amsr-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/amsr-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store AMSR-2 Satellite Data — amsr-class","text":"full contents data metadata slots amsr object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,amsr-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,amsr-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":"https://dankelley.github.io/oce/reference/amsr-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Class to Store AMSR-2 Satellite Data — amsr-class","text":"Information satellite, cite data, etc. provided http://www.remss.com/missions/amsr/. simple interface viewing downloading data http://images.remss.com/amsr/amsr2_data_daily.html.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/amsr-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store AMSR-2 Satellite Data — amsr-class","text":"Dan Kelley Chantelle Layton","code":""},{"path":"https://dankelley.github.io/oce/reference/amsr.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample amsr Data (Near Nova Scotia) — amsr","title":"Sample amsr Data (Near Nova Scotia) — amsr","text":"three-day composite satellite image July 27, 2023, trimmed show waters south east Nova Scotia, using code provide “Details” section.","code":""},{"path":"https://dankelley.github.io/oce/reference/amsr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample amsr Data (Near Nova Scotia) — amsr","text":"","code":"data(amsr)"},{"path":"https://dankelley.github.io/oce/reference/amsr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample amsr Data (Near Nova Scotia) — amsr","text":"following code used create dataset.","code":"library(oce) amsr <- read.amsr(download.amsr(2023, 7, 27, destdir=\"~/data/amsr\")) amsr <- subset(amsr, -71 < longitude & longitude < -60, debug=2) amsr <- subset(amsr,  36 < latitude  &  latitude <  45, debug=2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/amsr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample amsr Data (Near Nova Scotia) — amsr","text":"","code":"library(oce) data(coastlineWorld) data(amsr) plot(amsr, \"SST\") lines(coastlineWorld[[\"longitude\"]], coastlineWorld[[\"latitude\"]])"},{"path":"https://dankelley.github.io/oce/reference/angle2hms.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Astronomical Angle in Degrees to Hours, Minutes and Seconds — angle2hms","title":"Convert Astronomical Angle in Degrees to Hours, Minutes and Seconds — angle2hms","text":"purpose angle2hms facilitate comparison rightAscension angles computed sunAngle() moonAngle() angles reported astronomical sources software, often employ hour-minute-second notation. notation, decimal hour computed 24/360 times angle degrees, decimal hour compute integer hour minute values, plus decimal second value. common astronomical literature use strings represent results, e.g. \\(11^h40^m48^s.10\\) value used “Examples”; see Chapter 1 Meeus (1991) angle calculation representation.","code":""},{"path":"https://dankelley.github.io/oce/reference/angle2hms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Astronomical Angle in Degrees to Hours, Minutes and Seconds — angle2hms","text":"","code":"angle2hms(angle)"},{"path":"https://dankelley.github.io/oce/reference/angle2hms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Astronomical Angle in Degrees to Hours, Minutes and Seconds — angle2hms","text":"angle numerical value giving angle degrees","code":""},{"path":"https://dankelley.github.io/oce/reference/angle2hms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Astronomical Angle in Degrees to Hours, Minutes and Seconds — angle2hms","text":"angle2hms returns list containing values time (numerical value decimal hour, 0 24), hour, minute, second (last may fractional part), string, character value indicates time hour-minute-second notation, second part two decimal places intervening h, m s characters units.","code":""},{"path":"https://dankelley.github.io/oce/reference/angle2hms.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert Astronomical Angle in Degrees to Hours, Minutes and Seconds — angle2hms","text":"Meeus, Jean. Astronomical Algorithms. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1991.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/angle2hms.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Astronomical Angle in Degrees to Hours, Minutes and Seconds — angle2hms","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/angle2hms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Astronomical Angle in Degrees to Hours, Minutes and Seconds — angle2hms","text":"","code":"# A randomly-chosen example on page 99 of Meeus (1991). angle2hms(177.74208) # string component 11h50m58s.10 #> $hourDecimal #> [1] 11.84947 #>  #> $hour #> [1] 11 #>  #> $minute #> [1] 50 #>  #> $second #> [1] 58.0992 #>  #> $string #> [1] \"11h50m58s.10\" #>"},{"path":"https://dankelley.github.io/oce/reference/angleRemap.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Angle From 0:360 to -180:180 Convention — angleRemap","title":"Convert Angle From 0:360 to -180:180 Convention — angleRemap","text":"mostly used instrument heading angles, cases instrument aligned nearly northward, small variations heading (e.g. due mooring motion) can yield values swing small angles large angles, modulo-360 cut point. method use cosine sine angle order find \"x\" \"y\" values unit circle, use atan2() infer angles.","code":""},{"path":"https://dankelley.github.io/oce/reference/angleRemap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Angle From 0:360 to -180:180 Convention — angleRemap","text":"","code":"angleRemap(theta)"},{"path":"https://dankelley.github.io/oce/reference/angleRemap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Angle From 0:360 to -180:180 Convention — angleRemap","text":"theta angle (degrees) range 0 360 degrees","code":""},{"path":"https://dankelley.github.io/oce/reference/angleRemap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Angle From 0:360 to -180:180 Convention — angleRemap","text":"vector angles, range -180 180.","code":""},{"path":"https://dankelley.github.io/oce/reference/angleRemap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Angle From 0:360 to -180:180 Convention — angleRemap","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/angleRemap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Angle From 0:360 to -180:180 Convention — angleRemap","text":"","code":"library(oce) # fake some heading data that lie near due-north (0 degrees) n <- 20 heading <- 360 + rnorm(n, sd = 10) heading <- ifelse(heading > 360, heading - 360, heading) x <- 1:n plot(x, heading, ylim = c(-10, 360), type = \"l\", col = \"lightgray\", lwd = 10) lines(x, angleRemap(heading))"},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Alter an adp Object to Account for Magnetic Declination — applyMagneticDeclination,adp-method","title":"Alter an adp Object to Account for Magnetic Declination — applyMagneticDeclination,adp-method","text":"Acoustic-Doppler profiling instruments infer direction using magnetic compasses determine current direction need correction applied magnetic declination, goal infer currents x y oriented eastward northward, respectively.  present function (see “Details”).","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alter an adp Object to Account for Magnetic Declination — applyMagneticDeclination,adp-method","text":"","code":"# S4 method for class 'adp' applyMagneticDeclination(   object = \"oce\",   declination = 0,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alter an adp Object to Account for Magnetic Declination — applyMagneticDeclination,adp-method","text":"object adp object. declination numeric value holding magnetic declination degrees, positive clockwise north. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adp-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alter an adp Object to Account for Magnetic Declination — applyMagneticDeclination,adp-method","text":"adp object, modified outlined  “Description”.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alter an adp Object to Account for Magnetic Declination — applyMagneticDeclination,adp-method","text":"returned value copy object modified 4 ways. (1) horizontal components velocity rotated clockwise declination degrees.  (2) object holds heading values, declination added . (3) north item metadata slot set \"geographic\", warning issued also value object.  (4) declination item metadata slot set value supplied function.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adp-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Alter an adp Object to Account for Magnetic Declination — applyMagneticDeclination,adp-method","text":"Dan Kelley, aided Clark Richards Jaimie Harbin.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adp-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alter an adp Object to Account for Magnetic Declination — applyMagneticDeclination,adp-method","text":"","code":"# Transform beam coordinate to xyx, then to enu with respect to # magnetic north, and then to geographic north. library(oce) file <- system.file(\"extdata\", \"adp_rdi.000\", package = \"oce\") lon <- -69.73433 lat <- 47.88126 beam <- read.oce(file, from = 1, to = 4, longitude = lon, latitude = lat) dec <- magneticField(lon, lat, beam[[\"time\"]][1])$declination xyz <- beamToXyzAdp(beam) # Here, we tell xyzToEnuAdp() not to set a declination, # so enuMag has metadata$north equal to \"magnetic\".  We could # also skip the use of applyMagneticDeclination() by supplying # the known declination to xyzToEnuAdp(). enuMag <- xyzToEnuAdp(xyz, declination = NULL) enuGeo <- applyMagneticDeclination(enuMag, declination = dec)"},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adv-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Alter an adv Object to Account for Magnetic Declination — applyMagneticDeclination,adv-method","title":"Alter an adv Object to Account for Magnetic Declination — applyMagneticDeclination,adv-method","text":"Acoustic-Doppler velocimetry instruments infer direction using magnetic compasses need correction applied magnetic declination, goal infer currents x y oriented eastward northward, respectively.  present function (see “Details”).","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adv-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alter an adv Object to Account for Magnetic Declination — applyMagneticDeclination,adv-method","text":"","code":"# S4 method for class 'adv' applyMagneticDeclination(   object = \"oce\",   declination = 0,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adv-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alter an adv Object to Account for Magnetic Declination — applyMagneticDeclination,adv-method","text":"object adv object. declination numeric value holding magnetic declination degrees, positive clockwise north. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adv-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alter an adv Object to Account for Magnetic Declination — applyMagneticDeclination,adv-method","text":"adv object, adjusted outlined “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adv-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alter an adv Object to Account for Magnetic Declination — applyMagneticDeclination,adv-method","text":"returned value copy object modified 4 ways. (1) horizontal components velocity rotated clockwise declination degrees.  (2) object holds heading values, declination added . (3) north item metadata slot set \"geographic\", warning issued also value object.  (4) declination item metadata slot set value supplied function.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-adv-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Alter an adv Object to Account for Magnetic Declination — applyMagneticDeclination,adv-method","text":"Dan Kelley, aided Clark Richards Jaimie Harbin.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-cm-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Alter a cm Object to Account for Magnetic Declination — applyMagneticDeclination,cm-method","title":"Alter a cm Object to Account for Magnetic Declination — applyMagneticDeclination,cm-method","text":"Current-meter (cm) instruments determine directions onboard compasses, interpreting velocity components geographical coordinates requires magnetic declination taken account.  present function (see “Details”).","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-cm-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alter a cm Object to Account for Magnetic Declination — applyMagneticDeclination,cm-method","text":"","code":"# S4 method for class 'cm' applyMagneticDeclination(   object = \"oce\",   declination = 0,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-cm-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alter a cm Object to Account for Magnetic Declination — applyMagneticDeclination,cm-method","text":"object cm object. declination numeric value holding magnetic declination degrees, positive clockwise north. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-cm-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alter a cm Object to Account for Magnetic Declination — applyMagneticDeclination,cm-method","text":"cm object, adjusted outlined “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-cm-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alter a cm Object to Account for Magnetic Declination — applyMagneticDeclination,cm-method","text":"returned value copy object modified 4 ways. (1) horizontal components velocity rotated clockwise declination degrees.  (2) object holds heading values, declination added . (3) north item metadata slot set \"geographic\", warning issued also value object.  (4) declination item metadata slot set value supplied function.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-cm-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Alter a cm Object to Account for Magnetic Declination — applyMagneticDeclination,cm-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Alter an Object to Account for Magnetic Declination — applyMagneticDeclination,oce-method","title":"Alter an Object to Account for Magnetic Declination — applyMagneticDeclination,oce-method","text":"Current-measuring instruments infer flow direction using magnetic compasses require correction magnetic declination, order infer currents x y oriented eastward northward, respectively. applyMagneticDeclination() generic function handles task altering velocity components (heading values, exist).  works objects cm, adp adv cm classes calling applyMagneticDeclination,adp-method(), applyMagneticDeclination,adv-method(), applyMagneticDeclination,cm-method(), respectively.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alter an Object to Account for Magnetic Declination — applyMagneticDeclination,oce-method","text":"","code":"# S4 method for class 'oce' applyMagneticDeclination(   object = \"oce\",   declination = 0,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alter an Object to Account for Magnetic Declination — applyMagneticDeclination,oce-method","text":"object object cm, adp, adv class. declination numeric value holding magnetic declination degrees, positive clockwise north. debug debugging flag, set positive value get debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-oce-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alter an Object to Account for Magnetic Declination — applyMagneticDeclination,oce-method","text":"object class object, modified outlined “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-oce-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alter an Object to Account for Magnetic Declination — applyMagneticDeclination,oce-method","text":"returned value copy object modified 4 ways. (1) horizontal components velocity rotated clockwise declination degrees.  (2) object holds heading values, declination added . (3) north item metadata slot set \"geographic\", warning issued also value object.  (4) declination item metadata slot set value supplied function.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination-oce-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Alter an Object to Account for Magnetic Declination — applyMagneticDeclination,oce-method","text":"Dan Kelley, aided, adp adv variants, Clark Richards Jaimie Harbin.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination.html","id":null,"dir":"Reference","previous_headings":"","what":"Alter an Object to Account for Magnetic Declination (Generic) — applyMagneticDeclination","title":"Alter an Object to Account for Magnetic Declination (Generic) — applyMagneticDeclination","text":"Current-measuring instruments infer flow direction using magnetic compasses require correction magnetic declination, order infer currents x y oriented eastward northward, respectively. applyMagneticDeclination() generic function handles task altering velocity components (heading values, exist).  works objects cm, adp adv cm classes calling applyMagneticDeclination,adp-method(), applyMagneticDeclination,adv-method(), applyMagneticDeclination,cm-method(), respectively.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alter an Object to Account for Magnetic Declination (Generic) — applyMagneticDeclination","text":"","code":"applyMagneticDeclination(object = \"oce\", declination = \"ANY\", debug = \"ANY\")"},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alter an Object to Account for Magnetic Declination (Generic) — applyMagneticDeclination","text":"object object cm, adp, adv class. declination numeric value holding magnetic declination degrees, positive clockwise north. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alter an Object to Account for Magnetic Declination (Generic) — applyMagneticDeclination","text":"object class object, modified described “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alter an Object to Account for Magnetic Declination (Generic) — applyMagneticDeclination","text":"returned value copy object modified 4 ways. (1) horizontal components velocity rotated clockwise declination degrees.  (2) object holds heading values, declination added . (3) north item metadata slot set \"geographic\", warning issued also value object.  (4) declination item metadata slot set value supplied function.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/applyMagneticDeclination.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Alter an Object to Account for Magnetic Declination (Generic) — applyMagneticDeclination","text":"Dan Kelley, aided, adp adv variants, Clark Richards Jaimie Harbin.","code":""},{"path":"https://dankelley.github.io/oce/reference/approx3d.html","id":null,"dir":"Reference","previous_headings":"","what":"Trilinear Interpolation in a 3D Array — approx3d","title":"Trilinear Interpolation in a 3D Array — approx3d","text":"Interpolate within 3D array, using trilinear approximation.","code":""},{"path":"https://dankelley.github.io/oce/reference/approx3d.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trilinear Interpolation in a 3D Array — approx3d","text":"","code":"approx3d(x, y, z, f, xout, yout, zout)"},{"path":"https://dankelley.github.io/oce/reference/approx3d.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trilinear Interpolation in a 3D Array — approx3d","text":"x vector x values grid (must equi-spaced) y vector y values grid (must equi-spaced) z vector z values grid (must equi-spaced) f matrix rank 3, gridded values mapping x values (first index f), etc. xout vector x values output. yout vector y values output (length must match xout). zout vector z values output (length must match xout).","code":""},{"path":"https://dankelley.github.io/oce/reference/approx3d.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trilinear Interpolation in a 3D Array — approx3d","text":"vector interpolated values (NA values), length matching xout.","code":""},{"path":"https://dankelley.github.io/oce/reference/approx3d.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Trilinear Interpolation in a 3D Array — approx3d","text":"Trilinear interpolation used interpolate within f array, (xout, yout zout) triplets inside region specified x, y z.  Triplets lie outside range x, y z result NA values.","code":""},{"path":"https://dankelley.github.io/oce/reference/approx3d.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trilinear Interpolation in a 3D Array — approx3d","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/approx3d.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Trilinear Interpolation in a 3D Array — approx3d","text":"","code":"# set up a grid library(oce) n <- 5 x <- seq(0, 1, length.out = n) y <- seq(0, 1, length.out = n) z <- seq(0, 1, length.out = n) f <- array(1:n^3, dim = c(length(x), length(y), length(z))) # interpolate along a diagonal line m <- 100 xout <- seq(0, 1, length.out = m) yout <- seq(0, 1, length.out = m) zout <- seq(0, 1, length.out = m) approx <- approx3d(x, y, z, f, xout, yout, zout) # graph the results plot(xout, approx, type = \"l\") points(xout[1], f[1, 1, 1]) points(xout[m], f[n, n, n])"},{"path":"https://dankelley.github.io/oce/reference/argShow.html","id":null,"dir":"Reference","previous_headings":"","what":"Show a Function Argument — argShow","title":"Show a Function Argument — argShow","text":"Show Function Argument","code":""},{"path":"https://dankelley.github.io/oce/reference/argShow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show a Function Argument — argShow","text":"","code":"argShow(x, nshow = 4, last = FALSE, sep = \"=\")"},{"path":"https://dankelley.github.io/oce/reference/argShow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show a Function Argument — argShow","text":"x argument nshow number values show first (length(x)> 1) last indicates whether final argument function sep separator name value","code":""},{"path":"https://dankelley.github.io/oce/reference/argo-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Argo Profiler Data — argo-class","title":"Class to Store Argo Profiler Data — argo-class","text":"class stores data Argo floats.","code":""},{"path":"https://dankelley.github.io/oce/reference/argo-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Class to Store Argo Profiler Data — argo-class","text":"argo object may read read.argo() created .argo().  Argo data can gridded constant pressures argoGrid() subsetted subset,argo-method().  Plots can made plot,argo-method(), summary,argo-method() produces statistical summaries show produces overviews.","code":""},{"path":"https://dankelley.github.io/oce/reference/argo-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Argo Profiler Data — argo-class","text":"data oce objects, data slot argo objects list containing main data object. key items stored slot include  equal-length vectors time, longitude, latitude equal-dimension matrices pressure, salinity, temperature. metadata oce objects, metadata slot argo objects list containing information data object . Examples common interest include id, vector ID codes profiles, dataMode, vector strings indicating whether profile archived mode (\"\"), realtime mode (\"R\"), delayed mode (\"D\"). processingLog oce objects, processingLog slot argo objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/argo-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Argo Profiler Data — argo-class","text":"Although [[<- operator may permit modification contents argo objects (see [[<-,argo-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/argo-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Argo Profiler Data — argo-class","text":"full contents data metadata slots argo object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,argo-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,argo-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/argo-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Argo Profiler Data — argo-class","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/argo.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample argo Data — argo","title":"Sample argo Data — argo","text":"holds data ARGO 6900388 North Atlantic.","code":""},{"path":"https://dankelley.github.io/oce/reference/argo.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample argo Data — argo","text":"NetCDF file used read.argo() create argo object downloaded using FTP ftp.ifremer.fr/ifremer/argo/dac/bodc/6900388/6900388_prof.nc 2020 June 24.","code":""},{"path":"https://dankelley.github.io/oce/reference/argo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample argo Data — argo","text":"official citation (note DOI web links downloads): Argo (2017). Argo float data metadata Global Data Assembly Centre (Argo GDAC) - Snapshot Argo GDAC July, 8st 2017. SEANOE. DOI:10.17882/42182#50865","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/argo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample argo Data — argo","text":"","code":"library(oce) data(argo) summary(argo) #> Argo Summary #> ------------ #>  #> * Source:              \"/Users/kelley/git/oce/create_data/argo/6900388_prof.nc\" #> * ID:                  \"6900388\" #> * Feature type:        \"trajectoryProfile\" #> * Profiles:            210 delayed; 0 adjusted; 13 realtime #> * Time: 2005-10-29 13:57:42 to 2011-11-27 17:58:39 (223 samples, mean increment 10.00075 day) #> * Data Overview #>  #>                                           Min.                Mean                Max.                Dim.     NAs OriginalName          #>     time                                  2005-10-29 13:57:42 2008-11-12 16:18:05 2011-11-27 17:58:40 223      0   \"-\"                   #>     latitude [°N]                         48.743              56.715              64.335              223      0   \"LATITUDE\"            #>     longitude [°E]                        -60.52              -37.077             -21.385             223      0   \"LONGITUDE\"           #>     pressure [dbar]                       3.5                 521.31              6534.6              \"56x223\" 106 \"PRES\"                #>     pressureAdjusted [dbar]               3.6                 520.34              1778.9              \"56x223\" 874 \"PRES_ADJUSTED\"       #>     pressureAdjustedError [dbar]          2.4                 2.4                 2.4                 \"56x223\" 874 \"PRES_ADJUSTED_ERROR\" #>     salinity [PSS-78]                     0                   34.911              47.899              \"56x223\" 106 \"PSAL\"                #>     salinityAdjusted [PSS-78]             32.85               34.935              35.842              \"56x223\" 840 \"PSAL_ADJUSTED\"       #>     salinityAdjustedError [PSS-78]        0.01                0.01                0.01                \"56x223\" 840 \"PSAL_ADJUSTED_ERROR\" #>     temperature [°C, ITS-90]              -1.564              6.1216              55.997              \"56x223\" 106 \"TEMP\"                #>     temperatureAdjusted [°C, ITS-90]      -1.564              6.0916              14.914              \"56x223\" 837 \"TEMP_ADJUSTED\"       #>     temperatureAdjustedError [°C, ITS-90] 0.002               0.002               0.002               \"56x223\" 837 \"TEMP_ADJUSTED_ERROR\" #>  #> * Data-quality Flag Scheme #>  #>     name    \"argo\" #>     mapping list(not_assessed=0, passed_all_tests=1, probably_good=2, probably_bad=3, bad=4, changed=5, not_used_6=6, not_used_7=7, estimated=8, missing=9) #>     default c(0, 3, 4, 9) #>  #> * Data-quality Flags #>  #>     pressure:            \"1\" 12327, \"4\" 55 #>     pressureAdjusted:    \"2\" 11614 #>     salinity:            \"1\" 12348, \"4\" 34 #>     salinityAdjusted:    \"2\" 11648 #>     temperature:         \"1\" 12362, \"4\" 20 #>     temperatureAdjusted: \"2\" 11651 #>  #> * Processing Log #>  #>     - 2022-04-11 15:55:43 UTC: `create 'argo' object` #>     - 2022-04-11 15:55:43 UTC: `initializeFlagScheme(object, name=\"argo\", mapping=list(not_assessed=0,passed_all_tests=1,probably_good=2,probably_bad=3,bad=4,changed=5,not_used_6=6,not_used_7=7,estimated=8,missing=9)), default=c(0,3,4,9))` #>     - 2022-04-11 15:55:44 UTC: `read.argo(file=\"/Users/kelley/git/oce/create_data/argo/6900388_prof.nc\")` data(coastlineWorld) plot(argo, which = \"trajectory\")"},{"path":"https://dankelley.github.io/oce/reference/argoGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Grid Argo Float Data — argoGrid","title":"Grid Argo Float Data — argoGrid","text":"Grid Argo float, interpolating fixed pressure levels. gridding done approx().  sufficient user demand, methods may added, analogy sectionGrid().","code":""},{"path":"https://dankelley.github.io/oce/reference/argoGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Grid Argo Float Data — argoGrid","text":"","code":"argoGrid(argo, p, debug = getOption(\"oceDebug\"), ...)"},{"path":"https://dankelley.github.io/oce/reference/argoGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Grid Argo Float Data — argoGrid","text":"argo argo object gridded. p Optional indication pressure levels interpolation done.  supplied, pressure levels calculated based existing values, using medians. p=\"levitus\", pressures set Levitus atlas, given standardDepths(), trimmed maximum pressure argo. p single numerical value, taken number subdivisions use call seq() range 0 maximum pressure argo.  Finally, vector numerical values provided, used . debug flag turns debugging.  Higher values provide deeper debugging. ... Optional arguments approx(), used gridding.","code":""},{"path":"https://dankelley.github.io/oce/reference/argoGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Grid Argo Float Data — argoGrid","text":"x argo object.","code":""},{"path":"https://dankelley.github.io/oce/reference/argoGrid.html","id":"a-note-about-flags","dir":"Reference","previous_headings":"","what":"A note about flags","title":"Grid Argo Float Data — argoGrid","text":"Data-quality flags contained within original object ignored function, returned value contains flags.  flags represent assessment original data, quantities derived data.  function produces warning effect. recommended practice use handleFlags() means deal flags calling present function.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/argoGrid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Grid Argo Float Data — argoGrid","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/argoGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Grid Argo Float Data — argoGrid","text":"","code":"library(oce) data(argo) g <- argoGrid(argo, p = seq(0, 100, 1)) par(mfrow = c(2, 1)) t <- g[[\"time\"]] z <- -g[[\"pressure\"]][, 1] # Set zlim because of spurious temperatures. imagep(t, z, t(g[[\"temperature\"]]), ylim = c(-100, 0), zlim = c(0, 20)) imagep(t, z, t(g[[\"salinity\"]]), ylim = c(-100, 0))"},{"path":"https://dankelley.github.io/oce/reference/argoJuldToTime.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Argo Julian Day to R Time — argoJuldToTime","title":"Convert Argo Julian Day to R Time — argoJuldToTime","text":"Convert Argo Julian Day R Time","code":""},{"path":"https://dankelley.github.io/oce/reference/argoJuldToTime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Argo Julian Day to R Time — argoJuldToTime","text":"","code":"argoJuldToTime(jday)"},{"path":"https://dankelley.github.io/oce/reference/argoJuldToTime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Argo Julian Day to R Time — argoJuldToTime","text":"jday numerical value indicating julian day Argo convention, day=0 1950-01-01.","code":""},{"path":"https://dankelley.github.io/oce/reference/argoJuldToTime.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Argo Julian Day to R Time — argoJuldToTime","text":"Jaimie Harbin Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/argoJuldToTime.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Argo Julian Day to R Time — argoJuldToTime","text":"","code":"argoJuldToTime(25749) #> [1] \"2020-07-01 UTC\""},{"path":"https://dankelley.github.io/oce/reference/argoNames2oceNames.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Argo Data Name to Oce Name — argoNames2oceNames","title":"Convert Argo Data Name to Oce Name — argoNames2oceNames","text":"function used internally read.argo() convert Argo-convention data names oce-convention names. Users call directly, since return value may changed moment (e.g. include units well names).","code":""},{"path":"https://dankelley.github.io/oce/reference/argoNames2oceNames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Argo Data Name to Oce Name — argoNames2oceNames","text":"","code":"argoNames2oceNames(names, ignore.case = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/argoNames2oceNames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Argo Data Name to Oce Name — argoNames2oceNames","text":"names vector character strings containing names Argo convention. ignore.case logical value passed gsub(), indicating whether ignore case input strings. default set TRUE data files use lower-case names, despite fact Argo documentation specifies upper-case.","code":""},{"path":"https://dankelley.github.io/oce/reference/argoNames2oceNames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Argo Data Name to Oce Name — argoNames2oceNames","text":"character vector length names, replacements made known quantities.","code":""},{"path":"https://dankelley.github.io/oce/reference/argoNames2oceNames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert Argo Data Name to Oce Name — argoNames2oceNames","text":"Initially, Feb 2016, inference names initially done inspection data files, based reference 1. Later, June 2023, broader inspection files documents yielded ten additions, single correction: VRSpH renamed phSensorVoltageDifference, match related names added. noted data files examined contain names documented reference 1, others listed changelog, actual definitions given. example, files six distinct variable names seem relate phase oxygen sensor, translated present function variable names defined reference 1, defined uniquely reference 2. names converted gsub(), using ignore.case argument present function. procedure first handle items listed following table, string searches anchored start string. , qualifiers _ADJUSTED, _ERROR _QC, translated Adjusted, Error, QC, respectively. incomplete list name translations follows, ~ represents digit sequences instances letters others.  Note June 2023, pHSensorVoltageDifference called VRSpH.","code":""},{"path":"https://dankelley.github.io/oce/reference/argoNames2oceNames.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert Argo Data Name to Oce Name — argoNames2oceNames","text":"Argo User's Manual Version 3.3, Nov 89th, 2019, available https://archimer.ifremer.fr/doc/00187/29825/ online. Argo list parameters excel spreadsheet, available http://www.argodatamgt.org/content/download/27444/187206/file/argo-parameters-list-core--b.xlsx","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/argoNames2oceNames.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Argo Data Name to Oce Name — argoNames2oceNames","text":"Dan Kelley, help Anna Victor","code":""},{"path":"https://dankelley.github.io/oce/reference/as.adp.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an adp Object — as.adp","title":"Create an adp Object — as.adp","text":"Create adp Object","code":""},{"path":"https://dankelley.github.io/oce/reference/as.adp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an adp Object — as.adp","text":"","code":"as.adp(   time,   distance,   v,   a = NULL,   q = NULL,   orientation = \"upward\",   coordinate = \"enu\" )"},{"path":"https://dankelley.github.io/oce/reference/as.adp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an adp Object — as.adp","text":"time observations POSIXct format distance centre bins v array velocities, first index time, second bin number, third beam number amplitude, raw() array dimensions matching u q quality, raw() array dimensions matching u orientation string indicating sensor orientation, e.g. \"upward\" \"downward\" coordinate string indicating coordinate system, \"enu\", \"beam\", \"xy\", \"\"","code":""},{"path":"https://dankelley.github.io/oce/reference/as.adp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an adp Object — as.adp","text":"adp object.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.adp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create an adp Object — as.adp","text":"Construct adp object.  basic subset typical data slot represented arguments function, assumption typical usage reading data set nearly-blank adp object, data slot inserted.  However, testing situations can useful set artificial adp objects, arguments may useful.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.adp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create an adp Object — as.adp","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.adp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an adp Object — as.adp","text":"","code":"data(adp) t <- adp[[\"time\"]] d <- adp[[\"distance\"]] v <- adp[[\"v\"]] a <- as.adp(time = t, distance = d, v = v) # \\donttest{ plot(a)  # }"},{"path":"https://dankelley.github.io/oce/reference/as.argo.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into an argo Object — as.argo","title":"Coerce Data Into an argo Object — as.argo","text":"Coerce dataset argo dataset. right way read official argo datasets, provided NetCDF format may read read.argo().","code":""},{"path":"https://dankelley.github.io/oce/reference/as.argo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into an argo Object — as.argo","text":"","code":"as.argo(   time,   longitude,   latitude,   salinity,   temperature,   pressure,   units = NULL,   id,   filename = \"\",   missingValue )"},{"path":"https://dankelley.github.io/oce/reference/as.argo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into an argo Object — as.argo","text":"time vector POSIXct times. longitude vector longitudes. latitude vector latitudes. salinity vector salinities. temperature vector temperatures. pressure vector pressures. units optional list containing units. NULL, default, \"degree east\" used longitude, \"degree north\" latitude, \"\" salinity, \"-90\" temperature, \"dbar\" pressure. id identifier argo float, typically number, stored within object character form. (example, dataset retrieved data(argo) id \"6900388\".) filename source filename, defaults empty string. missingValue optional missing value, indicating data values taken NA.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.argo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into an argo Object — as.argo","text":"argo object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.argo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into an argo Object — as.argo","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.cm.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into a cm Object — as.cm","title":"Coerce Data Into a cm Object — as.cm","text":"Coerce Data cm Object","code":""},{"path":"https://dankelley.github.io/oce/reference/as.cm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into a cm Object — as.cm","text":"","code":"as.cm(   time,   u = NULL,   v = NULL,   pressure = NULL,   conductivity = NULL,   temperature = NULL,   salinity = NULL,   longitude = NA,   latitude = NA,   filename = \"\",   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/as.cm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into a cm Object — as.cm","text":"time vector times observation, oce object time two velocity components can inferred, e.g. adv object, adp object one distance bin.  time oce object, following arguments ignored. u, v optional numerical vectors containing x y components velocity (m/s). pressure, conductivity, salinity, temperature optional numerical vectors containing pressure (dbar), electrical conductivity, practical salinity, -situ temperature (degree C). longitude, latitude optional position specified degrees East North. filename optional source file name. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.cm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coerce Data Into a cm Object — as.cm","text":"","code":"library(oce) # Example 1: creation from scratch t <- Sys.time() + 0:50 u <- sin(2 * pi * 0:50 / 5) + rnorm(51) v <- cos(2 * pi * 0:50 / 5) + rnorm(51) p <- 100 + rnorm(51) summary(as.cm(t, u, v, p)) #> Cm summary #> ---------- #>  #> * North:         magnetic #> * Time: 2024-09-24 07:26:23 to 2024-09-24 07:27:13 (51 samples, mean increment 1 s) #> * Data Overview #>  #>                     Min.                Mean                Max.                Dim. NAs #>     time            2024-09-24 10:26:23 2024-09-24 10:26:48 2024-09-24 10:27:13 51   0   #>     u [m/s]         -2.8628             0.0070087           3.2703              51   0   #>     v [m/s]         -2.5653             0.23561             2.4359              51   0   #>     pressure [dbar] 98.1                100.02              101.88              51   0   #>  #> * Processing Log #>  #>     - 2024-09-24 10:26:23 UTC: `create 'cm' object` #>     - 2024-09-24 10:26:23 UTC: `as.cm(time = t, u = u, v = v, pressure = p)`  # Example 2: creation from an adv object data(adv) summary(as.cm(adv)) #> Cm summary #> ---------- #>  #> * File source:   \"(file name redacted)\" #> * Serial Num.:   (serial number redacted) #> * North:         magnetic #> * Time: 2008-07-01 00:00:00 to 2008-07-01 00:00:59 (480 samples, mean increment 0.1250001 s) #> * Data Overview #>  #>                     Min.                Mean                Max.                Dim. NAs #>     time            2008-07-01 00:00:00 2008-07-01 00:00:30 2008-07-01 00:00:59 480  0   #>     u [m/s]         -0.080871           -0.027275           0.012168            480  0   #>     v [m/s]         -0.0090777          0.021877            0.057789            480  0   #>     pressure [dbar] 16.85               16.866              16.879              480  0   #>  #> * Processing Log #>  #>     - 2015-12-23 17:53:39 UTC: `read.oce(file = \"/data/archive/sleiwex/2008/moorings/m05/adv/nortek_1943/raw/adv_nortek_1943.vec\",     from = as.POSIXct(\"2008-06-25 00:00:00\", tz = \"UTC\"), to = as.POSIXct(\"2008-07-06 00:00:00\",         tz = \"UTC\"), latitude = 47.87943, longitude = -69.72533)` #>     - 2015-12-23 17:53:54 UTC: `retime(x = m05VectorBeam, a = 0.58, b = 6.3892e-07, t0 = as.POSIXct(\"2008-07-01 00:00:00\",     tz = \"UTC\"))` #>     - 2015-12-23 17:53:55 UTC: `subset(x, subset=as.POSIXct(\"2008-06-25 13:00:00\", tz = \"UTC\") <= time & time <=      as.POSIXct(\"2008-07-03 00:50:00\", tz = \"UTC\"))` #>     - 2015-12-23 17:53:55 UTC: `oceEdit(x = m05VectorBeam, item = \"transformationMatrix\", value = rbind(c(11033,     -5803, -5238), c(347, -9622, 9338), c(-1418, -1476, -1333))/4096,     reason = \"Nortek email 2011-02-14\", person = \"DEK\")` #>     - 2015-12-23 17:53:55 UTC: `use aquadoppHR heading; despike own pitch and roll` #>     - 2015-12-23 17:54:11 UTC: `beamToXyzAdv(x = x)` #>     - 2015-12-23 17:54:34 UTC: `xyzToEnu(x, declination=-18.099, horizontalCase=TRUE, sensorOrientiation=upward, debug=0)` #>     - 2024-09-24 10:26:23 UTC: `as.cm(time = adv)`"},{"path":"https://dankelley.github.io/oce/reference/as.coastline.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into a coastline Object — as.coastline","title":"Coerce Data Into a coastline Object — as.coastline","text":"Coerces sequence longitudes latitudes coastline dataset. may used read.coastline() read file, data manipulated.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.coastline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into a coastline Object — as.coastline","text":"","code":"as.coastline(longitude, latitude, fillable = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/as.coastline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into a coastline Object — as.coastline","text":"longitude longitude decimal degrees, positive east Greenwich, data frame columns named latitude longitude, case values extracted data frame second argument ignored. latitude latitude decimal degrees, positive north Equator. fillable boolean indicating whether coastline can drawn filled polygon.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.coastline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into a coastline Object — as.coastline","text":"coastline object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.coastline.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into a coastline Object — as.coastline","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.ctd.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into a ctd Object — as.ctd","title":"Coerce Data Into a ctd Object — as.ctd","text":"Assemble data ctd object.  function complicated (spanning approximately 600 lines code) tries handle many special cases, tries make sensible defaults unspecified parameters.  odd results found, users might find helpful call function first parameter simple vector Practical Salinity values, case processing arguments relatively straightforward.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.ctd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into a ctd Object — as.ctd","text":"","code":"as.ctd(   salinity,   temperature = NULL,   pressure = NULL,   conductivity = NULL,   scan = NULL,   time = NULL,   units = NULL,   flags = NULL,   missingValue = NULL,   type = \"\",   serialNumber = NULL,   ship = NULL,   cruise = NULL,   station = NULL,   startTime = NULL,   longitude = NULL,   latitude = NULL,   deploymentType = \"unknown\",   pressureAtmospheric = 0,   sampleInterval = NULL,   profile = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/as.ctd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into a ctd Object — as.ctd","text":"salinity may (1) numeric vector holding Practical Salinity, (2) list data frame holding salinity hydrographic variables (3) oce-class object holds hydrographic information. salinity provided, conductivity must provided, swSCTp() can used compute salinity. temperature numeric vector containing -situ temperature \\(^\\circ\\)C -90 scale; see “Temperature units” documentation swRho(). pressure numeric vector containing sea pressure values, decibars. Typically, vector length salinity temperature, also possible supply just one value, repeated get right length. Note .ctd() stores sum pressure pressureAtmospheric returned object, although default value pressureAtmospheric zero, default case, pressure stored directly. conductivity optional numeric vector containing electrical conductivity ratio water column. convert raw conductivity milliSeimens per centimeter divide 42.914 get conductivity ratio (see Culkin Smith, 1980). scan optional numeric vector holding scan number.  provided, set seq_along(salinity). time optional vector times observation. units optional list containing units.  supplied, defaults set pressure, temperature, salinity, conductivity. Since simply guesses, users advised strongly supply units. See “Examples”. flags supplied, list containing data-quality flags. elements list must names match data provided object. missingValue optional missing value, indicating data taken NA. Set NULL turn feature. type optional type CTD, e.g. \"SBE\" serialNumber optional serial number instrument ship optional string containing ship observations made. cruise optional string containing cruise identifier. station optional string containing station identifier. startTime optional indication start time profile, used several plotting functions.  best given POSIXt time, may also character string can converted time .POSIXct(), using UTC timezone. longitude optional numerical value containing longitude decimal degrees, positive eastern hemisphere. single number, stored metadata slot returned value; vector numbers, stored data slot. longitude' provided (.e. NULL, default), .ctd()' tries find first parameter, list, oce object. latitude similar longitude.  Positive northern hemisphere. deploymentType character string indicating type deployment. Use \"unknown\" known, \"profile\" profile (data acquired downcast, device lowered water column, perhaps also including upcast; \"moored\" device installed fixed mooring, \"thermosalinograph\" (\"tsg\") device mounted moving vessel, record near-surface properties, \"towyo\" device repeatedly lowered raised. pressureAtmospheric numerical value (constant vector), subtracted pressure storing return value. (altered pressure also used calculating salinity, computed conductivity, etc., using swSCTp(); see salinity .) sampleInterval optional numerical value indicating time samples profile. profile optional positive integer specifying number profile extract object data matrices, argo objects. Currently profile argument utilized argo objects. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.ctd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into a ctd Object — as.ctd","text":"ctd object.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.ctd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Coerce Data Into a ctd Object — as.ctd","text":"following sections provide notes .ctd() handles certain object types given first parameter. Converting argo objects salinity argument object argo, object dismantled reassembled ctd object ways mostly straightforward, although handling time depends information original NetCDF data file used read.argo() create argo object. Argo data files contain item called juld profile time can computed, also contain additional item named MTIME, times individual measurements can also computed.  cases handled .ctd(), using scheme outlined Note 4 Details section read.argo() documentation. Converting rsk objects salinity argument object rsk, .ctd passes , pressureAtmospheric, longitude, latitude rsk2ctd(), builds ctd object returned .ctd. arguments .ctd ignored instance, rsk objects already contain information. required, data metadata element can added value returned .ctd using oceSetData() oceSetMetadata(), respectively. returned rsk object contains pressure form may need adjusted, rsk objects may contain either absolute pressure sea pressure. adjustment handled automatically .ctd, examination metadata item named pressureType (described documentation read.rsk()).  sea pressure determined, adjustments may made pressureAtmospheric argument, although case better considered pressure adjustment atmospheric pressure. rsk objects may store sea pressure absolute pressure (sum sea pressure atmospheric pressure), depending object created .rsk() read.rsk().  However, ctd objects store sea pressure, needed plotting, calculating density, etc. poses difficulties, however, .ctd automatically converts absolute pressure sea pressure, metadata rsk object indicates appropriate. alteration pressure can accomplished pressureAtmospheric argument, noted .","code":""},{"path":"https://dankelley.github.io/oce/reference/as.ctd.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Coerce Data Into a ctd Object — as.ctd","text":"Culkin, F., Norman D. Smith, 1980. Determination concentration potassium chloride solution electrical conductivity, 15 C infinite frequency, standard seawater salinity 35.0000 ppt (Chlorinity 19.37394 ppt). IEEE Journal Oceanic Engineering, volume 5, pages 22-23.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.ctd.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into a ctd Object — as.ctd","text":"Dan Kelley, help Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/as.ctd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coerce Data Into a ctd Object — as.ctd","text":"","code":"library(oce) # 1. fake data, with default units pressure <- 1:50 temperature <- 10 - tanh((pressure - 20) / 5) + 0.02 * rnorm(50) salinity <- 34 + 0.5 * tanh((pressure - 20) / 5) + 0.01 * rnorm(50) ctd <- as.ctd(salinity, temperature, pressure) # Add a new column fluo <- 5 * exp(-pressure / 20) ctd <- oceSetData(ctd,     name = \"fluorescence\", value = fluo,     unit = list(unit = expression(mg / m^3), scale = \"\") ) summary(ctd) #> CTD Summary #> ----------- #>  #> * Data Overview #>  #>                              Min.    Mean   Max.   Dim. NAs #>     scan                     1       25.5   50     50   0   #>     salinity [PSS-78]        33.49   34.108 34.519 50   0   #>     temperature [°C, ITS-90] 8.962   9.7833 11.033 50   0   #>     pressure [dbar]          1       25.5   50     50   0   #>     fluorescence [mg/m³]     0.41042 1.7903 4.7561 50   0   #>  #> * Processing Log #>  #>     - 2024-09-24 10:26:23 UTC: `create 'ctd' object` #>     - 2024-09-24 10:26:23 UTC: `as.ctd(salinity = salinity, temperature = temperature, pressure = pressure)` #>     - 2024-09-24 10:26:23 UTC: `oceSetData(object = ctd, name = \"fluorescence\", value = fluo,     unit = list(unit = expression(mg/m^3), scale = \"\"))`  # 2. fake data, with supplied units (which are the defaults, actually) ctd <- as.ctd(salinity, temperature, pressure,     units = list(         salinity = list(unit = expression(), scale = \"PSS-78\"),         temperature = list(unit = expression(degree * C), scale = \"ITS-90\"),         pressure = list(unit = expression(dbar), scale = \"\")     ) )"},{"path":"https://dankelley.github.io/oce/reference/as.echosounder.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into an echosounder Object — as.echosounder","title":"Coerce Data Into an echosounder Object — as.echosounder","text":"Coerces dataset echosounder dataset.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.echosounder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into an echosounder Object — as.echosounder","text":"","code":"as.echosounder(   time,   depth,   a,   src = \"\",   sourceLevel = 220,   receiverSensitivity = -55.4,   transmitPower = 0,   pulseDuration = 400,   beamwidthX = 6.5,   beamwidthY = 6.5,   frequency = 41800,   correction = 0 )"},{"path":"https://dankelley.github.io/oce/reference/as.echosounder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into an echosounder Object — as.echosounder","text":"time times pings. depth depths samples within pings. matrix echo amplitudes, stored read.echosounder(). src optional string indicating data source. sourceLevel source level, dB (uPa 1m), denoted sl reference 1 p15, units 0.1dB (uPa 1m). receiverSensitivity receiver sensitivity main element, dB(counts/uPa), denoted rs reference 1 p15, units 0.1dB(counts/uPa) transmitPower transmit power reduction factor, dB, denoted tpow reference 1 p10, units 0.1 dB. pulseDuration duration transmitted pulse us beamwidthX x-axis -3dB one-way beamwidth deg, denoted bwx reference 1 p16, unit 0.2 deg beamwidthY y-axis -3dB one-way beamwidth deg, denoted bwx reference 1 p16, unit 0.2 deg frequency transducer frequency Hz, denoted fq reference 1 p16 correction user-defined calibration correction dB, denoted corr reference 1 p14, unit 0.01dB.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.echosounder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into an echosounder Object — as.echosounder","text":"echosounder object.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.echosounder.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Coerce Data Into an echosounder Object — as.echosounder","text":"Creates echosounder file.  defaults e.g.  transmitPower taken echosounder dataset, unlikely make sense generally.  first three parameters must supplied, dimension must align lengths time depths. parameters defaults unlikely correct arbitrary application, essential basic plots, etc. use readHAC package read echosounder data note stores matrix flipped transposed format. See package's demo code function named flip() transforms matrix required .echosounder(). Indeed, users working HAC data study whole readHAC documentation, learn data stored, oceSetMetadata() oceSetData() can used needed flesh contents returned .echosounder().","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.echosounder.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into an echosounder Object — as.echosounder","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.gps.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into a gps Object — as.gps","title":"Coerce Data Into a gps Object — as.gps","text":"Coerces sequence longitudes latitudes GPS dataset. may used read.gps() read file, data manipulated.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.gps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into a gps Object — as.gps","text":"","code":"as.gps(longitude, latitude, filename = \"\")"},{"path":"https://dankelley.github.io/oce/reference/as.gps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into a gps Object — as.gps","text":"longitude longitude decimal degrees, positive east Greenwich, data frame columns named latitude longitude, case values extracted data frame second argument ignored. latitude latitude decimal degrees, positive north Equator. filename name file containing data (applicable).","code":""},{"path":"https://dankelley.github.io/oce/reference/as.gps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into a gps Object — as.gps","text":"gps object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.gps.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into a gps Object — as.gps","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.gps.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coerce Data Into a gps Object — as.gps","text":"","code":"# Location of the Tower Tank at Dalhousie University towerTank <- as.gps(-63.59428, 44.63572)"},{"path":"https://dankelley.github.io/oce/reference/as.ladp.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into an ladp object — as.ladp","title":"Coerce Data Into an ladp object — as.ladp","text":"function assembles vectors pressure velocity, possibly also shears, salinity, temperature, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.ladp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into an ladp object — as.ladp","text":"","code":"as.ladp(   longitude,   latitude,   station,   time,   pressure,   u,   v,   uz,   vz,   salinity,   temperature,   ... )"},{"path":"https://dankelley.github.io/oce/reference/as.ladp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into an ladp object — as.ladp","text":"longitude longitude degrees east, oce object contains data otherwise given longitude arguments. latitude latitude degrees east (use negative southern hemisphere). station number string indicating station ID. time time start profile, constructed e.g. .POSIXct(). pressure pressure decibars, water column. u eastward velocity (m/s). v northward velocity (m/s). uz vertical derivative eastward velocity (1/s). vz vertical derivative northward velocity (1/s). salinity salinity water column, practical salinity units. temperature temperature water column. ... optional additional data columns.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.ladp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into an ladp object — as.ladp","text":"ladp object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.ladp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into an ladp object — as.ladp","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.lisst.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into a lisst Object — as.lisst","title":"Coerce Data Into a lisst Object — as.lisst","text":"data contains fewer 42 columns, error reported.  contains 42 columns, first 42 used.  used read.lisst(), documentation explains meanings columns.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.lisst.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into a lisst Object — as.lisst","text":"","code":"as.lisst(   data,   filename = \"\",   year = 0,   tz = \"UTC\",   longitude = NA,   latitude = NA )"},{"path":"https://dankelley.github.io/oce/reference/as.lisst.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into a lisst Object — as.lisst","text":"data table (matrix) containing 42 columns, LISST data file. filename Name file containing data. year Year first observation made.  necessary LISST timestamps indicate year observation.  default value odd enough remind users include argument. tz Timezone observations.  necessary LISST timestamps indicate timezone. longitude Longitude observation. latitude Latitude observation.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.lisst.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into a lisst Object — as.lisst","text":"lisst object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.lisst.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into a lisst Object — as.lisst","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.lobo.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into a lobo Object — as.lobo","title":"Coerce Data Into a lobo Object — as.lobo","text":"Coerce dataset lobo dataset.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.lobo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into a lobo Object — as.lobo","text":"","code":"as.lobo(   time,   u,   v,   salinity,   temperature,   pressure,   nitrate,   fluorescence,   filename = \"\" )"},{"path":"https://dankelley.github.io/oce/reference/as.lobo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into a lobo Object — as.lobo","text":"time vector times observation u vector x velocity component observations v vector y velocity component observations salinity vector salinity observations temperature vector temperature observations pressure vector pressure observations nitrate vector nitrate observations fluorescence vector fluorescence observations filename source filename","code":""},{"path":"https://dankelley.github.io/oce/reference/as.lobo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into a lobo Object — as.lobo","text":"lobo object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.lobo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into a lobo Object — as.lobo","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.met.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into a met Object — as.met","title":"Coerce Data Into a met Object — as.met","text":"Coerces dataset met dataset. fills typical data fields, returned object much sparser output read.met(). Also, almost metadata fields filled , resultant object store station location, units data, data-quality flags, etc. Anyone working data Environment Canada (reference 2) advised use read.met() instead present function.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.met.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into a met Object — as.met","text":"","code":"as.met(time, temperature, pressure, u, v, filename = \"(constructed from data)\")"},{"path":"https://dankelley.github.io/oce/reference/as.met.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into a met Object — as.met","text":"time Either vector observation times (character strings can coerced times) output canadaHCD::hcd_hourly (see reference 1). temperature vector temperatures. pressure vector pressures. u vector eastward wind speed m/s. v vector northward wind speed m/s. filename optional string indicating data source","code":""},{"path":"https://dankelley.github.io/oce/reference/as.met.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into a met Object — as.met","text":"met object.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.met.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Coerce Data Into a met Object — as.met","text":"canadaHCD package development Gavin Simpson; see https://github.com/gavinsimpson/canadaHCD instructions download install GitHub. Environment Canada website Historical Climate Data https://climate.weather.gc.ca/index_e.html","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.met.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into a met Object — as.met","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.oce.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Something Into an oce Object — as.oce","title":"Coerce Something Into an oce Object — as.oce","text":"Coerce Something oce Object","code":""},{"path":"https://dankelley.github.io/oce/reference/as.oce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Something Into an oce Object — as.oce","text":"","code":"as.oce(x, ...)"},{"path":"https://dankelley.github.io/oce/reference/as.oce.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Something Into an oce Object — as.oce","text":"x item containing data. may data frame, list, oce object. ... optional extra arguments, passed conversion functions .coastline() ODF2oce(), used.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.oce.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Something Into an oce Object — as.oce","text":"oce object.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.oce.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Coerce Something Into an oce Object — as.oce","text":"function limited intended common use. circumstances, users employ function .ctd() construct specialized oce sub-classes. .oce creates oce object data contained within first argument, may list, data frame, object oce.  (last case, x simply returned, without modification.) x list containing items named longitude latitude, .coastline() called (specified ... value) create coastline object. x list created read_odf() (yet unreleased) ODF package developed Bedford Institute Oceanography, ODF2oce() called (arguments first) calculate return value. sub-class inference made ODF2oce() incorrect, users call function directly, specifying value coerce argument. x created read_odf(), names items contains examined, used try infer proper return value.  cases (although may added sufficient user demand). cases follows. x contains items named temperature, pressure either salinity conductivity, object type ctd returned. x contains columns named longitude latitude, columns, object class coastline returned.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.rsk.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into a rsk Object — as.rsk","title":"Coerce Data Into a rsk Object — as.rsk","text":"Create rsk object.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.rsk.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into a rsk Object — as.rsk","text":"","code":"as.rsk(   time,   columns,   filename = \"\",   instrumentType = \"rbr\",   serialNumber = \"\",   model = \"\",   sampleInterval = NA,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/as.rsk.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into a rsk Object — as.rsk","text":"time vector times data. columns list data frame containing measurements indicated times; see “Details”. filename optional name file containing data. instrumentType type instrument. serialNumber serial number instrument. model instrument model type, e.g. \"RBRduo\". sampleInterval sampling interval. given NA, estimated median difference times. debug flag can set TRUE turn debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.rsk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into a rsk Object — as.rsk","text":"rsk object.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.rsk.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Coerce Data Into a rsk Object — as.rsk","text":"contents columns copied data slot returned object directly, critical names units correspond expected code dealing rsk objects. conductivity, must called conductivity, must units mS/cm. temperature, must called temperature, must -situ value recorded -90 units.  pressure, must absolute pressure (sea pressure plus atmospheric pressure) must named pressure. checks made within .rsk rules, broken, may expect problems processing.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.rsk.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into a rsk Object — as.rsk","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.sealevel.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into a sealevel Object — as.sealevel","title":"Coerce Data Into a sealevel Object — as.sealevel","text":"Coerces dataset (minimally, sequence times heights) sealevel dataset. arguments based standard data format, described file formerly available reference 1.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.sealevel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into a sealevel Object — as.sealevel","text":"","code":"as.sealevel(   elevation,   time,   header = NULL,   stationNumber = NA,   stationVersion = NA,   stationName = NULL,   region = NULL,   year = NA,   longitude = NA,   latitude = NA,   GMTOffset = NA,   decimationMethod = NA,   referenceOffset = NA,   referenceCode = NA,   deltat )"},{"path":"https://dankelley.github.io/oce/reference/as.sealevel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into a sealevel Object — as.sealevel","text":"elevation list sea-level heights metres, hourly sequence. time optional list times, POSIXct format.  missing, list constructed assuming hourly samples, starting 0000-01-01 00:00:00. header character string read first line standard data file. stationNumber three-character string giving station number. stationVersion single character version station. stationName name station (18 characters). region name region country station (19 characters). year year observation. longitude longitude decimal degrees, positive east Greenwich. latitude latitude decimal degrees, positive north equator. GMTOffset offset GMT, hours. decimationMethod coded value, 1 meaning filtered, 2 meaning simple average samples, 3 meaning spot readings, 4 meaning method. referenceOffset ? referenceCode ? deltat optional interval samples, hours (ts() timeseries function). provided, t can understood time, difference first two times used.  provided, t understood time, 1 hour assumed.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.sealevel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into a sealevel Object — as.sealevel","text":"sealevel object (details, see read.sealevel()).","code":""},{"path":"https://dankelley.github.io/oce/reference/as.sealevel.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Coerce Data Into a sealevel Object — as.sealevel","text":"http://ilikai.soest.hawaii.edu/rqds/hourly.fmt (link worked years failed least temporarily December 4, 2016).","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.sealevel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into a sealevel Object — as.sealevel","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.sealevel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coerce Data Into a sealevel Object — as.sealevel","text":"","code":"library(oce)  # Construct a year of M2 tide, starting at the default time # 0000-01-01T00:00:00. h <- seq(0, 24 * 365) elevation <- 2.0 * sin(2 * pi * h / 12.4172) sl <- as.sealevel(elevation) summary(sl) #> Sealevel Summary #> ---------------- #>  #> * sampling delta-t:    1 hour #> * Location:            Lat and lon unknown  #> * number of observations:   8761  #> *    \"      non-missing:    8761  #> * Time: 0000-01-01 to 0000-12-31 (8761 samples, mean increment 1 hour) #> * Data Overview #>  #>                   Min.       Mean                Max.       Dim. NAs #>     elevation [m] -2         0.00089588          2          8761 0   #>     time          0000-01-01 0000-07-01 12:00:00 0000-12-31 8761 0   #>  #> * Processing Log #>  #>     - 2024-09-24 10:26:28 UTC: `create 'sealevel' object` #>     - 2024-09-24 10:26:28 UTC: `as.sealevel(elevation = elevation)`  # As above, but start at the Y2K time. time <- as.POSIXct(\"2000-01-01\") + h * 3600 sl <- as.sealevel(elevation, time) summary(sl) #> Sealevel Summary #> ---------------- #>  #> * sampling delta-t:    1 hour #> * Location:            Lat and lon unknown  #> * number of observations:   8761  #> *    \"      non-missing:    8761  #> * Time: 2000-01-01 04:00:00 to 2000-12-31 04:00:00 (8761 samples, mean increment 1 hour) #> * Data Overview #>  #>                   Min.                Mean                Max.                Dim. NAs #>     elevation [m] -2                  0.00089588          2                   8761 0   #>     time          2000-01-01 04:00:00 2000-07-01 16:00:00 2000-12-31 04:00:00 8761 0   #>  #> * Processing Log #>  #>     - 2024-09-24 10:26:28 UTC: `create 'sealevel' object` #>     - 2024-09-24 10:26:28 UTC: `as.sealevel(elevation = elevation, time = time)`"},{"path":"https://dankelley.github.io/oce/reference/as.section.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a Section — as.section","title":"Create a Section — as.section","text":"Create section based columnar data, set oce objects can coerced section. three cases.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.section.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a Section — as.section","text":"","code":"as.section(   salinity,   temperature,   pressure,   longitude,   latitude,   station,   sectionId = \"\",   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/as.section.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a Section — as.section","text":"salinity may numerical vector, case interpreted salinity, arguments used components ctd objects. Alternatively, may one variety objects CTD objects can inferred, case arguments ignored; see “Details”. temperature Temperature, vector holding values stations. pressure Pressure, vector holding values stations. longitude Longitude, vector holding values stations. latitude Latitude, vector holding values stations. station Station identifiers, vector holding values stations. sectionId Section identifier. debug integer value controls whether .section() prints information work.  function works quietly 0 prints information positive.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.section.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a Section — as.section","text":"object section.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.section.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a Section — as.section","text":"Case 1. first argument numerical vector, taken salinity, factor() applied station break data chunks assembled ctd objects .ctd() combined make section object returned. mode operation provided convenience datasets already partly processed; original CTD data available, next mode preferred, permits storage much data metadata CTD object. Case 2. first argument list containing oce objects, objects taken profiles something.  requirement work every element list contains longitude latitude either metadata data slot (latter case, mean value recorded section object) every element also contains pressure data slot. Case 3. first argument argo object, profiles contains turned ctd objects, assembled section returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.section.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a Section — as.section","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.section.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a Section — as.section","text":"","code":"library(oce) data(ctd) # vector of names of CTD objects fake <- ctd fake[[\"temperature\"]] <- ctd[[\"temperature\"]] + 0.5 fake[[\"salinity\"]] <- ctd[[\"salinity\"]] + 0.1 fake[[\"longitude\"]] <- ctd[[\"longitude\"]] + 0.01 fake[[\"station\"]] <- \"fake\" sec1 <- as.section(c(\"ctd\", \"fake\")) summary(sec1) #> Section Summary #> --------------- #>  #> * Source: \"\" #> * ID:     \"\" #> * Overview of stations #> Index    ID       Lon       Lat  Levels Depth             Time #>     1 Stn 2  -63.6439   44.6843     181    NA 2003-10-15 15:38 #>     2  fake  -63.6339   44.6843     181    NA 2003-10-15 15:38 #> * Processing Log #>  #>     - 2024-09-24 10:26:29 UTC: `create 'section' object` #>     - 2024-09-24 10:26:29 UTC: `as.section(salinity = c(\"ctd\", \"fake\"))` # vector of CTD objects ctds <- vector(\"list\", 2) ctds[[1]] <- ctd ctds[[2]] <- fake sec2 <- as.section(ctds) #> Warning: estimated waterDepth as max(pressure) for CTDs numbered 1:2 summary(sec2) #> Section Summary #> --------------- #>  #> * Source: \"\" #> * ID:     \"\" #> * Overview of stations #> Index    ID       Lon       Lat  Levels Depth             Time #>     1 Stn 2  -63.6439   44.6843     181    44 2003-10-15 15:38 #>     2  fake  -63.6339   44.6843     181    44 2003-10-15 15:38 #> * Processing Log #>  #>     - 2024-09-24 10:26:29 UTC: `create 'section' object` #>     - 2024-09-24 10:26:29 UTC: `as.section(salinity = ctds)` # argo data (a subset) data(argo) sec3 <- as.section(subset(argo, profile < 5)) summary(sec3) #> Section Summary #> --------------- #>  #> * Source: \"\" #> * ID:     \"\" #> * Overview of stations #> Index    ID       Lon       Lat  Levels Depth             Time #>     1     1  -21.3850   60.9640      56    NA 2005-10-29 13:57 #>     2     2  -21.8880   60.8480      56    NA 2005-11-08 13:53 #>     3     3  -22.2570   61.1060      56    NA 2005-11-18 13:49 #>     4     4  -22.4160   61.2520      56    NA 2005-11-28 14:12 #> * Processing Log #>  #>     - 2024-09-24 10:26:29 UTC: `create 'section' object` #>     - 2024-09-24 10:26:29 UTC: `as.section(salinity = subset(argo, profile < 5))`"},{"path":"https://dankelley.github.io/oce/reference/as.tidem.html","id":null,"dir":"Reference","previous_headings":"","what":"Create tidem Object From Fitted Harmonic Data — as.tidem","title":"Create tidem Object From Fitted Harmonic Data — as.tidem","text":"function takes set tidal constituent amplitudes phases, constructs return value similar form returned tidem().  purpose enable predictions based published constituent amplitudes phases.  Since .tidem() account reference height, user's responsible account prediction made using predict.tidem().","code":""},{"path":"https://dankelley.github.io/oce/reference/as.tidem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create tidem Object From Fitted Harmonic Data — as.tidem","text":"","code":"as.tidem(   tRef,   latitude,   name,   amplitude,   phase,   frequency,   speed,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/as.tidem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create tidem Object From Fitted Harmonic Data — as.tidem","text":"tRef POSIXt value indicating mean time observations used develop harmonic model. rounded nearest hour .tidem(), match behaviour tidem(). latitude numerical value indicating latitude observations used create harmonic model. needed nodal-correction procedures carried tidemVuf(). name character vector holding names constituents. amplitude, phase numeric vectors constituent amplitudes phases. must length name. frequency, speed optional numeric vectors giving frequencies constituents (cycles per hour) analogous speeds (degrees per hour).  one may given, conversion done latter former, required.  frequencies thus specified, used instead frequencies oce normally used, defined data(tideconst). warning issued absolute value relative frequency mismatch given component exceeds 1e-6, occur NOAA tables containing SA component, relative mismatch approximately 4e-5 (see reference 5). debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.tidem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create tidem Object From Fitted Harmonic Data — as.tidem","text":"object tidem, minimal contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.tidem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create tidem Object From Fitted Harmonic Data — as.tidem","text":"constituent names used tidem() permitted , except \"Z0\" (see “Description” regarding reference height). get list constituent names, please consult Foreman (1978), type following R console: addition , .tidem() can handle NOAA names constituents.  part, match oce names, 4 exceptions: NOAA names \"LAM2\", \"M1\", \"RHO\", \"2MK3\" converted oce names \"LDA2\", \"NO1\", \"RHO1\", \"MO3\". name mapping inferred matching frequencies; constituents, fractional mismatch frequencies 4e-8; see Reference 5 details. message printed name conversions required particular use .tidem(). Apart standard oce names set NOAA synonyms, constituent name reported warning message.","code":"data(tidedata) data.frame(name=tidedata$const$name, freq=tidedata$const$freq)"},{"path":"https://dankelley.github.io/oce/reference/as.tidem.html","id":"known-issues","dir":"Reference","previous_headings":"","what":"Known issues","title":"Create tidem Object From Fitted Harmonic Data — as.tidem","text":"two known differences tidem() Matlab T_TIDE package, listed references 3 4.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.tidem.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create tidem Object From Fitted Harmonic Data — as.tidem","text":"Foreman, M. G. G., 1978. Manual Tidal Currents Analysis Prediction. Pacific Marine Science Report. British Columbia, Canada: Institute Ocean Sciences, Patricia Bay. Wikipedia, \"Theory Tides.\" https://en.wikipedia.org/wiki/Theory_of_tides Downloaded Aug 17, 2019. Github issue 1653 \"tidem() t_tide produce identical results\" (https://github.com/dankelley/oce/issues/1653) Github issue 1654 \"predict(tidem()) uses constituents, unlike T_TIDE\" (https://github.com/dankelley/oce/issues/1654) Github issue 2143 \"mismatch oce/NOAA frequency SA tidal constituent\" (https://github.com/dankelley/oce/issues/2143)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.tidem.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create tidem Object From Fitted Harmonic Data — as.tidem","text":"","code":"# Example 1: show agreement with tidem() data(sealevelTuktoyaktuk) # 'm0' is model fitted by tidem() m0 <- tidem(sealevelTuktoyaktuk) #> Note: the tidal record is too short to fit for constituents: SA, SSA, MSM, MF, SIG1, RHO1, TAU1, BET1, CHI1, PI1, P1, S1, PSI1, PHI1, THE1, SO1, OQ2, 2N2, NU2, GAM2, H1, H2, MKS2, LDA2, T2, R2, K2, MSN2, SO3, MK4, SK4, 2MK6, MSK6 p0 <- predict(m0, sealevelTuktoyaktuk[[\"time\"]]) m1 <- as.tidem(     mean(sealevelTuktoyaktuk[[\"time\"]]), sealevelTuktoyaktuk[[\"latitude\"]],     m0[[\"name\"]], m0[[\"amplitude\"]], m0[[\"phase\"]] ) # Test agreement with tidem() result, by comparing predicted sealevels. p1 <- predict(m1, sealevelTuktoyaktuk[[\"time\"]]) stopifnot(max(abs(p1 - p0), na.rm = TRUE) < 1e-10)  # Example 2: See the effect of dropping weak constituents m0[[\"name\"]][which(m0[[\"amplitude\"]] > 0.05)] #> [1] \"Z0\"  \"MM\"  \"MSF\" \"O1\"  \"K1\"  \"OO1\" \"N2\"  \"M2\"  \"S2\"  h <- \" name  amplitude      phase   Z0 1.98061875   0.000000   MM 0.21213065 263.344739  MSF 0.15605629 133.795004   O1 0.07641438  74.233130   K1 0.13473817  81.093134  OO1 0.05309911 235.749693   N2 0.08377108  44.521462   M2 0.49041340  77.703594   S2 0.22023705 137.475767\" coef <- read.table(text = h, header = TRUE) m2 <- as.tidem(     mean(sealevelTuktoyaktuk[[\"time\"]]),     sealevelTuktoyaktuk[[\"latitude\"]],     coef$name, coef$amplitude, coef$phase ) p2 <- predict(m2, sealevelTuktoyaktuk[[\"time\"]]) par(mfrow = c(3, 1)) oce.plot.ts(sealevelTuktoyaktuk[[\"time\"]], p0) ylim <- par(\"usr\")[3:4] # to match scales in other panels oce.plot.ts(sealevelTuktoyaktuk[[\"time\"]], p1, ylim = ylim) oce.plot.ts(sealevelTuktoyaktuk[[\"time\"]], p2, ylim = ylim)"},{"path":"https://dankelley.github.io/oce/reference/as.topo.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce Data Into a topo Object — as.topo","title":"Coerce Data Into a topo Object — as.topo","text":"Coerce Data topo Object","code":""},{"path":"https://dankelley.github.io/oce/reference/as.topo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce Data Into a topo Object — as.topo","text":"","code":"as.topo(longitude, latitude, z, filename = \"\")"},{"path":"https://dankelley.github.io/oce/reference/as.topo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce Data Into a topo Object — as.topo","text":"longitude Either vector longitudes (degrees east, bounded -180 180), bathy object created getNOAA.bathy() marmap package; second case, arguments ignored. latitude vector latitudes. z matrix heights (positive land). filename Name data (used called read.topo().","code":""},{"path":"https://dankelley.github.io/oce/reference/as.topo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coerce Data Into a topo Object — as.topo","text":"topo object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.topo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coerce Data Into a topo Object — as.topo","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.unit.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a String to a Unit — as.unit","title":"Convert a String to a Unit — as.unit","text":"converts strings unit objects.  designed mainly use within various functions package, end user. Therefore, documentation give full listing; , developers examine tests/test_that/test_units.R file. Developers wish add new entries asked follow conventions file, regard regular expressions, spaces tokens, etc., also add tests whatever add.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.unit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a String to a Unit — as.unit","text":"","code":"as.unit(u, default = list(unit = expression(), scale = \"\"))"},{"path":"https://dankelley.github.io/oce/reference/as.unit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a String to a Unit — as.unit","text":"u character string indicating unit. Case ignored, e.g. \"dbar\" \"DBAR\" yield equal results.  Many common notations recognized, e.g. kg/m^3 kg m-3 density, etc. default default used return value, u recognized string.  Setting NULL good way discover whether given value u recognized unit function, opposed something (like conductivity ratio) simply unit.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.unit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a String to a Unit — as.unit","text":".unit recognizes u unit, returns list elements unit, expression(), scale, character value.  also case recognize u, default specified.  However, u recognized, default provided user, .unit returns provided value default.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.unit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert a String to a Unit — as.unit","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/as.unit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a String to a Unit — as.unit","text":"","code":"as.unit(\"DBAR\") #> $unit #> expression(dbar) #>  #> $scale #> [1] \"\" #>  as.unit(\"IPTS-68\") #> $unit #> expression(degree * C) #>  #> $scale #> [1] \"IPTS-68\" #>  as.unit(\"ITS-90\") #> $unit #> expression(degree * C) #>  #> $scale #> [1] \"ITS-90\" #>  as.unit(\"PSS-78\") #> $unit #> expression() #>  #> $scale #> [1] \"PSS-78\" #>  as.unit(\"UMOL/KG\") #> $unit #> expression(mu * mol/kg) #>  #> $scale #> [1] \"\" #>"},{"path":"https://dankelley.github.io/oce/reference/as.windrose.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a windrose Object — as.windrose","title":"Create a windrose Object — as.windrose","text":"Create wind-rose object, typically plotting plot,windrose-method().","code":""},{"path":"https://dankelley.github.io/oce/reference/as.windrose.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a windrose Object — as.windrose","text":"","code":"as.windrose(x, y, dtheta = 15, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/as.windrose.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a windrose Object — as.windrose","text":"x x component wind speed (stress) object class met (see met), case u v components object used components wind speed, y ignored. y y component wind speed (stress). dtheta angle increment (degrees) within classify data. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get .","code":""},{"path":"https://dankelley.github.io/oce/reference/as.windrose.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a windrose Object — as.windrose","text":"windrose object, data slot containing","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.windrose.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a windrose Object — as.windrose","text":"Dan Kelley, considerable help Alex Deckmyn.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.windrose.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a windrose Object — as.windrose","text":"","code":"library(oce) set.seed(1234) theta <- seq(0, 360, 0.25) x <- 1 + cos(pi / 180 * theta) + rnorm(theta) y <- sin(pi / 180 * theta) + rnorm(theta) wr <- as.windrose(x, y) summary(wr) #> Windrose data #> ------------- #>  #> * Have n= 24 angles, separated by dtheta= 15  #>  #> * Data Overview #>  #>            Min.     Mean       Max.     Dim.   NAs #>     n      1441     1441       1441     1      0   #>     x.mean 0.99206  0.99206    0.99206  1      0   #>     y.mean 0.013422 0.013422   0.013422 1      0   #>     theta  -172.5   1.5618e-14 172.5    24     0   #>     count  14       60.042     142      24     0   #>     mean   1.0569   1.584      2.1238   24     0   #>     fives  0.043288 1.6777     4.9429   \"24x5\" 0   #>  #> * Processing Log #>  #>     - 2024-09-24 10:26:31 UTC: `create 'windrose' object` #>     - 2024-09-24 10:26:31 UTC: `as.windrose(x = x, y = y)`"},{"path":"https://dankelley.github.io/oce/reference/as.xbt.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an xbt Object — as.xbt","title":"Create an xbt Object — as.xbt","text":"Create xbt Object","code":""},{"path":"https://dankelley.github.io/oce/reference/as.xbt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an xbt Object — as.xbt","text":"","code":"as.xbt(   z,   temperature,   longitude = NA,   latitude = NA,   filename = \"\",   sequenceNumber = NA,   serialNumber = \"\" )"},{"path":"https://dankelley.github.io/oce/reference/as.xbt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an xbt Object — as.xbt","text":"z numeric vector giving vertical coordinates measurements. negative depth, .e. z 0 air-sea interface, negative within water column. temperature numeric vector giving -situ temperatures z values. longitude, latitude location degE degN. filename character value naming source file. sequenceNumber numerical value sequence number XBT drop. serialNumber character value holding serial number XBT.","code":""},{"path":"https://dankelley.github.io/oce/reference/as.xbt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an xbt Object — as.xbt","text":"xbt object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/as.xbt.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create an xbt Object — as.xbt","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/bcdToInteger.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a BCD Value to an Integer Value — bcdToInteger","title":"Convert a BCD Value to an Integer Value — bcdToInteger","text":"Convert BCD Value Integer Value","code":""},{"path":"https://dankelley.github.io/oce/reference/bcdToInteger.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a BCD Value to an Integer Value — bcdToInteger","text":"","code":"bcdToInteger(x, endian = c(\"little\", \"big\"))"},{"path":"https://dankelley.github.io/oce/reference/bcdToInteger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a BCD Value to an Integer Value — bcdToInteger","text":"x raw value, vector raw values, coded binary-coded decimal. endian character string indicating endian-ness (\"big\" \"little\").  PC/intel convention use \"little\", data files format.","code":""},{"path":"https://dankelley.github.io/oce/reference/bcdToInteger.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a BCD Value to an Integer Value — bcdToInteger","text":"integer, list integers.","code":""},{"path":"https://dankelley.github.io/oce/reference/bcdToInteger.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert a BCD Value to an Integer Value — bcdToInteger","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/bcdToInteger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a BCD Value to an Integer Value — bcdToInteger","text":"","code":"library(oce) twenty.five <- bcdToInteger(as.raw(0x25)) thirty.seven <- as.integer(as.raw(0x25))"},{"path":"https://dankelley.github.io/oce/reference/beamName.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Names of Acoustic-Doppler Beams — beamName","title":"Get Names of Acoustic-Doppler Beams — beamName","text":"Get Names Acoustic-Doppler Beams","code":""},{"path":"https://dankelley.github.io/oce/reference/beamName.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Names of Acoustic-Doppler Beams — beamName","text":"","code":"beamName(x, which)"},{"path":"https://dankelley.github.io/oce/reference/beamName.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Names of Acoustic-Doppler Beams — beamName","text":"x adp object. integer indicating beam number.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamName.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Names of Acoustic-Doppler Beams — beamName","text":"character string containing reasonable name beam, form \"beam 1\", etc., beam coordinates, \"east\", etc. enu coordinates, \"u\", etc. \"xyz\", \"u'\", etc., \"\" coordinates.  coordinate system determined x[[\"coordinate\"]].","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/beamName.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Names of Acoustic-Doppler Beams — beamName","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyz.html","id":null,"dir":"Reference","previous_headings":"","what":"Change the Coordinate System in an adv or adp Object — beamToXyz","title":"Change the Coordinate System in an adv or adp Object — beamToXyz","text":"Convert velocity data acoustic-Doppler velocimeter acoustic-Doppler profiler one coordinate system another.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Change the Coordinate System in an adv or adp Object — beamToXyz","text":"","code":"beamToXyz(x, ...)"},{"path":"https://dankelley.github.io/oce/reference/beamToXyz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Change the Coordinate System in an adv or adp Object — beamToXyz","text":"x adp adv object. ... extra arguments passed beamToXyzAdp() beamToXyzAdv().","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Change the Coordinate System in an adv or adp Object — beamToXyz","text":"object class x, velocities xyz coordinates instead beam coordinates.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/beamToXyz.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Change the Coordinate System in an adv or adp Object — beamToXyz","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdp.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert adp Object From Beam to XYZ Coordinates — beamToXyzAdp","title":"Convert adp Object From Beam to XYZ Coordinates — beamToXyzAdp","text":"Convert ADP velocity components beam-based coordinate system xyz-based coordinate system. action depends type object. Objects creating reading RDI Teledyne, Sontek, Nortek instruments handled directly.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert adp Object From Beam to XYZ Coordinates — beamToXyzAdp","text":"","code":"beamToXyzAdp(x, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert adp Object From Beam to XYZ Coordinates — beamToXyzAdp","text":"x adp object. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert adp Object From Beam to XYZ Coordinates — beamToXyzAdp","text":"object first 3 velocity indices altered represent velocity components xyz (instrument) coordinates.  (rdi data, values 4th velocity index changed represent \"error\" velocity.) indicate change, value x[[\"oceCoordinate\"]] changed beam xyz.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert adp Object From Beam to XYZ Coordinates — beamToXyzAdp","text":"3-beam Nortek aquadopp object, beams transformed velocities using matrix stored header. 4-beam objects (slanted 4 beams 5-beam objects), along-beam velocity components \\(B_1\\) \\(B_2\\), \\(B_3\\), \\(B_4\\) converted Cartesian velocity components \\(u\\) \\(v\\) \\(w\\) using formulae section 5.5 RD Instruments (1998), viz. along-beam velocity components \\(B_1\\), \\(B_2\\), \\(B_3\\), \\(B_4\\) used calculate velocity components cartesian system referenced instrument using following formulae: \\(u=ca(B_1-B_2)\\), \\(v=ca(B_4-B_3)\\), \\(w=-b(B_1+B_2+B_3+B_4)\\). addition , estimate error velocity computed \\(e=d(B_1+B_2-B_3-B_4)\\). geometrical factors formulae : c +1 convex beam geometry -1 concave beam geometry, \\(=1/(2\\sin\\theta)\\) \\(\\theta\\) angle beams make axial direction (available x[[\"beamAngle\"]]), \\(b=1/(4\\cos\\theta)\\), \\(d=/\\sqrt{2}\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert adp Object From Beam to XYZ Coordinates — beamToXyzAdp","text":"Teledyne RD Instruments. “ADCP Coordinate Transformation: Formulas Calculations,” January 2010. P/N 951-6079-00. WHOI/USGS-provided Matlab code beam-enu transformation http://woodshole.er.usgs.gov/pubs/of2005-1429/MFILES/AQDPTOOLS/beam2enu.m","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert adp Object From Beam to XYZ Coordinates — beamToXyzAdp","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdpAD2CP.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert From Beam to XYZ Coordinates (AD2CP adp Data) — beamToXyzAdpAD2CP","title":"Convert From Beam to XYZ Coordinates (AD2CP adp Data) — beamToXyzAdpAD2CP","text":"looks items data slot x, see contain array named v holds velocity. velocity 4 components, oceCoordinate item \"beam\", along-beam velocity components \\(B_1\\) \\(B_2\\), \\(B_3\\), \\(B_4\\) converted instrument-oriented Cartesian velocity components \\(u\\) \\(v\\) \\(w\\) using convex-geometry formulae section 5.5 reference 1, viz. \\(u=ca(B_1-B_2)\\), \\(v=ca(B_4-B_3)\\), \\(w=-b(B_1+B_2+B_3+B_4)\\). addition , estimate error velocity computed \\(e=d(B_1+B_2-B_3-B_4)\\). geometrical factors formulae : \\(=1/(2\\sin\\theta)\\) \\(\\theta\\) angle beams make axial direction (available x[[\"beamAngle\"]]), \\(b=1/(4\\cos\\theta)\\), \\(d=/\\sqrt{2}\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdpAD2CP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert From Beam to XYZ Coordinates (AD2CP adp Data) — beamToXyzAdpAD2CP","text":"","code":"beamToXyzAdpAD2CP(x, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdpAD2CP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert From Beam to XYZ Coordinates (AD2CP adp Data) — beamToXyzAdpAD2CP","text":"x adp object. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdpAD2CP.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert From Beam to XYZ Coordinates (AD2CP adp Data) — beamToXyzAdpAD2CP","text":"Teledyne RD Instruments. “ADCP Coordinate Transformation: Formulas Calculations,” January 2010. P/N 951-6079-00.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdv.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert adv Object from Beam Coordinates to XYZ Coordinates — beamToXyzAdv","title":"Convert adv Object from Beam Coordinates to XYZ Coordinates — beamToXyzAdv","text":"Convert ADV velocity components beam-based coordinate system xyz-based coordinate system.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert adv Object from Beam Coordinates to XYZ Coordinates — beamToXyzAdv","text":"","code":"beamToXyzAdv(x, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert adv Object from Beam Coordinates to XYZ Coordinates — beamToXyzAdv","text":"x adv object. debug flag , non-zero, turns debugging.  Higher values yield extensive debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert adv Object from Beam Coordinates to XYZ Coordinates — beamToXyzAdv","text":"coordinate transformation done using transformation matrix contained transformation.matrix metadata slot, normally inferred header binary file.  matrix (e.g. data streamed data logger capture header), beamToXyzAdv user need store one x, e.g. something like following:","code":"x[[\"transformation.matrix\"]] <- rbind(c(11100, -5771, -5321),                                       c( #' 291, 9716, -10002),                                       c( 1409, 1409, 1409)) / 4096"},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert adv Object from Beam Coordinates to XYZ Coordinates — beamToXyzAdv","text":"https://nortek.zendesk.com/hc/en-us/articles/360029820971----Coordinate-transformation-done-","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/beamToXyzAdv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert adv Object from Beam Coordinates to XYZ Coordinates — beamToXyzAdv","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/beamUnspreadAdp.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjust adp Object to Account for Spherical Spreading — beamUnspreadAdp","title":"Adjust adp Object to Account for Spherical Spreading — beamUnspreadAdp","text":"Compensate ADP signal strength spherical spreading.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamUnspreadAdp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjust adp Object to Account for Spherical Spreading — beamUnspreadAdp","text":"","code":"beamUnspreadAdp(   x,   count2db = c(0.45, 0.45, 0.45, 0.45),   asMatrix = FALSE,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/beamUnspreadAdp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjust adp Object to Account for Spherical Spreading — beamUnspreadAdp","text":"x adp object. count2db set coefficients, one per beam, convert beam echo intensity decibels. asMatrix boolean indicates whether return numeric matrix, opposed returning updated object (matrix cast raw value). debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamUnspreadAdp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adjust adp Object to Account for Spherical Spreading — beamUnspreadAdp","text":"adp object.","code":""},{"path":"https://dankelley.github.io/oce/reference/beamUnspreadAdp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Adjust adp Object to Account for Spherical Spreading — beamUnspreadAdp","text":"First, beam echo intensity converted counts decibels, multiplying count2db.  , signal decrease owing spherical spreading compensated adding term \\(20\\log10(r)\\), \\(r\\) distance sensor head water scattering occurring.  \\(r\\) given x[[\"distance\"]].","code":""},{"path":"https://dankelley.github.io/oce/reference/beamUnspreadAdp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Adjust adp Object to Account for Spherical Spreading — beamUnspreadAdp","text":"coefficient convert decibels personal communication.  logarithmic term explained textbooks acoustics, optics, etc.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/beamUnspreadAdp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Adjust adp Object to Account for Spherical Spreading — beamUnspreadAdp","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/beamUnspreadAdp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Adjust adp Object to Account for Spherical Spreading — beamUnspreadAdp","text":"","code":"library(oce) data(adp) plot(adp, which = 5) # beam 1 echo intensity  adp.att <- beamUnspreadAdp(adp) plot(adp.att, which = 5) # beam 1 echo intensity  # Profiles par(mar = c(4, 4, 1, 1)) a <- adp[[\"a\", \"numeric\"]] # second arg yields matrix return value distance <- adp[[\"distance\"]] plot(apply(a, 2, mean), distance, type = \"l\", xlim = c(0, 256)) lines(apply(a, 2, median), distance, type = \"l\", col = \"red\") legend(\"topright\", lwd = 1, col = c(\"black\", \"red\"), legend = c(\"original\", \"attenuated\"))  # Image plot(adp.att, which = \"amplitude\", col = oce.colorsViridis(100))"},{"path":"https://dankelley.github.io/oce/reference/bilinearInterp.html","id":null,"dir":"Reference","previous_headings":"","what":"Bilinear Interpolation Within a Grid — bilinearInterp","title":"Bilinear Interpolation Within a Grid — bilinearInterp","text":"used topoInterpolate.","code":""},{"path":"https://dankelley.github.io/oce/reference/bilinearInterp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bilinear Interpolation Within a Grid — bilinearInterp","text":"","code":"bilinearInterp(x, y, gx, gy, g)"},{"path":"https://dankelley.github.io/oce/reference/bilinearInterp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bilinear Interpolation Within a Grid — bilinearInterp","text":"x vector x values interpolate y vector y values interpolate gx vector x values grid gy vector y values grid g matrix grid values","code":""},{"path":"https://dankelley.github.io/oce/reference/bilinearInterp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bilinear Interpolation Within a Grid — bilinearInterp","text":"vector interpolated values","code":""},{"path":"https://dankelley.github.io/oce/reference/binApply1D.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply a Function to Vector Data — binApply1D","title":"Apply a Function to Vector Data — binApply1D","text":"function FUN applied f bins specified xbreaks.  division data bins done cut().","code":""},{"path":"https://dankelley.github.io/oce/reference/binApply1D.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply a Function to Vector Data — binApply1D","text":"","code":"binApply1D(x, f, xbreaks, FUN, include.lowest = FALSE, ...)"},{"path":"https://dankelley.github.io/oce/reference/binApply1D.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply a Function to Vector Data — binApply1D","text":"x vector numerical values. f vector data FUN applied. xbreaks optional vector holding values x boundaries bins. given, computed calling pretty() n=20 segments. FUN function applied f values x bin.  must take single numeric vector input, return single numeric value. include.lowest logical value indicating whether include x values equal xbreaks[1].  See “Details”. ... optional arguments pass FUN.","code":""},{"path":"https://dankelley.github.io/oce/reference/binApply1D.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply a Function to Vector Data — binApply1D","text":"list following elements: xbreaks used, xmids (mid-points breaks) result (result applying FUN f values designated bins).","code":""},{"path":"https://dankelley.github.io/oce/reference/binApply1D.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply a Function to Vector Data — binApply1D","text":"default, sub-intervals defined xbreaks argument open left closed right, match behaviour cut().  open interval include points boundary, x values exactly match first breaks value counted.  include points calculation, set include.lowest TRUE.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/binApply1D.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Apply a Function to Vector Data — binApply1D","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/binApply1D.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Apply a Function to Vector Data — binApply1D","text":"","code":"library(oce) # salinity profile (black) with 1-dbar bin means (red) data(ctd) plotProfile(ctd, \"salinity\") p <- ctd[[\"pressure\"]] S <- ctd[[\"salinity\"]] pbreaks <- seq(0, max(p), 1) binned <- binApply1D(p, S, pbreaks, mean) lines(binned$result, binned$xmids, lwd = 2, col = rgb(1, 0, 0, 0.9))"},{"path":"https://dankelley.github.io/oce/reference/binApply2D.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply a Function to Matrix Data — binApply2D","title":"Apply a Function to Matrix Data — binApply2D","text":"function FUN applied f bins specified xbreaks ybreaks.","code":""},{"path":"https://dankelley.github.io/oce/reference/binApply2D.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply a Function to Matrix Data — binApply2D","text":"","code":"binApply2D(x, y, f, xbreaks, ybreaks, FUN, include.lowest = FALSE, ...)"},{"path":"https://dankelley.github.io/oce/reference/binApply2D.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply a Function to Matrix Data — binApply2D","text":"x vector numerical values. y vector numerical values. f vector data FUN applied. xbreaks values x boundaries bins; calculated using pretty() supplied. ybreaks xbreaks, y. FUN function applied f values (x,y) bin.  must take two numeric vectors input, return single numeric value. include.lowest logical value indicating whether include x values equal xbreaks[1] y values equal ybreaks[1].  See “Details”. ... optional arguments pass FUN.","code":""},{"path":"https://dankelley.github.io/oce/reference/binApply2D.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply a Function to Matrix Data — binApply2D","text":"list following elements: xbreaks ybreaks used, mid-points xmids ymids, result, matrix containing result applying FUN() f values designated bins.","code":""},{"path":"https://dankelley.github.io/oce/reference/binApply2D.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply a Function to Matrix Data — binApply2D","text":"division bins done cut(), include.lowest passed. default, x bins open left closed right, y bins open bottom closed top.  However, include.lowest TRUE, boundary points included calculation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/binApply2D.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Apply a Function to Matrix Data — binApply2D","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/binAverage.html","id":null,"dir":"Reference","previous_headings":"","what":"Bin-average a Vector y, Based on x Values — binAverage","title":"Bin-average a Vector y, Based on x Values — binAverage","text":"binAverage() works calling binMean1D(), computing xbreaks parameter latter function seq(xmin,xmax,xinc). Note return value binAverage() uses xmids result entries binMean1D() result.","code":""},{"path":"https://dankelley.github.io/oce/reference/binAverage.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bin-average a Vector y, Based on x Values — binAverage","text":"","code":"binAverage(x, y, xmin, xmax, xinc, include.lowest = FALSE, na.rm = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/binAverage.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bin-average a Vector y, Based on x Values — binAverage","text":"x vector numerical values. y vector numerical values. xmin x value lower limit first bin; minimum x used provided. xmax x value upper limit last bin; maximum x used provided. xinc width bins, terms x value; 1/10th xmax-xmin used provided. include.lowest logical value indicating whether include y values corresponding x equal xmin. See “Details”. na.rm logical value indicating whether remove NA values computation average. passed mean(), work present function.","code":""},{"path":"https://dankelley.github.io/oce/reference/binAverage.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bin-average a Vector y, Based on x Values — binAverage","text":"list two elements: x, mid-points bins, y, average y value bins.","code":""},{"path":"https://dankelley.github.io/oce/reference/binAverage.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bin-average a Vector y, Based on x Values — binAverage","text":"default, sub-intervals defined xmin, xinc xmax arguments open left closed right, match behaviour cut().  open interval include points boundary, x values exactly match first breaks value counted.  include points calculation, set include.lowest TRUE.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/binAverage.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bin-average a Vector y, Based on x Values — binAverage","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/binAverage.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bin-average a Vector y, Based on x Values — binAverage","text":"","code":"library(oce) # A. fake linear data x <- seq(0, 100, 1) y <- 1 + 2 * x plot(x, y, pch = 1) ba <- binAverage(x, y) points(ba$x, ba$y, pch = 3, col = \"red\", cex = 3)   # B. fake quadratic data y <- 1 + x^2 plot(x, y, pch = 1) ba <- binAverage(x, y) points(ba$x, ba$y, pch = 3, col = \"red\", cex = 3)   # C. natural data data(co2) plot(co2) avg <- binAverage(time(co2), co2, 1950, 2000, 2) points(avg$x, avg$y, col = \"red\")"},{"path":"https://dankelley.github.io/oce/reference/binCount1D.html","id":null,"dir":"Reference","previous_headings":"","what":"Bin-count Vector Data — binCount1D","title":"Bin-count Vector Data — binCount1D","text":"Count number elements given vector fall within successive pairs values within second vector.","code":""},{"path":"https://dankelley.github.io/oce/reference/binCount1D.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bin-count Vector Data — binCount1D","text":"","code":"binCount1D(x, xbreaks, include.lowest = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/binCount1D.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bin-count Vector Data — binCount1D","text":"x vector numerical values. xbreaks Vector values x boundaries bins, calculated using pretty() supplied. include.lowest logical value indicating whether include x values equal xbreaks[1].  See “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/binCount1D.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bin-count Vector Data — binCount1D","text":"list following elements: breaks (xbreaks, midpoints (xmids) breaks, count (number) x values successive breaks.","code":""},{"path":"https://dankelley.github.io/oce/reference/binCount1D.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bin-count Vector Data — binCount1D","text":"default, sub-intervals defined xbreaks argument open left closed right, match behaviour cut().  open interval include points boundary, x values exactly match first breaks value counted.  count points, set include.lowest TRUE. contextualize binCount1D() terms base R functions, note   matches","code":"binCount1D(1:20, seq(0, 20, 2))$number unname(table(cut(1:20, seq(0, 20, 2))))"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/binCount1D.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bin-count Vector Data — binCount1D","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/binCount2D.html","id":null,"dir":"Reference","previous_headings":"","what":"Bin-count Matrix Data — binCount2D","title":"Bin-count Matrix Data — binCount2D","text":"Count number elements given matrix z=z(x,y) fall within successive pairs breaks x y.","code":""},{"path":"https://dankelley.github.io/oce/reference/binCount2D.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bin-count Matrix Data — binCount2D","text":"","code":"binCount2D(x, y, xbreaks, ybreaks, flatten = FALSE, include.lowest = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/binCount2D.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bin-count Matrix Data — binCount2D","text":"x, y vectors numerical values. xbreaks, ybreaks vector values x y boundaries 2D bins, calculated using pretty() x y, supplied. flatten logical value indicating whether return value also contains equilength vectors x, y, z n, flattened representation xmids, ymids, result number. include.lowest logical value indicating whether include points x equals xbreaks[1] y equals ybreaks[1].","code":""},{"path":"https://dankelley.github.io/oce/reference/binCount2D.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bin-count Matrix Data — binCount2D","text":"list following elements: breaks (xbreaks ybreaks), midpoints (xmids ymids) breaks, count (number) f values boxes defined successive breaks.","code":""},{"path":"https://dankelley.github.io/oce/reference/binCount2D.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bin-count Matrix Data — binCount2D","text":"default, sub-intervals defined xbreaks ybreaks open left/bottom closed right/top, match behaviour cut().  open interval include points boundary, x y values equal xbreaks[1] ybreaks[1] counted.  include points calculation, set include.lowest TRUE.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/binCount2D.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bin-count Matrix Data — binCount2D","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/binMean1D.html","id":null,"dir":"Reference","previous_headings":"","what":"Bin-average f=f(x) — binMean1D","title":"Bin-average f=f(x) — binMean1D","text":"Average values vector f bins defined another vector x. values broken bins using cut().","code":""},{"path":"https://dankelley.github.io/oce/reference/binMean1D.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bin-average f=f(x) — binMean1D","text":"","code":"binMean1D(x, f, xbreaks, include.lowest = FALSE, na.rm = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/binMean1D.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bin-average f=f(x) — binMean1D","text":"x vector numerical values categorized bins via xbreaks parameter. f vector numerical values associated x values. xbreaks vector values x boundaries bins, calculated using pretty() supplied. include.lowest logical value indicating whether include x values equal xbreaks[1].  See “Details”. na.rm logical value indicating whether remove NA values computation average. passed mean(), work present function.","code":""},{"path":"https://dankelley.github.io/oce/reference/binMean1D.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bin-average f=f(x) — binMean1D","text":"list following elements: breaks (xbreaks, midpoints (xmids) breaks, count (number) x values successive breaks, resultant average (result) f, classified x breaks.","code":""},{"path":"https://dankelley.github.io/oce/reference/binMean1D.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bin-average f=f(x) — binMean1D","text":"default, sub-intervals defined xbreaks argument open left closed right, match behaviour cut().  open interval include points boundary, x values exactly match first breaks value counted.  include points calculation, set include.lowest TRUE.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/binMean1D.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bin-average f=f(x) — binMean1D","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/binMean1D.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bin-average f=f(x) — binMean1D","text":"","code":"# Plot raw temperature profile as circles, with lines indicating # the result of averaging in 1-metre depth intervals. library(oce) data(ctd) z <- ctd[[\"z\"]] T <- ctd[[\"temperature\"]] plot(T, z, cex = 0.3) TT <- binMean1D(z, T, seq(-100, 0, 1)) lines(TT$result, TT$xmids, col = rgb(1, 0, 0, 0.9), lwd = 2)"},{"path":"https://dankelley.github.io/oce/reference/binMean2D.html","id":null,"dir":"Reference","previous_headings":"","what":"Bin-average f=f(x,y) — binMean2D","title":"Bin-average f=f(x,y) — binMean2D","text":"Average values vector f(x,y) bins defined vectors x y. common example might averaging spatial data location bins.","code":""},{"path":"https://dankelley.github.io/oce/reference/binMean2D.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bin-average f=f(x,y) — binMean2D","text":"","code":"binMean2D(   x,   y,   f,   xbreaks,   ybreaks,   flatten = FALSE,   fill = FALSE,   fillgap = -1,   include.lowest = FALSE,   na.rm = FALSE,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/binMean2D.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bin-average f=f(x,y) — binMean2D","text":"x vector numerical values. y vector numerical values. f Matrix numerical values, matrix f=f(x,y). xbreaks Vector values x boundaries bins, calculated using pretty(x) supplied. ybreaks Vector values y boundaries bins, calculated using pretty(y) supplied. flatten logical value indicating whether return value also contains equilength vectors x, y, z n, flattened representation xmids, ymids, result number. fill, fillgap values controlling whether attempt fill gaps (, regions NA values) matrix. fill false, gaps, regions NA values, altered. fill TRUE, gaps size less equal fillgap interpolated across, calling fillGapMatrix() supplied value fillgap. include.lowest logical value indicating whether include y values corresponding x equal xmin. See “Details”. na.rm logical value indicating whether remove NA values computation average. passed mean(), work present function. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/binMean2D.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bin-average f=f(x,y) — binMean2D","text":"default, .e. flatten FALSE, binMean2D() returns list following elements: xmids, vector holding x-bin midpoints; ymids, vector holding y-bin midpoints; number, matrix holding number points bin; result, matrix holding mean value bin. flatten TRUE, number result matrices renamed n f transformed vectors, bin midpoints renamed x y extended match length n f.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/binMean2D.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bin-average f=f(x,y) — binMean2D","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/binMean2D.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bin-average f=f(x,y) — binMean2D","text":"","code":"library(oce) x <- runif(500, 0, 0.5) y <- runif(500, 0, 0.5) f <- x^2 + y^2 xb <- seq(0, 0.5, 0.1) yb <- seq(0, 0.5, 0.1) m <- binMean2D(x, y, f, xb, yb) cm <- colormap(f, col = oceColorsTurbo) opar <- par(no.readonly = TRUE) drawPalette(colormap = cm) plot(x, y, col = cm$zcol, pch = 20, cex = 1.4) contour(m$xmids, m$ymids, m$result, add = TRUE, labcex = 1.4)  par(opar)"},{"path":"https://dankelley.github.io/oce/reference/binmapAdp.html","id":null,"dir":"Reference","previous_headings":"","what":"Bin-map an adp Object — binmapAdp","title":"Bin-map an adp Object — binmapAdp","text":"Bin-map ADP object, interpolating velocities, backscatter amplitudes, etc., uniform depth bins, thus compensating pitch roll instrument.  makes sense ADP objects beam coordinates.","code":""},{"path":"https://dankelley.github.io/oce/reference/binmapAdp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bin-map an adp Object — binmapAdp","text":"","code":"binmapAdp(x, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/binmapAdp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bin-map an adp Object — binmapAdp","text":"x adp object. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/binmapAdp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bin-map an adp Object — binmapAdp","text":"adp object.","code":""},{"path":"https://dankelley.github.io/oce/reference/binmapAdp.html","id":"bugs","dir":"Reference","previous_headings":"","what":"Bugs","title":"Bin-map an adp Object — binmapAdp","text":"works 4-beam RDI ADP objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/binmapAdp.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Bin-map an adp Object — binmapAdp","text":"","code":"library(oce) file <- \"~/data/archive/sleiwex/2008/moorings/m09/adp/rdi_2615/raw/adp_rdi_2615.000\" beam <- read.oce(file,     from=as.POSIXct(\"2008-06-26\", tz=\"UTC\"),     to=as.POSIXct(\"2008-06-26 00:10:00\", tz=\"UTC\"),     longitude=-69.73433, latitude=47.88126) beam2 <- binmapAdp(beam) plot(enuToOther(toEnu(beam), heading=-31.5)) plot(enuToOther(toEnu(beam2), heading=-31.5)) plot(beam, which=5:8) # backscatter amplitude plot(beam2, which=5:8)"},{"path":"https://dankelley.github.io/oce/reference/binmapAdp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Bin-map an adp Object — binmapAdp","text":"method devised Clark Richards use PhD work Department Oceanography Dalhousie University.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/binmapAdp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bin-map an adp Object — binmapAdp","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/bodcNames2oceNames.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine oce Variable Names from an NERC/BODC Names — bodcNames2oceNames","title":"Determine oce Variable Names from an NERC/BODC Names — bodcNames2oceNames","text":"Translate names NERC/BODC vocabulary oce names, primarily read.netcdf() can produce easily interpreted results. Please note bodcNames2oceNames() handles tiny subset huge number names NERC/BODC vocabulary (see Reference 1). see names function handles currently, type bodcNames2oceNames R session.","code":""},{"path":"https://dankelley.github.io/oce/reference/bodcNames2oceNames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine oce Variable Names from an NERC/BODC Names — bodcNames2oceNames","text":"","code":"bodcNames2oceNames(bodcNames, unduplicate = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/bodcNames2oceNames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine oce Variable Names from an NERC/BODC Names — bodcNames2oceNames","text":"bodcNames character vector specifies variable names use NERC/BODC convention. unduplicate logical value indicating whether rename repeated entries, e.g. \"temperature occurs twice, second instance changed \"temperature2\". Set FALSE plan calling  bodcNames2oceNames renaming function , call unduplicateNames() end function; see Example 2.","code":""},{"path":"https://dankelley.github.io/oce/reference/bodcNames2oceNames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Determine oce Variable Names from an NERC/BODC Names — bodcNames2oceNames","text":"bodcNames2oceNames returns vector length first argument, translations oce names, appropriate. Note usual oce convention handling duplicates used, first name maps temperature set temperature, next temperature2, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/bodcNames2oceNames.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Determine oce Variable Names from an NERC/BODC Names — bodcNames2oceNames","text":"NERC Environmental Data Server. http://vocab.nerc.ac.uk/collection/P01/current/","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/bodcNames2oceNames.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Determine oce Variable Names from an NERC/BODC Names — bodcNames2oceNames","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/bodcNames2oceNames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Determine oce Variable Names from an NERC/BODC Names — bodcNames2oceNames","text":"","code":"# Example 1: typical usage bodcNames2oceNames(c(\"PSALST01\", \"TEMPP901\", \"PRESPR01\")) #> [1] \"salinity\"    \"temperature\" \"pressure\"     # Example 2: extend to add new variables BODC2 <- function(originalNames) {     rval <- bodcNames2oceNames(originalNames, unduplicate = FALSE)     rval[rval == \"bowler hat\"] <- \"hat\"     rval[rval == \"top hat\"] <- \"hat\"     unduplicateNames(rval) } BODC2(c(\"PSALST01\", \"TEMPP901\", \"PRESPR01\", \"bowler hat\", \"top hat\")) #> [1] \"salinity\"    \"temperature\" \"pressure\"    \"hat\"         \"hat2\""},{"path":"https://dankelley.github.io/oce/reference/bound125.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate a Bound, Rounded up to Mantissa 1, 2, or 5 — bound125","title":"Calculate a Bound, Rounded up to Mantissa 1, 2, or 5 — bound125","text":"Calculate Bound, Rounded Mantissa 1, 2, 5","code":""},{"path":"https://dankelley.github.io/oce/reference/bound125.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate a Bound, Rounded up to Mantissa 1, 2, or 5 — bound125","text":"","code":"bound125(x)"},{"path":"https://dankelley.github.io/oce/reference/bound125.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate a Bound, Rounded up to Mantissa 1, 2, or 5 — bound125","text":"x single positive number","code":""},{"path":"https://dankelley.github.io/oce/reference/bound125.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate a Bound, Rounded up to Mantissa 1, 2, or 5 — bound125","text":"positive x, value exceeding x mantissa 1, 2, 5; otherwise, x","code":""},{"path":"https://dankelley.github.io/oce/reference/bremen-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Bremen-formatted Data — bremen-class","title":"Class to Store Bremen-formatted Data — bremen-class","text":"class data stored format used Bremen. somewhat similar odf, sense apply just particular instrument. Although functions provided dealing data (see “Details”), common action read data read.bremen(), coerce object another storage class (e.g. using .ctd() CTD-style data) specialized functions can used thereafter.","code":""},{"path":"https://dankelley.github.io/oce/reference/bremen-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Bremen-formatted Data — bremen-class","text":"data oce objects, data slot bremen objects list containing main data object. metadata oce objects, metadata slot bremen objects list containing information data object . processingLog oce objects, processingLog slot bremen objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/bremen-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Bremen-formatted Data — bremen-class","text":"Although [[<- operator may permit modification contents bremen objects (see [[<-,bremen-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/bremen-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Bremen-formatted Data — bremen-class","text":"full contents data metadata slots bremen object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,bremen-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,bremen-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/bremen-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Bremen-formatted Data — bremen-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/byteToBinary.html","id":null,"dir":"Reference","previous_headings":"","what":"Format Bytes as Binary (Defunct) — byteToBinary","title":"Format Bytes as Binary (Defunct) — byteToBinary","text":"WARNING: endian argument soon removed function; see oce-defunct. actions endian=\"little\" made sense practical work. default value endian changed \"big\" 2017 May 6.","code":""},{"path":"https://dankelley.github.io/oce/reference/byteToBinary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format Bytes as Binary (Defunct) — byteToBinary","text":"","code":"byteToBinary(x, endian = \"big\")"},{"path":"https://dankelley.github.io/oce/reference/byteToBinary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format Bytes as Binary (Defunct) — byteToBinary","text":"x integer interpreted byte. endian character string indicating endian-ness (\"big\" \"little\"). WARNING: argument removed soon.","code":""},{"path":"https://dankelley.github.io/oce/reference/byteToBinary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format Bytes as Binary (Defunct) — byteToBinary","text":"character string representing bit strings elements x, order significance endian=\"big\" case. (nibbles, 4-bit sequences, interchanged now-deprecated \"little\" case.) See “Examples” relates output rawToBits.","code":""},{"path":"https://dankelley.github.io/oce/reference/byteToBinary.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Format Bytes as Binary (Defunct) — byteToBinary","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/byteToBinary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format Bytes as Binary (Defunct) — byteToBinary","text":"","code":"library(oce) # Note comparison with rawToBits(): a <- as.raw(0x0a) byteToBinary(a, \"big\") # \"00001010\" #> [1] \"00001010\" as.integer(rev(rawToBits(a))) # 0 0 0 0 1 0 1 0 #> [1] 0 0 0 0 1 0 1 0"},{"path":"https://dankelley.github.io/oce/reference/cm-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Current Meter Data — cm-class","title":"Class to Store Current Meter Data — cm-class","text":"class stores current meter data, e.g. Interocean/S4 device Aanderaa/RCM device.","code":""},{"path":"https://dankelley.github.io/oce/reference/cm-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Current Meter Data — cm-class","text":"data oce objects, data slot cm objects list containing main data object. key items stored slot time, u v. metadata oce objects, metadata slot cm objects list containing information data object . processingLog oce objects, processingLog slot cm objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/cm-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Current Meter Data — cm-class","text":"Although [[<- operator may permit modification contents cm objects (see [[<-,cm-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/cm-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Current Meter Data — cm-class","text":"full contents data metadata slots cm object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,cm-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,cm-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/cm-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Current Meter Data — cm-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/cm.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample cm Data — cm","title":"Sample cm Data — cm","text":"result using read.cm() current meter file holding measurements made Interocean S4 device.  See read.cm() general cautionary notes reading files. Note salinities sample dataset known incorrect, perhaps owing lack calibration old instrument used long time.","code":""},{"path":"https://dankelley.github.io/oce/reference/cm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample cm Data — cm","text":"","code":"data(cm)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/cm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample cm Data — cm","text":"","code":"library(oce) data(cm) summary(cm) #> Cm summary #> ---------- #>  #> * File source:   \"/Users/kelley/Dropbox/data/archive/sleiwex/2008/moorings/m11/cm/interocean_0811786/manufacturer/cm_interocean_0811786.s4a.tab\" #> * Instr. type:   (2Hz)S4 #> * Serial Num.:   8111786 #> * Version:       2.399 #> * North:         magnetic #> * Time: 2008-06-26 to 2008-06-26 23:59:00 (1440 samples, mean increment 1 min) #> * Data Overview #>  #>                              Min.       Mean                Max.                Dim. NAs  OriginalName #>     Sample..                 842        1561.5              2281                1440 0    \"Sample #\"   #>     Date                     NA         NA                  NA                  1440 0    \"Date\"       #>     Time                     NA         NA                  NA                  1440 0    \"Time\"       #>     dec.S                    0          0                   0                   1440 0    \"dec S\"      #>     v [m/s]                  -0.862     -0.088736           0.74                1440 0    \"Vnorth\"     #>     u [m/s]                  -0.478     0.02761             0.654               1440 0    \"Veast\"      #>     Speed                    1.44       53.569              98.29               1440 0    \"Speed\"      #>     Dir                      7          126.99              352.1               1440 0    \"Dir\"        #>     Vref                     NA         NA                  NA                  1440 1440 \"Vref\"       #>     Hx                       -210       -31.052             177                 1440 0    \"Hx\"         #>     Hy                       -212       -0.58889            211                 1440 0    \"Hy\"         #>     conductivity [mS/cm]     36.8       36.924              37.2                1440 0    \"Cond\"       #>     temperature [°C, ITS-90] 1.204      2.0773              3.065               1440 0    \"T-Temp\"     #>     Depth                    73.242     74.767              77.148              1440 0    \"Depth\"      #>     none                     NA         NA                  NA                  1440 1440 \"none\"       #>     none.1                   NA         NA                  NA                  1440 1440 \"none\"       #>     Hdg                      0          175.79              359.2               1440 0    \"Hdg\"        #>     X                        NA         NA                  NA                  1440 1440 \"-\"          #>     salinity [PSS-78]        41.307     42.71               44.205              1440 0    \"Sal\"        #>     Dens                     1033.3     1034.5              1035.8              1440 0    \"Dens\"       #>     SV                       1467.9     1469.8              1472.2              1440 0    \"SV\"         #>     X.1                      NA         NA                  NA                  1440 1440 \"-\"          #>     N.S.Dist                 -2535.2    4159.5              10349               1440 0    \"N-S Dist\"   #>     E.W.Dist                 -2033.5    893.81              4687.5              1440 0    \"E-W Dist\"   #>     X.2                      NA         NA                  NA                  1440 1440 \"-\"          #>     SRB.Date                 NA         NA                  NA                  1440 1440 \"SRB Date\"   #>     SRB.Time                 NA         NA                  NA                  1440 0    \"SRB Time\"   #>     Vref.1                   1.226      1.2263              1.23                1440 1152 \"Vref\"       #>     Hx.1                     NA         NA                  NA                  1440 1440 \"Hx\"         #>     Hy.1                     NA         NA                  NA                  1440 1440 \"Hy\"         #>     Cond.1                   NA         NA                  NA                  1440 1440 \"Cond\"       #>     T.Temp.1                 NA         NA                  NA                  1440 1440 \"T-Temp\"     #>     Depth.1                  NA         NA                  NA                  1440 1440 \"Depth\"      #>     none.2                   NA         NA                  NA                  1440 1440 \"none\"       #>     none.3                   NA         NA                  NA                  1440 1440 \"none\"       #>     Hdg.1                    NA         NA                  NA                  1440 1440 \"Hdg\"        #>     X.3                      NA         NA                  NA                  1440 1440 \"-\"          #>     Sal.1                    NA         NA                  NA                  1440 1440 \"Sal\"        #>     Dens.1                   NA         NA                  NA                  1440 1440 \"Dens\"       #>     SV.1                     NA         NA                  NA                  1440 1440 \"SV\"         #>     pressure [dbar]          73.855     75.392              77.794              1440 0    \"-\"          #>     time                     2008-06-26 2008-06-26 11:59:30 2008-06-26 23:59:00 1440 0    \"-\"          #>  #> * Processing Log #>  #>     - 2023-02-10 12:50:57 UTC: `create 'cm' object` #>     - 2023-02-10 12:50:57 UTC: `read.oce(\"~/data/archive/sleiwex/2008/moorings/m11/cm/interocean_0811786/manufacturer/cm_interocean_0811786.s4a.tab\", ...)` #>     - 2023-02-10 12:50:57 UTC: `subset.cm(x, subset=time < as.POSIXct(\"2008-06-27 00:00:00\", tz = \"UTC\"))` plot(cm)"},{"path":"https://dankelley.github.io/oce/reference/cnvName2oceName.html","id":null,"dir":"Reference","previous_headings":"","what":"Infer Variable Name, Units and Scale From a Seabird Header — cnvName2oceName","title":"Infer Variable Name, Units and Scale From a Seabird Header — cnvName2oceName","text":"function used read.ctd.sbe() infer data names units coding used Teledyne/Seabird (SBE) .cnv files.  Lacking access documentation SBE format, present function based inspection suite CNV files available oce developers.","code":""},{"path":"https://dankelley.github.io/oce/reference/cnvName2oceName.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Infer Variable Name, Units and Scale From a Seabird Header — cnvName2oceName","text":"","code":"cnvName2oceName(h, columns = NULL, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/cnvName2oceName.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Infer Variable Name, Units and Scale From a Seabird Header — cnvName2oceName","text":"h header line. columns Optional list containing name correspondences, described read.ctd.sbe(). debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/cnvName2oceName.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Infer Variable Name, Units and Scale From a Seabird Header — cnvName2oceName","text":"sample header lines encountered :   Examination several CNV files suggests best try infer name characters \"=\" \":\" characters, material colon seems vary sample files. table given indicates translation patterns used. taken reference 1. .cnv convention multiple sensors include optional extra digits name, indicated ~ ~~ table; decoding done grep(). important note table means complete, since great many SBE names listed document (reference 1), plus names listed present data files supplied prominent archiving agencies. SBE name recognized, oce name set SBE name. can cause problems processing steps (e.g. swRho() similar function called oce object first argument), users well-advised rename items appropriate. first step pass object summary(), discover SBE names question. consult SBE documentation find appropriate name data, either manipulate names object data slot directly use oceRenameData() rename elements. Finally, please publish 'issue' oce Github site https://github.com/dankelley/oce/issues developers can add data type question. (save development time, plan add possible data types without reasonable specific expression user interest. Oxygen alone forty variants.) Notes: 'pr' Dalhousie-generated data file seems reference 1. odd unit, sw* functions called object containing , conversion made performing computation. lookout errors, since rare situation. Assume -90 temperature scale, since sample .cnv file headers specify . files PSU . handle ? S scales consider? 'theta' symbol (shown accented e) may appear different ways different encoding configurations, set within R operating system.","code":"# name 4 = t068: temperature, IPTS-68 [deg C] # name 3 = t090C: Temperature [ITS-90, deg C] # name 4 = t190C: Temperature, 2 [ITS-90, deg C]"},{"path":"https://dankelley.github.io/oce/reference/cnvName2oceName.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Infer Variable Name, Units and Scale From a Seabird Header — cnvName2oceName","text":"SBE data processing manual http://www.seabird.com/document/sbe-data-processing-manual, summer 2018, longer seems provided SeaBird. web search turn copies manual put online various research groups data-archiving agencies. 2018-07-05, latest version named SBEDataProcessing_7.26.4.pdf release date 12/08/2017, reference version used coding oce.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/cnvName2oceName.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Infer Variable Name, Units and Scale From a Seabird Header — cnvName2oceName","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/coastline-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Coastline Data — coastline-class","title":"Class to Store Coastline Data — coastline-class","text":"class stores coastline data.","code":""},{"path":"https://dankelley.github.io/oce/reference/coastline-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Coastline Data — coastline-class","text":"data oce objects, data slot coastline objects list containing main data object. key items stored slot longitude latitude. metadata oce objects, metadata slot coastline objects list containing information data object . processingLog oce objects, processingLog slot coastline objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/coastline-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Coastline Data — coastline-class","text":"Although [[<- operator may permit modification contents coastline objects (see [[<-,coastline-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/coastline-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Coastline Data — coastline-class","text":"full contents data metadata slots coastline object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,coastline-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,coastline-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/coastline-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Coastline Data — coastline-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/coastlineBest.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the Name of the Best Coastline Object — coastlineBest","title":"Find the Name of the Best Coastline Object — coastlineBest","text":"Find name appropriate coastline given locale Checks coastlineWorld, coastlineWorldFine coastlineWorldCoarse, order, find one appropriate locale.","code":""},{"path":"https://dankelley.github.io/oce/reference/coastlineBest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the Name of the Best Coastline Object — coastlineBest","text":"","code":"coastlineBest(lonRange, latRange, span, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/coastlineBest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the Name of the Best Coastline Object — coastlineBest","text":"lonRange range longitude locale latRange range latitude locale span span domain km (provided, previous two arguments ignored). debug set positive value get debugging information processing.","code":""},{"path":"https://dankelley.github.io/oce/reference/coastlineBest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the Name of the Best Coastline Object — coastlineBest","text":"name coastline can loaded data().","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/coastlineBest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find the Name of the Best Coastline Object — coastlineBest","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/coastlineCut.html","id":null,"dir":"Reference","previous_headings":"","what":"Cut a Coastline Object at Specified Longitude — coastlineCut","title":"Cut a Coastline Object at Specified Longitude — coastlineCut","text":"can helpful preventing mapPlot() producing ugly horizontal lines world maps. lines occur coastline segment intersected longitude lon_0+180.  Since coastline files oce ocedata packages already \"cut\" longitudes -180 180, present function needed default maps, +lon_0=0. However, may help values lon_0.","code":""},{"path":"https://dankelley.github.io/oce/reference/coastlineCut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cut a Coastline Object at Specified Longitude — coastlineCut","text":"","code":"coastlineCut(coastline, lon_0 = 0)"},{"path":"https://dankelley.github.io/oce/reference/coastlineCut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cut a Coastline Object at Specified Longitude — coastlineCut","text":"coastline coastline object. lon_0 longitude given +lon_0= item call sf::sf_project().","code":""},{"path":"https://dankelley.github.io/oce/reference/coastlineCut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cut a Coastline Object at Specified Longitude — coastlineCut","text":"new coastline object","code":""},{"path":"https://dankelley.github.io/oce/reference/coastlineCut.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Cut a Coastline Object at Specified Longitude — coastlineCut","text":"function provisional. behaviour, name existence may change.  Part development plan see common ground clipPolys function PBSmapping package.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/coastlineCut.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cut a Coastline Object at Specified Longitude — coastlineCut","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/coastlineCut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cut a Coastline Object at Specified Longitude — coastlineCut","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) mapPlot(coastlineCut(coastlineWorld, lon_0 = 100),     projection = \"+proj=moll +lon_0=100\", col = \"gray\" )  # }"},{"path":"https://dankelley.github.io/oce/reference/coastlineWorld.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample coastline Data (Global, at 1:110M scale) — coastlineWorld","title":"Sample coastline Data (Global, at 1:110M scale) — coastlineWorld","text":"coarse resolution coastline scale 1:110M, 10,696 points, suitable world-scale plots plotted small size, e.g. inset diagrams. Finer resolution coastline files provided ocedata package.","code":""},{"path":"https://dankelley.github.io/oce/reference/coastlineWorld.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample coastline Data (Global, at 1:110M scale) — coastlineWorld","text":"Downloaded https://www.naturalearthdata.com, ne_110m_admin_0_countries.shp July 2015, update December 16, 2017.","code":""},{"path":"https://dankelley.github.io/oce/reference/coastlineWorld.html","id":"installing-your-own-datasets","dir":"Reference","previous_headings":"","what":"Installing your own datasets","title":"Sample coastline Data (Global, at 1:110M scale) — coastlineWorld","text":"Follow procedure along lines described “Details”, course source file differ. Also, change name coastline object coastlineWorld, avoid conflicts built-dataset. Save .rda file directory choosing, e.g. perhaps /data/coastlines ~/data/coastlines unix-type machine. , whenever need file, use load() load .  users find convenient loading Rprofile() startup file.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/colormap.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate a Color Map — colormap","title":"Calculate a Color Map — colormap","text":"Create mapping numeric values colors, use palettes plots. return value can used various ways, including colorizing points scattergraphs, controlling images created image() imagep(), drawing palettes drawPalette(), etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/colormap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate a Color Map — colormap","text":"","code":"colormap(   z = NULL,   zlim,   zclip = FALSE,   breaks,   col = oceColorsViridis,   name,   x0,   x1,   col0,   col1,   blend = 0,   missingColor,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/colormap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate a Color Map — colormap","text":"z optional vector set numerical values examined. z given, return value contain item named zcol vector length z, containing color point.  z given, zcol contain just one item, color \"black\". zlim optional vector containing two numbers specify z limits color scale. can provided cases B, defined “Details”.  case , zlim provided, inferred using rangeExtended() breaks, provided, z otherwise.  Also, case , error provide zlim breaks, unless latter length 1, meaning number subdivisions use within range set zlim. case B, zlim inferred using rangeExtended() c(x0,x1). case C, providing zlim yields error message, makes sense context named, predefined color scheme. zclip logical, TRUE indicating z values outside range zlim breaks painted missingColor FALSE indicating values painted nearest -range color. breaks optional indication break points color levels (see image()).  provided, arguments name blend ignored (see “Details”).  provided, may either vector break points, single number indicating desired number break points computed pretty(z,breaks).  either case non-missing breaks, resultant break points must number 1 plus number colors (see col). col either vector colors function taking numerical value single argument returning vector colors.  Prior 2021-02-08, default col oceColorsJet, switched oceColorsViridis date.  value col ignored name provided, x0 col1 provided. name optional string naming built-colormap (one \"gmt_relief\", \"gmt_ocean\", \"gmt_globe\" \"gmt_gebco\") name file URL contains color map specification GMT format.  name given, passed colormapGMT(), creates colormap. Note colormap thus created fixed relationship value color, zlim, argument examined z (may used zcol defined return value), warnings issued irrelevant arguments provided. x0, x1, col0, col1 Vectors specify color map.  must length, x0 x1 numerical values, col0 col1 colors.  colors may strings (e.g. \"red\") colors defined rgb() hsv(). blend number indicating blend colors within band. ignored except x0 col1 supplied.  value 0 means use col0[] interval x0[] x1[].  value 1 means use col1[] interval.  value 0 1 means blend two colors according stated fraction.  Values exceeding 1 error present, plan use indicate sub-intervals, smooth palette can created colors. missingColor color use missing values. provided name also provided (case C), named schemes pre-defined colors.  cases, missingColor defaults \"gray\", provided argument. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get .","code":""},{"path":"https://dankelley.github.io/oce/reference/colormap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate a Color Map — colormap","text":"list containing following (necessarily order) zcol, vector colors z, z provided, otherwise \"black\" zlim, two-element vector suitable argument name supplied image() imagep() breaks col, vectors breakpoints colors, suitable -named arguments image() imagep() zclip provided value zclip. x0 x1, numerical vectors sides color intervals, col0 col1, vectors corresponding colors.  meaning input.  purpose returning four vectors permit users alter color mapping, example 3 “Examples”. missingColor, color used specify missing values, e.g. -named argument imagep(). colfunction, univariate function returns vector colors, given vector z values; see Example 6.","code":""},{"path":"https://dankelley.github.io/oce/reference/colormap.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate a Color Map — colormap","text":"colormap can used variety ways, including following. Case . Supply combination arguments sufficient define mapping value color, without providing x0, col0, x1 col1 (see case B ), providing name (see Case C). several ways .  One approach supply z argument, case zlim, breaks determined z, default col used.  Another approach specify breaks col together, way might specified base R function image().  also possible supply zlim, case breaks inferred value. figure explains (`breaks`, `col`) method specifying color mapping.  Note must one break color.  method used e.g. [image()]. Case B. Supply x0, col0, x1, col1, zlim, breaks, col name. x0, col0, x1 col1 values specify value-color mapping similar used GMT color maps.  method works using seq() interpolate elements x0 vector.  done x1.  Similarly, colorRampPalette() used interpolate colors col0 vector, done col1.  figure explains (`x0`, `x1`, `col0`, `col1`) method specifying color mapping. Note items length. case `blend=0`, color `col0[]` `x0[]` `x1[]`, illustrated . Case C. Supply name possibly also z, zlim, breaks, col, x0, col0, x1 col1. name may name pre-defined color palette (\"gmt_relief\", \"gmt_ocean\", \"gmt_globe\" \"gmt_gebco\"), may name file (URL pointing file) contains color map GMT format (see “References”). z supplied along name, zcol set return value, e.g. use colorizing points.  Another method finding colors data points use colfunction() function return value.","code":""},{"path":"https://dankelley.github.io/oce/reference/colormap.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Calculate a Color Map — colormap","text":"","code":"# Example 2. topographic image with a standard color scheme par(mfrow=c(1,1)) data(topoWorld) cm <- colormap(name=\"gmt_globe\") imagep(topoWorld, breaks=cm$breaks, col=cm$col)  # Example 3. topographic image with modified colors, # black for depths below 4km. cm <- colormap(name=\"gmt_globe\") deep <- cm$x0 < -4000 cm$col0[deep] <- \"black\" cm$col1[deep] <- \"black\" cm <- colormap(x0=cm$x0, x1=cm$x1, col0=cm$col0, col1=cm$col1) imagep(topoWorld, breaks=cm$breaks, col=cm$col)  # Example 4. image of world topography with water colorized # smoothly from violet at 8km depth to blue # at 4km depth, then blending in 0.5km increments # to white at the coast, with tan for land. cm <- colormap(x0=c(-8000, -4000,   0,  100),      x1=c(-4000,     0, 100, 5000),      col0=c(\"violet\",\"blue\",\"white\",\"tan\"),      col1=c(\"blue\",\"white\",\"tan\",\"yellow\")) lon <- topoWorld[[\"longitude\"]] lat <- topoWorld[[\"latitude\"]] z <- topoWorld[[\"z\"]] imagep(lon, lat, z, breaks=cm$breaks, col=cm$col) contour(lon, lat, z, levels=0, add=TRUE)  # Example 5. visualize GMT style color map cm <- colormap(name=\"gmt_globe\", debug=4) plot(seq_along(cm$x0), cm$x0, pch=21, bg=cm$col0) grid() points(seq_along(cm$x1), cm$x1, pch=21, bg=cm$col1)  # Example 6. colfunction cm <- colormap(c(0, 1)) x <- 1:10 y <- (x - 5.5)^2 z <- seq(0, 1, length.out=length(x)) drawPalette(colormap=cm) plot(x, y, pch=21, bg=cm$colfunction(z), cex=3)"},{"path":"https://dankelley.github.io/oce/reference/colormap.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate a Color Map — colormap","text":"following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/colormap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate a Color Map — colormap","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/colormap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate a Color Map — colormap","text":"","code":"library(oce) # Example 1. color scheme for points on xy plot x <- seq(0, 1, length.out = 40) y <- sin(2 * pi * x) par(mar = c(3, 3, 1, 1)) mar <- par(\"mar\") # prevent margin creep by drawPalette() # First, default breaks c <- colormap(y) drawPalette(c$zlim, col = c$col, breaks = c$breaks) plot(x, y, bg = c$zcol, pch = 21, cex = 1) grid()  par(mar = mar) # Second, 100 breaks, yielding a smoother palette c <- colormap(y, breaks = 100) drawPalette(c$zlim, col = c$col, breaks = c$breaks) plot(x, y, bg = c$zcol, pch = 21, cex = 1) grid()  par(mar = mar)"},{"path":"https://dankelley.github.io/oce/reference/colormapGMT.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a GMT-type (CPT) Colormap — colormapGMT","title":"Create a GMT-type (CPT) Colormap — colormapGMT","text":"colormapGMT creates colormaps Generic Mapping Tools (GMT) scheme (see References 1 4).  schemes built-, may referred name (\"gmt_gebco\", \"gmt_globe\", \"gmt_ocean\", \"gmt_relief\") others handled reading local files GMT format, URLs providing files (see Reference 3).","code":""},{"path":"https://dankelley.github.io/oce/reference/colormapGMT.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a GMT-type (CPT) Colormap — colormapGMT","text":"","code":"colormapGMT(name, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/colormapGMT.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a GMT-type (CPT) Colormap — colormapGMT","text":"name character value specifying GMT scheme, source scheme. Four pre-defined schemes available, accessed setting name \"gmt_gebco\", \"gmt_globe\", \"gmt_ocean\", \"gmt_relief\". name one values, taken name local file GMT format , file found, URL holding file. debug integer , positive, indicates print debugging output","code":""},{"path":"https://dankelley.github.io/oce/reference/colormapGMT.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a GMT-type (CPT) Colormap — colormapGMT","text":"colormap returns list, format return value colormap().","code":""},{"path":"https://dankelley.github.io/oce/reference/colormapGMT.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a GMT-type (CPT) Colormap — colormapGMT","text":"GMT files understood colormapGMT GMT calls \"Regular CPT files\" (see reference 4).  text format can read (care) edited text editor.  three categories lines within file.  (1) line starting \"#\" character comment, ignored colormapGMT. (2) Lines 8 numbers specify colour bands. first number z value, three numbers red, green blue values range 0 255. set 4 numbers followed line similar values. Think sequence describing band colours two z values. (3) Lines starting character, followed three numbers, specify particular codings.  character \"B\" specifies background colour, \"F\" specifies foreground colour, \"N\" specifies colour used missing data (letter stands --number).  \"N\" used colormapGMT, takes role missingColor argument otherwise .  (missingColor permitted name given.)","code":""},{"path":"https://dankelley.github.io/oce/reference/colormapGMT.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create a GMT-type (CPT) Colormap — colormapGMT","text":"General overview GMT system https://www.generic-mapping-tools.org. Information GMT color schemes https://docs.generic-mapping-tools.org/dev/cookbook/cpts.html Source GMT specification files https://beamreach.org/maps/gmt/share/cpt/ CPT (color palette table) format https://www.soest.hawaii.edu/gmt/gmt/html/GMT_Docs.html#x1-820004.15","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/colormapGMT.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a GMT-type (CPT) Colormap — colormapGMT","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/composite-amsr-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a Composite of amsr Satellite Data — composite,amsr-method","title":"Create a Composite of amsr Satellite Data — composite,amsr-method","text":"Form averages item data slot supplied objects, taking account bad-data codes. Items within data slots objects supplied arguments averaged way makes sense object class, .e. taking account particular bad-data codes particular class.","code":""},{"path":"https://dankelley.github.io/oce/reference/composite-amsr-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a Composite of amsr Satellite Data — composite,amsr-method","text":"","code":"# S4 method for class 'amsr' composite(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/composite-amsr-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a Composite of amsr Satellite Data — composite,amsr-method","text":"object amsr object. ... amsr objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/composite-amsr-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a Composite of amsr Satellite Data — composite,amsr-method","text":"none objects good data particular pixel (.e. particular latitude longitude), resultant bad-data code last item argument list. metadata result taken directly metadata final argument, except filename set comma-separated list component filenames.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/composite-list-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Composite by Averaging Across Data — composite,list-method","title":"Composite by Averaging Across Data — composite,list-method","text":"done calling specialized version function defined given class. present version, objects must inherit amsr, action call composite,amsr-method(). Items within data slots objects supplied arguments averaged way makes sense object class, .e. taking account particular bad-data codes particular class.","code":""},{"path":"https://dankelley.github.io/oce/reference/composite-list-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Composite by Averaging Across Data — composite,list-method","text":"","code":"# S4 method for class 'list' composite(object)"},{"path":"https://dankelley.github.io/oce/reference/composite-list-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Composite by Averaging Across Data — composite,list-method","text":"object list oce objects.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/composite.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a Composite Object by Averaging Across Good Data — composite","title":"Create a Composite Object by Averaging Across Good Data — composite","text":"Items within data slots objects supplied arguments averaged way makes sense object class, .e. taking account particular bad-data codes particular class.","code":""},{"path":"https://dankelley.github.io/oce/reference/composite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a Composite Object by Averaging Across Good Data — composite","text":"","code":"composite(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/composite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a Composite Object by Averaging Across Good Data — composite","text":"object either list oce objects, case argument, single oce object, case least one argument (object size) must supplied. ... Ignored, object list. Otherwise, one oce objects sub-class first argument.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/computableWaterProperties.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine Available Derived Water Properties — computableWaterProperties","title":"Determine Available Derived Water Properties — computableWaterProperties","text":"determines things can derived supplied variables.  example, salinity, temperature, pressure supplied, potential temperature, sound speed, several things can derived.  , addition, longitude latitude supplied, Absolute Salinity, Conservative Temperature, things can derived. Similarly, nitrate can computed NO2+NO3 together nitrate, nitrite can computed NO2+NO3 together nitrate. See “Examples” full listing.","code":""},{"path":"https://dankelley.github.io/oce/reference/computableWaterProperties.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine Available Derived Water Properties — computableWaterProperties","text":"","code":"computableWaterProperties(x)"},{"path":"https://dankelley.github.io/oce/reference/computableWaterProperties.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine Available Derived Water Properties — computableWaterProperties","text":"x specification names known variables.  may () oce object, case names determined calling names() data slot x, (b) vector character values indicating names.","code":""},{"path":"https://dankelley.github.io/oce/reference/computableWaterProperties.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Determine Available Derived Water Properties — computableWaterProperties","text":"computableWaterProperties() returns sorted character vector holding names computable water properties, NULL, computable values.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/computableWaterProperties.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Determine Available Derived Water Properties — computableWaterProperties","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/computableWaterProperties.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Determine Available Derived Water Properties — computableWaterProperties","text":"","code":"library(oce) # Example 1 data(ctd) computableWaterProperties(ctd) #>  [1] \"Absolute Salinity\"        \"CT\"                       #>  [3] \"Conservative Temperature\" \"N2\"                       #>  [5] \"Rrho\"                     \"RrhoSF\"                   #>  [7] \"SA\"                       \"SP\"                       #>  [9] \"SR\"                       \"Sstar\"                    #> [11] \"density\"                  \"potential temperature\"    #> [13] \"sigma0\"                   \"sigma1\"                   #> [15] \"sigma2\"                   \"sigma3\"                   #> [17] \"sigma4\"                   \"sigmaTheta\"               #> [19] \"sound speed\"              \"spice\"                    #> [21] \"spiciness0\"               \"spiciness1\"               #> [23] \"spiciness2\"               \"theta\"                    #> [25] \"z\"                        # Example 2: nothing an be computed from just salinity computableWaterProperties(\"salinity\") #> NULL # Example 3: quite a lot can be computed from this trio of values computableWaterProperties(c(\"salinity\", \"temperature\", \"pressure\")) #>  [1] \"N2\"                    \"Rrho\"                  \"RrhoSF\"                #>  [4] \"SP\"                    \"density\"               \"depth\"                 #>  [7] \"potential temperature\" \"sigmaTheta\"            \"sound speed\"           #> [10] \"spice\"                 \"theta\"                 \"z\"                     # Example 4: now we can get TEOS-10 values as well computableWaterProperties(c(     \"salinity\", \"temperature\", \"pressure\",     \"longitude\", \"latitude\" )) #>  [1] \"Absolute Salinity\"        \"CT\"                       #>  [3] \"Conservative Temperature\" \"N2\"                       #>  [5] \"Rrho\"                     \"RrhoSF\"                   #>  [7] \"SA\"                       \"SP\"                       #>  [9] \"SR\"                       \"Sstar\"                    #> [11] \"density\"                  \"depth\"                    #> [13] \"potential temperature\"    \"sigma0\"                   #> [15] \"sigma1\"                   \"sigma2\"                   #> [17] \"sigma3\"                   \"sigma4\"                   #> [19] \"sigmaTheta\"               \"sound speed\"              #> [21] \"spice\"                    \"spiciness0\"               #> [23] \"spiciness1\"               \"spiciness2\"               #> [25] \"theta\"                    \"z\""},{"path":"https://dankelley.github.io/oce/reference/concatenate-adp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate adp Objects — concatenate,adp-method","title":"Concatenate adp Objects — concatenate,adp-method","text":"function concatenates adp objects. intended objects holding data sampled time, works pasting together data linearly vectors, row matrices, second index arrays. tested following classes: adp, adv, ctd, met. may useful things classes, users encouraged try, report problems developers. unlikely function anything even remotely useful image topographic data, name just two cases fit sampled--time category.","code":""},{"path":"https://dankelley.github.io/oce/reference/concatenate-adp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate adp Objects — concatenate,adp-method","text":"","code":"# S4 method for class 'adp' concatenate(object, ..., debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/concatenate-adp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate adp Objects — concatenate,adp-method","text":"object object adp, list containing objects (case remaining arguments ignored). ... optional additional objects adp. debug integer indicating debugging level. exceeds 1, information may printed processing.","code":""},{"path":"https://dankelley.github.io/oce/reference/concatenate-adp-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate adp Objects — concatenate,adp-method","text":"object adp.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/concatenate-adp-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Concatenate adp Objects — concatenate,adp-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/concatenate-adp-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Concatenate adp Objects — concatenate,adp-method","text":"","code":"## 1. Split, then recombine, a ctd object. data(ctd) ctd1 <- subset(ctd, scan <= median(ctd[[\"scan\"]])) ctd2 <- subset(ctd, scan > median(ctd[[\"scan\"]])) CTD <- concatenate(ctd1, ctd2)  ## 2. Split, then recombine, an adp object. data(adp) midtime <- median(adp[[\"time\"]]) adp1 <- subset(adp, time <= midtime) adp2 <- subset(adp, time > midtime) ADP <- concatenate(adp1, adp2)  if (FALSE) { # \\dontrun{ ## 3. Download two met files and combine them. met1 <- read.met(download.met(id=6358, year=2003, month=8)) met2 <- read.met(download.met(id=6358, year=2003, month=9)) MET <- concatenate(met1, met2) } # }"},{"path":"https://dankelley.github.io/oce/reference/concatenate-list-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate a List of oce Objects — concatenate,list-method","title":"Concatenate a List of oce Objects — concatenate,list-method","text":"Concatenate List oce Objects","code":""},{"path":"https://dankelley.github.io/oce/reference/concatenate-list-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate a List of oce Objects — concatenate,list-method","text":"","code":"# S4 method for class 'list' concatenate(object)"},{"path":"https://dankelley.github.io/oce/reference/concatenate-list-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate a List of oce Objects — concatenate,list-method","text":"object list oce objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/concatenate-list-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate a List of oce Objects — concatenate,list-method","text":"object class corresponding object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/concatenate-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate oce Objects (oce-Specific) — concatenate,oce-method","title":"Concatenate oce Objects (oce-Specific) — concatenate,oce-method","text":"function concatenates oce objects. intended objects holding data sampled time, works pasting together data linearly vectors, row matrices, second index arrays. tested following classes: adp, adv, ctd, met. may useful things classes, users encouraged try, report problems developers. unlikely function anything even remotely useful image topographic data, name just two cases fit sampled--time category.","code":""},{"path":"https://dankelley.github.io/oce/reference/concatenate-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate oce Objects (oce-Specific) — concatenate,oce-method","text":"","code":"# S4 method for class 'oce' concatenate(object, ..., debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/concatenate-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate oce Objects (oce-Specific) — concatenate,oce-method","text":"object object oce, list containing objects (case remaining arguments ignored). ... optional additional objects oce. debug integer indicating debugging level. exceeds 1, information may printed processing.","code":""},{"path":"https://dankelley.github.io/oce/reference/concatenate-oce-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate oce Objects (oce-Specific) — concatenate,oce-method","text":"object oce.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/concatenate-oce-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Concatenate oce Objects (oce-Specific) — concatenate,oce-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/concatenate-oce-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Concatenate oce Objects (oce-Specific) — concatenate,oce-method","text":"","code":"## 1. Split, then recombine, a ctd object. data(ctd) ctd1 <- subset(ctd, scan <= median(ctd[[\"scan\"]])) ctd2 <- subset(ctd, scan > median(ctd[[\"scan\"]])) CTD <- concatenate(ctd1, ctd2)  ## 2. Split, then recombine, an adp object. data(adp) midtime <- median(adp[[\"time\"]]) adp1 <- subset(adp, time <= midtime) adp2 <- subset(adp, time > midtime) ADP <- concatenate(adp1, adp2)  if (FALSE) { # \\dontrun{ ## 3. Download two met files and combine them. met1 <- read.met(download.met(id=6358, year=2003, month=8)) met2 <- read.met(download.met(id=6358, year=2003, month=9)) MET <- concatenate(met1, met2) } # }"},{"path":"https://dankelley.github.io/oce/reference/concatenate.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate oce Objects (Generic) — concatenate","title":"Concatenate oce Objects (Generic) — concatenate","text":"Concatenate oce Objects (Generic)","code":""},{"path":"https://dankelley.github.io/oce/reference/concatenate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate oce Objects (Generic) — concatenate","text":"","code":"concatenate(object, ..., debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/concatenate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate oce Objects (Generic) — concatenate","text":"object oce object. ... optional additional oce objects. debug integer indicating debugging level. 0, work done silently.  larger integer, information may printed processing.","code":""},{"path":"https://dankelley.github.io/oce/reference/concatenate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate oce Objects (Generic) — concatenate","text":"object class corresponding object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/coriolis.html","id":null,"dir":"Reference","previous_headings":"","what":"Coriolis Parameter on the Earth — coriolis","title":"Coriolis Parameter on the Earth — coriolis","text":"Compute \\(f\\), Coriolis parameter function latitude (see reference 1), assuming earth siderial angular rotation rate \\(omega\\)=7292115e-11 rad/s. See reference 1 general notes, see reference 2 comments temporal variations \\(omega\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/coriolis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coriolis Parameter on the Earth — coriolis","text":"","code":"coriolis(latitude, degrees = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/coriolis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coriolis Parameter on the Earth — coriolis","text":"latitude Vector latitudes \\(^\\circ\\)N radians north equator. degrees Flag indicating whether degrees used latitude; set FALSE, radians used.","code":""},{"path":"https://dankelley.github.io/oce/reference/coriolis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coriolis Parameter on the Earth — coriolis","text":"Coriolis parameter, radian/s.","code":""},{"path":"https://dankelley.github.io/oce/reference/coriolis.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Coriolis Parameter on the Earth — coriolis","text":"Gill, .E., 1982. Atmosphere-ocean Dynamics, Academic Press, New York, 662 pp. Groten, E., 2004: Fundamental Parameters Current, 2004. Best Estimates Parameters Common Relevance Astronomy, Geodesy, Geodynamics. Journal Geodesy, 77:724-797. (downloaded http://www.iag-aig.org/attach/e354a3264d1e420ea0a9920fe762f2a0/51-groten.pdf March 11, 2017).","code":""},{"path":"https://dankelley.github.io/oce/reference/coriolis.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coriolis Parameter on the Earth — coriolis","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/coriolis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coriolis Parameter on the Earth — coriolis","text":"","code":"C <- coriolis(45) # 1e-4"},{"path":"https://dankelley.github.io/oce/reference/ctd-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store CTD (or general hydrographic) Data — ctd-class","title":"Class to Store CTD (or general hydrographic) Data — ctd-class","text":"class stores hydrographic data measured CTD (conductivity, temperature, depth) instrument, systems produce similar data.  Data repositories may store conductivity, temperature depth, instrument name, also common store salinity, temperature pressure instead (addition). reason, ctd objects required hold salinity, temperature pressure data slot, data optional. Formulae available converting variants data triplets, e.g. swSCTp() can calculate salinity given conductivity, temperature pressure, used main functions create ctd objects. example, read.ctd.sbe() used read Seabird file contains conductivity, temperature pressure, function automatically append data item hold salinity.  Since .ctd() salinity, result ctd objects hold salinity, temperature pressure, henceforth called three basic quantities.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctd-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Class to Store CTD (or general hydrographic) Data — ctd-class","text":"Different units scales permitted three basic quantities, oce functions check units scales calculations (e.g. seawater density), calculations demand certain units scales. way handled accessor function [[,ctd-method] returns values standardized form. example, ctd object might hold temperature defined IPTS-68 scale, e.g. ctd[[\"temperature\"]] returns value -90 scale. (conversion done T90fromT68().)  Similarly, pressure may stored either dbars PSI, e.g. ctd[[\"pressure\"]] returns value dbars, dividing 0.689476 value stored PSI. Luckily, (early 2016) one salinity scale common use data files, namely PSS-78.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctd-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store CTD (or general hydrographic) Data — ctd-class","text":"data oce objects, data slot ctd objects list containing main data object. key items stored slot : salinity, temperature, pressure, although many instances quite additional items. metadata oce objects, metadata slot ctd objects list containing information data object . example former might location ctd measurement made, stored longitude latitude, latter might filename, name data source. processingLog oce objects, processingLog slot ctd objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctd-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store CTD (or general hydrographic) Data — ctd-class","text":"Although [[<- operator may permit modification contents ctd objects (see [[<-,ctd-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctd-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store CTD (or general hydrographic) Data — ctd-class","text":"full contents data metadata slots ctd object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,ctd-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,ctd-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctd-class.html","id":"reading-creating-ctd-objects","dir":"Reference","previous_headings":"","what":"Reading/creating ctd objects","title":"Class to Store CTD (or general hydrographic) Data — ctd-class","text":"file containing CTD profile data may read read.ctd(), CTD object can also created .ctd().  See read.ctd() references data formats used CTD files. Data can also assembled ctd objects .ctd(). Statistical summaries provided summary,ctd-method(), show() displays overview. CTD objects may plotted plot,ctd-method(), much work calling plotProfile() plotTS(), can also called user, get fine control plots. CTD profile can isolated larger record ctdTrim(), task made easier plotScan() used examine results. Towyow data can split sets profiles (ascending descending) ctdFindProfiles().  CTD data may smoothed /cast onto specified pressure levels ctdDecimate(). oce objects, low-level manipulation may done oceSetData() oceSetMetadata(). Additionally, many contents CTD objects may altered [[<-,ctd-method scheme, sufficiently skilled users may even manipulate contents directly.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctd-class.html","id":"data-sources","dir":"Reference","previous_headings":"","what":"Data sources","title":"Class to Store CTD (or general hydrographic) Data — ctd-class","text":"Archived CTD () data may found servers https://cchdo.ucsd.edu/","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctd-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store CTD (or general hydrographic) Data — ctd-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ctd-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Class to Store CTD (or general hydrographic) Data — ctd-class","text":"","code":"# 1. Create a ctd object with fake data. a <- as.ctd(salinity = 35 + 1:3 / 10, temperature = 10 - 1:3 / 10, pressure = 1:3) summary(a) #> CTD Summary #> ----------- #>  #> * Data Overview #>  #>                              Min. Mean Max. Dim. NAs #>     scan                     1    2    3    3    0   #>     salinity [PSS-78]        35.1 35.2 35.3 3    0   #>     temperature [°C, ITS-90] 9.7  9.8  9.9  3    0   #>     pressure [dbar]          1    2    3    3    0   #>  #> * Processing Log #>  #>     - 2024-09-24 10:26:53 UTC: `create 'ctd' object` #>     - 2024-09-24 10:26:53 UTC: `as.ctd(salinity = 35 + 1:3/10, temperature = 10 - 1:3/10, pressure = 1:3)`  # 2. Fix a typo in a station latitude (fake! it's actually okay) data(ctd) ctd <- oceSetMetadata(     ctd, \"latitude\", ctd[[\"latitude\"]] - 0.001,     \"fix latitude typo in log book\" )"},{"path":"https://dankelley.github.io/oce/reference/ctd.cnv.gz.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample ctd File in .cnv Format — ctd.cnv.gz","title":"Sample ctd File in .cnv Format — ctd.cnv.gz","text":"Sample ctd File .cnv Format","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctd.cnv.gz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample ctd File in .cnv Format — ctd.cnv.gz","text":"","code":"read.oce(system.file(\"extdata\", \"ctd.cnv.gz\", package=\"oce\")) #> Warning: startTime (1903-10-15 11:38:38) is < 1950, suggesting a turn-of-the-century problem in this cnv file #> Warning: this CNV file has temperature in the IPTS-68 scale, and this is stored in object, but note  that [[\"temperature\"]] and the sw* functions convert the numbers to ITS-90 values #> ctd object, from file \"/private/var/folders/8b/l4h64m1j22v5pb7vj049ff140000gn/T/RtmpFbPNQ2/temp_libpath17ff52acea456/oce/extdata/ctd.cnv.gz\", with data slot containing: #>    scan[1:181]: 130, 131, ..., 309, 310 #>    timeS[1:181]: 129, 130, ..., 308, 309 #>    pressure[1:181]: 1.480, 1.671, ..., 43.903, 44.141 #>    depth[1:181]: 1.468, 1.657, ..., 43.542, 43.778 #>    temperature[1:181]: 14.225, 14.230, ..., 2.9190, 2.9194 #>    salinity[1:181]: 29.921, 29.921, ..., 31.395, 31.393 #>    flag[1:181]: 0, 0, ..., 0, 0"},{"path":"https://dankelley.github.io/oce/reference/ctd.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample ctd Data — ctd","title":"Sample ctd Data — ctd","text":"CTD profile measured Halifax Harbour 2003, based ctdRaw(), trimmed just downcast ctdTrim(), using indices inferred inspection results plotScan().","code":""},{"path":"https://dankelley.github.io/oce/reference/ctd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample ctd Data — ctd","text":"","code":"data(ctd)"},{"path":"https://dankelley.github.io/oce/reference/ctd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample ctd Data — ctd","text":"station sampled students enrolled Dan Kelley's Physical Oceanography class Dalhousie University.  data acquired near centre Bedford Basin Halifax Harbour, October 2003 field trip Dalhousie University's Oceanography 4120/5120 class.  Note startTime metadata slot altered 1903 2003, using oceEdit(). change done original time clearly incorrect, perhaps owing use software designed work twentieth century .","code":""},{"path":"https://dankelley.github.io/oce/reference/ctd.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Sample ctd Data — ctd","text":"","code":"library(oce) data(ctd) plot(ctd)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctdDecimate.html","id":null,"dir":"Reference","previous_headings":"","what":"Decimate a ctd Profile — ctdDecimate","title":"Decimate a ctd Profile — ctdDecimate","text":"Interpolate CTD profile specified pressure values.  used sectionGrid(), also useful dealing individual CTD/bottle profiles.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdDecimate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decimate a ctd Profile — ctdDecimate","text":"","code":"ctdDecimate(   x,   p = 1,   method = \"boxcar\",   rule = 1,   e = 1.5,   na.rm = FALSE,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/ctdDecimate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decimate a ctd Profile — ctdDecimate","text":"x ctd object. p pressure increment, vector pressures.  first case, pressures 0dbar rounded maximum pressure used, incrementing p dbars.  vector pressures given, interpolation done pressures. method method used calculating decimated values.  may string specifying method, function. string case, possibilities follows. \"boxcar\" (based local average) \"approx\" (based linear interpolation neighboring points, using approx() rule argument specified ) \"approxML\" \"approx\", except mixed layer assumed apply top data value; done setting yleft argument approx(), calling function rule=c(2, 1)) \"lm\" (based local regression, e setting size local region); \"rr\" Reiniger Ross method, carried oce.approx(); \"unesco\" (UNESCO method, carried oce.approx(). hand, method function, must take two arguments, named data parameters. first set x@data ctdTrim(). second passed directly user's function (see Example 2). return value function must logical vector length pressure data, TRUE values meaning keep corresponding entries data slot. rule integer passed approx(), case method \"approx\". Note default value rule 1, inhibit extrapolation beyond observed pressure range. change behaviour previous May 8, 2017, rule 2 used (without stating argument). e expansion coefficient used calculate local neighbourhoods \"boxcar\" \"lm\" methods.  e=1, neighbourhood -th pressure extends (-1)-th pressure (+1)-th pressure.  endpoints assumed outside bin pressure range first inside bin.  values e, neighbourhood expanded linearly direction.  \"lm\" method produces warnings \"prediction rank-deficient fit\", larger value \"e\" used. na.rm logical value indicating whether remove NA values decimating.  value ignored unless method boxcar case passed binMean1D() averaging. parameter added February 2024, behaviour ctdDecimate() prior date equivalent na.rm=FALSE, default value, even though expected many uses find using TRUE convenient. See https://github.com/dankelley/oce/issues/2192 discussion. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdDecimate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decimate a ctd Profile — ctdDecimate","text":"ctd object, pressures set \"p\" parameter properties modified appropriately.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdDecimate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decimate a ctd Profile — ctdDecimate","text":"\"approx\" \"approxML\" methods may best bottle data, usual task interpolate coarse sampling grid finer one. distinction \"approxML\" assumes mixed-layer top sample value. CTD data, \"boxcar\" method may preferred choice, task normally sub-sample, degree smoothing usually desired.  (\"lm\" method can quite slow, results may quite similar boxcar method.) widely-spaced data, sort numerical cabeling effect can result density computed based interpolated salinity temperature. See reference 2 discussion issue possible solutions.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdDecimate.html","id":"a-note-about-flags","dir":"Reference","previous_headings":"","what":"A note about flags","title":"Decimate a ctd Profile — ctdDecimate","text":"Data-quality flags contained within original object ignored function, returned value contains flags.  flags represent assessment original data, quantities derived data.  function produces warning effect. recommended practice use handleFlags() means deal flags calling present function.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdDecimate.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Decimate a ctd Profile — ctdDecimate","text":"R.F. Reiniger C.K. Ross, 1968.  method interpolation application oceanographic data.  Deep Sea Research, 15, 185-193. Oguma, Sachiko, Toru Suzuki, Yutaka Nagata, Hidetoshi Watanabe, Hatsuyo Yamaguchi, Kimio Hanawa. “Interpolation Scheme Standard Depth Data Applicable Areas Complex Hydrographical Structure.” Journal Atmospheric Oceanic Technology 21, . 4 (April 1, 2004): 704-15.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctdDecimate.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Decimate a ctd Profile — ctdDecimate","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdDecimate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decimate a ctd Profile — ctdDecimate","text":"","code":"library(oce) data(ctd) plotProfile(ctd, \"salinity\", ylim = c(10, 0)) p <- seq(0, 45, 1) ctd2 <- ctdDecimate(ctd, p = p) lines(ctd2[[\"salinity\"]], ctd2[[\"pressure\"]], col = \"blue\") p <- seq(0, 45, 1) ctd3 <- ctdDecimate(ctd, p = p, method = function(x, y, xout) {     predict(smooth.spline(x, y, df = 30), xout)$y }) lines(ctd3[[\"salinity\"]], ctd3[[\"pressure\"]], col = \"red\")"},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfiles.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Profiles Within a Tow-Yow ctd Record — ctdFindProfiles","title":"Find Profiles Within a Tow-Yow ctd Record — ctdFindProfiles","text":"Examine pressure record looking extended periods either ascent descent, return either indices events vector CTD records containing events.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfiles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Profiles Within a Tow-Yow ctd Record — ctdFindProfiles","text":"","code":"ctdFindProfiles(   x,   cutoff = 0.5,   minLength = 10,   minHeight,   smoother = smooth.spline,   direction = c(\"descending\", \"ascending\"),   breaks,   arr.ind = FALSE,   distinct,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfiles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Profiles Within a Tow-Yow ctd Record — ctdFindProfiles","text":"x ctd object. cutoff criterion pressure difference; see “Details”. provided, defaults 0.5. minLength lower limit number points candidate profiles. provided, defaults 10. minHeight lower limit height candidate profiles. provided, defaults 0.1 times pressure span. smoother smoothing function use identifying /casts. default smooth.spline, performs well small number cycles; see “Examples” method better long tow-yo. return value smoother must either list containing element named y something can coerced vector .vector(). turn smoothing , cycles pressure determined simple first difference, set smoother NULL. direction String indicating travel direction selected. breaks optional integer vector indicating indices last datum profile stored within x. Thus, first profile return value contain x data indices 1 breaks[1].  breaks given, arguments except x ignored. Using breaks handy cases schemes fail, author independent knowledge profiles strung together x. arr.ind logical value indicating whether array indices returned; alternative return vector ctd objects. distinct optional string indicating identify profiles unique values. Use \"location\" find profiles change longitude latitude, use name item data slot x. cases, arguments except x ignored. However, distinct supplied, arguments handled described . debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. ... Optional extra arguments passed smoothing function, smoother.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfiles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find Profiles Within a Tow-Yow ctd Record — ctdFindProfiles","text":"arr.ind=TRUE, data frame columns start end, indices downcasts.  Otherwise, vector ctd objects. second case, station names set form like \"10/3\", third profile within original ctd object station name \"10\", \"3\", original ctd object station name defined.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfiles.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find Profiles Within a Tow-Yow ctd Record — ctdFindProfiles","text":"method works examining pressure record.  First, smoothed using smoother() (see “Arguments”), result first-differenced using diff().  Median values positive negative first-difference values multiplied cutoff.  establishes criteria given point ascending profile, descending profile, non-profile. Contiguous regions found, fewer minLength points discarded.  , pressure ranges less minHeight discarded. Caution: method well-suited datasets. example, default value smoother smooth.spline(), works well just profiles, poorly tow-yo long sequence profiles; latter case, can preferable use simpler smoothers (see “Examples”). Also, depending sampling protocol, often necessary pass resultant profiles ctdTrim(), remove artifacts equilibration phase, etc. Generally, one well-advised use present function quick look data, relying e.g. plotScan() identify profiles visually, final product.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfiles.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Find Profiles Within a Tow-Yow ctd Record — ctdFindProfiles","text":"","code":"library(oce) # These examples cannot be tested, because they are based on # data objects that are not provided with oce.  # Example 1. Find profiles within a towyo file, as can result # if the CTD is cycled within the water column as the ship # moves. profiles <- ctdFindProfiles(towyo)  # Example 2. Use a moving average to smooth pressure, instead of the # default smooth.spline() method. This might avoid a tendency of # the default scheme to miss some profiles in a long towyo. movingAverage <- function(x, n = 11, ...) {     f <- rep(1/n, n)     stats::filter(x, f, ...) } casts <- ctdFindProfiles(towyo, smoother=movingAverage)  # Example 3: glider data read into a ctd object. Chop # into profiles by looking for pressure jumps exceeding # 10 dbar. breaks <- which(diff(gliderAsCtd[[\"pressure\"]]) > 10) profiles <- ctdFindProfiles(gliderAsCtd, breaks=breaks)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfiles.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find Profiles Within a Tow-Yow ctd Record — ctdFindProfiles","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfilesRBR.html","id":null,"dir":"Reference","previous_headings":"","what":"Find Profiles Within a ctd Object Read From a RBR File — ctdFindProfilesRBR","title":"Find Profiles Within a ctd Object Read From a RBR File — ctdFindProfilesRBR","text":"uses information profiles contained within metadata slot first parameter, x, inserted read.rsk(). x created reading .rsk file read.rsk(), file contained geographical information (, data table named geodata) first longitude latitude profile stored metadata slot returned value.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfilesRBR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find Profiles Within a ctd Object Read From a RBR File — ctdFindProfilesRBR","text":"","code":"ctdFindProfilesRBR(   x,   direction = \"descending\",   arr.ind = FALSE,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfilesRBR.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find Profiles Within a ctd Object Read From a RBR File — ctdFindProfilesRBR","text":"x either rsk ctd object; former case, converted ctd object .ctd(). direction character value, either \"descending\" \"ascending\", indicating sampling direction selected.  default, \"descending\", commonly preferred choice. arr.ind logical value indicating whether array indices returned; alternative return vector ctd objects. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctdFindProfilesRBR.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find Profiles Within a ctd Object Read From a RBR File — ctdFindProfilesRBR","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdRaw.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample ctd Data, Not Trimmed of Extraneous Data — ctdRaw","title":"Sample ctd Data, Not Trimmed of Extraneous Data — ctdRaw","text":"sample CTD profile provided testing.  includes just (useful) portion dataset instrument lowered, also data upcast time spent near surface.  Spikes also clearly evident pressure record.  real-world wrinkles, dataset provides good example data need trimming ctdTrim().","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdRaw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample ctd Data, Not Trimmed of Extraneous Data — ctdRaw","text":"","code":"data(ctdRaw)"},{"path":"https://dankelley.github.io/oce/reference/ctdRaw.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample ctd Data, Not Trimmed of Extraneous Data — ctdRaw","text":"station sampled students enrolled Dan Kelley's Physical Oceanography class Dalhousie University.  data acquired near centre Bedford Basin Halifax Harbour, October 2003 field trip Dalhousie University's Oceanography 4120/5120 class. (Note startTime metadata slot altered 1903 2003, using oceEdit(). change done original time clearly incorrect, perhaps owing use software designed work twentieth .)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctdRepair.html","id":null,"dir":"Reference","previous_headings":"","what":"Repair a Malformed ctd Object — ctdRepair","title":"Repair a Malformed ctd Object — ctdRepair","text":"Make ctd object adhere closely expected form, e.g. moving certain things data slot metadata slot, oce functions may assume located. can handy objects set incorrectly, perhaps inappropriate user insertions.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdRepair.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Repair a Malformed ctd Object — ctdRepair","text":"","code":"ctdRepair(x, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/ctdRepair.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Repair a Malformed ctd Object — ctdRepair","text":"x ctd object. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdRepair.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Repair a Malformed ctd Object — ctdRepair","text":"ctd object based x, possibly elements changed described “Details” section.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdRepair.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Repair a Malformed ctd Object — ctdRepair","text":"possible changes fall following categories. unit-length values latitude, longitude, time, station exist data slot, move metadata slot.  However, leave data  length exceeds 1, can arise towyo data. metadata data slot contains items named time, recoveryTime, startTime, systemUploadTime, POSIXt format, use .POSIXct() tz=\"UTC\" convert POSIXt format. conversion fails, owing unrecognizable format, original value retained, unaltered.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctdRepair.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Repair a Malformed ctd Object — ctdRepair","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdRepair.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Repair a Malformed ctd Object — ctdRepair","text":"","code":"library(oce) data(ctd) # Insert location information into 'data' slot, although it belongs in 'metadata'. ctd@data$latitude <- ctd@metadata$latitude # Done by experts only! ctd@data$longitude <- ctd@metadata$longitude # Done by experts only! repaired <- ctdRepair(ctd) #> Warning: moving unit-length data$longitude to metadata$longitude #> Warning: moving unit-length data$latitude to metadata$latitude #> Warning: changed metadata$recoveryTime to a POSIXct value"},{"path":"https://dankelley.github.io/oce/reference/ctdTrim.html","id":null,"dir":"Reference","previous_headings":"","what":"Trim Beginning and Ending of a CTD cast — ctdTrim","title":"Trim Beginning and Ending of a CTD cast — ctdTrim","text":"Often CTD profiling, goal isolate downcast, discarding measurements made air, equilibration phase device held water surface, upcast phase follows downcast.  handled reasonably well ctdTrim method=\"downcast\", although almost always best use plotScan() investigate data, use method=\"index\" method=\"scan\" method based visual inspection data.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdTrim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trim Beginning and Ending of a CTD cast — ctdTrim","text":"","code":"ctdTrim(   x,   method,   removeDepthInversions = FALSE,   parameters = NULL,   indices = FALSE,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/ctdTrim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trim Beginning and Ending of a CTD cast — ctdTrim","text":"x ctd object. method string (vector two strings) specifying trimming method, function used determine data indices keep.  method provided, \"downcast\" assumed. See “Details”. removeDepthInversions Logical value indicating whether remove levels depth less , equal , depth .  (needed object assembled section, unless ctdDecimate() used, remove inversions. parameters list whose elements depend method; see “Details”. indices Logical value indicating return. indices=FALSE (default), return value subsetted ctd object. indices=TRUE, return value logical vector used subset data subset,ctd-method() set data-quality flags. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdTrim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trim Beginning and Ending of a CTD cast — ctdTrim","text":"Either ctd object logical vector length matching data. first case, default, elements data slot trimmed, along elements metadata slot (e.g. metadata4flags , present length matching data$pressure, metadata$longitude metadata$latitude).  second case, achieved setting indices=FALSE, may helpful advanced users wish things like construct data flags inserted object.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdTrim.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Trim Beginning and Ending of a CTD cast — ctdTrim","text":"ctdTrim begins examining pressure differences subsequent samples. value, input ctd object returned, unaltered. handles case pressure-binned data. However, pressure difference varies, variety approaches taken trimming dataset. method[1] \"downcast\" attempt made keep data CTD descending.  done stages, variants based method[2], supplied. pressure data despiked smooth() filter method \"3R\". removes wild spikes arise poor instrument connections, etc. Step 2. parameters given, data negative pressures deleted.  parameter named pmin, pressure (decibars) used instead lower limit. commonly-used setup, e.g. ctdTrim(ctd, parameters=list(pmin=1)) removes top decibar (roughly 1m) data.  Specifying pmin simple way remove near-surface data, shallow equilibration phase, specified cause ctdTrim skip step 4 . maximum pressure determined, data acquired subsequent point deleted.  removes upcast subsequent data. pmin parameter specified, attempt made remove initial equilibrium phase regression pressure scan number.  three variants , depending value second method element. method \"\" (given), procedure call nls() fit piecewise linear model pressure function scan, pressure constant scan less critical value, linearly varying scan.  meant handle common situation CTD held roughly constant depth (typically metre ) equilibrate, lowered water column. method \"B\", procedure similar, except pressure surface region taken zero (make much sense, might help cases). Note , prior early 2016, method \"B\" called method \"C\"; old \"B\" method judged useless removed. method=\"upcast\", sort reverse \"downcast\" used. added late April 2017 well tested yet. method=\"sbe\", method similar described SBE Data Processing manual used remove \"soak\" period beginning cast (see Section 6 subsection \"Loop Edit\"). method based soak procedure whereby instrument sits fixed depth period time, raised toward surface beginning actual downcast. enables equilibration sensors still permitting reasonably good near-surface data. Parameters method can passed using parameters argument, include minSoak (minimum depth soak) maxSoak maximum depth soak. method finds minimum pressure prior maxSoak value passed, occurring scan minSoak value reached. method work, pre-cast pressure minimum must less minSoak value. default values minSoak maxSoak 1 20 dbar, respectively. method=\"index\" \"scan\", column data subsetted according value parameters. latter logical vector length matching data column length, used directly subsetting. parameters numerical vector two elements, index scan values lie parameters[1] parameters[2] (inclusive) used subsetting.  two-element method probably useful, values determined visual inspection results plotScan(). may take minute two, analyst bear mind deep-water CTD profile might take 6 hours, corresponding ship-time costs exceeding week salary. method=\"range\" data selected based value column named parameters$item.  may range critical value.  range: select values parameters$(lower limit) parameters$(upper limit) critical value: select named column exceeds value.  example, ctd2 <-     ctdTrim(ctd, \"range\", parameters=list(item=\"scan\", =5)) starts scan number 5 continues end, ctdTrim(ctd,\"range\", parameters=list(item=\"scan\", =5, =100)) also starts scan 5, extends scan 100. method function, must return vector logical() values, computed based two arguments: data (list()), parameters supplied ctdTrim.  inferWaterDepth removeInversions ignored function case. See “Examples”.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdTrim.html","id":"historical-note","dir":"Reference","previous_headings":"","what":"Historical Note","title":"Trim Beginning and Ending of a CTD cast — ctdTrim","text":"subsetting longitude latitude metadata slot introduced 2022-12-13, use ctd objects created using .ctd() rsk objects created using read.rsk() Ruskin files hold data RBR CTD instruments linked phone/tablet devices equipped GPS sensors.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctdTrim.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Trim Beginning and Ending of a CTD cast — ctdTrim","text":"","code":"library(oce) data(ctdRaw) # Example 1: focus on downcast plot(ctdTrim(ctdRaw)) # Example 2: user-supplied function. trimByIndex<-function(data, parameters) {     parameters[1] < data$scan & data$scan < parameters[2] } trimmed <- ctdTrim(ctdRaw, trimByIndex, parameters=c(130, 380)) plot(trimmed)"},{"path":"https://dankelley.github.io/oce/reference/ctdTrim.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Trim Beginning and Ending of a CTD cast — ctdTrim","text":"Seabird CTD instrument described http://www.seabird.com/products/spec_sheets/19plusdata.htm. Seasoft V2: SBE Data Processing, SeaBird Scientific, 05/26/2016","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctdTrim.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trim Beginning and Ending of a CTD cast — ctdTrim","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/ctd_aml.csv.gz.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample ctd File in aml Format — ctd_aml.csv.gz","title":"Sample ctd File in aml Format — ctd_aml.csv.gz","text":"file may read read.ctd.aml().  based file donated Ashley Stanek, shortened just 50 points inclusion oce, identifying information (serial number, IP address, WEP code) zeroed-.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctd_aml.csv.gz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample ctd File in aml Format — ctd_aml.csv.gz","text":"","code":"ctd <- read.ctd.aml(system.file(\"extdata\", \"ctd_aml.csv.gz\", package=\"oce\")) summary(ctd) #> CTD Summary #> ----------- #>  #> * File:                \"/private/var/folders/8b/l4h64m1j22v5pb7vj049ff140000gn/T/RtmpSsGnPb/temp_libpath8f1f3aac60fb/oce/extdata/ctd_aml.csv.gz\" #> * Mean Location:       70.228N 145.85W #> * Time: 2021-07-25 18:22:28 to 2021-07-25 18:22:30 (50 samples, mean increment 0.04020408 s) #> * Data Overview #>  #>                              Min.                Mean                Max.                Dim. NAs OriginalName           #>     scan                     1                   25.5                50                  50   0   \"-\"                    #>     salinity [PSS-78]        5.5779              26.323              28.503              50   0   \"-\"                    #>     temperature [°C, ITS-90] 3.414               4.8729              5.671               50   0   \"Temperature (C)\"      #>     pressure [dbar]          0.22                0.8592              1.69                50   0   \"-\"                    #>     conductivity [mS/cm]     6.281               25.687              27.139              50   0   \"Conductivity (mS/cm)\" #>     time                     2021-07-25 18:22:28 2021-07-25 18:22:29 2021-07-25 18:22:30 50   0   \"-\"                    #>     Date                     NA                  NA                  NA                  50   0   \"Date\"                 #>     Time                     NA                  NA                  NA                  50   0   \"Time\"                 #>     battery [V]              7.93                7.93                7.93                50   0   \"Battery (V)\"          #>  #> * Processing Log #>  #>     - 2024-09-06 11:48:28 UTC: `create 'ctd' object` #>     - 2024-09-06 11:48:28 UTC: `as.ctd(salinity = S, temperature = data$temperature, pressure = data$pressure,     conductivity = data$conductivity, serialNumber = serialNumber,     longitude = longitude, latitude = latitude, debug = debug -         1L)` #>     - 2024-09-06 11:48:28 UTC: `read.ctd.aml(file = system.file(\"extdata\", \"ctd_aml.csv.gz\",     package = \"oce\"))` plot(ctd)"},{"path":"https://dankelley.github.io/oce/reference/ctd_aml_type1.csv.gz.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample ctd File in aml Format 1 — ctd_aml_type1.csv.gz","title":"Sample ctd File in aml Format 1 — ctd_aml_type1.csv.gz","text":"file may read read.ctd.aml().  based file donated Ashley Stanek, shortened just 5 points inclusion oce, identifying information (serial number, IP address, WEP code) redacted.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctd_aml_type1.csv.gz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample ctd File in aml Format 1 — ctd_aml_type1.csv.gz","text":"","code":"ctd <- read.ctd.aml(system.file(\"extdata\", \"ctd_aml_type1.csv.gz\", package=\"oce\"))"},{"path":"https://dankelley.github.io/oce/reference/ctd_aml_type3.csv.gz.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample ctd File in aml Format 3 — ctd_aml_type3.csv.gz","title":"Sample ctd File in aml Format 3 — ctd_aml_type3.csv.gz","text":"file may read read.ctd.aml().  based file created Sailfish 1.4.8.0 software, explained oce issue https://github.com/dankelley/oce/issues/2247. first 5 data points provided .","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctd_aml_type3.csv.gz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample ctd File in aml Format 3 — ctd_aml_type3.csv.gz","text":"","code":"ctd <- read.ctd.aml(system.file(\"extdata\", \"ctd_aml_type3.csv.gz\", package=\"oce\"))"},{"path":"https://dankelley.github.io/oce/reference/ctimeToSeconds.html","id":null,"dir":"Reference","previous_headings":"","what":"Interpret a Character String as a Time Interval — ctimeToSeconds","title":"Interpret a Character String as a Time Interval — ctimeToSeconds","text":"Infer time interval character string form MM:SS HH:MM:SS.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctimeToSeconds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interpret a Character String as a Time Interval — ctimeToSeconds","text":"","code":"ctimeToSeconds(ctime)"},{"path":"https://dankelley.github.io/oce/reference/ctimeToSeconds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interpret a Character String as a Time Interval — ctimeToSeconds","text":"ctime character string (see “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/ctimeToSeconds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Interpret a Character String as a Time Interval — ctimeToSeconds","text":"numeric value, number seconds represented string.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ctimeToSeconds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Interpret a Character String as a Time Interval — ctimeToSeconds","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ctimeToSeconds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Interpret a Character String as a Time Interval — ctimeToSeconds","text":"","code":"library(oce) cat(\"10      = \", ctimeToSeconds(\"10\"), \"s\\n\", sep = \"\") #> 10      = 10s cat(\"01:04   = \", ctimeToSeconds(\"01:04\"), \"s\\n\", sep = \"\") #> 01:04   = 64s cat(\"1:00:00 = \", ctimeToSeconds(\"1:00:00\"), \"s\\n\", sep = \"\") #> 1:00:00 = 3600s"},{"path":"https://dankelley.github.io/oce/reference/curl.html","id":null,"dir":"Reference","previous_headings":"","what":"Curl of 2D Vector Field — curl","title":"Curl of 2D Vector Field — curl","text":"Calculate z component curl x-y vector field.","code":""},{"path":"https://dankelley.github.io/oce/reference/curl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Curl of 2D Vector Field — curl","text":"","code":"curl(u, v, x, y, geographical = FALSE, method = 1)"},{"path":"https://dankelley.github.io/oce/reference/curl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Curl of 2D Vector Field — curl","text":"u matrix containing 'x' component vector field v matrix containing 'y' component vector field x x values matrices, vector length equal number rows u v. y y values matrices, vector length equal number cols u v. geographical logical value indicating whether x y longitude latitude, case spherical trigonometry used. method number indicating method used calculate first-difference approximations derivatives.  See “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/curl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Curl of 2D Vector Field — curl","text":"list containing vectors x y, along matrix curl.  See “Details” lengths dimensions, various values method.","code":""},{"path":"https://dankelley.github.io/oce/reference/curl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Curl of 2D Vector Field — curl","text":"computed component curl defined \\(\\partial \\)\\( v/\\partial x - \\partial u/\\partial y\\) estimate made using first-difference approximations derivatives. Two methods provided, selected value method. method=1, centred-difference, 5-point stencil used interior domain.  example, \\(\\partial v/\\partial x\\) given ratio \\(v_{+1,j}-v_{-1,j}\\) x extent grid cell index \\(j\\). (cell extents depend value geographical.)  , edges filled nearest-neighbour values. Finally, corners filled adjacent value along diagonal.  geographical=TRUE, x y taken longitude latitude degrees, earth shape approximated sphere radius 6371km.  resultant x y identical provided values, resultant curl matrix dimension identical u. method=2, interior cell grid considered individually, derivatives calculated cell center. example, \\(\\partial v/\\partial x\\) given ratio \\(0.5*(v_{+1,j}+v_{+1,j+1}) - 0.5*(v_{,j}+v_{,j+1})\\) average x extent grid cell indices \\(j\\) \\(j+1\\). (cell extents depend value geographical.)  returned x y values mid-points supplied values. Thus, returned x y shorter supplied values 1 item, returned curl matrix dimensions similarly reduced compared dimensions u v.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/curl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Curl of 2D Vector Field — curl","text":"Dan Kelley Chantelle Layton","code":""},{"path":"https://dankelley.github.io/oce/reference/curl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Curl of 2D Vector Field — curl","text":"","code":"library(oce) # 1. Shear flow with uniform curl. x <- 1:4 y <- 1:10 u <- outer(x, y, function(x, y) y / 2) v <- outer(x, y, function(x, y) -x / 2) C <- curl(u, v, x, y, FALSE)  # 2. Rankine vortex: constant curl inside circle, zero outside rankine <- function(x, y) {     r <- sqrt(x^2 + y^2)     theta <- atan2(y, x)     speed <- ifelse(r < 1, 0.5 * r, 0.5 / r)     list(u = -speed * sin(theta), v = speed * cos(theta)) } x <- seq(-2, 2, length.out = 100) y <- seq(-2, 2, length.out = 50) u <- outer(x, y, function(x, y) rankine(x, y)$u) v <- outer(x, y, function(x, y) rankine(x, y)$v) C <- curl(u, v, x, y, FALSE) # plot results par(mfrow = c(2, 2)) imagep(x, y, u, zlab = \"u\", asp = 1) imagep(x, y, v, zlab = \"v\", asp = 1) imagep(x, y, C$curl, zlab = \"curl\", asp = 1) hist(C$curl, breaks = 100)"},{"path":"https://dankelley.github.io/oce/reference/d200321-001.ctd.gz.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample ctd File in .ctd Format — d200321-001.ctd.gz","title":"Sample ctd File in .ctd Format — d200321-001.ctd.gz","text":"Sample ctd File .ctd Format","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/d200321-001.ctd.gz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample ctd File in .ctd Format — d200321-001.ctd.gz","text":"","code":"read.oce(system.file(\"extdata\", \"d200321-001.ctd.gz\", package=\"oce\")) #> ctd object, from file \"/private/var/folders/8b/l4h64m1j22v5pb7vj049ff140000gn/T/RtmpFbPNQ2/temp_libpath17ff52acea456/oce/extdata/d200321-001.ctd.gz\", with data slot containing: #>    pressure[1:1147]: 1, 2, ..., 1146, 1147 #>    temperature[1:1147]: -1.1999, -1.2250, ..., -0.1404, -0.1399 #>    salinity[1:1147]: 28.428, 27.982, ..., 34.897, 34.897 #>    oxygen[1:1147]: 8.77, 8.76, ..., 6.84, 6.84 #>    fluorescence[1:1147]: 0.026, 0.011, ..., 0.014, 0.014 #>    transmission[1:1147]: 87.679, 88.029, ..., 88.536, 88.571"},{"path":"https://dankelley.github.io/oce/reference/d201211_0011.cnv.gz.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample ctd File in .cnv Format — d201211_0011.cnv.gz","title":"Sample ctd File in .cnv Format — d201211_0011.cnv.gz","text":"Sample ctd File .cnv Format","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/d201211_0011.cnv.gz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample ctd File in .cnv Format — d201211_0011.cnv.gz","text":"","code":"read.oce(system.file(\"extdata\", \"d201211_0011.cnv.gz\", package=\"oce\")) #> ctd object, from file \"/private/var/folders/8b/l4h64m1j22v5pb7vj049ff140000gn/T/RtmpFbPNQ2/temp_libpath17ff52acea456/oce/extdata/d201211_0011.cnv.gz\", with data slot containing: #>    scan[1:78]: 10569, 10673, ..., 15306, 17116 #>    pressure[1:78]: 1, 2, ..., 77, 78 #>    depth[1:78]: 0.99, 1.98, ..., 76.200, 77.189 #>    temperature[1:78]: -0.0155,  0.0005, ..., 1.3833, 1.2639 #>    temperature2[1:78]: -0.0104,  0.0004, ..., 1.3624, 1.2667 #>    conductivity[1:78]: 21.490, 21.526, ..., 27.499, 27.433 #>    conductivity2[1:78]: 21.492, 21.537, ..., 27.488, 27.437 #>    oxygenRaw[1:78]: 2.5958, 2.6078, ..., 2.9210, 2.9245 #>    beamTransmission[1:78]: 86.142, 85.844, ..., 68.275, 68.242 #>    v1[1:78]: 4.2040, 4.1896, ..., 3.3438, 3.3422 #>    fluorescence[1:78]: 0.1562, 0.1640, ..., 0.2869, 0.2883 #>    v0[1:78]: 0.2842, 0.2989, ..., 0.5309, 0.5335 #>    fluorescence2[1:78]: 3.1228, 3.2319, ..., 4.3922, 4.4032 #>    v4[1:78]: 0.1974, 0.2019, ..., 0.2493, 0.2497 #>    upoly[1:78]: 0.2782, 0.2976, ..., 0.2920, 0.2724 #>    par[1:78]: 10.430,  8.809, ..., 1e-12, 1e-12 #>    spar[1:78]: -9, -9, ..., -9, -9 #>    altimeter[1:78]: 88.04, 87.61, ..., 10.99, 10.02 #>    oxygen[1:78]: 8.8168, 8.8604, ..., 9.2459, 9.2883 #>    salinity[1:78]: 25.164, 25.196, ..., 31.477, 31.514 #>    salinity2[1:78]: 25.162, 25.210, ..., 31.485, 31.516 #>    theta[1:78]: -0.0155,  0.0005, ..., 1.3801, 1.2607 #>    sigmaTheta[1:78]: 20.174, 20.200, ..., 25.191, 25.228 #>    soundSpeed[1:78]: 1436.0, 1436.1, ..., 1452.0, 1451.5 #>    nbin[1:78]: 74, 37, ..., 124, 225 #>    flag[1:78]: 222, 222, ..., 222, 222"},{"path":"https://dankelley.github.io/oce/reference/dataLabel.html","id":null,"dir":"Reference","previous_headings":"","what":"Associate Data Names With Units — dataLabel","title":"Associate Data Names With Units — dataLabel","text":"Note whole object given argument; possibly reduce copying thus storage impact.","code":""},{"path":"https://dankelley.github.io/oce/reference/dataLabel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Associate Data Names With Units — dataLabel","text":"","code":"dataLabel(names, units)"},{"path":"https://dankelley.github.io/oce/reference/dataLabel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Associate Data Names With Units — dataLabel","text":"names names data within object units units metadata","code":""},{"path":"https://dankelley.github.io/oce/reference/dataLabel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Associate Data Names With Units — dataLabel","text":"vector strings, blank entries data unknown units","code":""},{"path":"https://dankelley.github.io/oce/reference/decimate.html","id":null,"dir":"Reference","previous_headings":"","what":"Smooth and Decimate, or Subsample, an oce Object — decimate","title":"Smooth and Decimate, or Subsample, an oce Object — decimate","text":"Later , methods added, ctdDecimate() retired favour , general, function.  filtering done filter() function stats package.","code":""},{"path":"https://dankelley.github.io/oce/reference/decimate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Smooth and Decimate, or Subsample, an oce Object — decimate","text":"","code":"decimate(x, by = 10, to, filter, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/decimate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Smooth and Decimate, or Subsample, an oce Object — decimate","text":"x oce object. indication subsampling.  single number, indicates spacing elements x selected.  two numbers (condition applicable x echosounder object, present), first number indicates time spacing second indicates depth spacing. Indices subsample.  given, -rides . filter optional list numbers representing digital filter applied variable data slot x, decimation done. supplied, decimation done strictly sub-sampling. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get .","code":""},{"path":"https://dankelley.github.io/oce/reference/decimate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Smooth and Decimate, or Subsample, an oce Object — decimate","text":"oce object subsampled appropriately.","code":""},{"path":"https://dankelley.github.io/oce/reference/decimate.html","id":"bugs","dir":"Reference","previous_headings":"","what":"Bugs","title":"Smooth and Decimate, or Subsample, an oce Object — decimate","text":"preliminary version function provided present package.  works objects class echosounder, decimation done applying running median filter boxcar filter, length equal corresponding component .","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/decimate.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Smooth and Decimate, or Subsample, an oce Object — decimate","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/decimate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Smooth and Decimate, or Subsample, an oce Object — decimate","text":"","code":"library(oce) data(adp) plot(adp) adpDec <- decimate(adp, by = 2, filter = c(1 / 4, 1 / 2, 1 / 4)) #> Warning: decimate(adp) not working yet ... just returning the adp unchanged plot(adpDec)"},{"path":"https://dankelley.github.io/oce/reference/decodeHeaderNortek.html","id":null,"dir":"Reference","previous_headings":"","what":"Decode a Nortek Header — decodeHeaderNortek","title":"Decode a Nortek Header — decodeHeaderNortek","text":"Decode data Nortek ADV ADP header.","code":""},{"path":"https://dankelley.github.io/oce/reference/decodeHeaderNortek.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decode a Nortek Header — decodeHeaderNortek","text":"","code":"decodeHeaderNortek(   buf,   type = c(\"aquadoppHR\", \"aquadoppProfiler\", \"aquadopp\", \"aquadoppPlusMagnetometer\",     \"vector\"),   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/decodeHeaderNortek.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decode a Nortek Header — decodeHeaderNortek","text":"buf “raw” buffer containing header type type device debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... additional arguments, passed called routines.","code":""},{"path":"https://dankelley.github.io/oce/reference/decodeHeaderNortek.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decode a Nortek Header — decodeHeaderNortek","text":"list containing elements hardware, head, user offset.  easiest way find contents run function debug=3.","code":""},{"path":"https://dankelley.github.io/oce/reference/decodeHeaderNortek.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decode a Nortek Header — decodeHeaderNortek","text":"Decodes header binary-format Nortek ADV/ADP file.  function designed used read.adp() read.adv(), can used directly well.  code based information Nortek System Integrator Guide (2008) postings Nortek “knowledge center” discussion board.  One might assume latter less authoritative former.  example, inference cell size follows advice found https://www.nortekusa.com/en/knowledge-center/forum/hr-profilers/736804717, contains typo early posting corrected later .","code":""},{"path":"https://dankelley.github.io/oce/reference/decodeHeaderNortek.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Decode a Nortek Header — decodeHeaderNortek","text":"Information Nortek profilers (including System Integrator Guide, explains data format byte--byte) available https://www.nortekusa.com/usa?set_language=usa login. Nortek Knowledge Center https://www.nortekusa.com/en/knowledge-center may help problems arise dealing data Nortek instruments. Nortek, \"Classic Integrators Guide: Aquadopp | Aquadopp DW | Aquadopp Profiler | HQ Aquadopp Profiler | Vector | AWAC.\" Nortek , 2022.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/decodeHeaderNortek.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Decode a Nortek Header — decodeHeaderNortek","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/decodeTime.html","id":null,"dir":"Reference","previous_headings":"","what":"Oce Version of as.POSIXct — decodeTime","title":"Oce Version of as.POSIXct — decodeTime","text":"format timeFormats used turn format argument .POSIXct(), first produces non-NA result used.  timeFormats missing, following formats tried, stated order:","code":""},{"path":"https://dankelley.github.io/oce/reference/decodeTime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Oce Version of as.POSIXct — decodeTime","text":"","code":"decodeTime(time, timeFormats, tz = \"UTC\")"},{"path":"https://dankelley.github.io/oce/reference/decodeTime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Oce Version of as.POSIXct — decodeTime","text":"time Character string indication time. timeFormats Optional vector time formats use, .POSIXct(). tz Time zone.","code":""},{"path":"https://dankelley.github.io/oce/reference/decodeTime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Oce Version of as.POSIXct — decodeTime","text":"time returned .POSIXct().","code":""},{"path":"https://dankelley.github.io/oce/reference/decodeTime.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Oce Version of as.POSIXct — decodeTime","text":"\"\\%b \\%d \\%Y \\%H:\\%M:\\%S\" (e.g. \"Jul 1 2013 01:02:03\") \"\\%b \\%d \\%Y\" (e.g. \"Jul 1 2013\") \"\\%B \\%d \\%Y \\%H:\\%M:\\%S\" (e.g. \"July 1 2013 01:02:03\") \"\\%B \\%d \\%Y\" (e.g. \"July 1 2013\") \"\\%d \\%b \\%Y \\%H:\\%M:\\%S\" (e.g. \"1 Jul 2013 01:02:03\") \"\\%d \\%b \\%Y\" (e.g. \"1 Jul 2013\") \"\\%d \\%B \\%Y \\%H:\\%M:\\%S\" (e.g. \"1 July 2013 01:02:03\") \"\\%d \\%B \\%Y\" (e.g. \"1 July 2013\") \"\\%Y-\\%m-\\%d \\%H:\\%M:\\%S\" (e.g.  \"2013-07-01 01:02:03\") \"\\%Y-\\%m-\\%d\" (e.g. \"2013-07-01\") \"\\%Y-\\%b-\\%d \\%H:\\%M:\\%S\" (e.g.  \"2013-July-01 01:02:03\") \"\\%Y-\\%b-\\%d\" (e.g.  \"2013-Jul-01\") \"\\%Y-\\%B-\\%d \\%H:\\%M:\\%S\" (e.g. \"2013-July-01 01:02:03\") \"\\%Y-\\%B-\\%d\" (e.g. \"2013-July-01\") \"\\%d-\\%b-\\%Y \\%H:\\%M:\\%S\" (e.g.  \"01-Jul-2013 01:02:03\") \"\\%d-\\%b-\\%Y\" (e.g. \"01-Jul-2013\") \"\\%d-\\%B-\\%Y \\%H:\\%M:\\%S\" (e.g. \"01-July-2013 01:02:03\") \"\\%d-\\%B-\\%Y\" (e.g. \"01-July-2013\") \"\\%Y/\\%b/\\%d \\%H:\\%M:\\%S\" (e.g. \"2013/Jul/01 01:02:03\") \"\\%Y/\\%b/\\%d\" (e.g. \"2013/Jul/01\") \"\\%Y/\\%B/\\%d \\%H:\\%M:\\%S\" (e.g. \"2013/July/01 01:02:03\") \"\\%Y/\\%B/\\%d\" (e.g. \"2013/July/01\") \"\\%Y/\\%m/\\%d \\%H:\\%M:\\%S\" (e.g. \"2013/07/01 01:02:03\") \"\\%Y/\\%m/\\%d\" (e.g. \"2013/07/01\")","code":""},{"path":"https://dankelley.github.io/oce/reference/decodeTime.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Oce Version of as.POSIXct — decodeTime","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/decodeTime.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Oce Version of as.POSIXct — decodeTime","text":"","code":"decodeTime(\"July 1 2013 01:02:03\") #> [1] \"2013-07-01 01:02:03 UTC\" decodeTime(\"Jul 1 2013 01:02:03\") #> [1] \"2013-07-01 01:02:03 UTC\" decodeTime(\"1 July 2013 01:02:03\") #> [1] \"2013-07-01 01:02:03 UTC\" decodeTime(\"1 Jul 2013 01:02:03\") #> [1] \"2013-07-01 01:02:03 UTC\" decodeTime(\"2013-07-01 01:02:03\") #> [1] \"2013-07-01 01:02:03 UTC\" decodeTime(\"2013/07/01 01:02:03\") #> [1] \"2013-07-01 01:02:03 UTC\" decodeTime(\"2013/07/01\") #> [1] \"2013-07-01 UTC\""},{"path":"https://dankelley.github.io/oce/reference/defaultFlags.html","id":null,"dir":"Reference","previous_headings":"","what":"Suggest a Default Flag Vector for Bad or Suspicious Data — defaultFlags","title":"Suggest a Default Flag Vector for Bad or Suspicious Data — defaultFlags","text":"defaultFlags tries suggest reasonable default flag scheme use handleFlags(). looking item named flagScheme metadata slot object. flagScheme found, scheme recognized, numeric vector returned indicates bad questionable data. flagScheme$default exists, scheme returned. However, exist, flagScheme$name recognized, pre-defined (conservative) scheme used, listed .","code":""},{"path":"https://dankelley.github.io/oce/reference/defaultFlags.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Suggest a Default Flag Vector for Bad or Suspicious Data — defaultFlags","text":"","code":"defaultFlags(object)"},{"path":"https://dankelley.github.io/oce/reference/defaultFlags.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Suggest a Default Flag Vector for Bad or Suspicious Data — defaultFlags","text":"object oce object","code":""},{"path":"https://dankelley.github.io/oce/reference/defaultFlags.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Suggest a Default Flag Vector for Bad or Suspicious Data — defaultFlags","text":"vector one flag values, NULL object metadata slot lacks flagScheme set initializeFlagScheme(), scheme list provide “Description”.","code":""},{"path":"https://dankelley.github.io/oce/reference/defaultFlags.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Suggest a Default Flag Vector for Bad or Suspicious Data — defaultFlags","text":"argo, default c(0,3,4,6,7,9), meaning act upon not_assessed (0), probably_bad (3), bad (4), not_used_6 (6), not_used_7 (7) missing (9).  See Section 3.2.2 Carval et al. (2019). BODC, default c(0,2,3,4,5,6,7,8,9), .e. flags except good. DFO, default c(0,2,3,4,5,8,9), .e. flags except appears_correct. WHP bottle, default c(1,3,4,5,6,7,8,9), .e. flags except no_problems_noted. WHP ctd, default c(1,3,4,5,6,7,9), .e. flags except acceptable.","code":""},{"path":"https://dankelley.github.io/oce/reference/defaultFlags.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Suggest a Default Flag Vector for Bad or Suspicious Data — defaultFlags","text":"Carval, Thierry, Bob Keeley, Yasushi Takatsuki, Takashi Yoshida, Stephen Loch Loch, Claudia Schmid, Roger Goldsmith. Argo User's Manual V3.3. Ifremer, 2019. doi:10.13155/29825","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/despike.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove Spikes From a Time Series — despike","title":"Remove Spikes From a Time Series — despike","text":"method identifies spikes respect \"reference\" time-series, replaces spikes reference value, NA according value action; see “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/despike.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove Spikes From a Time Series — despike","text":"","code":"despike(   x,   reference = c(\"median\", \"smooth\", \"trim\"),   n = 4,   k = 7,   min = NA,   max = NA,   replace = c(\"reference\", \"NA\"),   skip )"},{"path":"https://dankelley.github.io/oce/reference/despike.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove Spikes From a Time Series — despike","text":"x vector (time-series) values, list vectors, data frame, oce object. reference indication type reference time series used detection spikes; see “Details”. n indication limit differences x reference time series, used reference=\"median\" reference=\"smooth\"; see “Details.” k length running median used reference=\"median\", ignored values reference. min minimum non-spike value x, used reference=\"trim\". max maximum non-spike value x, used reference=\"trim\". replace indication spike values, \"reference\" indicating replace reference time series, \"NA\" indicating replace NA. skip optional vector naming columns skipped. ignored x simple vector. items named skip passed return value without modification.  cases, despike set reasonable defaults skip, e.g. ctd object, skip set c(\"time\", \"scan\", \"pressure\") supplied argument.","code":""},{"path":"https://dankelley.github.io/oce/reference/despike.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove Spikes From a Time Series — despike","text":"new vector spikes replaced described .","code":""},{"path":"https://dankelley.github.io/oce/reference/despike.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Remove Spikes From a Time Series — despike","text":"Three modes operation permitted, depending value reference. reference=\"median\", first step linearly interpolate across gaps (spots x==NA), using approx() rule=2. second step pass runmed() get running median spanning k elements. result two steps \"reference\" time-series. , standard deviation difference x reference calculated.  x values differ reference n times standard deviation considered spikes.  replace=\"reference\", spike values replaced reference, resultant time series returned.  replace=\"NA\", spikes replaced NA, result returned. reference=\"smooth\", processing \"median\", except smooth() used calculate reference time series. reference=\"trim\", reference time series constructed linear interpolation across regions x<min x>max.  (, done approx() rule=2.) case, value n ignored, return value x, except spikes replaced reference series (replace=\"reference\" NA, replace=\"NA\".","code":""},{"path":"https://dankelley.github.io/oce/reference/despike.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Remove Spikes From a Time Series — despike","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/despike.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove Spikes From a Time Series — despike","text":"","code":"n <- 50 x <- 1:n y <- rnorm(n = n) y[n / 2] <- 10 # 10 standard deviations plot(x, y, type = \"l\") lines(x, despike(y), col = \"red\") lines(x, despike(y, reference = \"smooth\"), col = \"darkgreen\") lines(x, despike(y, reference = \"trim\", min = -3, max = 3), col = \"blue\") legend(\"topright\",     lwd = 1, col = c(\"black\", \"red\", \"darkgreen\", \"blue\"),     legend = c(\"raw\", \"median\", \"smooth\", \"trim\") )   # add a spike to a CTD object data(ctd) plot(ctd)  T <- ctd[[\"temperature\"]] T[10] <- T[10] + 10 ctd[[\"temperature\"]] <- T CTD <- despike(ctd) plot(CTD)"},{"path":"https://dankelley.github.io/oce/reference/detrend.html","id":null,"dir":"Reference","previous_headings":"","what":"Detrend a Set of Observations — detrend","title":"Detrend a Set of Observations — detrend","text":"Detrends y subtracting linear trend x, create vector zero first last finite value. second parameter (y) missing, x taken y, new x constructed seq_along().  NA values left -.","code":""},{"path":"https://dankelley.github.io/oce/reference/detrend.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detrend a Set of Observations — detrend","text":"","code":"detrend(x, y)"},{"path":"https://dankelley.github.io/oce/reference/detrend.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detrend a Set of Observations — detrend","text":"x vector numerical values.  y given, x taken y. y optional vector","code":""},{"path":"https://dankelley.github.io/oce/reference/detrend.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detrend a Set of Observations — detrend","text":"list containing Y, detrended version y, intercept slope b linear function x subtracted y yield Y.","code":""},{"path":"https://dankelley.github.io/oce/reference/detrend.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Detrend a Set of Observations — detrend","text":"common application bring end points time series zero, prior applying digital filter. (See examples.)","code":""},{"path":"https://dankelley.github.io/oce/reference/detrend.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detrend a Set of Observations — detrend","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/detrend.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Detrend a Set of Observations — detrend","text":"","code":"x <- seq(0, 0.9 * pi, length.out = 50) y <- sin(x) y[1] <- NA y[10] <- NA plot(x, y, ylim = c(0, 1)) d <- detrend(x, y) points(x, d$Y, pch = 20) abline(d$a, d$b, col = \"blue\") abline(h = 0) points(x, d$Y + d$a + d$b * x, col = \"blue\", pch = \"+\")"},{"path":"https://dankelley.github.io/oce/reference/download.amsr.html","id":null,"dir":"Reference","previous_headings":"","what":"Download and Cache an amsr File — download.amsr","title":"Download and Cache an amsr File — download.amsr","text":"file already present destdir, downloaded . default destdir present directory, probably makes sense use something like \"~/data/amsr\" make easy scripts directories use cached data. file downloaded download.file().  Please read “History” section important details download.amsr() also read.amsr() altered years, deal changes directory structure file format server files downloaded.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.amsr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download and Cache an amsr File — download.amsr","text":"","code":"download.amsr(   year = NULL,   month,   day,   destdir = \".\",   server = \"https://data.remss.com/amsr2/ocean/L3/v08.2\",   type = \"3day\",   debug = 0 )"},{"path":"https://dankelley.github.io/oce/reference/download.amsr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download and Cache an amsr File — download.amsr","text":"year, month, day specification desired observation time. 3 choices specification.  () year object created .Date(), specifies time, month day ignored.  scheme can convenient creating sequence images, starting particular date, adding 1 object class Date increases time 1 day, saving user know many days given month. (b) year integer, taken year, user must also specify month day, also integers. (c) year NULL (default), focus set recent date, depends value type (see next).  type \"3day\", \"daily\" \"weekly\", just first two type \"monthly\".  things provided, just match exactly values sought-file remote server.  year NULL, download.amsr() constructs URL recent available file: 3 days prior present date (type \"3day\" \"daily\"), Saturday two weeks prior present date (type \"weekly\"), two months past (type \"monthly\"). destdir string naming directory cache downloaded file. default store present directory, many users find helpful use something like \"~/data/amsr\" , collect downloaded amsr files one place. server string naming server data acquired. See “History”. type character value indicating get data.  may \"3day\" (default), composite covering 3 days observation, removes viewing-path cloud blanks, \"daily\" daily reading, \"weekly\" composite covering week, \"monthly\" composite covering month, \"rt\" seems realtime datasets (seem restricted prior days ).  Note \"rt\" files store SST related variables 3D arrays, opposed 2D arrays used file types.  ascending descending passes available; select choice plotting, use pass parameter plot,amsr-method(). debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.amsr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download and Cache an amsr File — download.amsr","text":"download.amsr returns character value holding full pathname downloaded file.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.amsr.html","id":"history","dir":"Reference","previous_headings":"","what":"History","title":"Download and Cache an amsr File — download.amsr","text":"25 March 2017, default server \"ftp.ssmi.com/amsr2/bmaps_v07.2\", changed author discovered FTP site changed require users create accounts register downloads.  default changed \"http://data.remss.com/amsr2/bmaps_v07.2\" named date. site found web search, seems provide proper data. assumed users checking best source. 23 January 2018, noticed server-url naming convention changed, e.g. http://data.remss.com/amsr2/bmaps_v07.2/y2017/m01/f34_20170114v7.2.gz becoming http://data.remss.com/amsr2/bmaps_v08/y2017/m01/f34_20170114v8.gz 2023-07-26, noticed server-url naming convention changed , requiring alteration default server value also addition new parameter named type. Worse yet file format evidently changed gzipped format NetCDF format, required complete rewriting read.amsr(). 2024-08-17, noticed server directory called rt seems hold realtime data recent days (isolated 3-day sequences past two years). files may use analysis current events.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.amsr.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Download and Cache an amsr File — download.amsr","text":"","code":"# The download may take up to about a minute. f <- download.amsr(2023, 7, 27, destdir=\"~/data/amsr\") d <- read.amsr(f) plot(d) mtext(d[[\"filename\"]], side=3, line=0, adj=0)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/download.amsr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download and Cache an amsr File — download.amsr","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/download.coastline.html","id":null,"dir":"Reference","previous_headings":"","what":"Download a coastline File — download.coastline","title":"Download a coastline File — download.coastline","text":"Constructs query NaturalEarth server (see reference 1) download coastline data (lake data, river data, etc) three resolutions.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.coastline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download a coastline File — download.coastline","text":"","code":"download.coastline(   resolution,   item = \"coastline\",   destdir = \".\",   destfile,   server = \"naturalearth\",   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/download.coastline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download a coastline File — download.coastline","text":"resolution character value specifying desired resolution. permitted choices \"10m\" (1:10M resolution, detailed), \"50m\" (1:50M resolution) \"110m\" (1:110M resolution). resolution supplied, \"50m\" used. item character value indicating quantity downloaded. normally one \"coastline\", \"land\", \"ocean\", \"rivers_lakes_centerlines\", \"lakes\", NaturalEarth server types, advanced users can discover names inspecting URLs links NaturalEarth site, use item. item supplied, defaults \"coastline\". destdir Optional string indicating directory store downloaded files. supplied, \".\" used, .e. data file stored present working directory. destfile Optional string indicating name file. supplied, file name constructed parameters function call, subsequent calls parameters yield result, thus providing key caching scheme. server character value specifying server supply data. moment, permitted value \"naturalearth\", default server supplied. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.coastline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download a coastline File — download.coastline","text":"character value indicating filename result; problem kind, result empty string.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.coastline.html","id":"non-executable-examples","dir":"Reference","previous_headings":"","what":"Non-Executable Examples","title":"Download a coastline File — download.coastline","text":"","code":"library(oce) # User must create directory ~/data/coastline first. # As of September 2016, the downloaded file, named # \"ne_50m_coastline.zip\", occupies 443K bytes. filename <- download.coastline(destdir=\"~/data/coastline\") coastline <- read.coastline(filename) plot(coastline)"},{"path":"https://dankelley.github.io/oce/reference/download.coastline.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download a coastline File — download.coastline","text":"NaturalEarth server https://www.naturalearthdata.com","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/download.coastline.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download a coastline File — download.coastline","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/download.met.html","id":null,"dir":"Reference","previous_headings":"","what":"Download and Cache a met File — download.met","title":"Download and Cache a met File — download.met","text":"download.met() attempts download data Environment Canada's historical-data website, cache files locally. Lacking published API, function must rely reverse-engineering queries handled web server.  reason, brittle.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.met.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download and Cache a met File — download.met","text":"","code":"download.met(   id,   year,   month,   deltat,   type = \"xml\",   destdir = \".\",   destfile,   force = FALSE,   quiet = FALSE,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/download.met.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download and Cache a met File — download.met","text":"id number giving \"Station ID\" station interest. provided, id defaults 6358, Halifax International Airport. See “Details”. year number giving year interest. Ignored unless deltat \"hour\". year given, defaults present year. month number giving month interest. Ignored unless deltat \"hour\". month given, defaults present month. deltat Optional character string indicating time step desired dataset. may \"hour\" \"month\". deltat given, defaults \"hour\". type String indicating type file download, either \"xml\" (default) XML file \"csv\" CSV file. destdir Optional string indicating directory store downloaded files. supplied, \".\" used, .e. data file stored present working directory. destfile Optional string indicating name file. supplied, file name constructed parameters function call, subsequent calls parameters yield result, thus providing key caching scheme. force Logical value indicating whether force download, even file already exists locally. quiet Logical value passed download.file(); TRUE value silences output. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.met.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download and Cache a met File — download.met","text":"String indicating full pathname downloaded file.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.met.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download and Cache a met File — download.met","text":"function fails, users might try using Gavin Simpson's canadaHCD package (reference 2). package maintains copy Environment Canada listing stations, find_station() function provides easy way determine Station IDs.  , hcd_hourly function (related functions) make easy read data. data can converted met class .met(), although leaves many important metadata blank.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.met.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Download and Cache a met File — download.met","text":"","code":"library(oce) # Download data for Halifax International Airport, in September # of 2003. This dataset is used for data(met) provided with oce. # Note that requests for data after 2012 month 10 yield all # missing values, for reasons unknown to the author. metFile <- download.met(6358, 2003, 9, destdir=\".\") met <- read.met(metFile)"},{"path":"https://dankelley.github.io/oce/reference/download.met.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download and Cache a met File — download.met","text":"Environment Canada website Historical Climate Data https://climate.weather.gc.ca/index_e.html Gavin Simpson's canadaHCD package GitHub https://github.com/gavinsimpson/canadaHCD","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/download.met.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download and Cache a met File — download.met","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/download.topo.html","id":null,"dir":"Reference","previous_headings":"","what":"Download and Cache a topo File — download.topo","title":"Download and Cache a topo File — download.topo","text":"Topographic data downloaded data server holds ETOPO1 dataset (Amante, C. B.W. Eakins, 2009), saved netCDF file whose name specifies data request, file name already present local file system.  return value name data file, typical use filename call read.topo().  Given rules file naming, subsequent calls download.topo identical parameters simply return name cached file, assuming user deleted meantime.  Note download.topo uses \"terra\" \"ncdf4\" packages, error reported available.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.topo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download and Cache a topo File — download.topo","text":"","code":"download.topo(   west,   east,   south,   north,   resolution = 4,   destdir = \".\",   destfile,   format,   server = \"https://gis.ngdc.noaa.gov\",   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/download.topo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download and Cache a topo File — download.topo","text":"west, east numeric values limits data-selection box, degrees. converted -180 180 degree notation, needed. , west rounded nearest 1/100th degree, east rounded nearest 1/100th degree. results operations used constructing query NOAA data server. south, north latitude limits, treated way corresponds longitude limits. resolution numeric value grid spacing, geographical minutes. default value 4 minutes, corresponding 4 nautical miles (approx. 7.4km) north-south direction, less east-west direction. destdir Optional string indicating directory store downloaded files. supplied, \".\" used, .e. data file stored present working directory. destfile Optional string indicating name file. supplied, file name constructed parameters function call, subsequent calls parameters yield result, thus providing key caching scheme. format Deprecated, ignored, June 2020. server character value specifying base download URL constructed.  unlikely value default work, unless similarly-constructed mirrored site. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.topo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download and Cache a topo File — download.topo","text":"String indicating full pathname downloaded file.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.topo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download and Cache a topo File — download.topo","text":"specified longitude latitude limits rounded 2 digits (corresponding footprint approximately 1km), used server request. resultant request generate 1 row column result, download.topo generates error message stops.","code":""},{"path":"https://dankelley.github.io/oce/reference/download.topo.html","id":"historical-note-relating-to-noaa-server-changes","dir":"Reference","previous_headings":"","what":"Historical note relating to NOAA server changes","title":"Download and Cache a topo File — download.topo","text":"2022 November 13: updated new NOAA database, 1/4-minute resolution (marked improvement previous 1-minute resolution).  revision framed along similar changes marmap::getNOAAbathy() made earlier today. Thanks Clark Richards pointing ! 2020 May 31: updated change NOAA query structure, taking hints marmap::getNOAAbathy().","code":""},{"path":"https://dankelley.github.io/oce/reference/download.topo.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Download and Cache a topo File — download.topo","text":"","code":"library(oce) topoFile <- download.topo(west=-66, east=-60, south=43, north=47,     resolution=1, destdir=\"~/data/topo\") topo <- read.topo(topoFile) imagep(topo, zlim=c(-400, 400), col=oceColorsTwo, drawTriangles=TRUE) if (requireNamespace(\"ocedata\", quietly=TRUE)) {     data(coastlineWorldFine, package=\"ocedata\")     lines(coastlineWorldFine[[\"longitude\"]], coastlineWorldFine[[\"latitude\"]]) }"},{"path":"https://dankelley.github.io/oce/reference/download.topo.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download and Cache a topo File — download.topo","text":"Amante, C. B.W. Eakins, 2009. ETOPO1 1 Arc-Minute Global Relief Model: Procedures, Data Sources Analysis. NOAA Technical Memorandum NESDIS NGDC-24. National Geophysical Data Center, NOAA. doi:10.7289/V5C8276M","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/download.topo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download and Cache a topo File — download.topo","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/drawDirectionField.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw a Direction Field — drawDirectionField","title":"Draw a Direction Field — drawDirectionField","text":"direction field indicated variously, depending value type:","code":""},{"path":"https://dankelley.github.io/oce/reference/drawDirectionField.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw a Direction Field — drawDirectionField","text":"","code":"drawDirectionField(   x,   y,   u,   v,   scalex,   scaley,   skip,   length = 0.05,   add = FALSE,   type = 1,   col = par(\"fg\"),   pch = 1,   cex = par(\"cex\"),   lwd = par(\"lwd\"),   lty = par(\"lty\"),   xlab = \"\",   ylab = \"\",   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/drawDirectionField.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw a Direction Field — drawDirectionField","text":"x, y coordinates velocities specified. length x y depends form u v (vectors matrices). u, v velocity components x y directions. Can either vectors length x, y, matrices, dimension length(x) length(y). scalex, scaley scale used velocity arrows. Exactly one must specified.  Arrows u^2+v^2=1 length scalex along x axis, scaley along y axis, according argument given. skip either integer, two-element vector indicating number points skip plotting arrows (matrix u, v case). single value, skip applied x y directions. two-element vector, specifies different values x y directions. length indication width arrowheads. somewhat confusing name argument consequence fact passed arrows() drawing arrows.  Note present default smaller default used arrows(). add TRUE, arrows added existing plot; otherwise, new plot started calling plot() x, y type=\"n\". words, plot basic. cases, user probably want draw diagram first, add direction field later. type indication style arrow-like indication direction. col color line segments arrows; see par() meaning pch, cex plot character expansion factor, used type=1; see par() meanings lwd, lty line width type, used type=2; see par() meaning xlab, ylab x y axis labels debug debugging value; set positive integer get debugging information. ... arguments passed plotting functions (e.g. axis labels, etc).","code":""},{"path":"https://dankelley.github.io/oce/reference/drawDirectionField.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw a Direction Field — drawDirectionField","text":"None.","code":""},{"path":"https://dankelley.github.io/oce/reference/drawDirectionField.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Draw a Direction Field — drawDirectionField","text":"type=1, indicator drawn symbol, according value pch (either supplied globally, element ... list) size cex, color col.   , line segment drawn , lwd col may set globally ... list. type=2, points drawn, arrows drawn instead line segments.  , lwd col control type line.","code":""},{"path":"https://dankelley.github.io/oce/reference/drawDirectionField.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Draw a Direction Field — drawDirectionField","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/drawDirectionField.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw a Direction Field — drawDirectionField","text":"","code":"library(oce) plot(c(-1.5, 1.5), c(-1.5, 1.5), xlab = \"\", ylab = \"\", type = \"n\") drawDirectionField(     x = rep(0, 2), y = rep(0, 2),     u = c(1, 1), v = c(1, -1), scalex = 0.5, add = TRUE )  plot(c(-1.5, 1.5), c(-1.5, 1.5), xlab = \"\", ylab = \"\", type = \"n\") drawDirectionField(     x = rep(0, 2), y = rep(0, 2),     u = c(1, 1), v = c(1, -1), scalex = 0.5, add = TRUE, type = 2 )   # 2D example x <- seq(-2, 2, 0.1) y <- x xx <- expand.grid(x, y)[, 1] yy <- expand.grid(x, y)[, 2] z <- matrix(xx * exp(-xx^2 - yy^2), nrow = length(x)) gz <- grad(z, x, y) drawDirectionField(x, y, gz$gx, gz$gy, scalex = 0.5, type = 2, len = 0.02) oceContour(x, y, z, add = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/drawIsopycnals.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Isopycnal Curves to a TS Plot — drawIsopycnals","title":"Add Isopycnal Curves to a TS Plot — drawIsopycnals","text":"Adds isopycnal lines existing temperature-salinity plot.  called plotTS(), may called user also, e.g. image plot used show TS data density.","code":""},{"path":"https://dankelley.github.io/oce/reference/drawIsopycnals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Isopycnal Curves to a TS Plot — drawIsopycnals","text":"","code":"drawIsopycnals(   nlevels = 6,   levels,   rotate = TRUE,   rho1000 = FALSE,   digits = 2,   eos = getOption(\"oceEOS\", default = \"gsw\"),   longitude = NULL,   latitude = NULL,   trimIsopycnals = TRUE,   gridIsopycnals = c(50, 50),   cex = 0.75 * par(\"cex\"),   col = \"darkgray\",   lwd = par(\"lwd\"),   lty = par(\"lty\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/drawIsopycnals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Isopycnal Curves to a TS Plot — drawIsopycnals","text":"nlevels suggested number density levels (.e. isopycnal curves); ignored levels supplied.  set 0, isopycnal drawn (see also levels, next). levels optional density levels draw.  NULL, isopycnals drawn. rotate boolean, set TRUE write density labels horizontally. rho1000 boolean, set TRUE write isopycnal labels e.g. 1024 instead 24. digits minimum number decimal digits use label (supplied round()). density range small, drawIsopycnals() increase value digits, try make labels distinct. eos equation state used, either \"unesco\" \"gsw\".  \"gsw\" latitude longitude must supplied, since needed computer density formulation. longitude, latitude numerical values giving location used density calculations, eos \"gsw\". trimIsopycnals logical value (TRUE default) indicates whether trim isopycnal curves (drawn) region temperature-salinity space density computations considered valid context chosen eos; see “Details” documentation plotTS(). gridIsopycnals parameter controls isopycnals computed.  may NULL, integer vector length 2. Case 1: gridIsopycnals NULL, isopycnals drawn tracing density isopleths salinity-temperature space. method used default prior version 1.7-11, found yield staircase-like isopycnal curves highly zoomed-plots (e.g. millidegree temperature ranges). Case 2 (new default): gridIsopycnals two-element integer vector, grid density constructed, gridIsopycnals[1] salinity levels gridIsopycnals[2] temperature levels, contourLines() used trace isopycnals. default value gridIsopycnals yields grid millimeter-scale spacing typical plot. cex size labels. col color lines labels. lwd line width isopycnal curves lty line type isopycnal curves debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/drawIsopycnals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Isopycnal Curves to a TS Plot — drawIsopycnals","text":"None.","code":""},{"path":"https://dankelley.github.io/oce/reference/drawIsopycnals.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Isopycnal Curves to a TS Plot — drawIsopycnals","text":"default method drawing isopycnals changed February 2023, even plots zoomed millidegree temperature ranges smooth curves.  See discussion gridIsopycnals details.","code":""},{"path":"https://dankelley.github.io/oce/reference/drawIsopycnals.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Add Isopycnal Curves to a TS Plot — drawIsopycnals","text":"Fofonoff, N. P., R. C. Millard. \"Algorithms Computation Fundamental Properties Seawater.\" UNESCO Technical Papers Marine Research. SCOR working group Evaluation CTD data; UNESCO/ICES/SCOR/IAPSO Joint Panel Oceanographic Tables Standards, 1983. https://unesdoc.unesco.org/ark:/48223/pf0000059832. McDougall, Trevor J., David R. Jackett, Daniel G. Wright, Rainer Feistel. \"Accurate Computationally Efficient Algorithms Potential Temperature Density Seawater.\" Journal Atmospheric Oceanic Technology 20, . 5 (May 1, 2003): 730-41. https://journals.ametsoc.org/jtech/article/20/5/730/2543/Accurate--Computationally-Efficient-Algorithms.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/drawIsopycnals.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Isopycnal Curves to a TS Plot — drawIsopycnals","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/drawPalette.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw a Palette, Leaving Margins Suitable for an Accompanying Plot — drawPalette","title":"Draw a Palette, Leaving Margins Suitable for an Accompanying Plot — drawPalette","text":"normal use, drawPalette() draws image palette near right-hand side plotting device, adjusts global margin settings way cause next plot appear (much larger width) left palette. function can also used, zlim provided, adjust margin without drawing anything; useful lining x axes stack plots, palettes others .","code":""},{"path":"https://dankelley.github.io/oce/reference/drawPalette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw a Palette, Leaving Margins Suitable for an Accompanying Plot — drawPalette","text":"","code":"drawPalette(   zlim,   zlab = \"\",   breaks,   col,   colormap,   mai,   cex = par(\"cex\"),   pos = 4,   las = 0,   labels = NULL,   at = NULL,   levels,   drawContours = FALSE,   plot = TRUE,   fullpage = FALSE,   drawTriangles = FALSE,   axisPalette,   tformat,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/drawPalette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw a Palette, Leaving Margins Suitable for an Accompanying Plot — drawPalette","text":"zlim two-element vector containing lower upper limits z. may also vector length exceeding 1, case range used. zlab label palette scale. breaks optional numeric vector z values breaks color scheme. colormap provided, takes precedence breaks col. col optional argument, either vector colors corresponding breaks, length 1 less number breaks, function specifying colors. col provided, colormap also provided, col defaults oceColorsViridis(). colormap provided, takes precedence breaks col. colormap optional color map created colormap(). colormap provided, takes precedence breaks col. mai margins palette, defined usual way; see par().  given, reasonable values inferred existence non-blank zlab. cex numeric character expansion value text labels pos integer indicating location palette within plotting area, 1 near bottom, 2 near left-hand side, 3 near top side, 4 (default) near right-hand side. las optional argument, passed axis(), control orientation numbers along axis. explained help par(), meaning las follows: las=0 (default) means put labels parallel axis, las=1 means horizontal (regardless axis orientation), las=2 means perpendicular axis, las=3 means vertical (regardless axis orientation).  Note automatic computation margin spacing parameter mai assumes las=0, cases, user may need specify mai argument directly. labels optional vector labels ticks palette axis (must correspond ) optional vector positions labels levels optional contour levels, preference breaks values, added image drawContours TRUE. drawContours logical value indicating whether draw contours palette, color breaks. plot logical value indicating whether plot palette, default, whether just alter margins make space palette gone.  latter case may useful lining plots, example 1 “Examples”. fullpage logical value indicating whether draw palette filling whole plot width (apart mai, course).  can helpful palette panel created layout(), illustrated “Examples”. drawTriangles logical value indicating whether draw triangles top bottom palette.  single value provided, applies ends palette.  pair provided, first refers lower range palette, second upper range. axisPalette optional replacement function axis(), e.g. exponential notation large small values. tformat optional format axis labels, variable time type (ignored otherwise). debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/drawPalette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw a Palette, Leaving Margins Suitable for an Accompanying Plot — drawPalette","text":"None.","code":""},{"path":"https://dankelley.github.io/oce/reference/drawPalette.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Draw a Palette, Leaving Margins Suitable for an Accompanying Plot — drawPalette","text":"plot positioning done entirely margins, par(mfrow) R schemes multi-panel plots.  means user free use schemes without worrying nesting conflicts.","code":""},{"path":"https://dankelley.github.io/oce/reference/drawPalette.html","id":"use-with-multi-panel-plots","dir":"Reference","previous_headings":"","what":"Use with multi-panel plots","title":"Draw a Palette, Leaving Margins Suitable for an Accompanying Plot — drawPalette","text":"important consequence margin adjustment multi-panel plots require initial margin stored prior first call drawPalette(), reset palette-plot pair.  method illustrated “Examples”.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/drawPalette.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Draw a Palette, Leaving Margins Suitable for an Accompanying Plot — drawPalette","text":"Dan Kelley, help Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/drawPalette.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw a Palette, Leaving Margins Suitable for an Accompanying Plot — drawPalette","text":"","code":"library(oce) par(mgp = getOption(\"oceMgp\"))  # 1. A three-panel plot par(mfrow = c(3, 1), mar = c(3, 3, 1, 1)) omar <- par(\"mar\") # save initial margin  # 1a. top panel: simple case with Viridis scheme drawPalette(zlim = c(0, 1), col = oce.colorsViridis(10)) plot(1:10, 1:10, col = oce.colorsViridis(10)[1:10], pch = 20, cex = 3, xlab = \"x\", ylab = \"y\") par(mar = omar) # reset margin  # 1b. middle panel: colormap cm <- colormap(name = \"gmt_globe\") drawPalette(colormap = cm) icol <- seq_along(cm$col) plot(icol, cm$breaks[icol],     pch = 20, cex = 2, col = cm$col,     xlab = \"Palette index\", ylab = \"Palette breaks\" ) par(mar = omar) # reset margin  # 1c. bottom panel: space for palette (to line up graphs) drawPalette(plot = FALSE) plot(1:10, 1:10, col = oce.colorsViridis(10)[1:10], pch = 20, cex = 3, xlab = \"x\", ylab = \"y\")  par(mar = omar) # reset margin  # 2. Use layout to mimic the action of imagep(), with the width # of the palette region being 14 percent of figure width. d <- 0.14 layout(matrix(1:2, nrow = 1), widths = c(1 - d, d)) image(volcano, col = oce.colorsViridis(100), zlim = c(90, 200)) contour(volcano, add = TRUE) drawPalette(c(90, 200), fullpage = TRUE, col = oce.colorsViridis)"},{"path":"https://dankelley.github.io/oce/reference/echosounder-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Echosounder Data — echosounder-class","title":"Class to Store Echosounder Data — echosounder-class","text":"class stores echosounder data. Echosounder objects may read read.echosounder(), summarized summary,echosounder-method(), plotted plot,echosounder-method(). findBottom() function infers ocean bottom tracing strongest reflector ping ping.","code":""},{"path":"https://dankelley.github.io/oce/reference/echosounder-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Class to Store Echosounder Data — echosounder-class","text":"infrequently updated record instrument position, timeSlow, longitudeSlow latitudeSlow.  used plotting maps plot,echosounder-method(). interpolated record instrument position, time, longitude, latitude.  Linear interpolation used infer longitude latitude variables listed . depth, vector depths echo samples (measured positive downwards water column).  calculated inter-sample time interval sound speed provided soundSpeed argument read.echosounder(), altering value latter alter echosounder plots provided plot,echosounder-method(). echosounder signal amplitude , matrix whose number rows matches length time, etc., number columns equal length depth.  Thus, example, [100,] represents depth-dependent amplitude time 100th ping. matrix named b exists dual-beam split-beam cases. dual-beam data, wide-beam data, whereas narrow-beam data.  split-beam data, x-angle data. matrix named c exists split-beam data, containing y-angle data. addition matrices, ad-hoc calculated matrices named Sv TS may accessed explained next section.","code":""},{"path":"https://dankelley.github.io/oce/reference/echosounder-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Echosounder Data — echosounder-class","text":"data oce objects, data slot echosounder objects list containing main data object. metadata oce objects, metadata slot echosounder objects list containing information data object . processingLog oce objects, processingLog slot echosounder objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/echosounder-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Echosounder Data — echosounder-class","text":"Although [[<- operator may permit modification contents echosounder objects (see [[<-,echosounder-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/echosounder-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Echosounder Data — echosounder-class","text":"full contents data metadata slots echosounder object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,echosounder-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,echosounder-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/echosounder-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Echosounder Data — echosounder-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/echosounder.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample echosounder Data — echosounder","title":"Sample echosounder Data — echosounder","text":"degraded subsample measurements made Biosonics scientific echosounder, part St Lawrence Internal Wave Experiment (SLEIWEX).","code":""},{"path":"https://dankelley.github.io/oce/reference/echosounder.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample echosounder Data — echosounder","text":"file came SLEIWEX-2008 experiment, decimated using decimate() =c().","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/echosounder.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sample echosounder Data — echosounder","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/eclipticalToEquatorial.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Ecliptical Coordinate to Equatorial Coordinate — eclipticalToEquatorial","title":"Convert Ecliptical Coordinate to Equatorial Coordinate — eclipticalToEquatorial","text":"Convert ecliptical equatorial coordinates, using equations 8.3 8.4 reference 1, , equivalently, equations 12.3 12.4 reference 2.","code":""},{"path":"https://dankelley.github.io/oce/reference/eclipticalToEquatorial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Ecliptical Coordinate to Equatorial Coordinate — eclipticalToEquatorial","text":"","code":"eclipticalToEquatorial(lambda, beta, epsilon)"},{"path":"https://dankelley.github.io/oce/reference/eclipticalToEquatorial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Ecliptical Coordinate to Equatorial Coordinate — eclipticalToEquatorial","text":"lambda longitude, degrees, data frame containing lambda, beta, epsilon, case next arguments ignored beta geocentric latitude, degrees epsilon obliquity ecliptic, degrees","code":""},{"path":"https://dankelley.github.io/oce/reference/eclipticalToEquatorial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Ecliptical Coordinate to Equatorial Coordinate — eclipticalToEquatorial","text":"data frame containing columns rightAscension declination degrees.","code":""},{"path":"https://dankelley.github.io/oce/reference/eclipticalToEquatorial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert Ecliptical Coordinate to Equatorial Coordinate — eclipticalToEquatorial","text":"code based reference 1; see moonAngle() comments differences formulae found reference 2.  Indeed, reference 2 cited case readers want check ideas formulae; DK found reference 2 available via university library inter-library loan system, whereas owns copy reference 1.","code":""},{"path":"https://dankelley.github.io/oce/reference/eclipticalToEquatorial.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert Ecliptical Coordinate to Equatorial Coordinate — eclipticalToEquatorial","text":"Meeus, Jean. Astronomical Formulas Calculators. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1982. Meeus, Jean. Astronomical Algorithms. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1991.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/eclipticalToEquatorial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Ecliptical Coordinate to Equatorial Coordinate — eclipticalToEquatorial","text":"Dan Kelley, based formulae references 1 2.","code":""},{"path":"https://dankelley.github.io/oce/reference/enuToOther.html","id":null,"dir":"Reference","previous_headings":"","what":"Rotate Acoustic-Doppler Data to a New Coordinate System — enuToOther","title":"Rotate Acoustic-Doppler Data to a New Coordinate System — enuToOther","text":"Rotate Acoustic-Doppler Data New Coordinate System","code":""},{"path":"https://dankelley.github.io/oce/reference/enuToOther.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rotate Acoustic-Doppler Data to a New Coordinate System — enuToOther","text":"","code":"enuToOther(x, ...)"},{"path":"https://dankelley.github.io/oce/reference/enuToOther.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rotate Acoustic-Doppler Data to a New Coordinate System — enuToOther","text":"x adp adv object. ... extra arguments passed enuToOtherAdp() enuToOtherAdv().","code":""},{"path":"https://dankelley.github.io/oce/reference/enuToOther.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rotate Acoustic-Doppler Data to a New Coordinate System — enuToOther","text":"object class x, velocities rotated coordinate system","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdp.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert adp Object from ENU Coordinate to Rotated Coordinate — enuToOtherAdp","title":"Convert adp Object from ENU Coordinate to Rotated Coordinate — enuToOtherAdp","text":"Convert ADP velocity components enu-based coordinate system another system, perhaps align axes coastline.","code":""},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert adp Object from ENU Coordinate to Rotated Coordinate — enuToOtherAdp","text":"","code":"enuToOtherAdp(x, heading = 0, pitch = 0, roll = 0)"},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert adp Object from ENU Coordinate to Rotated Coordinate — enuToOtherAdp","text":"x adp object. heading number vector numbers, giving angle, degrees, added heading.  See “Details”. pitch heading pitch. roll heading roll.","code":""},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert adp Object from ENU Coordinate to Rotated Coordinate — enuToOtherAdp","text":"object data$v[,1:3,] altered appropriately, metadata$oce.coordinate changed enu .","code":""},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert adp Object from ENU Coordinate to Rotated Coordinate — enuToOtherAdp","text":"supplied angles specify rotations made around axes heading, pitch, roll defined.  example, eastward current point southeast heading=45 used. returned value heading, pitch, roll matching x, angles retain meaning instrument orientation. NOTE: function works similarly xyzToEnuAdp(), except present function, makes difference whether instrument points , etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert adp Object from ENU Coordinate to Rotated Coordinate — enuToOtherAdp","text":"Teledyne RD Instruments. “ADCP Coordinate Transformation: Formulas Calculations,” January 2010. P/N 951-6079-00.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert adp Object from ENU Coordinate to Rotated Coordinate — enuToOtherAdp","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert adp Object from ENU Coordinate to Rotated Coordinate — enuToOtherAdp","text":"","code":"library(oce) data(adp) o <- enuToOtherAdp(adp, heading = -31.5) plot(o, which = 1:3)"},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdv.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert ENU to Other Coordinate — enuToOtherAdv","title":"Convert ENU to Other Coordinate — enuToOtherAdv","text":"Convert ADV velocity components enu-based coordinate system another system, perhaps align axes coastline.","code":""},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert ENU to Other Coordinate — enuToOtherAdv","text":"","code":"enuToOtherAdv(   x,   heading = 0,   pitch = 0,   roll = 0,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert ENU to Other Coordinate — enuToOtherAdv","text":"x adv object. heading number vector numbers, giving angle, degrees, added heading. length less number velocity sampling times, extended using rep(). pitch heading pitch. roll heading roll. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert ENU to Other Coordinate — enuToOtherAdv","text":"supplied angles specify rotations made around axes heading, pitch, roll defined.  example, eastward current point southeast heading=45 used. returned value heading, pitch, roll matching x, angles retain meaning instrument orientation. NOTE: function works similarly xyzToEnuAdv(), except present function, makes difference whether instrument points , etc.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/enuToOtherAdv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert ENU to Other Coordinate — enuToOtherAdv","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/equatorialToLocalHorizontal.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Equatorial Coordinate to Local Horizontal Coordinate — equatorialToLocalHorizontal","title":"Convert Equatorial Coordinate to Local Horizontal Coordinate — equatorialToLocalHorizontal","text":"Convert equatorial coordinates local horizontal coordinates, .e. azimuth altitude. method taken equations 8.5 8.6 reference 1, , equivalently, equations 12.5 12.6 reference 2.","code":""},{"path":"https://dankelley.github.io/oce/reference/equatorialToLocalHorizontal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Equatorial Coordinate to Local Horizontal Coordinate — equatorialToLocalHorizontal","text":"","code":"equatorialToLocalHorizontal(   rightAscension,   declination,   t,   longitude,   latitude )"},{"path":"https://dankelley.github.io/oce/reference/equatorialToLocalHorizontal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Equatorial Coordinate to Local Horizontal Coordinate — equatorialToLocalHorizontal","text":"rightAscension right ascension, e.g. calculated eclipticalToEquatorial(). declination declination, e.g. calculated eclipticalToEquatorial(). t time observation. longitude longitude observation, positive eastern hemisphere. latitude latitude observation, positive northern hemisphere.","code":""},{"path":"https://dankelley.github.io/oce/reference/equatorialToLocalHorizontal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Equatorial Coordinate to Local Horizontal Coordinate — equatorialToLocalHorizontal","text":"data frame containing columns altitude (angle horizon, degrees) azimuth (angle anticlockwise south, degrees).","code":""},{"path":"https://dankelley.github.io/oce/reference/equatorialToLocalHorizontal.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert Equatorial Coordinate to Local Horizontal Coordinate — equatorialToLocalHorizontal","text":"Meeus, Jean. Astronomical Formulas Calculators. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1982. Meeus, Jean. Astronomical Algorithms. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1991.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/equatorialToLocalHorizontal.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Equatorial Coordinate to Local Horizontal Coordinate — equatorialToLocalHorizontal","text":"Dan Kelley, based formulae references 1 2.","code":""},{"path":"https://dankelley.github.io/oce/reference/errorbars.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw Error Bars on an Existing xy Diagram — errorbars","title":"Draw Error Bars on an Existing xy Diagram — errorbars","text":"Draw Error Bars Existing xy Diagram","code":""},{"path":"https://dankelley.github.io/oce/reference/errorbars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw Error Bars on an Existing xy Diagram — errorbars","text":"","code":"errorbars(x, y, xe, ye, percent = FALSE, style = 0, length = 0.025, ...)"},{"path":"https://dankelley.github.io/oce/reference/errorbars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw Error Bars on an Existing xy Diagram — errorbars","text":"x, y coordinates points existing plot. xe, ye errors x y coordinates points existing plot, either single number vector length identical corresponding coordinate. percent boolean flag indicating whether xe ye terms percent corresponding x y values. style indication style error bar.  Using style=0 yields simple line segments (drawn segments()) style=1 yields line segments short perpendicular endcaps. length length endcaps, style=1 ; passed arrows(), used draw style error bars. ... graphical parameters passed code produces error bars, e.g. segments() style=0.","code":""},{"path":"https://dankelley.github.io/oce/reference/errorbars.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Draw Error Bars on an Existing xy Diagram — errorbars","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/errorbars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw Error Bars on an Existing xy Diagram — errorbars","text":"","code":"library(oce) data(ctd) S <- ctd[[\"salinity\"]] T <- ctd[[\"temperature\"]] plot(S, T) errorbars(S, T, 0.05, 0.5)"},{"path":"https://dankelley.github.io/oce/reference/fillGap.html","id":null,"dir":"Reference","previous_headings":"","what":"Fill a Gap in an oce Object — fillGap","title":"Fill a Gap in an oce Object — fillGap","text":"Sequences NA values, filled linear interpolation non-NA values bound gap.","code":""},{"path":"https://dankelley.github.io/oce/reference/fillGap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fill a Gap in an oce Object — fillGap","text":"","code":"fillGap(x, method = c(\"linear\"), rule = 1)"},{"path":"https://dankelley.github.io/oce/reference/fillGap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fill a Gap in an oce Object — fillGap","text":"x oce object. method use; see “Details”. rule integer controlling behaviour start end x.  rule=1, NA values ends left return value. rule=2, replaced nearest non-NA point.","code":""},{"path":"https://dankelley.github.io/oce/reference/fillGap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fill a Gap in an oce Object — fillGap","text":"new oce object, gaps removed.","code":""},{"path":"https://dankelley.github.io/oce/reference/fillGap.html","id":"bugs","dir":"Reference","previous_headings":"","what":"Bugs","title":"Fill a Gap in an oce Object — fillGap","text":"Eventually, expanded work oce object.  , now, works vectors can coerced numeric. first last point NA, x returned unaltered. method linear permitted now.","code":""},{"path":"https://dankelley.github.io/oce/reference/fillGap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fill a Gap in an oce Object — fillGap","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/fillGap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fill a Gap in an oce Object — fillGap","text":"","code":"library(oce) # Integers x <- c(1:2, NA, NA, 5:6) y <- fillGap(x) print(data.frame(x, y)) #>    x y #> 1  1 1 #> 2  2 2 #> 3 NA 3 #> 4 NA 4 #> 5  5 5 #> 6  6 6 # Floats x <- x + 0.1 y <- fillGap(x) print(data.frame(x, y)) #>     x   y #> 1 1.1 1.1 #> 2 2.1 2.1 #> 3  NA 3.1 #> 4  NA 4.1 #> 5 5.1 5.1 #> 6 6.1 6.1"},{"path":"https://dankelley.github.io/oce/reference/fillGapMatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Fill a Gap in a Matrix — fillGapMatrix","title":"Fill a Gap in a Matrix — fillGapMatrix","text":"Sequences NA values replaced values computed linear interpolation along rows /columns, provided neighbouring values sufficiently close, defined fillgap parameter.  interpolation can done across row column directions, two values averaged.","code":""},{"path":"https://dankelley.github.io/oce/reference/fillGapMatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fill a Gap in a Matrix — fillGapMatrix","text":"","code":"fillGapMatrix(m, fillgap = 1, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/fillGapMatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fill a Gap in a Matrix — fillGapMatrix","text":"m numeric matrix. fillgap vector containing 1 2 integers, indicating maximum width gaps filled.  just one number given, repeated create pair.  first element pair maximum gap height (.e. row separation matrix) can filled, second maximum gap width. default value 1 means gaps width height 1 can filled. exception rules, negative value means fill gaps regardless size. error specify fillgap value less 1. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/fillGapMatrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fill a Gap in a Matrix — fillGapMatrix","text":"fillGapMatrix returns matrix, NA values replaced interpolated values dictated function parameters.","code":""},{"path":"https://dankelley.github.io/oce/reference/fillGapMatrix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fill a Gap in a Matrix — fillGapMatrix","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/fillGapMatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fill a Gap in a Matrix — fillGapMatrix","text":"","code":"library(oce) m <- matrix(1:20, nrow = 5) # Example 1: interpolate past across gaps of width/height equal to 1 m[2, 3] <- NA m[3, 3] <- NA m[4, 2] <- NA m #>      [,1] [,2] [,3] [,4] #> [1,]    1    6   11   16 #> [2,]    2    7   NA   17 #> [3,]    3    8   NA   18 #> [4,]    4   NA   14   19 #> [5,]    5   10   15   20 fillGapMatrix(m) #>      [,1] [,2] [,3] [,4] #> [1,]    1    6   11   16 #> [2,]    2    7   12   17 #> [3,]    3    8   13   18 #> [4,]    4    9   14   19 #> [5,]    5   10   15   20 # Example 2: cannot interpolate across larger groups by default m <- matrix(1:20, nrow = 5) m[2:3, 2:3] <- NA m #>      [,1] [,2] [,3] [,4] #> [1,]    1    6   11   16 #> [2,]    2   NA   NA   17 #> [3,]    3   NA   NA   18 #> [4,]    4    9   14   19 #> [5,]    5   10   15   20 fillGapMatrix(m) #>      [,1] [,2] [,3] [,4] #> [1,]    1    6   11   16 #> [2,]    2   NA   NA   17 #> [3,]    3   NA   NA   18 #> [4,]    4    9   14   19 #> [5,]    5   10   15   20 # Example 3: increasing gap lets us cover gaps of size 1 or 2 fillGapMatrix(m, fillgap = 2) #>      [,1] [,2] [,3] [,4] #> [1,]    1    6   11   16 #> [2,]    2    7   12   17 #> [3,]    3    8   13   18 #> [4,]    4    9   14   19 #> [5,]    5   10   15   20"},{"path":"https://dankelley.github.io/oce/reference/findBottom.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the Ocean Bottom in an Echosounder Object — findBottom","title":"Find the Ocean Bottom in an Echosounder Object — findBottom","text":"Finds depth Biosonics echosounder file, finding strongest reflector smoothing trace.","code":""},{"path":"https://dankelley.github.io/oce/reference/findBottom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the Ocean Bottom in an Echosounder Object — findBottom","text":"","code":"findBottom(x, ignore = 5, clean = despike)"},{"path":"https://dankelley.github.io/oce/reference/findBottom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the Ocean Bottom in an Echosounder Object — findBottom","text":"x echosounder object. ignore number metres data ignore, near surface. clean function clean inferred depth spikes.","code":""},{"path":"https://dankelley.github.io/oce/reference/findBottom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the Ocean Bottom in an Echosounder Object — findBottom","text":"list elements: time ping, depth inferred depth metres, index inferred bottom location, referenced object's depth vector.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/findBottom.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find the Ocean Bottom in an Echosounder Object — findBottom","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/firstFinite.html","id":null,"dir":"Reference","previous_headings":"","what":"Get First Finite Value in a Vector or Array. — firstFinite","title":"Get First Finite Value in a Vector or Array. — firstFinite","text":"x vector, straightforward.  x anything else, first converted vector .vector(), first value respect storage columns, matrix, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/firstFinite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get First Finite Value in a Vector or Array. — firstFinite","text":"","code":"firstFinite(v)"},{"path":"https://dankelley.github.io/oce/reference/firstFinite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get First Finite Value in a Vector or Array. — firstFinite","text":"v numerical vector array.","code":""},{"path":"https://dankelley.github.io/oce/reference/firstFinite.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get First Finite Value in a Vector or Array. — firstFinite","text":"first finite value, NULL finite values.","code":""},{"path":"https://dankelley.github.io/oce/reference/formatCI.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a Confidence Interval — formatCI","title":"Format a Confidence Interval — formatCI","text":"formats confidence interval either +/- notation parenthetic notation.  example, quantity mean 1 uncertainty 0.05, means CI 0.95 1.05, \"+-\" style yields \"1+/-0.05\", \"parentheses\" style yields `\"\"'.","code":""},{"path":"https://dankelley.github.io/oce/reference/formatCI.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a Confidence Interval — formatCI","text":"","code":"formatCI(   ci,   style = c(\"+/-\", \"parentheses\"),   model,   digits = 2,   debug = getOption(\"oceDebug\", 0) )"},{"path":"https://dankelley.github.io/oce/reference/formatCI.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a Confidence Interval — formatCI","text":"ci optional vector length 2 3. style string indicating notation used. model optional regression model, e.g. returned lm() nls(). digits optional number digits use.  ignored style \"parentheses\". debug integer value indicating debugging level. 0, formatCI() works silently.  greater 0, debugging messages printed processing.","code":""},{"path":"https://dankelley.github.io/oce/reference/formatCI.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format a Confidence Interval — formatCI","text":"ci given, result character string estimate uncertainty, plus/minus parenthetic notation.  model given, result 1-column matrix holding character strings, row names corresponding parameters model.","code":""},{"path":"https://dankelley.github.io/oce/reference/formatCI.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Format a Confidence Interval — formatCI","text":"model given, ci ignored, confidence interval calculated using confint() level set 0.6914619.  level corresponds range plus minus one standard deviation, t distribution large number degrees freedom (since qt(0.6914619, 100000) 0.5). model missing, ci must provided.  contains 3 elements, first third elements taken range confidence interval (convention use level stated previous paragraph), second element taken central value.  Alternatively, ci 2 elements, taken bounds confidence interval mean taken central value. +/- notation, e.g. \\(\\pm b\\) indicates true value lies \\(-b\\) \\(+b\\) high degree certainty.  Mills et al. (1993, section 4.1 page 83) suggest \\(b\\) set equal 2 times standard uncertainty standard deviation.  JCGM (2008, section 7.2.2 pages 25 26), however, suggest \\(b\\) set standard uncertainty, also recommending \\(\\pm\\) notation (presumably parentheses notation also) avoided altogether, favour writing sentences explains uncertainties clear terms. parentheses notation often called compact notation.  , digits parentheses indicate uncertainty corresponding digits left, e.g. 12.34(3) means last digit (4) uncertainty 3.  However, \\(\\pm\\) notation, different authorities offer different advice defining uncertainty; Mills et al. (1993) provide example parenthetic value half \\(\\pm\\) value, whereas JCM (2008) suggest using values. JCM(2008) convention used formatCI() parentheses notation, illustrated Examples 1 2.  Note, however, confidence range exceeds value, request parentheses format reverts +/- format.","code":""},{"path":"https://dankelley.github.io/oce/reference/formatCI.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Format a Confidence Interval — formatCI","text":"JCGM, 2008. Evaluation measurement data - Guide expression uncertainty measurement (JCGM 100:2008), published Joint Committee Guides Metrology, available (November 2023) https://www.bipm.org/documents/20126/2071204/JCGM_100_2008_E.pdf. See section 7.2.2 Page 25, summary notation, including illustration use equal values +- parentheses notations. Mills, ., T. Cvitas, K. Homann, N. Kallay, K. Kuchitsu, 1993. Quantities, Units Symbols Physical Chemistry, published Blackwell Science International Union Pure Applied Chemistry. (See section 4.1, page 83, summary notation, shows value right +- sign halved put parentheses, done present function, choice follow recommendation reference 1.","code":""},{"path":"https://dankelley.github.io/oce/reference/formatCI.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Format a Confidence Interval — formatCI","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/formatCI.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format a Confidence Interval — formatCI","text":"","code":"library(oce)  # Example 1: mean=1, uncertainty=0.05, in +/- notation. formatCI(c(0.95, 1.05)) # \"1+/-0.05\" #> [1] \"1+/-0.05\"  # Example 2: save mean and uncertainty, but in parentheses notation. formatCI(c(0.95, 1.05), style = \"parentheses\") # \"1.00(5)\" #> [1] \"1.00(5)\"  # example 3: using t.test to find a CI. a <- rnorm(100, mean = 10, sd = 1) CI <- t.test(a)$conf.int formatCI(CI) #> [1] \"9.9+/-0.19\" formatCI(CI, style = \"parentheses\") #> [1] \"9.9(1.87)\"  # example 4: specifying a model x <- seq(0, 10, 0.1) y <- 2 + 3 * x + rnorm(x, sd = 0.1) m <- lm(y ~ x) formatCI(model = m) #>             value        #> (Intercept) \"2+/-0.021\"  #> x           \"3+/-0.0036\" formatCI(model = m, style = \"parentheses\") #>             value         #> (Intercept) \"1.97(2.11)\"  #> x           \"3.005(3.64)\""},{"path":"https://dankelley.github.io/oce/reference/formatPosition.html","id":null,"dir":"Reference","previous_headings":"","what":"Format Geographical Position in Degrees and Minutes — formatPosition","title":"Format Geographical Position in Degrees and Minutes — formatPosition","text":"Format geographical positions degrees, minutes, hemispheres","code":""},{"path":"https://dankelley.github.io/oce/reference/formatPosition.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format Geographical Position in Degrees and Minutes — formatPosition","text":"","code":"formatPosition(   latlon,   isLat = TRUE,   type = c(\"list\", \"string\", \"expression\"),   showHemi = TRUE )"},{"path":"https://dankelley.github.io/oce/reference/formatPosition.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format Geographical Position in Degrees and Minutes — formatPosition","text":"latlon vector latitudes longitudes isLat boolean indicates whether quantity latitude longitude type string indicating type return value (see ) showHemi boolean indicates whether indicate hemisphere","code":""},{"path":"https://dankelley.github.io/oce/reference/formatPosition.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format Geographical Position in Degrees and Minutes — formatPosition","text":"list containing degrees, minutes, seconds, hemispheres, vector strings (broken) vector expressions.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/formatPosition.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Format Geographical Position in Degrees and Minutes — formatPosition","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/formatPosition.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format Geographical Position in Degrees and Minutes — formatPosition","text":"","code":"library(oce) formatPosition(10 + 1:10 / 60 + 2.8 / 3600) #> expression(c(10, 10, 10, 10, 10, 10, 10, 10, 10, 10), c(1, 2,  #> 3, 4, 5, 6, 7, 8, 9, 10), c(2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8,  #> 2.8, 2.8, 2.8), c(\"N\", NA, NA, NA, NA, NA, NA, NA, NA, NA), NULL,  #>     NULL, NULL, NULL, NULL, NULL) formatPosition(10 + 1:10 / 60 + 2.8 / 3600, type = \"string\") #> expression(\"10 01' 2.80\\\" N\", \"10 02' 2.80\\\" NA\", \"10 03' 2.80\\\" NA\",  #>     \"10 04' 2.80\\\" NA\", \"10 05' 2.80\\\" NA\", \"10 06' 2.80\\\" NA\",  #>     \"10 07' 2.80\\\" NA\", \"10 08' 2.80\\\" NA\", \"10 09' 2.80\\\" NA\",  #>     \"10 10' 2.80\\\" NA\")"},{"path":"https://dankelley.github.io/oce/reference/fullFilename.html","id":null,"dir":"Reference","previous_headings":"","what":"Full Name of File, Including Path — fullFilename","title":"Full Name of File, Including Path — fullFilename","text":"Determines full name file, including path.  Used many read.X routines, X name class object. wrapper around normalizePath(), warnings turned messages printed files found (e.g. URLs).","code":""},{"path":"https://dankelley.github.io/oce/reference/fullFilename.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Full Name of File, Including Path — fullFilename","text":"","code":"fullFilename(filename)"},{"path":"https://dankelley.github.io/oce/reference/fullFilename.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Full Name of File, Including Path — fullFilename","text":"filename name file","code":""},{"path":"https://dankelley.github.io/oce/reference/fullFilename.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Full Name of File, Including Path — fullFilename","text":"Full file name","code":""},{"path":"https://dankelley.github.io/oce/reference/fullFilename.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Full Name of File, Including Path — fullFilename","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/g1sst-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store G1SST Satellite/Model Data — g1sst-class","title":"Class to Store G1SST Satellite/Model Data — g1sst-class","text":"class stores G1SST model-satellite products.","code":""},{"path":"https://dankelley.github.io/oce/reference/g1sst-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Class to Store G1SST Satellite/Model Data — g1sst-class","text":"G1SST acronym global 1-km sea surface temperature, product combines satellite data model output. provided JPO ROMS (Regional Ocean Modelling System) modelling group. See JPL website (reference 1) learn data, see read.g1sst() documentation example downloading plotting. important regard G1SST data category , say, amsr data, two products differ greatly respect cloud cover. satellite used amsr ability sense water temperature even cloud cover, whereas g1sst fills cloud gaps model simulations.  can helpful consult reference 1 given time, clicking unclicking radio button turns model-based filling cloud gaps.","code":""},{"path":"https://dankelley.github.io/oce/reference/g1sst-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store G1SST Satellite/Model Data — g1sst-class","text":"data oce objects, data slot g1sst objects list containing main data object. metadata oce objects, metadata slot g1sst objects list containing information data object . processingLog oce objects, processingLog slot g1sst objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/g1sst-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store G1SST Satellite/Model Data — g1sst-class","text":"Although [[<- operator may permit modification contents g1sst objects (see [[<-,g1sst-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/g1sst-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store G1SST Satellite/Model Data — g1sst-class","text":"full contents data metadata slots g1sst object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,g1sst-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,g1sst-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":"https://dankelley.github.io/oce/reference/g1sst-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Class to Store G1SST Satellite/Model Data — g1sst-class","text":"JPO OurOcean Portal https://ourocean.jpl.nasa.gov/SST/ (link worked 2016 seen fail 2017 Feb 2).","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/g1sst-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store G1SST Satellite/Model Data — g1sst-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/gappyIndex.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a Possibly Gappy Indexing Vector — gappyIndex","title":"Create a Possibly Gappy Indexing Vector — gappyIndex","text":"used internally construct indexing arrays, mainly adv adp functions, readBin() used access isolated regions within raw vector. work done C++, speed. Since function designed use within oce, offer many safeguards parameters, beyond detecting overlapping situation occur length exceeded space starts elements.  Also, users aware behaviour gappyIndex() might change time; simply stated, intended direct use except package developers.","code":""},{"path":"https://dankelley.github.io/oce/reference/gappyIndex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a Possibly Gappy Indexing Vector — gappyIndex","text":"","code":"gappyIndex(starts, offset = 0L, length = 4L)"},{"path":"https://dankelley.github.io/oce/reference/gappyIndex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a Possibly Gappy Indexing Vector — gappyIndex","text":"starts integer vector one values. offset integer value indicating value added starts value, beginning sequence. length integer value indicating number elements sequence.","code":""},{"path":"https://dankelley.github.io/oce/reference/gappyIndex.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a Possibly Gappy Indexing Vector — gappyIndex","text":"example, suppose data elements buffer named buf start bytes 1000 2000, goal skip first 4 bytes sequences, read next 2 bytes unsigned 16-bit integer. accomplished follows.","code":"library(oce) buf <- readBin(\"filename\", \"raw\", n=5000, size=1) i <- gappyIndex(c(1000, 2000, 3000), 4, 2) # i is 1004,1005, 2004,2005, 3004,3005 values <- readBin(buf[i], \"integer\", size=2, n=3, endian=\"little\")"},{"path":"https://dankelley.github.io/oce/reference/gappyIndex.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a Possibly Gappy Indexing Vector — gappyIndex","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/geodDist.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Geodesic Distance on Surface of Earth — geodDist","title":"Compute Geodesic Distance on Surface of Earth — geodDist","text":"calculates geodesic distance, km, points earth, .e. distance measured along (presumed ellipsoidal) surface. method involves solution geodetic inverse problem, using Vincenty's (1975) modification Rainsford's method Helmert's elliptical terms.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodDist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Geodesic Distance on Surface of Earth — geodDist","text":"","code":"geodDist(   longitude1,   latitude1 = NULL,   longitude2 = NULL,   latitude2 = NULL,   alongPath = FALSE )"},{"path":"https://dankelley.github.io/oce/reference/geodDist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Geodesic Distance on Surface of Earth — geodDist","text":"longitude1 longitude vector longitudes, section object, longitude latitude extracted used instead next three arguments latitude1 latitude vector latitudes (ignored longitude1 section object) longitude2 optional longitude vector longitudes (ignored alongPath=TRUE) latitude2 optional latitude vector latitudes (ignored alongPath=TRUE) alongPath boolean indicating whether compute distance along path, opposed distance reference point.  alongPath=TRUE, values provided latitude2 longitude2 ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodDist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute Geodesic Distance on Surface of Earth — geodDist","text":"Vector distances kilometres.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodDist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute Geodesic Distance on Surface of Earth — geodDist","text":"function may used several different ways. Case 1: longitude1 section object. values latitude1, longitude2, latitude2 arguments ignored, behaviour depends value alongPath argument.  alongPath=FALSE, return value contains geodetic distances station first one.  alongPath=TRUE, return value geodetic distance along path connecting stations, order stored section. Case 2: longitude1 vector.  longitude2 latitude2 given, return value vector containing distances point first one, distance along path connecting points, according value alongPath.  hand, longitude2 latitude2 specified, return result depends length arguments.  length 1, taken reference point, distances longitude1 latitude1 calculated (ignoring value alongPath). However, length longitude1 latitude1, return value distance corresponding (longitude1,latitude1) (longitude2,latitude2) values.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodDist.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute Geodesic Distance on Surface of Earth — geodDist","text":"Vincenty, T. \"Direct Inverse Solutions Geodesics Ellipsoid Application Nested Equations.\" Survey Review 23, . 176 (April 1, 1975): 88-93. https://doi.org/10.1179/sre.1975.23.176.88.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/geodDist.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute Geodesic Distance on Surface of Earth — geodDist","text":"Dan Kelley based R code sent Darren Gillis, 2003 modified Fortran code , according comments source, written 1974 L. Pfeifer J. G. Gergen.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodDist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute Geodesic Distance on Surface of Earth — geodDist","text":"","code":"library(oce) km <- geodDist(100, 45, 100, 46) data(section) geodDist(section) #>   [1]    0.00000   19.32429   41.97088   55.38400   77.12095   97.43228 #>   [7]  140.86337  236.68579  288.31159  341.09128  391.72386  445.05214 #>  [13]  497.71719  549.70283  601.72487  655.01069  708.59668  760.25064 #>  [19]  814.20562  866.36956  919.08447  971.64219 1076.76938 1130.27545 #>  [25] 1182.65028 1289.00714 1341.45528 1394.73699 1448.93931 1500.14559 #>  [31] 1553.69120 1607.12013 1659.27943 1711.43964 1764.28095 1816.50871 #>  [37] 1869.14069 1922.63185 1975.25273 2028.54549 2080.42703 2133.23082 #>  [43] 2185.44805 2238.44463 2290.01922 2343.28305 2395.13015 2448.12865 #>  [49] 2500.85347 2552.86513 2605.39232 2658.30164 2711.51496 2763.34652 #>  [55] 2816.13791 2868.73222 2922.74667 2972.57341 3025.06989 3077.58318 #>  [61] 3126.21092 3179.06544 3230.14997 3336.07435 3388.24838 3493.29516 #>  [67] 3543.42063 3595.29304 3648.19007 3700.12404 3752.64077 3804.68050 #>  [73] 3859.43021 3914.55123 3968.84559 4024.20490 4080.45748 4136.26199 #>  [79] 4190.68385 4245.85274 4299.61905 4356.68235 4408.77946 4464.74619 #>  [85] 4514.56278 4567.35792 4623.31159 4680.32529 4736.04351 4790.14602 #>  [91] 4845.35484 4899.20736 4953.59714 5007.88376 5059.92465 5116.18357 #>  [97] 5224.57696 5278.47381 5330.56753 5347.43198 5361.75044 5376.43180 #> [103] 5388.12780 5402.31973 5415.84740 5429.59164 5443.72655 5457.30296 #> [109] 5470.12311 5479.22626 5488.57772 5504.57747 5518.33874 5530.83750 #> [115] 5542.29346 5553.12372 5565.24674 5576.51940 5587.84941 5599.75751 #> [121] 5610.04172 5621.55739 5629.16006 5633.49267 geodDist(section, alongPath = TRUE) #>   [1]    0.00000   19.32429   41.98025   55.45124   77.19517  110.46626 #>   [7]  165.53704  270.97198  324.62785  379.07516  430.79723  485.08130 #>  [13]  538.55673  591.26800  643.88027  697.78690  752.07840  804.06096 #>  [19]  858.28302  910.91394  964.04121 1017.01676 1123.51893 1177.28079 #>  [25] 1230.08210 1337.29373 1390.21243 1444.00195 1498.32245 1550.42178 #>  [31] 1604.48322 1658.24865 1710.92352 1763.59800 1817.12368 1869.69358 #>  [37] 1923.21041 1977.10211 2030.23927 2084.16611 2136.69018 2190.36711 #>  [43] 2243.09385 2296.82917 2349.08925 2403.02461 2455.63789 2509.39317 #>  [49] 2563.01465 2616.13733 2669.43418 2723.19853 2777.12313 2830.11382 #>  [55] 2883.69215 2937.44869 2991.73271 3043.56085 3097.04814 3150.62606 #>  [61] 3200.33847 3254.74428 3306.99942 3414.90302 3468.58088 3576.36715 #>  [67] 3627.93229 3681.32923 3735.60106 3789.20771 3843.14810 3896.99974 #>  [73] 3953.77147 4010.86373 4066.91757 4123.85351 4181.90090 4240.29531 #>  [79] 4296.21556 4354.78728 4410.24474 4469.41248 4523.69794 4582.00096 #>  [85] 4634.87666 4689.75722 4747.45577 4806.86398 4865.47849 4922.65818 #>  [91] 4980.92893 5037.32056 5094.77974 5151.26056 5206.85970 5265.74388 #>  [97] 5380.67252 5437.79073 5493.26410 5516.47719 5538.32842 5559.84386 #> [103] 5581.10886 5603.01334 5623.06788 5643.77294 5665.47216 5686.53871 #> [109] 5707.28098 5723.54327 5740.23088 5760.01226 5778.91461 5797.41508 #> [115] 5814.27408 5831.22599 5849.15121 5866.66683 5883.59620 5901.68615 #> [121] 5918.58447 5935.68413 5946.96298 5953.85721"},{"path":"https://dankelley.github.io/oce/reference/geodGc.html","id":null,"dir":"Reference","previous_headings":"","what":"Great-circle Segments Between Points on Earth — geodGc","title":"Great-circle Segments Between Points on Earth — geodGc","text":"pair longitude latitude vectors considered turn.  long vectors, may slow.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodGc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Great-circle Segments Between Points on Earth — geodGc","text":"","code":"geodGc(longitude, latitude, dmax)"},{"path":"https://dankelley.github.io/oce/reference/geodGc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Great-circle Segments Between Points on Earth — geodGc","text":"longitude vector longitudes, degrees east latitude vector latitudes, degrees north dmax maximum angular separation tolerate sub-segments, degrees.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodGc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Great-circle Segments Between Points on Earth — geodGc","text":"Data frame longitude latitude.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodGc.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Great-circle Segments Between Points on Earth — geodGc","text":"http://williams.best.vwh.net/avform.htm#Intermediate (link worked years failed 2017-01-16).","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/geodGc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Great-circle Segments Between Points on Earth — geodGc","text":"Dan Kelley, based code Clark Richards, turn based formulae provided Ed Williams (see reference 1)].","code":""},{"path":"https://dankelley.github.io/oce/reference/geodGc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Great-circle Segments Between Points on Earth — geodGc","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) mapPlot(coastlineWorld,     type = \"l\",     longitudelim = c(-80, 10), latitudelim = c(35, 80),     projection = \"+proj=merc\" ) # Great circle from New York to Paris (Lindberg's flight) l <- geodGc(c(-73.94, 2.35), c(40.67, 48.86), 1) mapLines(l$longitude, l$latitude, col = \"red\", lwd = 2)  # }"},{"path":"https://dankelley.github.io/oce/reference/geodXy.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert From Geographical to Geodesic Coordinates — geodXy","title":"Convert From Geographical to Geodesic Coordinates — geodXy","text":"method, may useful determining coordinate systems mooring array ship transects, calculates (x,y) distance calculations along geodesic curves.  See “Caution”.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodXy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert From Geographical to Geodesic Coordinates — geodXy","text":"","code":"geodXy(   longitude,   latitude,   longitudeRef,   latitudeRef,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/geodXy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert From Geographical to Geodesic Coordinates — geodXy","text":"longitude, latitude vector longitude latitude longitudeRef, latitudeRef numeric reference location. Poor results returned values close locations described longitude latitude. sensible approach might set longitudeRef longitude[1], etc. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodXy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert From Geographical to Geodesic Coordinates — geodXy","text":"geodXy returns data frame x y, geodesic distance components, measured metres.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodXy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert From Geographical to Geodesic Coordinates — geodXy","text":"calculation follows. Consider -th point longitude latitude vectors.  calculate x[], geodDist() used find distance along geodesic curve connecting (longitude[], latitude[]) (longitudeRef, latitude[]). resultant distance multiplied -1 longitude[]-longitudeRef negative, result assigned x[]. similar procedure used y[].","code":""},{"path":"https://dankelley.github.io/oce/reference/geodXy.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Convert From Geographical to Geodesic Coordinates — geodXy","text":"scheme without known precedent literature, users read documentation carefully deciding use .","code":""},{"path":"https://dankelley.github.io/oce/reference/geodXy.html","id":"change-history","dir":"Reference","previous_headings":"","what":"Change history","title":"Convert From Geographical to Geodesic Coordinates — geodXy","text":"2015-11-02, names arguments changed lon, etc., longitude, etc., keeping oce functions. 2017-04-05, four changes made. Default values longitudeRef latitudeRef removed, since old defaults inappropriate work. argument called rotate eliminated, made sense mean resultant x y zero. example made useful. Pointers made lonlat2utm(), may useful.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/geodXy.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert From Geographical to Geodesic Coordinates — geodXy","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/geodXy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert From Geographical to Geodesic Coordinates — geodXy","text":"","code":"# \\donttest{ # Develop a transect-based axis system for final data(section) stations library(oce) data(section) lon <- tail(section[[\"longitude\", \"byStation\"]], 26) lat <- tail(section[[\"latitude\", \"byStation\"]], 26) lonR <- tail(lon, 1) latR <- tail(lat, 1) data(coastlineWorld) mapPlot(coastlineWorld,     projection = \"+proj=merc\",     longitudelim = c(-75, -65), latitudelim = c(35, 43), col = \"gray\" ) mapPoints(lon, lat) XY <- geodXy(lon, lat, mean(lon), mean(lat)) angle <- 180 / pi * atan(coef(lm(y ~ x, data = XY))[2]) mapCoordinateSystem(lonR, latR, 500, angle, col = 2) # Compare UTM calculation UTM <- lonlat2utm(lon, lat, zone = 18) # we need to set the zone for this task! angleUTM <- 180 / pi * atan(coef(lm(northing ~ easting, data = UTM))[2]) mapCoordinateSystem(lonR, latR, 500, angleUTM, col = 3) legend(\"topright\",     lwd = 1, col = 2:3, bg = \"white\", title = \"Axis Rotation Angle\",     legend = c(         sprintf(\"geod: %.1f deg\", angle),         sprintf(\"utm:  %.1f deg\", angleUTM)     ) )  # }"},{"path":"https://dankelley.github.io/oce/reference/geodXyInverse.html","id":null,"dir":"Reference","previous_headings":"","what":"Inverse Geodesic Calculation — geodXyInverse","title":"Inverse Geodesic Calculation — geodXyInverse","text":"calculation done finding minimum value cost function vector difference (x,y) corresponding values returned geodXy(). See “Caution”.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodXyInverse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Inverse Geodesic Calculation — geodXyInverse","text":"","code":"geodXyInverse(x, y, longitudeRef, latitudeRef, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/geodXyInverse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Inverse Geodesic Calculation — geodXyInverse","text":"x value x metres, given geodXy() y value y metres, given geodXy() longitudeRef reference longitude, supplied geodXy() latitudeRef reference latitude, supplied geodXy() debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodXyInverse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Inverse Geodesic Calculation — geodXyInverse","text":"data frame containing longitude latitude","code":""},{"path":"https://dankelley.github.io/oce/reference/geodXyInverse.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Inverse Geodesic Calculation — geodXyInverse","text":"minimum calculated C speed, using nmmin function underpinning Nelder-Meade version R function optim(). find odd results, try setting debug=1 rerunning, see whether optimizer difficulty finding minimum mismatch function.","code":""},{"path":"https://dankelley.github.io/oce/reference/geodXyInverse.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Inverse Geodesic Calculation — geodXyInverse","text":"scheme without known precedent literature, users read documentation carefully deciding use .","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/gps-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store GPS Data — gps-class","title":"Class to Store GPS Data — gps-class","text":"class stores GPS data. objects may read read.gps() assembled .gps().","code":""},{"path":"https://dankelley.github.io/oce/reference/gps-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store GPS Data — gps-class","text":"data oce objects, data slot gps objects list containing main data object. metadata oce objects, metadata slot gps objects list containing information data object . processingLog oce objects, processingLog slot gps objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/gps-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store GPS Data — gps-class","text":"Although [[<- operator may permit modification contents gps objects (see [[<-,gps-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/gps-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store GPS Data — gps-class","text":"full contents data metadata slots gps object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,gps-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,gps-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/gps-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store GPS Data — gps-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/grad.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Matrix Gradient — grad","title":"Calculate Matrix Gradient — grad","text":"interior matrix, centred second-order differences used infer components grad.  Along edges, first-order differences used.","code":""},{"path":"https://dankelley.github.io/oce/reference/grad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Matrix Gradient — grad","text":"","code":"grad(   h,   x = seq(0, 1, length.out = nrow(h)),   y = seq(0, 1, length.out = ncol(h)) )"},{"path":"https://dankelley.github.io/oce/reference/grad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Matrix Gradient — grad","text":"h matrix values x vector coordinates along matrix columns (defaults integers) y vector coordinates along matrix rows (defaults integers)","code":""},{"path":"https://dankelley.github.io/oce/reference/grad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Matrix Gradient — grad","text":"list containing \\(|\\nabla h|\\) g, \\(\\partial h/\\partial x\\) gx, \\(\\partial h/\\partial y\\) gy, matrix dimension h.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/grad.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate Matrix Gradient — grad","text":"Dan Kelley, based advice Clark Richards, mimicking matlab function.","code":""},{"path":"https://dankelley.github.io/oce/reference/grad.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate Matrix Gradient — grad","text":"","code":"# 1. Built-in volcano dataset g <- grad(volcano) par(mfrow = c(2, 2), mar = c(3, 3, 1, 1), mgp = c(2, 0.7, 0)) imagep(volcano, zlab = \"h\") imagep(g$g, zlab = \"|grad(h)|\") zlim <- c(-1, 1) * max(g$g) imagep(g$gx, zlab = \"dh/dx\", zlim = zlim) imagep(g$gy, zlab = \"dh/dy\", zlim = zlim)   # 2. Geostrophic flow around an eddy library(oce) dx <- 5e3 dy <- 10e3 x <- seq(-200e3, 200e3, dx) y <- seq(-200e3, 200e3, dy) R <- 100e3 h <- outer(x, y, function(x, y) 500 * exp(-(x^2 + y^2) / R^2)) grad <- grad(h, x, y) par(mfrow = c(2, 2), mar = c(3, 3, 1, 1), mgp = c(2, 0.7, 0)) contour(x, y, h, asp = 1, main = expression(h)) f <- 1e-4 gprime <- 9.8 * 1 / 1024 u <- -(gprime / f) * grad$gy v <- (gprime / f) * grad$gx contour(x, y, u, asp = 1, main = expression(u)) contour(x, y, v, asp = 1, main = expression(v)) contour(x, y, sqrt(u^2 + v^2), asp = 1, main = expression(speed))"},{"path":"https://dankelley.github.io/oce/reference/gravity.html","id":null,"dir":"Reference","previous_headings":"","what":"Acceleration Due to Earth Gravity — gravity","title":"Acceleration Due to Earth Gravity — gravity","text":"Compute \\(g\\), acceleration due gravity, function latitude.","code":""},{"path":"https://dankelley.github.io/oce/reference/gravity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acceleration Due to Earth Gravity — gravity","text":"","code":"gravity(latitude = 45, degrees = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/gravity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acceleration Due to Earth Gravity — gravity","text":"latitude Latitude \\(^\\circ\\)N radians north equator. degrees Flag indicating whether degrees used latitude; set FALSE, radians used.","code":""},{"path":"https://dankelley.github.io/oce/reference/gravity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Acceleration Due to Earth Gravity — gravity","text":"Acceleration due gravity, \\(m^2/s\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/gravity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Acceleration Due to Earth Gravity — gravity","text":"Value verified yet, except roughly.","code":""},{"path":"https://dankelley.github.io/oce/reference/gravity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acceleration Due to Earth Gravity — gravity","text":"Gill, .E., 1982. Atmosphere-ocean Dynamics, Academic Press, New York, 662 pp. Caution: Fofonoff Millard (1983 UNESCO) use different formula.","code":""},{"path":"https://dankelley.github.io/oce/reference/gravity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Acceleration Due to Earth Gravity — gravity","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/gravity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acceleration Due to Earth Gravity — gravity","text":"","code":"g <- gravity(45) # 9.8"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-adp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Handle Flags in adp Objects — handleFlags,adp-method","title":"Handle Flags in adp Objects — handleFlags,adp-method","text":"Data-quality flags stored metadata slot oce objects list named flags. present function (generic specialized versions various data classes) provides way manipulate contents data slot, based data-quality flags. example, common operation replace erroneous data NA. flags within object's metadata slot empty, object returned, unaltered. Otherwise, handleFlags examines object@metadata$flags context flags argument, carries actions specified actions argument. default, sets returned data entries NA, wherever corresponding metadata$flag values signal unreliable data. maintain hint data changed, metadata$flags returned value direct copy corresponding entry object.","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-adp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Handle Flags in adp Objects — handleFlags,adp-method","text":"","code":"# S4 method for class 'adp' handleFlags(   object = \"oce\",   flags = NULL,   actions = NULL,   where = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-adp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Handle Flags in adp Objects — handleFlags,adp-method","text":"object adp object. flags list specifying flag values upon actions taken. can take two forms. first form, list named elements containing vector integers. example, salinities flagged values 1 3:9 specified flags=list(salinity=c(1,3:9)). Several data items can specified, e.g. flags=list(salinity=c(1,3:9), temperature=c(1,3:9)) indicates actions take place salinity temperature. second form, flags list holding single unnamed vector, means apply actions data entries.  example, flags=list(c(1,3:9)) means apply just salinity temperature, everything within data slot. flags provided, defaultFlags() called, try determine reasonable default. actions optional list contains items names match flags argument.  actions supplied, default set values identified flags NA; can also specified specifying actions=list(\"NA\"). also possible specify functions calculate replacement values. provided object single argument, must return replacement data item question. See “Details” default used actions supplied. optional character value permits function work objects store flags e.g. object@metadata$flags$instead object@metadata$flags, data within object@data$instead within object@data. default value NULL means look withing object@metadata , default within oce.  (purpose make oce extensible packages, may choose store data two levels deep data slot.) debug optional integer specifying degree debugging, value 0 meaning skip debugging 1 higher meaning print information arguments data. usually good idea set 1 initial work dataset, see flags handled data item. supplied, defaults value getOption(\"oceDebug\").","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-adp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Handle Flags in adp Objects — handleFlags,adp-method","text":"flags actions provided, default consider flag value 1 indicate bad data, 0 indicate good data. Note makes sense use velocity (v) flags, flags , least instruments, stored raw quantities, quantities may set NA.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/handleFlags-adp-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Handle Flags in adp Objects — handleFlags,adp-method","text":"","code":"# Flag low \"goodness\" or high \"error beam\" values. library(oce) data(adp) # Same as Example 2 of ?'setFlags,adp-method' v <- adp[[\"v\"]] i2 <- array(FALSE, dim = dim(v)) g <- adp[[\"g\", \"numeric\"]] # Set thresholds on percent \"goodness\" and error \"velocity\". G <- 25 V4 <- 0.45 for (k in 1:3) {     i2[, , k] <- ((g[, , k] + g[, , 4]) < G) | (v[, , 4] > V4) } adpQC <- initializeFlags(adp, \"v\", 2) adpQC <- setFlags(adpQC, \"v\", i2, 3) adpClean <- handleFlags(adpQC, flags = list(3), actions = list(\"NA\")) # Demonstrate (subtle) change graphically. par(mfcol = c(2, 1)) plot(adp, which = \"u1\", drawTimeRange = FALSE) plot(adpClean, which = \"u1\", drawTimeRange = FALSE) t0 <- 1214510000 # from locator() arrows(t0, 20, t0, 35, length = 0.1, lwd = 3, col = \"magenta\") mtext(\"Slight change above arrow\", col = \"magenta\", font = 2)"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-argo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Handle Flags in argo Objects — handleFlags,argo-method","title":"Handle Flags in argo Objects — handleFlags,argo-method","text":"Data-quality flags stored metadata slot oce objects list named flags. present function (generic specialized versions various data classes) provides way manipulate contents data slot, based data-quality flags. example, common operation replace erroneous data NA. flags within object's metadata slot empty, object returned, unaltered. Otherwise, handleFlags examines object@metadata$flags context flags argument, carries actions specified actions argument. default, sets returned data entries NA, wherever corresponding metadata$flag values signal unreliable data. maintain hint data changed, metadata$flags returned value direct copy corresponding entry object.","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-argo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Handle Flags in argo Objects — handleFlags,argo-method","text":"","code":"# S4 method for class 'argo' handleFlags(   object = \"oce\",   flags = NULL,   actions = NULL,   where = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-argo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Handle Flags in argo Objects — handleFlags,argo-method","text":"object argo object. flags list specifying flag values upon actions taken. can take two forms. first form, list named elements containing vector integers. example, salinities flagged values 1 3:9 specified flags=list(salinity=c(1,3:9)). Several data items can specified, e.g. flags=list(salinity=c(1,3:9), temperature=c(1,3:9)) indicates actions take place salinity temperature. second form, flags list holding single unnamed vector, means apply actions data entries.  example, flags=list(c(1,3:9)) means apply just salinity temperature, everything within data slot. flags provided, defaultFlags() called, try determine reasonable default. actions optional list contains items names match flags argument.  actions supplied, default set values identified flags NA; can also specified specifying actions=list(\"NA\"). also possible specify functions calculate replacement values. provided object single argument, must return replacement data item question. See “Details” default used actions supplied. optional character value permits function work objects store flags e.g. object@metadata$flags$instead object@metadata$flags, data within object@data$instead within object@data. default value NULL means look withing object@metadata , default within oce.  (purpose make oce extensible packages, may choose store data two levels deep data slot.) debug optional integer specifying degree debugging, value 0 meaning skip debugging 1 higher meaning print information arguments data. usually good idea set 1 initial work dataset, see flags handled data item. supplied, defaults value getOption(\"oceDebug\").","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-argo-method.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Handle Flags in argo Objects — handleFlags,argo-method","text":"Wong, Annie, Robert Keeley, Thierry Carval, Argo Data Management Team. \"Argo Quality Control Manual CTD Trajectory Data,\" January 1, 2020. https://archimer.ifremer.fr/doc/00228/33951/.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/handleFlags-argo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Handle Flags in argo Objects — handleFlags,argo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-argo-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Handle Flags in argo Objects — handleFlags,argo-method","text":"","code":"library(oce) data(argo) argoNew <- handleFlags(argo) # Demonstrate replacement, looking at the second profile f <- argo[[\"salinityFlag\"]][, 2] df <- data.frame(flag = f, orig = argo[[\"salinity\"]][, 2], new = argoNew[[\"salinity\"]][, 2]) df[11:15, ] # notice line 13 #>    flag   orig    new #> 11    1 35.207 35.207 #> 12    1 35.207 35.207 #> 13    4 35.209     NA #> 14    1 35.207 35.207 #> 15    1 35.207 35.207"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-ctd-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Handle Flags in ctd Objects — handleFlags,ctd-method","title":"Handle Flags in ctd Objects — handleFlags,ctd-method","text":"Data-quality flags stored metadata slot oce objects list named flags. present function (generic specialized versions various data classes) provides way manipulate contents data slot, based data-quality flags. example, common operation replace erroneous data NA. flags within object's metadata slot empty, object returned, unaltered. Otherwise, handleFlags examines object@metadata$flags context flags argument, carries actions specified actions argument. default, sets returned data entries NA, wherever corresponding metadata$flag values signal unreliable data. maintain hint data changed, metadata$flags returned value direct copy corresponding entry object.","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-ctd-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Handle Flags in ctd Objects — handleFlags,ctd-method","text":"","code":"# S4 method for class 'ctd' handleFlags(   object = \"oce\",   flags = NULL,   actions = NULL,   where = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-ctd-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Handle Flags in ctd Objects — handleFlags,ctd-method","text":"object ctd object. flags list specifying flag values upon actions taken. can take two forms. first form, list named elements containing vector integers. example, salinities flagged values 1 3:9 specified flags=list(salinity=c(1,3:9)). Several data items can specified, e.g. flags=list(salinity=c(1,3:9), temperature=c(1,3:9)) indicates actions take place salinity temperature. second form, flags list holding single unnamed vector, means apply actions data entries.  example, flags=list(c(1,3:9)) means apply just salinity temperature, everything within data slot. flags provided, defaultFlags() called, try determine reasonable default. actions optional list contains items names match flags argument.  actions supplied, default set values identified flags NA; can also specified specifying actions=list(\"NA\"). also possible specify functions calculate replacement values. provided object single argument, must return replacement data item question. See “Details” default used actions supplied. optional character value permits function work objects store flags e.g. object@metadata$flags$instead object@metadata$flags, data within object@data$instead within object@data. default value NULL means look withing object@metadata , default within oce.  (purpose make oce extensible packages, may choose store data two levels deep data slot.) debug optional integer specifying degree debugging, value 0 meaning skip debugging 1 higher meaning print information arguments data. usually good idea set 1 initial work dataset, see flags handled data item. supplied, defaults value getOption(\"oceDebug\").","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-ctd-method.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Handle Flags in ctd Objects — handleFlags,ctd-method","text":"following link used work, failed December 2020. https://www.nodc.noaa.gov/woce/woce_v3/wocedata_1/whp/exchange/exchange_format_desc.htm","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/handleFlags-ctd-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Handle Flags in ctd Objects — handleFlags,ctd-method","text":"","code":"library(oce) data(section) stn <- section[[\"station\", 100]] # 1. Default: anything not flagged as 2 is set to NA, to focus # solely on 'good', in the World Hydrographic Program scheme. STN1 <- handleFlags(stn, flags = list(c(1, 3:9))) data.frame(old = stn[[\"salinity\"]], new = STN1[[\"salinity\"]], salinityFlag = stn[[\"salinityFlag\"]]) #>        old     new salinityFlag #> 1  36.4766 36.4766            2 #> 2  36.6921 36.6921            2 #> 3  36.6001 36.6001            2 #> 4  36.5399 36.5399            2 #> 5  36.2388 36.2388            2 #> 6  35.7580      NA            3 #> 7  35.2765      NA            3 #> 8  35.0700 35.0700            2 #> 9  34.9622 34.9622            2 #> 10 34.9497 34.9497            2 #> 11 34.9484 34.9484            2 #> 12 34.9639 34.9639            2 #> 13 34.9395 34.9395            2 #> 14 34.9645 34.9645            2 #> 15 34.9665 34.9665            2 #> 16 34.9516 34.9516            2 #> 17 34.9408 34.9408            2 #> 18 34.9307 34.9307            2 #> 19 34.9193 34.9193            2 #> 20 34.9040 34.9040            2 #> 21 34.8960 34.8960            2 #> 22 34.8838 34.8838            2 #> 23 34.8834 34.8834            2 #> 24 34.9039 34.9039            2  # 2. Use bottle salinity, if it is good and ctd is bad replace <- 2 == stn[[\"salinityBottleFlag\"]] & 2 != stn[[\"salinityFlag\"]] S <- ifelse(replace, stn[[\"salinityBottle\"]], stn[[\"salinity\"]]) STN2 <- oceSetData(stn, \"salinity\", S)  # 3. Use smoothed TS relationship to nudge questionable data. f <- function(x) {     S <- x[[\"salinity\"]]     T <- x[[\"temperature\"]]     df <- 0.5 * length(S) # smooths a bit     sp <- smooth.spline(T, S, df = df)     0.5 * (S + predict(sp, T)$y) } par(mfrow = c(1, 2)) STN3 <- handleFlags(stn, flags = list(salinity = c(1, 3:9)), action = list(salinity = f)) plotProfile(stn, \"salinity\", mar = c(3, 3, 3, 1)) p <- stn[[\"pressure\"]] par(mar = c(3, 3, 3, 1)) plot(STN3[[\"salinity\"]] - stn[[\"salinity\"]], p, ylim = rev(range(p)))   # 4. Single-variable flags (vector specification) data(section) # Multiple-flag scheme: one per data item A <- section[[\"station\", 100]] deep <- A[[\"pressure\"]] > 1500 flag <- ifelse(deep, 7, 2) for (flagName in names(A[[\"flags\"]])) {     A[[paste(flagName, \"Flag\", sep = \"\")]] <- flag } Af <- handleFlags(A) stopifnot(all.equal(is.na(Af[[\"salinity\"]]), deep))  # 5. Single-variable flags (list specification) B <- section[[\"station\", 100]] B[[\"flags\"]] <- list(flag) Bf <- handleFlags(B) stopifnot(all.equal(is.na(Bf[[\"salinity\"]]), deep))"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Handle Flags in oce Objects — handleFlags,oce-method","title":"Handle Flags in oce Objects — handleFlags,oce-method","text":"Data-quality flags stored metadata slot oce objects list named flags. present function (generic specialized versions various data classes) provides way manipulate contents data slot, based data-quality flags. example, common operation replace erroneous data NA. flags within object's metadata slot empty, object returned, unaltered. Otherwise, handleFlags examines object@metadata$flags context flags argument, carries actions specified actions argument. default, sets returned data entries NA, wherever corresponding metadata$flag values signal unreliable data. maintain hint data changed, metadata$flags returned value direct copy corresponding entry object.","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Handle Flags in oce Objects — handleFlags,oce-method","text":"","code":"# S4 method for class 'oce' handleFlags(   object = \"oce\",   flags = NULL,   actions = NULL,   where = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Handle Flags in oce Objects — handleFlags,oce-method","text":"object oce object. flags list specifying flag values upon actions taken. can take two forms. first form, list named elements containing vector integers. example, salinities flagged values 1 3:9 specified flags=list(salinity=c(1,3:9)). Several data items can specified, e.g. flags=list(salinity=c(1,3:9), temperature=c(1,3:9)) indicates actions take place salinity temperature. second form, flags list holding single unnamed vector, means apply actions data entries.  example, flags=list(c(1,3:9)) means apply just salinity temperature, everything within data slot. flags provided, defaultFlags() called, try determine reasonable default. actions optional list contains items names match flags argument.  actions supplied, default set values identified flags NA; can also specified specifying actions=list(\"NA\"). also possible specify functions calculate replacement values. provided object single argument, must return replacement data item question. See “Details” default used actions supplied. optional character value permits function work objects store flags e.g. object@metadata$flags$instead object@metadata$flags, data within object@data$instead within object@data. default value NULL means look withing object@metadata , default within oce.  (purpose make oce extensible packages, may choose store data two levels deep data slot.) debug optional integer specifying degree debugging, value 0 meaning skip debugging 1 higher meaning print information arguments data. usually good idea set 1 initial work dataset, see flags handled data item. supplied, defaults value getOption(\"oceDebug\").","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-oce-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Handle Flags in oce Objects — handleFlags,oce-method","text":"Base-level handling flags.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/handleFlags-section-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Handle flags in section Objects — handleFlags,section-method","title":"Handle flags in section Objects — handleFlags,section-method","text":"Data-quality flags stored metadata slot oce objects list named flags. present function (generic specialized versions various data classes) provides way manipulate contents data slot, based data-quality flags. example, common operation replace erroneous data NA. flags within object's metadata slot empty, object returned, unaltered. Otherwise, handleFlags examines object@metadata$flags context flags argument, carries actions specified actions argument. default, sets returned data entries NA, wherever corresponding metadata$flag values signal unreliable data. maintain hint data changed, metadata$flags returned value direct copy corresponding entry object.","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-section-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Handle flags in section Objects — handleFlags,section-method","text":"","code":"# S4 method for class 'section' handleFlags(   object = \"oce\",   flags = NULL,   actions = NULL,   where = where,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-section-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Handle flags in section Objects — handleFlags,section-method","text":"object section object. flags list specifying flag values upon actions taken. can take two forms. first form, list named elements containing vector integers. example, salinities flagged values 1 3:9 specified flags=list(salinity=c(1,3:9)). Several data items can specified, e.g. flags=list(salinity=c(1,3:9), temperature=c(1,3:9)) indicates actions take place salinity temperature. second form, flags list holding single unnamed vector, means apply actions data entries.  example, flags=list(c(1,3:9)) means apply just salinity temperature, everything within data slot. flags provided, defaultFlags() called, try determine reasonable default. actions optional list contains items names match flags argument.  actions supplied, default set values identified flags NA; can also specified specifying actions=list(\"NA\"). also possible specify functions calculate replacement values. provided object single argument, must return replacement data item question. See “Details” default used actions supplied. optional character value permits function work objects store flags e.g. object@metadata$flags$instead object@metadata$flags, data within object@data$instead within object@data. default value NULL means look withing object@metadata , default within oce.  (purpose make oce extensible packages, may choose store data two levels deep data slot.) debug optional integer specifying degree debugging, value 0 meaning skip debugging 1 higher meaning print information arguments data. usually good idea set 1 initial work dataset, see flags handled data item. supplied, defaults value getOption(\"oceDebug\").","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-section-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Handle flags in section Objects — handleFlags,section-method","text":"default flags based calling defaultFlags() based metadata first station section. stations different flag schemes (seems highly unlikely archived data), work well, indeed way proceed use handleFlags,ctd-method() stations, individually.","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-section-method.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Handle flags in section Objects — handleFlags,section-method","text":"following link used work, found fail December 2020. https://www.nodc.noaa.gov/woce/woce_v3/wocedata_1/whp/exchange/exchange_format_desc.htm","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/handleFlags-section-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Handle flags in section Objects — handleFlags,section-method","text":"","code":"library(oce) data(section) section2 <- handleFlags(section, flags = c(1, 3:9)) par(mfrow = c(2, 1)) plotTS(section) plotTS(section2)"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-vector-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Signal Erroneous Application to non-oce Objects — handleFlags,vector-method","title":"Signal Erroneous Application to non-oce Objects — handleFlags,vector-method","text":"Signal Erroneous Application non-oce Objects","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags-vector-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Signal Erroneous Application to non-oce Objects — handleFlags,vector-method","text":"","code":"# S4 method for class 'vector' handleFlags(   object = \"oce\",   flags = list(),   actions = list(),   where = list(),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/handleFlags-vector-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Signal Erroneous Application to non-oce Objects — handleFlags,vector-method","text":"object vector, case oce objects. flags Ignored. actions Ignored. Ignored. debug Ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags.html","id":null,"dir":"Reference","previous_headings":"","what":"Handle Flags in oce Objects (Generic) — handleFlags","title":"Handle Flags in oce Objects (Generic) — handleFlags","text":"Data-quality flags stored metadata slot oce objects list named flags. present function (generic specialized versions various data classes) provides way manipulate contents data slot, based data-quality flags. example, common operation replace erroneous data NA. flags within object's metadata slot empty, object returned, unaltered. Otherwise, handleFlags examines object@metadata$flags context flags argument, carries actions specified actions argument. default, sets returned data entries NA, wherever corresponding metadata$flag values signal unreliable data. maintain hint data changed, metadata$flags returned value direct copy corresponding entry object.","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Handle Flags in oce Objects (Generic) — handleFlags","text":"","code":"handleFlags(   object = \"oce\",   flags = NULL,   actions = NULL,   where = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/handleFlags.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Handle Flags in oce Objects (Generic) — handleFlags","text":"object oce object. flags list specifying flag values upon actions taken. can take two forms. first form, list named elements containing vector integers. example, salinities flagged values 1 3:9 specified flags=list(salinity=c(1,3:9)). Several data items can specified, e.g. flags=list(salinity=c(1,3:9), temperature=c(1,3:9)) indicates actions take place salinity temperature. second form, flags list holding single unnamed vector, means apply actions data entries.  example, flags=list(c(1,3:9)) means apply just salinity temperature, everything within data slot. flags provided, defaultFlags() called, try determine reasonable default. actions optional list contains items names match flags argument.  actions supplied, default set values identified flags NA; can also specified specifying actions=list(\"NA\"). also possible specify functions calculate replacement values. provided object single argument, must return replacement data item question. See “Details” default used actions supplied. optional character value permits function work objects store flags e.g. object@metadata$flags$instead object@metadata$flags, data within object@data$instead within object@data. default value NULL means look withing object@metadata , default within oce.  (purpose make oce extensible packages, may choose store data two levels deep data slot.) debug optional integer specifying degree debugging, value 0 meaning skip debugging 1 higher meaning print information arguments data. usually good idea set 1 initial work dataset, see flags handled data item. supplied, defaults value getOption(\"oceDebug\").","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlags.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Handle Flags in oce Objects (Generic) — handleFlags","text":"specialized variant function defaults flags actions.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/handleFlagsInternal.html","id":null,"dir":"Reference","previous_headings":"","what":"Low-Level Function for Handling Data-Quality Flags — handleFlagsInternal","title":"Low-Level Function for Handling Data-Quality Flags — handleFlagsInternal","text":"function designed internal use within oce package.  purpose carry low-level processing relating data-quality flags, support higher-level functions handleFlags,ctd-method ctd objects, handleFlags,adp-method adp objects, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlagsInternal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Low-Level Function for Handling Data-Quality Flags — handleFlagsInternal","text":"","code":"handleFlagsInternal(object, flags, actions, where, debug = 0)"},{"path":"https://dankelley.github.io/oce/reference/handleFlagsInternal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Low-Level Function for Handling Data-Quality Flags — handleFlagsInternal","text":"object oce object. flags named list numeric values. actions character vector indicating actions carried corresponding flags values. lengthened rep() necessary, length flags. common value actions \"NA\", means data values flagged replaced NA returned result. optional string permits function work objects store flags e.g. object@metadata$flags$instead object@metadata$flags, data within object@data$instead within object@data. appropriate value within oce package default, NULL, means extra subdirectory used. debug integer indicating degree debugging requested, value 0 meaning act silently, value 1 meaning print information steps processing.","code":""},{"path":"https://dankelley.github.io/oce/reference/handleFlagsInternal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Low-Level Function for Handling Data-Quality Flags — handleFlagsInternal","text":"copy object, possibly modifications data slot, object contains flag values actions alter data.","code":""},{"path":"https://dankelley.github.io/oce/reference/head.oce.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract The Start of an Oce Object — head.oce","title":"Extract The Start of an Oce Object — head.oce","text":"Extract Start Oce Object function handles following object classes directly: adp, adv, argo (selection profile), coastline, ctd, echosounder (selection ping), section (selection station) topo (selection longitude latitude). handle amsr landsat yet, instead issuing warning returning x cases. classes, calls head() n provided, item data slot, issuing warning item vector; author quite aware may work well classes. plan handle appropriate classes July 2018. Please contact author class need handled date.","code":""},{"path":"https://dankelley.github.io/oce/reference/head.oce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract The Start of an Oce Object — head.oce","text":"","code":"# S3 method for class 'oce' head(x, n = 6L, ...)"},{"path":"https://dankelley.github.io/oce/reference/head.oce.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract The Start of an Oce Object — head.oce","text":"x oce object. n Number elements extract, head(). ... ignored","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/head.oce.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract The Start of an Oce Object — head.oce","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/imagep.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an Image with a Color Palette — imagep","title":"Plot an Image with a Color Palette — imagep","text":"Plot image color palette, way conflict par(\"mfrow\") layout().  plot just palette, e.g. get x-y plot points colored according palette, use drawPalette() draw main diagram.","code":""},{"path":"https://dankelley.github.io/oce/reference/imagep.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an Image with a Color Palette — imagep","text":"","code":"imagep(   x,   y,   z,   xlim,   ylim,   zlim,   zclip = FALSE,   flipy = FALSE,   xlab = \"\",   ylab = \"\",   zlab = \"\",   zlabPosition = c(\"top\", \"side\"),   las.palette = 0,   decimate = TRUE,   quiet = FALSE,   breaks,   col,   colormap,   labels = NULL,   at = NULL,   drawContours = FALSE,   drawPalette = TRUE,   drawTriangles = FALSE,   tformat,   drawTimeRange = getOption(\"oceDrawTimeRange\"),   filledContour = FALSE,   missingColor = NULL,   useRaster,   mgp = getOption(\"oceMgp\"),   mar,   mai.palette,   xaxs = \"i\",   yaxs = \"i\",   asp = NA,   cex = par(\"cex\"),   cex.axis = cex,   cex.lab = cex,   cex.main = cex,   axes = TRUE,   main = \"\",   axisPalette,   add = FALSE,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/imagep.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an Image with a Color Palette — imagep","text":"x, y different meanings different modes operation. Mode 1. One mode meaning locations coordinates along values matrix z defined. case, x y must supplied , within , values must finite distinct; values order, (z) transformed put order. ordered matching way). Mode 2. z provided x y, latter constructed indicate indices matrix, contrast range 0 1, case image(). Mode 3. x list, components x$x x$y used x y, respectively. list component z used z. (NOTE: arguments meant mimic image(), explains description .)  Mode 4. also special cases, e.g. x topographic object can created read.topo() .topo(), longitude latitude used axes, topographic height drawn. z matrix containing values plotted (NAs allowed). Note x can used instead z convenience. (NOTE: arguments meant mimic image(), explains description .) xlim, ylim Limits x y axes. zlim missing, z scale determined range data. provided, zlim may take several forms. First, may pair numbers specify limits color scale.  Second, string \"histogram\", yield flattened histogram (.e. increase contrast). Third, string \"symmetric\", yield limits symmetric zero, can helpful drawing velocity fields, zero value particular meaning (case, good color scheme might col=oceColorsTwo). zclip Logical, indicating whether clip colors corresponding zlim. works zlim provided. Clipped regions colored missingColor. Thus, clipping image somewhat analogous clipping xy plot, clipped data ignored, image means colored missingColor. flipy Logical, TRUE indicating graph y axis reversed, .e. smaller values bottom page. (Historical note: 2019 March 26, meaning flipy different; meant reverse range y axis, ylim given reversed range, setting flipy=TRUE reverse flip, yielding conventional axis smaller values bottom.) xlab, ylab, zlab Names x axis, y axis, image values. zlabPosition String indicating put label z axis, either top-right main image, side, axis palette. las.palette Parameter controlling orientation labels image palette, passed las argument drawPalette().  See documentation drawPalette() details. decimate Controls whether image decimated plotting, three possible cases. decimate=FALSE every grid cell matrix represented pixel image. decimate=TRUE (default), decimation done horizontal vertical direction () length corresponding edge z matrix exceeds 800. (also creates warning message.) decimation factor computed integer just ratio z dimension 400. Thus, decimation done dimension less 800, dimension s 800 1199, every second grid point mapped pixel image. decimate integer, z subsampled seq.int(1L, dim(z)[1], =decimate) (x), done y direction. decimate vector two integers, first used first index z, second used second index. quiet logical value indicating whether silence warnings might occur image decimated. breaks z values breaks color scheme.  length 1, value indicates desired number breaks, supplied pretty(), determining clean break points. colormap provided, takes precedence breaks col. col Either vector colors corresponding breaks, length 1 plus number breaks, function specifying colors. col provided, colormap also provided, col defaults oceColorsViridis(). colormap provided, takes precedence breaks col. colormap color map created colormap().  provided, colormap$breaks colormap$col take precedence present arguments breaks col. (contents colormap ignored, though.) colormap provided, takes precedence breaks col. labels Optional vector labels ticks palette axis (must correspond ). Optional vector positions labels. drawContours Logical value indicating whether draw contours image, palette, color breaks.  Images great deal high-wavenumber variation look poor contours. drawPalette Indication type palette draw, .  drawPalette=TRUE, palette drawn right-hand side main image.  drawPalette=FALSE, palette drawn, right-hand side plot thin margin.  drawPalette=\"space\", palette drawn, space put right-hand margin occupy region palette drawn.  last form useful producing stacked plots uniform left right margins, palettes images. drawTriangles Logical value indicating whether draw triangles top bottom palette.  passed drawPalette(). tformat Optional argument passed oce.plot.ts(), plot types call function.  (See strptime() format used.) drawTimeRange Logical, used x axis time.  TRUE, indication time range data (axis) indicated top-left margin graph.  useful labels time axes indicate hours range less day, etc. filledContour Boolean value indicating whether use filled contours plot image. missingColor color used indicate missing data, NULL transparent (see , try setting par(\"bg\")<-\"red\"). useRaster logical value passed image(), cases filledContour FALSE. Setting useRaster=TRUE can alleviate anti-aliasing effects plot devices; see documentation image(). mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar 4-element Value used par(\"mar\").  given, reasonable value calculated based whether xlab ylab empty strings. mai.palette Palette margin corrections (inches), added mai value used palette.  Use care. xaxs Character indicating whether image extend edge x axis (value \"\") ; see par(\"xaxs\"). yaxs xaxs y axis. asp Aspect ratio plot, plot.default(). x inherits topo asp=NA (default) asp redefined reciprocal mean latitude x, way reduce geographical distortion. Otherwise, asp NA, used directly. cex numeric character expansion factor, used cex.axis, cex.lab cex.main, values supplied. cex.axis, cex.lab, cex.main numeric character expansion factors axis numbers, axis names plot titles; see par(). axes Logical, set TRUE get axes main image. main Title plot. axisPalette Optional replacement function axis(), passed drawPalette(). add Logical value indicating whether add existing plot. default value, FALSE indicates new plot created. However, add TRUE, idea add image (palette axes) existing plot. Clearly, , arguments xlim ignored. Indeed, add=TRUE, arguments examined x (must vector; mode providing matrix oce object work), y, z, decimate, plus either colormap breaks col. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... Optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/imagep.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an Image with a Color Palette — imagep","text":"list silently returned, containing xat yat, values can used oce.grid() add grid plot.","code":""},{"path":"https://dankelley.github.io/oce/reference/imagep.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot an Image with a Color Palette — imagep","text":"default, creates image color palette right.  effect similar filled.contour() except imagep possible set layout() outside function, enables creation plots many image-palette panels.  Note contour lines may coincide color transitions, case coarse images. Note use layout() screen splitting methods.  simply manipulates margins, draws two plots together.  lets users employ favourite layout schemes. NOTE: imagep analogue image(), borrows convention number rows matrix corresponds x axis, y axis.  (Actually, image() permits length x match either nrow(z) 1+nrow(z), first permitted.)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/imagep.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an Image with a Color Palette — imagep","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/imagep.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an Image with a Color Palette — imagep","text":"","code":"library(oce)  # 1. simplest use imagep(volcano)   # 2. something oceanographic (internal-wave speed) h <- seq(0, 50, length.out = 100) drho <- seq(1, 3, length.out = 200) speed <- outer(h, drho, function(drho, h) sqrt(9.8 * drho * h / 1024)) imagep(h, drho, speed,     xlab = \"Equivalent depth [m]\",     ylab = expression(paste(Delta * rho, \" [kg/m^3]\")),     zlab = \"Internal-wave speed [m/s]\" )   # 3. fancy labelling on atan() function x <- seq(0, 1, 0.01) y <- seq(0, 1, 0.01) angle <- outer(x, y, function(x, y) atan2(y, x)) imagep(x, y, angle,     filledContour = TRUE, breaks = c(0, pi / 4, pi / 2),     col = c(\"lightgray\", \"darkgray\"),     at = c(0, pi / 4, pi / 2),     labels = c(0, expression(pi / 4), expression(pi / 2)) )   # 5. y-axis flipping par(mfrow = c(2, 2)) data(adp) d <- adp[[\"distance\"]] t <- adp[[\"time\"]] u <- adp[[\"v\"]][, , 1] imagep(t, d, u, drawTimeRange = FALSE) mtext(\"normal\") imagep(t, d, u, flipy = TRUE, drawTimeRange = FALSE) mtext(\"flipy\") imagep(t, d, u, ylim = rev(range(d)), drawTimeRange = FALSE) mtext(\"ylim\") imagep(t, d, u, ylim = rev(range(d)), flipy = TRUE, drawTimeRange = FALSE) mtext(\"flipy and ylim\")  par(mfrow = c(1, 1))  # 6. a colormap case data(topoWorld) cm <- colormap(name = \"gmt_globe\") imagep(topoWorld, colormap = cm)"},{"path":"https://dankelley.github.io/oce/reference/initialize-ctd-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialize Storage for a ctd Object — initialize,ctd-method","title":"Initialize Storage for a ctd Object — initialize,ctd-method","text":"function creates ctd objects. mainly used oce functions read.ctd() .ctd(), intended novice users, may change time, without following usual rules transitioning deprecated defunct status (see oce-deprecated).","code":""},{"path":"https://dankelley.github.io/oce/reference/initialize-ctd-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialize Storage for a ctd Object — initialize,ctd-method","text":"","code":"# S4 method for class 'ctd' initialize(   .Object,   pressure,   salinity,   temperature,   conductivity,   units,   pressureType,   deploymentType,   ... )"},{"path":"https://dankelley.github.io/oce/reference/initialize-ctd-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialize Storage for a ctd Object — initialize,ctd-method","text":".Object string \"ctd\" pressure optional numerical vector pressures. salinity optional numerical vector salinities. temperature optional numerical vector temperatures. conductivity optional numerical vector conductivities. units optional list indicating units quantities specified previous arguments. supplied, default set , based pressure conductivity arguments specified. 4 arguments specified, units set call included following: units=list(temperature=list(unit=expression(degree*C), scale=\"-90\"),      salinity=list(unit=expression(), scale=\"PSS-78\"),      conductivity=list(unit=expression(), scale=\"\"),      pressure=list(unit=expression(dbar), scale=\"\"),      depth=list(unit=expression(m), scale=\"\")). list trimmed 4 items specified previous arguments. Note units specified, just copied metadata slot returned object, user must careful set values make sense oce functions. pressureType optional character string indicating type pressure; supplied, defaults \"sea\", indicates excess pressure atmospheric value, dbar. deploymentType optional character string indicating type deployment, may \"unknown\", \"profile\", \"towyo\", \"thermosalinograph\". set, value defaults \"unknown\". ... Ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/initialize-ctd-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Initialize Storage for a ctd Object — initialize,ctd-method","text":"save storage, function arguments quantities often present data files cases. example, data files oxygen, present . Extra data may added object created, using oceSetData(). Similarly, oceSetMetadata() may used add metadata (station ID, etc), bearing mind functions look information particular places (e.g. station ID string named station within metadata slot). See ctd information elements stored ctd objects.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/initialize-ctd-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Initialize Storage for a ctd Object — initialize,ctd-method","text":"","code":"# 1. empty new(\"ctd\") #> ctd object has nothing in its data slot.  # 2. fake data with no location information, so can only #    plot with the UNESCO equation of state. #    NOTE: always name arguments, in case the default order gets changed ctd <- new(\"ctd\", salinity = 35 + 1:3 / 10, temperature = 10 - 1:3 / 10, pressure = 1:3) summary(ctd) #> CTD Summary #> ----------- #>  #> * Data Overview #>  #>                              Min. Mean Max. Dim. NAs #>     pressure [dbar]          1    2    3    3    0   #>     temperature [°C, ITS-90] 9.7  9.8  9.9  3    0   #>     salinity [PSS-78]        35.1 35.2 35.3 3    0   #>  #> * Processing Log #>  #>     - 2024-09-24 10:27:37 UTC: `create 'ctd' object` plot(ctd, eos = \"unesco\")   # 3. as 2, but insert location and plot with GSW equation of state. ctd <- oceSetMetadata(ctd, \"latitude\", 44) ctd <- oceSetMetadata(ctd, \"longitude\", -63) plot(ctd, eos = \"gsw\")"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-ctd-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Establish a Data-Quality Scheme for a ctd Object — initializeFlagScheme,ctd-method","title":"Establish a Data-Quality Scheme for a ctd Object — initializeFlagScheme,ctd-method","text":"function adds item named flagScheme metadata slot object inheriting ctd. list containing two items: name mapping, provided function arguments. purpose document flag scheme make initializeFlags(), setFlags() handleFlags() can specify flags name, opposed number. generic function, may specialized class object (see “Details”).","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-ctd-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Establish a Data-Quality Scheme for a ctd Object — initializeFlagScheme,ctd-method","text":"","code":"# S4 method for class 'ctd' initializeFlagScheme(   object,   name = NULL,   mapping = NULL,   default = NULL,   update = NULL,   debug = 0 )"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-ctd-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Establish a Data-Quality Scheme for a ctd Object — initializeFlagScheme,ctd-method","text":"object oce object. name character value naming scheme. refers pre-defined scheme, mapping must provided, contradict pre-defined scheme, defeating purpose providing concreteness clarity. mapping list named items describing mapping flag meaning flag numerical value, e.g list(good=1, bad=2) might used hypothetical class. default integer vector flag values considered good. provided, name \"argo\", \"BODC\", \"DFO\", \"WHP bottle\", \"WHP CTD\", conservative value set automatically, equal list flag values designate bad questionable data. example, name=\"WHP CTD\", setting c(1,3,4,5,6,7,9), leaving value 2, corresponds \"acceptable\" notation used flag scheme. update logical value indicating whether scheme provided update existing scheme.  default value, FALSE, prevents attempt alter existing flag scheme, one already embedded object. debug integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-ctd-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Establish a Data-Quality Scheme for a ctd Object — initializeFlagScheme,ctd-method","text":"object metadata slot containing flagScheme.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-ctd-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Establish a Data-Quality Scheme for a ctd Object — initializeFlagScheme,ctd-method","text":"following pre-defined schemes available (note names simplified phrases used defining documentation): name=\"argo\" defaults mapping OLD (prior June 10, 2020)   NEW (June 10, 2020)   See reference 1 deeper explanation meanings codes. name=\"BODC\" defaults mapping   See reference 2 deeper explanation meanings codes, note codes Q provided oce. name=\"DFO\" defaults mapping   See reference 3 deeper explanation meanings codes. name=\"WHP bottle\" defaults mapping   See reference 4 deeper explanation meanings codes. name=\"WHP CTD\" defaults mapping   See reference 4 deeper explanation meanings codes.","code":"list(not_assessed=0, passed_all_tests=1, probably_good=2,      probably_bad=3, bad=4, averaged=7,      interpolated=8, missing=9) list(not_assessed=0, passed_all_tests=1, probably_good=2,      probably_bad=3, bad=4, changed=5, not_used_6=6, not_used_7=7,      estimated=8, missing=9) list(no_quality_control=0, good=1, probably_good=2,      probably_bad=3, bad=4, changed=5,      below_detection=6, in_excess=7, interpolated=8,      missing=9) list(no_quality_control=0, appears_correct=1, appears_inconsistent=2,      doubtful=3, erroneous=4, changed=5,      qc_by_originator=8, missing=9) list(no_information=1, no_problems_noted=2, leaking=3,      did_not_trip=4, not_reported=5, discrepency=6,      unknown_problem=7, did_not_trip=8, no_sample=9) list(not_calibrated=1, acceptable=2, questionable=3,     bad=4, not_reported=5, interpolated=6,     despiked=7, missing=9)"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-ctd-method.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Establish a Data-Quality Scheme for a ctd Object — initializeFlagScheme,ctd-method","text":"codes \"argo\" derived information Table 4.1 Wong, Annie, Robert Keeley, Thierry Carval, Argo Data Management Team (8 January 2020), \"Argo Quality Control Manual CTD Trajectory Data, Version 3.3,\" available https://archimer.ifremer.fr/doc/00228/33951/ June 2020. codes \"BODC\" defined http://seadatanet.maris2.nl/v_bodc_vocab_v2/browse.asp?order=conceptid&formname=search&screen=0&lib=l20 codes \"DFO\" defined http://www.dfo-mpo.gc.ca/science/data-donnees/code/list/014-eng.html codes \"WHP CTD\" \"WHP bottle\" defined https://www.nodc.noaa.gov/woce/woce_v3/wocedata_1/whp/exchange/exchange_format_desc.htm","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme,oce-method","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme,oce-method","text":"function adds item named flagScheme metadata slot object inheriting oce. list containing two items: name mapping, provided function arguments. purpose document flag scheme make initializeFlags(), setFlags() handleFlags() can specify flags name, opposed number. generic function, may specialized class object (see “Details”).","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme,oce-method","text":"","code":"# S4 method for class 'oce' initializeFlagScheme(   object,   name = NULL,   mapping = NULL,   default = NULL,   update = NULL,   debug = 0 )"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme,oce-method","text":"object oce object. name character value naming scheme. refers pre-defined scheme, mapping must provided, contradict pre-defined scheme, defeating purpose providing concreteness clarity. mapping list named items describing mapping flag meaning flag numerical value, e.g list(good=1, bad=2) might used hypothetical class. default integer vector flag values considered good. provided, name \"argo\", \"BODC\", \"DFO\", \"WHP bottle\", \"WHP CTD\", conservative value set automatically, equal list flag values designate bad questionable data. example, name=\"WHP CTD\", setting c(1,3,4,5,6,7,9), leaving value 2, corresponds \"acceptable\" notation used flag scheme. update logical value indicating whether scheme provided update existing scheme.  default value, FALSE, prevents attempt alter existing flag scheme, one already embedded object. debug integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-oce-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme,oce-method","text":"object metadata slot containing flagScheme.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-oce-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme,oce-method","text":"following pre-defined schemes available (note names simplified phrases used defining documentation): name=\"argo\" defaults mapping OLD (prior June 10, 2020)   NEW (June 10, 2020)   See reference 1 deeper explanation meanings codes. name=\"BODC\" defaults mapping   See reference 2 deeper explanation meanings codes, note codes Q provided oce. name=\"DFO\" defaults mapping   See reference 3 deeper explanation meanings codes. name=\"WHP bottle\" defaults mapping   See reference 4 deeper explanation meanings codes. name=\"WHP CTD\" defaults mapping   See reference 4 deeper explanation meanings codes.","code":"list(not_assessed=0, passed_all_tests=1, probably_good=2,      probably_bad=3, bad=4, averaged=7,      interpolated=8, missing=9) list(not_assessed=0, passed_all_tests=1, probably_good=2,      probably_bad=3, bad=4, changed=5, not_used_6=6, not_used_7=7,      estimated=8, missing=9) list(no_quality_control=0, good=1, probably_good=2,      probably_bad=3, bad=4, changed=5,      below_detection=6, in_excess=7, interpolated=8,      missing=9) list(no_quality_control=0, appears_correct=1, appears_inconsistent=2,      doubtful=3, erroneous=4, changed=5,      qc_by_originator=8, missing=9) list(no_information=1, no_problems_noted=2, leaking=3,      did_not_trip=4, not_reported=5, discrepency=6,      unknown_problem=7, did_not_trip=8, no_sample=9) list(not_calibrated=1, acceptable=2, questionable=3,     bad=4, not_reported=5, interpolated=6,     despiked=7, missing=9)"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-oce-method.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme,oce-method","text":"codes \"argo\" derived information Table 4.1 Wong, Annie, Robert Keeley, Thierry Carval, Argo Data Management Team (8 January 2020), \"Argo Quality Control Manual CTD Trajectory Data, Version 3.3,\" available https://archimer.ifremer.fr/doc/00228/33951/ June 2020. codes \"BODC\" defined http://seadatanet.maris2.nl/v_bodc_vocab_v2/browse.asp?order=conceptid&formname=search&screen=0&lib=l20 codes \"DFO\" defined http://www.dfo-mpo.gc.ca/science/data-donnees/code/list/014-eng.html codes \"WHP CTD\" \"WHP bottle\" defined https://www.nodc.noaa.gov/woce/woce_v3/wocedata_1/whp/exchange/exchange_format_desc.htm","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-section-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Establish a Data-Quality Scheme for a section Object — initializeFlagScheme,section-method","title":"Establish a Data-Quality Scheme for a section Object — initializeFlagScheme,section-method","text":"function adds item named flagScheme metadata slot object inheriting section. list containing two items: name mapping, provided function arguments. purpose document flag scheme make initializeFlags(), setFlags() handleFlags() can specify flags name, opposed number. generic function, may specialized class object (see “Details”).","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-section-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Establish a Data-Quality Scheme for a section Object — initializeFlagScheme,section-method","text":"","code":"# S4 method for class 'section' initializeFlagScheme(   object,   name = NULL,   mapping = NULL,   default = NULL,   update = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-section-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Establish a Data-Quality Scheme for a section Object — initializeFlagScheme,section-method","text":"object oce object. name character value naming scheme. refers pre-defined scheme, mapping must provided, contradict pre-defined scheme, defeating purpose providing concreteness clarity. mapping list named items describing mapping flag meaning flag numerical value, e.g list(good=1, bad=2) might used hypothetical class. default integer vector flag values considered good. provided, name \"argo\", \"BODC\", \"DFO\", \"WHP bottle\", \"WHP CTD\", conservative value set automatically, equal list flag values designate bad questionable data. example, name=\"WHP CTD\", setting c(1,3,4,5,6,7,9), leaving value 2, corresponds \"acceptable\" notation used flag scheme. update logical value indicating whether scheme provided update existing scheme.  default value, FALSE, prevents attempt alter existing flag scheme, one already embedded object. debug integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-section-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Establish a Data-Quality Scheme for a section Object — initializeFlagScheme,section-method","text":"object metadata slot containing flagScheme.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-section-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Establish a Data-Quality Scheme for a section Object — initializeFlagScheme,section-method","text":"following pre-defined schemes available (note names simplified phrases used defining documentation): name=\"argo\" defaults mapping OLD (prior June 10, 2020)   NEW (June 10, 2020)   See reference 1 deeper explanation meanings codes. name=\"BODC\" defaults mapping   See reference 2 deeper explanation meanings codes, note codes Q provided oce. name=\"DFO\" defaults mapping   See reference 3 deeper explanation meanings codes. name=\"WHP bottle\" defaults mapping   See reference 4 deeper explanation meanings codes. name=\"WHP CTD\" defaults mapping   See reference 4 deeper explanation meanings codes.","code":"list(not_assessed=0, passed_all_tests=1, probably_good=2,      probably_bad=3, bad=4, averaged=7,      interpolated=8, missing=9) list(not_assessed=0, passed_all_tests=1, probably_good=2,      probably_bad=3, bad=4, changed=5, not_used_6=6, not_used_7=7,      estimated=8, missing=9) list(no_quality_control=0, good=1, probably_good=2,      probably_bad=3, bad=4, changed=5,      below_detection=6, in_excess=7, interpolated=8,      missing=9) list(no_quality_control=0, appears_correct=1, appears_inconsistent=2,      doubtful=3, erroneous=4, changed=5,      qc_by_originator=8, missing=9) list(no_information=1, no_problems_noted=2, leaking=3,      did_not_trip=4, not_reported=5, discrepency=6,      unknown_problem=7, did_not_trip=8, no_sample=9) list(not_calibrated=1, acceptable=2, questionable=3,     bad=4, not_reported=5, interpolated=6,     despiked=7, missing=9)"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-section-method.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Establish a Data-Quality Scheme for a section Object — initializeFlagScheme,section-method","text":"","code":"data(section) section <- read.section(\"a03_hy1.csv\", sectionId=\"a03\", institute=\"SIO\",    ship=\"R/V Professor Multanovskiy\", scientist=\"Vladimir Tereschenov\") sectionWithFlags <- initializeFlagScheme(section, \"WHP bottle\") station1 <- sectionWithFlags[[\"station\", 1]] str(station1[[\"flagScheme\"]])"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme-section-method.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Establish a Data-Quality Scheme for a section Object — initializeFlagScheme,section-method","text":"codes \"argo\" derived information Table 4.1 Wong, Annie, Robert Keeley, Thierry Carval, Argo Data Management Team (8 January 2020), \"Argo Quality Control Manual CTD Trajectory Data, Version 3.3,\" available https://archimer.ifremer.fr/doc/00228/33951/ June 2020. codes \"BODC\" defined http://seadatanet.maris2.nl/v_bodc_vocab_v2/browse.asp?order=conceptid&formname=search&screen=0&lib=l20 codes \"DFO\" defined http://www.dfo-mpo.gc.ca/science/data-donnees/code/list/014-eng.html codes \"WHP CTD\" \"WHP bottle\" defined https://www.nodc.noaa.gov/woce/woce_v3/wocedata_1/whp/exchange/exchange_format_desc.htm","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme.html","id":null,"dir":"Reference","previous_headings":"","what":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme","text":"function adds item named flagScheme metadata slot object inheriting oce. list containing two items: name mapping, provided function arguments. purpose document flag scheme make initializeFlags(), setFlags() handleFlags() can specify flags name, opposed number. generic function, may specialized class object (see “Details”).","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme","text":"","code":"initializeFlagScheme(   object,   name = NULL,   mapping = NULL,   default = NULL,   update = NULL,   debug = 0 )"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme","text":"object oce object. name character value naming scheme. refers pre-defined scheme, mapping must provided, contradict pre-defined scheme, defeating purpose providing concreteness clarity. mapping list named items describing mapping flag meaning flag numerical value, e.g list(good=1, bad=2) might used hypothetical class. default integer vector flag values considered good. provided, name \"argo\", \"BODC\", \"DFO\", \"WHP bottle\", \"WHP CTD\", conservative value set automatically, equal list flag values designate bad questionable data. example, name=\"WHP CTD\", setting c(1,3,4,5,6,7,9), leaving value 2, corresponds \"acceptable\" notation used flag scheme. update logical value indicating whether scheme provided update existing scheme.  default value, FALSE, prevents attempt alter existing flag scheme, one already embedded object. debug integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme","text":"object metadata slot containing flagScheme.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme","text":"following pre-defined schemes available (note names simplified phrases used defining documentation): name=\"argo\" defaults mapping OLD (prior June 10, 2020)   NEW (June 10, 2020)   See reference 1 deeper explanation meanings codes. name=\"BODC\" defaults mapping   See reference 2 deeper explanation meanings codes, note codes Q provided oce. name=\"DFO\" defaults mapping   See reference 3 deeper explanation meanings codes. name=\"WHP bottle\" defaults mapping   See reference 4 deeper explanation meanings codes. name=\"WHP CTD\" defaults mapping   See reference 4 deeper explanation meanings codes.","code":"list(not_assessed=0, passed_all_tests=1, probably_good=2,      probably_bad=3, bad=4, averaged=7,      interpolated=8, missing=9) list(not_assessed=0, passed_all_tests=1, probably_good=2,      probably_bad=3, bad=4, changed=5, not_used_6=6, not_used_7=7,      estimated=8, missing=9) list(no_quality_control=0, good=1, probably_good=2,      probably_bad=3, bad=4, changed=5,      below_detection=6, in_excess=7, interpolated=8,      missing=9) list(no_quality_control=0, appears_correct=1, appears_inconsistent=2,      doubtful=3, erroneous=4, changed=5,      qc_by_originator=8, missing=9) list(no_information=1, no_problems_noted=2, leaking=3,      did_not_trip=4, not_reported=5, discrepency=6,      unknown_problem=7, did_not_trip=8, no_sample=9) list(not_calibrated=1, acceptable=2, questionable=3,     bad=4, not_reported=5, interpolated=6,     despiked=7, missing=9)"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagScheme.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagScheme","text":"codes \"argo\" derived information Table 4.1 Wong, Annie, Robert Keeley, Thierry Carval, Argo Data Management Team (8 January 2020), \"Argo Quality Control Manual CTD Trajectory Data, Version 3.3,\" available https://archimer.ifremer.fr/doc/00228/33951/ June 2020. codes \"BODC\" defined http://seadatanet.maris2.nl/v_bodc_vocab_v2/browse.asp?order=conceptid&formname=search&screen=0&lib=l20 codes \"DFO\" defined http://www.dfo-mpo.gc.ca/science/data-donnees/code/list/014-eng.html codes \"WHP CTD\" \"WHP bottle\" defined https://www.nodc.noaa.gov/woce/woce_v3/wocedata_1/whp/exchange/exchange_format_desc.htm","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/initializeFlagSchemeInternal.html","id":null,"dir":"Reference","previous_headings":"","what":"Establish a Data-Quality Scheme for a oce Object — initializeFlagSchemeInternal","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagSchemeInternal","text":"function adds item named flagScheme metadata slot object inheriting oce. list containing two items: name mapping, provided function arguments. purpose document flag scheme make initializeFlags(), setFlags() handleFlags() can specify flags name, opposed number. generic function, may specialized class object (see “Details”).","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagSchemeInternal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagSchemeInternal","text":"","code":"initializeFlagSchemeInternal(   object,   name = NULL,   mapping = NULL,   default = NULL,   update = NULL,   debug = 0 )"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagSchemeInternal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagSchemeInternal","text":"object oce object. name character value naming scheme. refers pre-defined scheme, mapping must provided, contradict pre-defined scheme, defeating purpose providing concreteness clarity. mapping list named items describing mapping flag meaning flag numerical value, e.g list(good=1, bad=2) might used hypothetical class. default integer vector flag values considered good. provided, name \"argo\", \"BODC\", \"DFO\", \"WHP bottle\", \"WHP CTD\", conservative value set automatically, equal list flag values designate bad questionable data. example, name=\"WHP CTD\", setting c(1,3,4,5,6,7,9), leaving value 2, corresponds \"acceptable\" notation used flag scheme. update logical value indicating whether scheme provided update existing scheme.  default value, FALSE, prevents attempt alter existing flag scheme, one already embedded object. debug integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagSchemeInternal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagSchemeInternal","text":"object metadata slot containing flagScheme.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagSchemeInternal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagSchemeInternal","text":"following pre-defined schemes available (note names simplified phrases used defining documentation): name=\"argo\" defaults mapping OLD (prior June 10, 2020)   NEW (June 10, 2020)   See reference 1 deeper explanation meanings codes. name=\"BODC\" defaults mapping   See reference 2 deeper explanation meanings codes, note codes Q provided oce. name=\"DFO\" defaults mapping   See reference 3 deeper explanation meanings codes. name=\"WHP bottle\" defaults mapping   See reference 4 deeper explanation meanings codes. name=\"WHP CTD\" defaults mapping   See reference 4 deeper explanation meanings codes.","code":"list(not_assessed=0, passed_all_tests=1, probably_good=2,      probably_bad=3, bad=4, averaged=7,      interpolated=8, missing=9) list(not_assessed=0, passed_all_tests=1, probably_good=2,      probably_bad=3, bad=4, changed=5, not_used_6=6, not_used_7=7,      estimated=8, missing=9) list(no_quality_control=0, good=1, probably_good=2,      probably_bad=3, bad=4, changed=5,      below_detection=6, in_excess=7, interpolated=8,      missing=9) list(no_quality_control=0, appears_correct=1, appears_inconsistent=2,      doubtful=3, erroneous=4, changed=5,      qc_by_originator=8, missing=9) list(no_information=1, no_problems_noted=2, leaking=3,      did_not_trip=4, not_reported=5, discrepency=6,      unknown_problem=7, did_not_trip=8, no_sample=9) list(not_calibrated=1, acceptable=2, questionable=3,     bad=4, not_reported=5, interpolated=6,     despiked=7, missing=9)"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagSchemeInternal.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Establish a Data-Quality Scheme for a oce Object — initializeFlagSchemeInternal","text":"codes \"argo\" derived information Table 4.1 Wong, Annie, Robert Keeley, Thierry Carval, Argo Data Management Team (8 January 2020), \"Argo Quality Control Manual CTD Trajectory Data, Version 3.3,\" available https://archimer.ifremer.fr/doc/00228/33951/ June 2020. codes \"BODC\" defined http://seadatanet.maris2.nl/v_bodc_vocab_v2/browse.asp?order=conceptid&formname=search&screen=0&lib=l20 codes \"DFO\" defined http://www.dfo-mpo.gc.ca/science/data-donnees/code/list/014-eng.html codes \"WHP CTD\" \"WHP bottle\" defined https://www.nodc.noaa.gov/woce/woce_v3/wocedata_1/whp/exchange/exchange_format_desc.htm","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/initializeFlags-adp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Create and Initialize adp Flags — initializeFlags,adp-method","title":"Create and Initialize adp Flags — initializeFlags,adp-method","text":"function creates item named variable within flags entry object's metadata slot. purpose document flag scheme make initializeFlags() setFlags() can specify flags name, addition number. generic function, specialized classes via interpretation scheme argument (see “Details”, object classes specializations).","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlags-adp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create and Initialize adp Flags — initializeFlags,adp-method","text":"","code":"# S4 method for class 'adp' initializeFlags(   object,   name = NULL,   value = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/initializeFlags-adp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create and Initialize adp Flags — initializeFlags,adp-method","text":"object oce object. name Character value indicating name variable within data slot object. value Numerical character value stored newly-created entry within flags. (character value work initializeFlags() used first object.) debug Integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlags-adp-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create and Initialize adp Flags — initializeFlags,adp-method","text":"object flags item within metadata slot set indicated.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlags-adp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create and Initialize adp Flags — initializeFlags,adp-method","text":"object already contains flags entry indicated name, returned unaltered, warning issued.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/initializeFlags-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Create and Initialize oce Flags — initializeFlags,oce-method","title":"Create and Initialize oce Flags — initializeFlags,oce-method","text":"function creates item named variable within flags entry object's metadata slot. purpose document flag scheme make initializeFlags() setFlags() can specify flags name, addition number. generic function, specialized classes via interpretation scheme argument (see “Details”, object classes specializations).","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlags-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create and Initialize oce Flags — initializeFlags,oce-method","text":"","code":"# S4 method for class 'oce' initializeFlags(   object,   name = NULL,   value = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/initializeFlags-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create and Initialize oce Flags — initializeFlags,oce-method","text":"object oce object. name Character value indicating name variable within data slot object. value Numerical character value stored newly-created entry within flags. (character value work initializeFlags() used first object.) debug Integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlags-oce-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create and Initialize oce Flags — initializeFlags,oce-method","text":"object flags item within metadata slot set indicated.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlags-oce-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create and Initialize oce Flags — initializeFlags,oce-method","text":"object already contains flags entry indicated name, returned unaltered, warning issued.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/initializeFlags.html","id":null,"dir":"Reference","previous_headings":"","what":"Create and Initialize oce Flags — initializeFlags","title":"Create and Initialize oce Flags — initializeFlags","text":"function creates item named variable within flags entry object's metadata slot. purpose document flag scheme make initializeFlags() setFlags() can specify flags name, addition number. generic function, specialized classes via interpretation scheme argument (see “Details”, object classes specializations).","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlags.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create and Initialize oce Flags — initializeFlags","text":"","code":"initializeFlags(object, name = NULL, value = NULL, debug = 0)"},{"path":"https://dankelley.github.io/oce/reference/initializeFlags.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create and Initialize oce Flags — initializeFlags","text":"object oce object. name Character value indicating name variable within data slot object. value Numerical character value stored newly-created entry within flags. (character value work initializeFlags() used first object.) debug Integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlags.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create and Initialize oce Flags — initializeFlags","text":"object flags item within metadata slot set indicated.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlags.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create and Initialize oce Flags — initializeFlags","text":"object already contains flags entry indicated name, returned unaltered, warning issued.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/initializeFlagsInternal.html","id":null,"dir":"Reference","previous_headings":"","what":"Create and Initialize oce Flags — initializeFlagsInternal","title":"Create and Initialize oce Flags — initializeFlagsInternal","text":"function creates item named variable within flags entry object's metadata slot. purpose document flag scheme make initializeFlags() setFlags() can specify flags name, addition number. generic function, specialized classes via interpretation scheme argument (see “Details”, object classes specializations).","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagsInternal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create and Initialize oce Flags — initializeFlagsInternal","text":"","code":"initializeFlagsInternal(   object,   name = NULL,   value = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/initializeFlagsInternal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create and Initialize oce Flags — initializeFlagsInternal","text":"object oce object. name Character value indicating name variable within data slot object. value Numerical character value stored newly-created entry within flags. (character value work initializeFlags() used first object.) debug Integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagsInternal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create and Initialize oce Flags — initializeFlagsInternal","text":"object flags item within metadata slot set indicated.","code":""},{"path":"https://dankelley.github.io/oce/reference/initializeFlagsInternal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create and Initialize oce Flags — initializeFlagsInternal","text":"object already contains flags entry indicated name, returned unaltered, warning issued.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/integerToAscii.html","id":null,"dir":"Reference","previous_headings":"","what":"Infer ASCII Code From an Integer Value — integerToAscii","title":"Infer ASCII Code From an Integer Value — integerToAscii","text":"Infer ASCII Code Integer Value","code":""},{"path":"https://dankelley.github.io/oce/reference/integerToAscii.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Infer ASCII Code From an Integer Value — integerToAscii","text":"","code":"integerToAscii(i)"},{"path":"https://dankelley.github.io/oce/reference/integerToAscii.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Infer ASCII Code From an Integer Value — integerToAscii","text":"integer, integer vector.","code":""},{"path":"https://dankelley.github.io/oce/reference/integerToAscii.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Infer ASCII Code From an Integer Value — integerToAscii","text":"character, character vector.","code":""},{"path":"https://dankelley.github.io/oce/reference/integerToAscii.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Infer ASCII Code From an Integer Value — integerToAscii","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/integerToAscii.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Infer ASCII Code From an Integer Value — integerToAscii","text":"","code":"library(oce) A <- integerToAscii(65) cat(\"A=\", A, \"\\n\") #> A= A"},{"path":"https://dankelley.github.io/oce/reference/integrateTrapezoid.html","id":null,"dir":"Reference","previous_headings":"","what":"Trapezoidal Integration — integrateTrapezoid","title":"Trapezoidal Integration — integrateTrapezoid","text":"Estimate integral one-dimensional function using trapezoidal rule.","code":""},{"path":"https://dankelley.github.io/oce/reference/integrateTrapezoid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trapezoidal Integration — integrateTrapezoid","text":"","code":"integrateTrapezoid(x, y, type = c(\"A\", \"dA\", \"cA\"), xmin, xmax)"},{"path":"https://dankelley.github.io/oce/reference/integrateTrapezoid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trapezoidal Integration — integrateTrapezoid","text":"x, y vectors x y values. normal case, vectors supplied, equal length. also two special cases. First, y missing, x taken y, new x constructed seq_along(y)1. Second, length(x)1 andlength(y)exceeds 1, thenxis replaced byx*[seq_along](y)`. type Flag indicating desired return value (see “Value”). xmin, xmax Optional numbers indicating range integration. values may used restrict range integration, extend ; either case, approx() rule=2 used create new x y vectors.","code":""},{"path":"https://dankelley.github.io/oce/reference/integrateTrapezoid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trapezoidal Integration — integrateTrapezoid","text":"type=\"\" (default), single value returned, containing estimate integral y=y(x).  type=\"dA\", numeric vector length x, first element zero, second element integral x[1] x[2], etc.  type=\"cA\", result cumulative sum (cumsum()) values returned type=\"dA\".  See “Examples”.","code":""},{"path":"https://dankelley.github.io/oce/reference/integrateTrapezoid.html","id":"bugs","dir":"Reference","previous_headings":"","what":"Bugs","title":"Trapezoidal Integration — integrateTrapezoid","text":"handling NA values.","code":""},{"path":"https://dankelley.github.io/oce/reference/integrateTrapezoid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trapezoidal Integration — integrateTrapezoid","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/integrateTrapezoid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Trapezoidal Integration — integrateTrapezoid","text":"","code":"x <- seq(0, 1, length.out = 10) # try larger length.out to see if area approaches 2 y <- 2 * x + 3 * x^2 A <- integrateTrapezoid(x, y) dA <- integrateTrapezoid(x, y, \"dA\") cA <- integrateTrapezoid(x, y, \"cA\") print(A) #> [1] 2.006173 print(sum(dA)) #> [1] 2.006173 print(tail(cA, 1)) #> [1] 2.006173 print(integrateTrapezoid(diff(x[1:2]), y)) #> [1] 2.006173 print(integrateTrapezoid(y)) #> [1] 18.05556"},{"path":"https://dankelley.github.io/oce/reference/interpBarnes.html","id":null,"dir":"Reference","previous_headings":"","what":"Grid Data Using the Barnes Algorithm — interpBarnes","title":"Grid Data Using the Barnes Algorithm — interpBarnes","text":"algorithm follows described Koch et al. (1983), except interpBarnes adds (1) ability blank grid data sparse, using trim argument, (2) ability pre-grid, pregrid argument.","code":""},{"path":"https://dankelley.github.io/oce/reference/interpBarnes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Grid Data Using the Barnes Algorithm — interpBarnes","text":"","code":"interpBarnes(   x,   y,   z,   w,   xg,   yg,   xgl,   ygl,   xr,   yr,   gamma = 0.5,   iterations = 2,   trim = 0,   pregrid = FALSE,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/interpBarnes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Grid Data Using the Barnes Algorithm — interpBarnes","text":"x, y vector x y locations. z vector z values, one (x,y) location. w optional vector weights (x,y) location.  supplied, weight 1 used point, means equal weighting.  Higher weights give data points influence. pregrid TRUE, supplied value w ignored, instead pregriddd points given equal weight. xg, yg optional vectors defining x y grids.  supplied, values inferred data, using e.g. pretty(x, n=50). xgl, ygl optional lengths x y grids, constructed seq() spanning data range.  values xgl examined xg yg supplied. xr, yr optional values defining x y radii weighting ellipse. supplied, calculated span x y square root number data. gamma grid-focussing parameter.  successive iteration, xr yr reduced factor sqrt(gamma). iterations number iterations.  Set 1 perform just one iteration, using radii described xr,yr . trim number 0 1, indicating quantile data weight used criterion blanking gridded value (using NA).  0, whole zg grid returned.  >0, spots grid data weight less trim-th quantile() set NA.  See examples. pregrid indication whether pre-grid data. FALSE, done, .e. conventional Barnes interpolation performed.  Otherwise, data first averaged within grid cells using binMean2D().  pregrid TRUE 4, averaging done within grid 4 times finer grid used Barnes interpolation. Otherwise, pregrid may single integer indicating grid refinement (4 result TRUE supplied), vector two integers, grid refinement x y. purpose using pregrid speed processing large datasets, remove spatial bias (e.g. single station repeated frequently otherwise seldom-sampled region).  form pregridding done World Ocean Atlas, example. debug flag turns debugging.  Set 0 debugging information, 1 , etc; value reduced 1 descendent function call.","code":""},{"path":"https://dankelley.github.io/oce/reference/interpBarnes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Grid Data Using the Barnes Algorithm — interpBarnes","text":"list containing: xg, vector holding x-grid); yg, vector holding y-grid; zg, matrix holding gridded values; wg, matrix holding weights used interpolation final iteration; zd, vector length x, holds interpolated values data points.","code":""},{"path":"https://dankelley.github.io/oce/reference/interpBarnes.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Grid Data Using the Barnes Algorithm — interpBarnes","text":"S. E.  Koch M.  DesJardins P. J. Kocin, 1983.  “interactive Barnes objective map analysis scheme use satellite conventional data,” J.  Climate Appl.  Met., vol 22, p. 1487-1503.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/interpBarnes.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Grid Data Using the Barnes Algorithm — interpBarnes","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/interpBarnes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Grid Data Using the Barnes Algorithm — interpBarnes","text":"","code":"library(oce)  # 1. contouring example, with wind-speed data from Koch et al. (1983) data(wind) u <- interpBarnes(wind$x, wind$y, wind$z) contour(u$xg, u$yg, u$zg, labcex = 1) text(wind$x, wind$y, wind$z, cex = 0.7, col = \"blue\") title(\"Numbers are the data\")   # 2. As 1, but blank out spots where data are sparse u <- interpBarnes(wind$x, wind$y, wind$z, trim = 0.1) contour(u$xg, u$yg, u$zg, level = seq(0, 30, 1)) points(wind$x, wind$y, cex = 1.5, pch = 20, col = \"blue\")   # 3. As 1, but interpolate back to points, and display the percent mismatch u <- interpBarnes(wind$x, wind$y, wind$z) contour(u$xg, u$yg, u$zg, labcex = 1) mismatch <- 100 * (wind$z - u$zd) / wind$z text(wind$x, wind$y, round(mismatch), col = \"blue\") title(\"Numbers are percent mismatch between grid and data\")   # 4. As 3, but contour the mismatch mismatchGrid <- interpBarnes(wind$x, wind$y, mismatch) contour(mismatchGrid$xg, mismatchGrid$yg, mismatchGrid$zg, labcex = 1)   # 5. One-dimensional example, smoothing a salinity profile data(ctd) p <- ctd[[\"pressure\"]] y <- rep(1, length(p)) # fake y data, with arbitrary value S <- ctd[[\"salinity\"]] pg <- pretty(p, n = 100) g <- interpBarnes(p, y, S, xg = pg, xr = 1) plot(S, p, cex = 0.5, col = \"blue\", ylim = rev(range(p))) lines(g$zg, g$xg, col = \"red\")"},{"path":"https://dankelley.github.io/oce/reference/is.ad2cp.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Whether Item is a ad2cp-Type adp Object — is.ad2cp","title":"Test Whether Item is a ad2cp-Type adp Object — is.ad2cp","text":"Test Whether Item ad2cp-Type adp Object","code":""},{"path":"https://dankelley.github.io/oce/reference/is.ad2cp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Whether Item is a ad2cp-Type adp Object — is.ad2cp","text":"","code":"is.ad2cp(x)"},{"path":"https://dankelley.github.io/oce/reference/is.ad2cp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Whether Item is a ad2cp-Type adp Object — is.ad2cp","text":"x oce object.","code":""},{"path":"https://dankelley.github.io/oce/reference/is.ad2cp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test Whether Item is a ad2cp-Type adp Object — is.ad2cp","text":"Logical value indicating whether x adp object, fileType metadata slot equal \"AD2CP\".","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/is.ad2cp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Test Whether Item is a ad2cp-Type adp Object — is.ad2cp","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/julianCenturyAnomaly.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Julian-Day-Number to Julian Century — julianCenturyAnomaly","title":"Convert Julian-Day-Number to Julian Century — julianCenturyAnomaly","text":"Convert Julian-Day number time julian centuries since noon January 1, 1900. method follows Equation 15.1 Reference 1.  example reproduces Example 15.source, fractional error 3e-8.","code":""},{"path":"https://dankelley.github.io/oce/reference/julianCenturyAnomaly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Julian-Day-Number to Julian Century — julianCenturyAnomaly","text":"","code":"julianCenturyAnomaly(jd)"},{"path":"https://dankelley.github.io/oce/reference/julianCenturyAnomaly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Julian-Day-Number to Julian Century — julianCenturyAnomaly","text":"jd julian day number, e.g. given julianDay().","code":""},{"path":"https://dankelley.github.io/oce/reference/julianCenturyAnomaly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Julian-Day-Number to Julian Century — julianCenturyAnomaly","text":"Julian century since noon January 1, 1900.","code":""},{"path":"https://dankelley.github.io/oce/reference/julianCenturyAnomaly.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert Julian-Day-Number to Julian Century — julianCenturyAnomaly","text":"Meeus, Jean. Astronomical Formulas Calculators. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1982.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/julianCenturyAnomaly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Julian-Day-Number to Julian Century — julianCenturyAnomaly","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/julianCenturyAnomaly.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Julian-Day-Number to Julian Century — julianCenturyAnomaly","text":"","code":"t <- ISOdatetime(1978, 11, 13, 4, 35, 0, tz = \"UTC\") jca <- julianCenturyAnomaly(julianDay(t)) cat(format(t), \"is Julian Century anomaly\", format(jca, digits = 8), \"\\n\") #> 1978-11-13 04:35:00 is Julian Century anomaly 0.78865684"},{"path":"https://dankelley.github.io/oce/reference/julianDay.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a Time to a Julian Day — julianDay","title":"Convert a Time to a Julian Day — julianDay","text":"Convert POSIXt time (given either t argument year, month, arguments) Julian day, using method provided Chapter 3 Meeus (1982).  noted Meeus astronomical treatments use fractional days, whereas present code follows R convention specifying days whole numbers, hours, minutes, seconds also provided necessary.  Conversion simple, illustrated example 1977 April 26.4, Meeus calculates julian day 2443259.9.  Note R documentation julian() suggests another formula, point present function match Meeus formulae, suggestion ignored .","code":""},{"path":"https://dankelley.github.io/oce/reference/julianDay.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a Time to a Julian Day — julianDay","text":"","code":"julianDay(   t,   year = NA,   month = NA,   day = NA,   hour = NA,   min = NA,   sec = NA,   tz = \"UTC\" )"},{"path":"https://dankelley.github.io/oce/reference/julianDay.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a Time to a Julian Day — julianDay","text":"t time, POSIXt format, e.g. created .POSIXct(), .POSIXlt(), numberAsPOSIXct(), character string can converted time using .POSIXct().  t provided, arguments ignored. year year, provided along month, etc., t provided. month numerical value month, January 1. (required t provided.) day numerical value day month, starting 1. (required t provided.) hour numerical value hour day, range 0 24. (required t provided.) min numerical value minute hour. (required t provided.) sec numerical value second minute. (required t provided.) tz timezone","code":""},{"path":"https://dankelley.github.io/oce/reference/julianDay.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a Time to a Julian Day — julianDay","text":"Julian-Day number, astronomical convention explained Meeus.","code":""},{"path":"https://dankelley.github.io/oce/reference/julianDay.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert a Time to a Julian Day — julianDay","text":"Meeus, Jean. Astronomical Formulas Calculators. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1982.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/julianDay.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert a Time to a Julian Day — julianDay","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/julianDay.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a Time to a Julian Day — julianDay","text":"","code":"library(oce) # example from Meeus t <- ISOdatetime(1977, 4, 26, hour = 0, min = 0, sec = 0, tz = \"UTC\") + 0.4 * 86400 stopifnot(all.equal(julianDay(t), 2443259.9))"},{"path":"https://dankelley.github.io/oce/reference/labelWithUnit.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Label With Unit — labelWithUnit","title":"Create Label With Unit — labelWithUnit","text":"labelWithUnit creates label unit, graphical display, e.g. plot,section-method. unit enclosed square brackets, although setting options(oceUnitBracket=\"(\") cause parentheses used, instead. function intended mainly use within package, users rely behaviour unchangeable.","code":""},{"path":"https://dankelley.github.io/oce/reference/labelWithUnit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Label With Unit — labelWithUnit","text":"","code":"labelWithUnit(name, unit = NULL)"},{"path":"https://dankelley.github.io/oce/reference/labelWithUnit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Label With Unit — labelWithUnit","text":"name character value naming quantity. unit list containing items unit (optionally) scale, first , expression(), used.  unit provided, default used (see “Details”).","code":""},{"path":"https://dankelley.github.io/oce/reference/labelWithUnit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Label With Unit — labelWithUnit","text":"labelWithUnit returns language object, created bquote(), may supplied text string legend(), mtext(), text(), etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/labelWithUnit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create Label With Unit — labelWithUnit","text":"name standard list, alterations made appropriate, e.g. \"SA\" \"Absolute Salinity\" yields S subscript ; \"CT\" \"Conservative Temperature\" yields upper-case Theta, sigmaTheta yields sigma subscript theta, sigma0 yields sigma subscript 0 (similar 1 4), \"N2\" yields \"N\" superscript 2, \"pressure\" yields \"p\". basic hydrographic quantities default units used unit supplied (see “Examples”). addition , several chemical names recognized, unit guessed , oceanographic community lacks agreed-upon standards. name recognized, simply repeated return value.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/labelWithUnit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Label With Unit — labelWithUnit","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/labelWithUnit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Label With Unit — labelWithUnit","text":"","code":"library(oce) # 1. temperature has a predefined unit, but this can be overruled labelWithUnit(\"temperature\") #> T * \" [\" * degree * C * \"]\" labelWithUnit(     \"temperature\",     list(unit = expression(m / s), scale = \"erroneous\") ) #> T * \" [\" * (m/s) * \"]\" # 2. phosphate lacks a predefined unit labelWithUnit(\"phosphate\") #> PO[4] data(section) labelWithUnit(     \"phosphate\",     section[[\"station\", 1]][[\"phosphateUnit\"]] ) #> PO[4] * \" [\" * (mu * mol/kg) * \"]\""},{"path":"https://dankelley.github.io/oce/reference/ladp-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Lowered-adp Data — ladp-class","title":"Class to Store Lowered-adp Data — ladp-class","text":"class stores data measured lowered ADP (also known ADCP) device.","code":""},{"path":"https://dankelley.github.io/oce/reference/ladp-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Lowered-adp Data — ladp-class","text":"data oce objects, data slot ladp objects list containing main data object. metadata oce objects, metadata slot ladp objects list containing information data object . processingLog oce objects, processingLog slot ladp objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/ladp-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Lowered-adp Data — ladp-class","text":"Although [[<- operator may permit modification contents ladp objects (see [[<-,ladp-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/ladp-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Lowered-adp Data — ladp-class","text":"full contents data metadata slots ladp object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,ladp-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,ladp-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ladp-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Lowered-adp Data — ladp-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/landsat-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Landsat Satellite Data — landsat-class","title":"Class to Store Landsat Satellite Data — landsat-class","text":"class holds landsat data. available several websites (e.g. reference 1). Although various functions may work satellites, discussion focusses Landsat 8 Landsat 7.","code":""},{"path":"https://dankelley.github.io/oce/reference/landsat-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Landsat Satellite Data — landsat-class","text":"data oce objects, data slot landsat objects list containing main data object. metadata oce objects, metadata slot landsat objects list containing information data object . processingLog oce objects, processingLog slot landsat objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/landsat-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Landsat Satellite Data — landsat-class","text":"Although [[<- operator may permit modification contents landsat objects (see [[<-,landsat-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/landsat-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Landsat Satellite Data — landsat-class","text":"full contents data metadata slots landsat object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,landsat-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,landsat-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":"https://dankelley.github.io/oce/reference/landsat-class.html","id":"data-storage","dir":"Reference","previous_headings":"","what":"Data storage","title":"Class to Store Landsat Satellite Data — landsat-class","text":"data stored 16-bit resolution.  Oce breaks 16 bits -significant least-significant bytes. example, aerosol band Landsat object named x contained within x@data$aerosol$msb x@data$aerosol$lsb, matrix raw values.  results may combined e.g. returned executing x[[\"aerosol\"]]. Landsat data files typically occupy approximately gigabyte storage.  means corresponding Oce objects size, can pose significant problems computers less 8GB memory.  sensible specify bands interest reading data read.landsat(), also use landsatTrim() isolate geographical regions need processing. Experts may need get direct access data, easy Landsat objects (regardless satellite) use similar storage form. Band information stored byte form, conserve space.  Two bytes used pixel Landsat-8 objects, just one objects. example, Landsat-8 object named L contains tirs1 band, - least-significant bytes stored matrices L@data$tirs1$msb L@data$tirs1$lsb.  similar Landsat-7 object items, msb just value 0x00. Derived bands, may added landsat object landsatAdd(), stored byte matrices.  Instead stored numerical matrices, means use 4X storage space Landsat-8 images, 8X storage space satellites. computer needs least 8GB RAM work data.","code":"256L*as.integer(x@data[[i]]$msb) + as.integer(x@data[[i]]$lsb)"},{"path":"https://dankelley.github.io/oce/reference/landsat-class.html","id":"landsat-","dir":"Reference","previous_headings":"","what":"Landsat 8","title":"Class to Store Landsat Satellite Data — landsat-class","text":"Landsat 8 satellite 11 frequency bands, listed (see reference 2]). addition , setting band=\"terralook\" may used abbreviation band=c(\"red\", \"green\", \"nir\"). Band 8 panchromatic, highest resolution.  convenience programming, read.landsat() subsamples tirs1 tirs2 bands 30m resolution bands.  See Reference 3 information evolution Landsat 8 calibration coefficients, summer 2014 still subject change.","code":".------------------------------------------------------------------------------. | Band | Band                      | Band         | Wavelength    | Resolution | | No.  | Contents                  | Name         | (micrometers) |   (meters) | |------+---------------------------+--------------+---------------+------------| |    1 | Coastal aerosol           | aerosol      |  0.43 -  0.45 |         30 | |    2 | Blue                      | blue         |  0.45 -  0.51 |         30 | |    3 | Green                     | green        |  0.53 -  0.59 |         30 | |    4 | Red                       | red          |  0.64 -  0.67 |         30 | |    5 | Near Infrared (NIR)       | nir          |  0.85 -  0.88 |         30 | |    6 | SWIR 1                    | swir1        |  1.57 -  1.65 |         30 | |    7 | SWIR 2                    | swir2        |  2.11 -  2.29 |         30 | |    8 | Panchromatic              | panchromatic |  0.50 -  0.68 |         15 | |    9 | Cirrus                    | cirrus       |  1.36 -  1.38 |         30 | |   10 | Thermal Infrared (TIRS) 1 | tirs1        | 10.60 - 11.19 |        100 | |   11 | Thermal Infrared (TIRS) 2 | tirs2        | 11.50 - 12.51 |        100 | .------------------------------------------------------------------------------."},{"path":"https://dankelley.github.io/oce/reference/landsat-class.html","id":"landsat--1","dir":"Reference","previous_headings":"","what":"Landsat 7","title":"Class to Store Landsat Satellite Data — landsat-class","text":"Band information follows (reference 8).  names official, set roughly correspond Landsat-8 names, according wavelength. exception Landsat-7 bands named tirs1 tirs2, two different gain settings, identical wavelength span , roughly matches range Landsat-8 bands tirs1 tirs2 combined.  may seem confusing, lets code like plot(im, band=\"tirs1\") work Landsat-8 Landsat-7.","code":".------------------------------------------------------------------------------. | Band | Band                      | Band         | Wavelength    | Resolution | | No.  | Contents                  | Name         | (micrometers) |   (meters) | |------+---------------------------+--------------+---------------+------------| |    1 | Blue                      | blue         |  0.45 -  0.52 |         30 | |    2 | Green                     | green        |  0.52 -  0.60 |         30 | |    3 | Red                       | red          |  0.63 -  0.69 |         30 | |    4 | Near IR                   | nir          |  0.77 -  0.90 |         30 | |    5 | SWIR                      | swir1        |  1.55 -  1.75 |         30 | |    6 | Thermal IR                | tirs1        | 10.4  - 12.50 |         30 | |    7 | Thermal IR                | tirs2        | 10.4  - 12.50 |         30 | |    8 | SWIR                      | swir2        |  2.09 -  2.35 |         30 | |    9 | Panchromatic              | panchromatic |  0.52 -  0.90 |         15 | .------------------------------------------------------------------------------."},{"path":"https://dankelley.github.io/oce/reference/landsat-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Class to Store Landsat Satellite Data — landsat-class","text":"See USGS \"glovis\" web site. see landsat.gsfc.nasa.gov/?page_id=5377 see landsat.usgs.gov/calibration_notices.php https://dankelley.github.io/r/2014/07/01/landsat.html https://scienceofdoom.com/2010/12/27/emissivity---ocean/ see landsat.usgs.gov/Landsat8_Using_Product.php see landsathandbook.gsfc.nasa.gov/pdfs/Landsat7_Handbook.pdf see landsat.usgs.gov/band_designations_landsat_satellites.php Yu, X. X. Guo Z. Wu., 2014. Land Surface Temperature Retrieval Landsat 8 TIRS-Comparison Radiative Transfer Equation-Based Method, Split Window Algorithm Single Channel Method, Remote Sensing, 6, 9829-9652.  https://www.mdpi.com/2072-4292/6/10/9829 Rajeshwari, ., N. D. Mani, 2014.  Estimation land surface temperature Dindigul district using Landsat 8 data. International Journal Research Engineering Technology, 3(5), 122-126. http://www.academia.edu/7655089/ESTIMATION_OF_LAND_SURFACE_TEMPERATURE_OF_DINDIGUL_DISTRICT_USING_LANDSAT_8_DATA Konda, M. Imasato N., Nishi, K., T. Toda, 1994.  Measurement Sea Surface Emissivity.  Journal Oceanography, 50, 17:30. doi:10.1007/BF02233853","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/landsat-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Landsat Satellite Data — landsat-class","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/landsat.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample landsat Data — landsat","title":"Sample landsat Data — landsat","text":"subset Landsat-8 image designated LC80080292014065LGN00, image March 2014 covers Nova Scotia portions Bay Fundy Scotian Shelf. image decimated reduce memory requirements package, yielding spatial resolution 2km.","code":""},{"path":"https://dankelley.github.io/oce/reference/landsat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample landsat Data — landsat","text":"original data downloaded USGS earthexplorer website, although sites can also used uncover name.  original data decimated factor 100 longitude latitude, reduce file size 1G 100K.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/landsatAdd.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a Band to a landsat Object — landsatAdd","title":"Add a Band to a landsat Object — landsatAdd","text":"Add band landsat object. Note stored numeric form, raw form, therefore require much storage data read read.landsat().","code":""},{"path":"https://dankelley.github.io/oce/reference/landsatAdd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a Band to a landsat Object — landsatAdd","text":"","code":"landsatAdd(x, data, name, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/landsatAdd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a Band to a landsat Object — landsatAdd","text":"x landsat object. data matrix data, dimensions matching entries already x. name name used data, .e. data can later accessed d[[name]] d name return value present function. debug flag turns debugging.  Set 1 get moderate amount debugging information, higher value debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/landsatAdd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add a Band to a landsat Object — landsatAdd","text":"landsat object, new data band.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/landsatAdd.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add a Band to a landsat Object — landsatAdd","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/landsatTrim.html","id":null,"dir":"Reference","previous_headings":"","what":"Trim a landsat Image to a Geographical Region — landsatTrim","title":"Trim a landsat Image to a Geographical Region — landsatTrim","text":"Trim landsat image latitude-longitude box. approximate operation, landsat images provided x-y coordinates, longitude-latitude coordinates.","code":""},{"path":"https://dankelley.github.io/oce/reference/landsatTrim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trim a landsat Image to a Geographical Region — landsatTrim","text":"","code":"landsatTrim(x, ll, ur, box, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/landsatTrim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trim a landsat Image to a Geographical Region — landsatTrim","text":"x landsat object. ll list containing longitude latitude, lower-left corner portion image retain, vector first element longitude second element latitude. provided, ur must also provided, box . ur list containing longitude latitude, upper-right corner portion image retain, vector first element longitude second element latitude. provided, ll must also provided, box . box list containing x y (length 2), corresponding values ll ur, produced call locator(2). provided, neither ll ur may provided. debug flag turns debugging.  Set 1 get moderate amount debugging information, higher value debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/landsatTrim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trim a landsat Image to a Geographical Region — landsatTrim","text":"landsat object, data trimmed specified.","code":""},{"path":"https://dankelley.github.io/oce/reference/landsatTrim.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Trim a landsat Image to a Geographical Region — landsatTrim","text":"June 25, 2015, matrices storing image data trimmed indices determined linear interpolation based location ll ur corners within lon-lat corners specified image data. (previous version trimmed UTM space, fact may done future also, problem lonlat/utm conversion resolved.) error results intersection trimming box image box.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/landsatTrim.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trim a landsat Image to a Geographical Region — landsatTrim","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/latFormat.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a Latitude — latFormat","title":"Format a Latitude — latFormat","text":"Format latitude, using \"S\" negative latitude.","code":""},{"path":"https://dankelley.github.io/oce/reference/latFormat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a Latitude — latFormat","text":"","code":"latFormat(lat, digits = max(6, getOption(\"digits\") - 1))"},{"path":"https://dankelley.github.io/oce/reference/latFormat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a Latitude — latFormat","text":"lat latitude \\(^\\circ\\)N north equator. digits number significant digits use printing.","code":""},{"path":"https://dankelley.github.io/oce/reference/latFormat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format a Latitude — latFormat","text":"character string.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/latFormat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Format a Latitude — latFormat","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/latlonFormat.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a Latitude-Longitude Pair — latlonFormat","title":"Format a Latitude-Longitude Pair — latlonFormat","text":"Format latitude-longitude pair, using \"S\" negative latitudes, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/latlonFormat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a Latitude-Longitude Pair — latlonFormat","text":"","code":"latlonFormat(lat, lon, digits = max(6, getOption(\"digits\") - 1))"},{"path":"https://dankelley.github.io/oce/reference/latlonFormat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a Latitude-Longitude Pair — latlonFormat","text":"lat latitude \\(^\\circ\\)N north equator. lon longitude \\(^\\circ\\)N east Greenwich. digits number significant digits use printing.","code":""},{"path":"https://dankelley.github.io/oce/reference/latlonFormat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format a Latitude-Longitude Pair — latlonFormat","text":"character string.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/latlonFormat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Format a Latitude-Longitude Pair — latlonFormat","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/lisst-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store LISST Data — lisst-class","title":"Class to Store LISST Data — lisst-class","text":"class stores LISST (Laser -situ scattering transmissometry) data.","code":""},{"path":"https://dankelley.github.io/oce/reference/lisst-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store LISST Data — lisst-class","text":"data oce objects, data slot lisst objects list containing main data object. metadata oce objects, metadata slot lisst objects list containing information data object . processingLog oce objects, processingLog slot lisst objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/lisst-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store LISST Data — lisst-class","text":"Although [[<- operator may permit modification contents lisst objects (see [[<-,lisst-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/lisst-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store LISST Data — lisst-class","text":"full contents data metadata slots lisst object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,lisst-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,lisst-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":"https://dankelley.github.io/oce/reference/lisst-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Class to Store LISST Data — lisst-class","text":"Information LISST instruments provided manufacturer's website, https://www.sequoiasci.com.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/lisst-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store LISST Data — lisst-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/lisst.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample lisst Data — lisst","title":"Sample lisst Data — lisst","text":"LISST (Laser -situ scattering transmissometry) dataset, constructed artificially.","code":""},{"path":"https://dankelley.github.io/oce/reference/lisst.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample lisst Data — lisst","text":"","code":"data(lisst)"},{"path":"https://dankelley.github.io/oce/reference/lisst.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample lisst Data — lisst","text":"constructed artificially using .lisst(), approximately match values might measured field.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/lisst.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sample lisst Data — lisst","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/lobo-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store LOBO Data — lobo-class","title":"Class to Store LOBO Data — lobo-class","text":"class stores LOBO data.","code":""},{"path":"https://dankelley.github.io/oce/reference/lobo-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store LOBO Data — lobo-class","text":"data oce objects, data slot lobo objects list containing main data object. metadata oce objects, metadata slot lobo objects list containing information data object . processingLog oce objects, processingLog slot lobo objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/lobo-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store LOBO Data — lobo-class","text":"Although [[<- operator may permit modification contents lobo objects (see [[<-,lobo-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/lobo-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store LOBO Data — lobo-class","text":"full contents data metadata slots lobo object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,lobo-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,lobo-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/lobo-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store LOBO Data — lobo-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/lobo.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample lobo Data — lobo","title":"Sample lobo Data — lobo","text":"sample lobo dataset obtained Northwest Arm Halifax Satlantic.","code":""},{"path":"https://dankelley.github.io/oce/reference/lobo.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample lobo Data — lobo","text":"data downloaded web interface Satlantic LOBO web server read read.lobo().","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/lobo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sample lobo Data — lobo","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/lobo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample lobo Data — lobo","text":"","code":"library(oce) data(lobo) summary(lobo) #> Lobo Summary #> ------------ #>  #> * source: \"/Users/kelley/src/oce/create_data/lobo/lobo.dat\" #> * Time: 2009-03-01 to 2009-04-01 23:00:00 (768 samples, mean increment 1 hour) #> * Data Overview #>  #>                                 Min.  Mean     Max. Dim. NAs #>     time                        NA    NA       NA   768  0   #>     u [m/s]                     NA    NA       NA   768  768 #>     v [m/s]                     NA    NA       NA   768  768 #>     salinity [PSS-78]           13.61 29.208   30.8 768  0   #>     temperature [°C, ITS-90]    -0.72 1.691    4.55 768  0   #>     airtemperature [°C, ITS-90] -10.4 -0.20573 11.8 768  0   #>     pressure [dbar]             NA    NA       NA   768  768 #>     nitrate [μM]                0.3   6.7108   38.5 768  0   #>     fluorescence [μg/l]         0.32  1.2463   4.83 768  0   #>  #> * Processing Log #>  #>     - 2016-01-10 15:34:18 UTC: `create 'lobo' object` #>     - 2016-01-10 15:34:18 UTC: `read.lobo(file = \"lobo.dat\")` #>     - 2016-01-10 15:34:19 UTC: `subset.lobo(x, subset=start <= time & time <= end)` #>     - 2016-01-10 15:34:19 UTC: `subset.lobo(x, subset=!is.na(temperature))` plot(lobo) #> Warning: no good pressures, so setting all to 0.0 dbar"},{"path":"https://dankelley.github.io/oce/reference/locationForGsw.html","id":null,"dir":"Reference","previous_headings":"","what":"Alter Longitude and Latitude for gsw Computations — locationForGsw","title":"Alter Longitude and Latitude for gsw Computations — locationForGsw","text":"function repeats location information required seawater functions, e.g. swAbsoluteSalinity(), use gsw package compute seawater properties Gibbs Seawater formulation. seems unlikely users need call function directly routine work.","code":""},{"path":"https://dankelley.github.io/oce/reference/locationForGsw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alter Longitude and Latitude for gsw Computations — locationForGsw","text":"","code":"locationForGsw(x)"},{"path":"https://dankelley.github.io/oce/reference/locationForGsw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alter Longitude and Latitude for gsw Computations — locationForGsw","text":"x oce object.","code":""},{"path":"https://dankelley.github.io/oce/reference/locationForGsw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alter Longitude and Latitude for gsw Computations — locationForGsw","text":"locationForGsw returns list containing longitude latitude, dimensionality matching pressure data slot x.  x lacks location information (either metadata data slot) lacks pressure data slot, returned list hold NULL values longitude latitude.","code":""},{"path":"https://dankelley.github.io/oce/reference/locationForGsw.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alter Longitude and Latitude for gsw Computations — locationForGsw","text":"Several gsw functions require location information matched hydrographic information.  scheme depends dimensionality hydrographic variables location variables. example, ctd stores salinity etc vectors, stores just one longitude-latitude pair vector.  contrast, argo stores salinity etc matrices, stores e.g. longitude vector length matching first dimension salinity.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/locationForGsw.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Alter Longitude and Latitude for gsw Computations — locationForGsw","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/lon360.html","id":null,"dir":"Reference","previous_headings":"","what":"Change Longitude From -180:180 to 0:360 Convention — lon360","title":"Change Longitude From -180:180 to 0:360 Convention — lon360","text":"numerical input, including vectors, matrices arrays, lon360() simply calls ifelse() add 360 negative values. section objects, changes longitude metadata slot calls handle ctd objects stored entries station within data slot. ctd object, indeed non-section objects, lon360() changes longitude values metadata slot (present) also data slot (, present). function useful dealing coastline data; see coastlineCut() data.","code":""},{"path":"https://dankelley.github.io/oce/reference/lon360.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Change Longitude From -180:180 to 0:360 Convention — lon360","text":"","code":"lon360(x)"},{"path":"https://dankelley.github.io/oce/reference/lon360.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Change Longitude From -180:180 to 0:360 Convention — lon360","text":"x either numeric vector array, oce object.","code":""},{"path":"https://dankelley.github.io/oce/reference/lon360.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Change Longitude From -180:180 to 0:360 Convention — lon360","text":"","code":"lon360(c(179, -179)) #> [1] 179 181"},{"path":"https://dankelley.github.io/oce/reference/lonFormat.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a Longitude — lonFormat","title":"Format a Longitude — lonFormat","text":"Format longitude, using \"W\" west longitude.","code":""},{"path":"https://dankelley.github.io/oce/reference/lonFormat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a Longitude — lonFormat","text":"","code":"lonFormat(lon, digits = max(6, getOption(\"digits\") - 1))"},{"path":"https://dankelley.github.io/oce/reference/lonFormat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a Longitude — lonFormat","text":"lon longitude \\(^\\circ\\)N east Greenwich. digits number significant digits use printing.","code":""},{"path":"https://dankelley.github.io/oce/reference/lonFormat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format a Longitude — lonFormat","text":"character string.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/lonFormat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Format a Longitude — lonFormat","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/longitudeTighten.html","id":null,"dir":"Reference","previous_headings":"","what":"Try to Reduce Section Longitude Range — longitudeTighten","title":"Try to Reduce Section Longitude Range — longitudeTighten","text":"longitudeTighten shifts longitudes first argument 360 degrees, reduce overall longitude span.","code":""},{"path":"https://dankelley.github.io/oce/reference/longitudeTighten.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Try to Reduce Section Longitude Range — longitudeTighten","text":"","code":"longitudeTighten(section)"},{"path":"https://dankelley.github.io/oce/reference/longitudeTighten.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Try to Reduce Section Longitude Range — longitudeTighten","text":"section section object.","code":""},{"path":"https://dankelley.github.io/oce/reference/longitudeTighten.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Try to Reduce Section Longitude Range — longitudeTighten","text":"section object based first argument, longitudes shifted metadata slot, also metadata slots ctd objects stored station item data slot.","code":""},{"path":"https://dankelley.github.io/oce/reference/longitudeTighten.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Try to Reduce Section Longitude Range — longitudeTighten","text":"function can helpful cases CTD stations within section cross cut point longitude convention, otherwise might yield ugly plots plot,section-method() used xtype=\"longitude\". problem occur CTD objects ordered time sampling, observed December 2020 GO-SHIPS dataset downloaded https://cchdo.ucsd.edu/data/15757/a10_1992_ct1.","code":""},{"path":"https://dankelley.github.io/oce/reference/longitudeTighten.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Try to Reduce Section Longitude Range — longitudeTighten","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/lonlat2map.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Longitude and Latitude to X and Y — lonlat2map","title":"Convert Longitude and Latitude to X and Y — lonlat2map","text":"projection already used (e.g. set mapPlot()) longitude latitude given, arguments inferred lonlat2map.  important otherwise, new projection called , ruin additions existing plot.","code":""},{"path":"https://dankelley.github.io/oce/reference/lonlat2map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Longitude and Latitude to X and Y — lonlat2map","text":"","code":"lonlat2map(longitude, latitude, projection = \"\", debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/lonlat2map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Longitude and Latitude to X and Y — lonlat2map","text":"longitude numeric vector containing decimal longitudes, list containing items named longitude latitude, case indicated values used, next argument ignored. latitude numeric vector containing decimal latitude (ignored longitude list, described ). projection optional indication projection.  must character string format used sf package; see mapPlot().) debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/lonlat2map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Longitude and Latitude to X and Y — lonlat2map","text":"list containing x y.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/lonlat2map.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Longitude and Latitude to X and Y — lonlat2map","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/lonlat2map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Longitude and Latitude to X and Y — lonlat2map","text":"","code":"library(oce) # Cape Split, in the Minas Basin of the Bay of Fundy cs <- list(longitude = -64.49657, latitude = 45.33462) xy <- lonlat2map(cs, projection = \"+proj=merc\") map2lonlat(xy) #> $longitude #> [1] -64.49657 #>  #> $latitude #> [1] 45.33462 #>"},{"path":"https://dankelley.github.io/oce/reference/lonlat2utm.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Longitude and Latitude to UTM — lonlat2utm","title":"Convert Longitude and Latitude to UTM — lonlat2utm","text":"Convert Longitude Latitude UTM","code":""},{"path":"https://dankelley.github.io/oce/reference/lonlat2utm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Longitude and Latitude to UTM — lonlat2utm","text":"","code":"lonlat2utm(longitude, latitude, zone, km = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/lonlat2utm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Longitude and Latitude to UTM — lonlat2utm","text":"longitude numeric vector decimal longitude.  May also list containing items named longitude latitude, case indicated values used, next argument ignored. latitude numeric vector decimal latitude (ignored longitude list containing coordinates) zone optional indication UTM zone.  Normally inferred longitude, specifying can helpful dealing Landsat images, may cross zones therefore described single zone. km logical value indicating whether easting northing kilometers meters.","code":""},{"path":"https://dankelley.github.io/oce/reference/lonlat2utm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Longitude and Latitude to UTM — lonlat2utm","text":"lonlat2utm returns list containing easting, northing, zone hemisphere.","code":""},{"path":"https://dankelley.github.io/oce/reference/lonlat2utm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert Longitude and Latitude to UTM — lonlat2utm","text":"https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system, downloaded May 31, 2014.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/lonlat2utm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Longitude and Latitude to UTM — lonlat2utm","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/lonlat2utm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Longitude and Latitude to UTM — lonlat2utm","text":"","code":"library(oce) # Cape Split, in the Minas Basin of the Bay of Fundy lonlat2utm(-64.496567, 45.334626) #> $easting #> [1] 382736.4 #>  #> $northing #> [1] 5021214 #>  #> $zone #> [1] 20 #>  #> $hemisphere #> [1] \"N\" #>"},{"path":"https://dankelley.github.io/oce/reference/lookWithin.html","id":null,"dir":"Reference","previous_headings":"","what":"Look Within the First Element of a List for Replacement Values — lookWithin","title":"Look Within the First Element of a List for Replacement Values — lookWithin","text":"helper function used seawater functions (names starting sw) facilitate specification water properties either distinct arguments, data stored within oce object first argument.","code":""},{"path":"https://dankelley.github.io/oce/reference/lookWithin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Look Within the First Element of a List for Replacement Values — lookWithin","text":"","code":"lookWithin(list)"},{"path":"https://dankelley.github.io/oce/reference/lookWithin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Look Within the First Element of a List for Replacement Values — lookWithin","text":"list list elements, typically arguments used sw functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/lookWithin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Look Within the First Element of a List for Replacement Values — lookWithin","text":"list elements names possibly filled first element.","code":""},{"path":"https://dankelley.github.io/oce/reference/lookWithin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Look Within the First Element of a List for Replacement Values — lookWithin","text":"list[1] oce object, return value lookWithin input value, except () eos completed either \"gsw\" \"unesco\" (b) longitude latitude within list[1], possibly lengthened, length first item data slot list[1]. examples may clarify somewhat.","code":""},{"path":"https://dankelley.github.io/oce/reference/lookWithin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Look Within the First Element of a List for Replacement Values — lookWithin","text":"","code":"# 1. If first item is not a CTD object, just return the input lookWithin(list(a = 1, b = 2)) # returns a list #> $a #> [1] 1 #>  #> $b #> [1] 2 #>  # 2. Extract salinity from a CTD object data(ctd) str(lookWithin(list(salinity = ctd))) #> List of 1 #>  $ salinity: num [1:181] 29.9 29.9 29.9 29.9 29.9 ... # 3. Extract salinity and temperature. Note that the # value specified for temperature is ignored; all that matters # is that temperature is named. str(lookWithin(list(salinity = ctd, temperature = NULL))) #> List of 2 #>  $ salinity   : num [1:181] 29.9 29.9 29.9 29.9 29.9 ... #>  $ temperature: num [1:181] 14.2 14.2 14.2 14.2 14.2 ... # 4. How it is used by swRho() rho1 <- swRho(ctd, eos = \"unesco\") rho2 <- swRho(ctd[[\"salinity\"]], ctd[[\"temperature\"]], ctd[[\"pressure\"]], eos = \"unesco\") stopifnot(all.equal(rho1, rho2))"},{"path":"https://dankelley.github.io/oce/reference/lowpass.html","id":null,"dir":"Reference","previous_headings":"","what":"Lowpass Digital Filtering — lowpass","title":"Lowpass Digital Filtering — lowpass","text":"filter coefficients constructed using standard definitions, stats::filter() used filter data. leaves NA values within half filter length ends time series, may replaced original x values, argument replace set TRUE.","code":""},{"path":"https://dankelley.github.io/oce/reference/lowpass.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lowpass Digital Filtering — lowpass","text":"","code":"lowpass(x, filter = \"hamming\", n, replace = TRUE, coefficients = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/lowpass.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Lowpass Digital Filtering — lowpass","text":"x vector smoothed filter name filter; present, \"hamming\", \"hanning\", \"boxcar\" permitted. n length filter (must odd integer exceeding 1) replace logical value indicating whether points near ends x copied end regions, replacing NA values otherwise placed stats::filter(). coefficients logical value indicating whether return filter coefficients, instead filtered values. accordance conventions literature, returned values normalized sum 1, although course normalization done actual filtering.","code":""},{"path":"https://dankelley.github.io/oce/reference/lowpass.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Lowpass Digital Filtering — lowpass","text":"default, lowpass returns filtered version x, coefficients TRUE returns filter coefficients.","code":""},{"path":"https://dankelley.github.io/oce/reference/lowpass.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Lowpass Digital Filtering — lowpass","text":"function added June 2017, may extended rest 2017. New arguments may appear n replace, users advised call function named arguments, positional arguments.","code":""},{"path":"https://dankelley.github.io/oce/reference/lowpass.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Lowpass Digital Filtering — lowpass","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/lowpass.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Lowpass Digital Filtering — lowpass","text":"","code":"library(oce) par(mfrow = c(1, 2), mar = c(4, 4, 1, 1)) coef <- lowpass(n = 5, coefficients = TRUE) plot(-2:2, coef, ylim = c(0, 1), xlab = \"Lag\", ylab = \"Coefficient\") x <- seq(-5, 5) + rnorm(11) plot(1:11, x, type = \"o\", xlab = \"time\", ylab = \"x and X\") X <- lowpass(x, n = 5) lines(1:11, X, col = 2) points(1:11, X, col = 2)"},{"path":"https://dankelley.github.io/oce/reference/magneticField.html","id":null,"dir":"Reference","previous_headings":"","what":"Earth Magnetic Declination, Inclination, and Intensity — magneticField","title":"Earth Magnetic Declination, Inclination, and Intensity — magneticField","text":"Implements 12th 13th generations International Geomagnetic Reference Field (IGRF), based reworked version Fortran program downloaded NOAA website (see “References”).","code":""},{"path":"https://dankelley.github.io/oce/reference/magneticField.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Earth Magnetic Declination, Inclination, and Intensity — magneticField","text":"","code":"magneticField(longitude, latitude, time, version = 13)"},{"path":"https://dankelley.github.io/oce/reference/magneticField.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Earth Magnetic Declination, Inclination, and Intensity — magneticField","text":"longitude longitude degrees east (negative degrees west), number, vector, matrix. latitude latitude degrees north, number, vector, matrix. shape (length dimensions) must conform dimensions longitude. time time field desired. may single value vector matrix structured match longitude latitude. value may decimal year, POSIXt time, Date time. version integer must either 12 13, specify version number formulae. Note 13 became default 2020 March 3, old code need specify version=12 work date.","code":""},{"path":"https://dankelley.github.io/oce/reference/magneticField.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Earth Magnetic Declination, Inclination, and Intensity — magneticField","text":"list containing declination, inclination, intensity.","code":""},{"path":"https://dankelley.github.io/oce/reference/magneticField.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Earth Magnetic Declination, Inclination, and Intensity — magneticField","text":"code (subroutines igrf12syn igrf13syn) seem written Susan Macmillan British Geological Survey.  Comments source code igrf13syn (current default used ) indicate coefficients agreed December 2019 IAGA Working Group V-MOD.  comments code suggest proposed application time interval years 1900 2025, inclusive, dates 1945 2015 considered definitive.","code":""},{"path":"https://dankelley.github.io/oce/reference/magneticField.html","id":"historical-notes","dir":"Reference","previous_headings":"","what":"Historical Notes","title":"Earth Magnetic Declination, Inclination, and Intensity — magneticField","text":"decade, magneticField used version 12 formulae provided IAGA, code updated March 3, 2020, version 13.  Example 3 shows differences declination typically 2 degrees (95 percent data lying -1.7 0.7 degrees).","code":""},{"path":"https://dankelley.github.io/oce/reference/magneticField.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Earth Magnetic Declination, Inclination, and Intensity — magneticField","text":"underlying Fortran code version 12 igrf12.f, downloaded NOAA website (https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html) June 7, version 13 igrf13.f, downloaded NOAA website (https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html March 3, 2020. Witze, Alexandra. “Earth's Magnetic Field Acting Geologists Know .” Nature 565 (January 9, 2019): 143. doi:10.1038/d41586-019-00007-1 Alken, P., E. Thébault, C. D. Beggan, H. Amit, J. Aubert, J. Baerenzung, T. N. Bondar, et al. \"International Geomagnetic Reference Field: Thirteenth Generation.\" Earth, Planets Space 73, . 1 (December 2021): 49. doi:10.1186/s40623-020-01288-x .","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/magneticField.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Earth Magnetic Declination, Inclination, and Intensity — magneticField","text":"Dan Kelley wrote R code fortran wrapper igrf12.f subroutine, written Susan Macmillan British Geological Survey distributed “without limitation” (email SM DK dated June 5, 2015).  version updated subsequent date; see “Historical Notes”.","code":""},{"path":"https://dankelley.github.io/oce/reference/magneticField.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Earth Magnetic Declination, Inclination, and Intensity — magneticField","text":"","code":"library(oce) # 1. Today's value at Halifax NS magneticField(-(63 + 36 / 60), 44 + 39 / 60, Sys.Date()) #> $declination #> [1] -16.33788 #>  #> $inclination #> [1] 66.41279 #>  #> $intensity #> [1] 51206.52 #>   # 2. World map of declination in year 2000. # \\donttest{ data(coastlineWorld) par(mar = rep(0.5, 4)) # no axes on whole-world projection mapPlot(coastlineWorld, projection = \"+proj=robin\", col = \"lightgray\") # Construct matrix holding declination lon <- seq(-180, 180) lat <- seq(-90, 90) dec2000 <- function(lon, lat) {     magneticField(lon, lat, 2000)$declination } dec <- outer(lon, lat, dec2000) # hint: outer() is very handy! # Contour, unlabelled for small increments, labeled for # larger increments. mapContour(lon, lat, dec,     col = \"blue\", levels = seq(-180, -5, 5),     lty = 3, drawlabels = FALSE ) mapContour(lon, lat, dec, col = \"blue\", levels = seq(-180, -20, 20)) mapContour(lon, lat, dec,     col = \"red\", levels = seq(5, 180, 5),     lty = 3, drawlabels = FALSE ) mapContour(lon, lat, dec, col = \"red\", levels = seq(20, 180, 20)) mapContour(lon, lat, dec, levels = 180, col = \"black\", lwd = 2, drawlabels = FALSE) mapContour(lon, lat, dec, levels = 0, col = \"black\", lwd = 2)  # }  # 3. Declination differences between versions 12 and 13 # \\donttest{ lon <- seq(-180, 180) lat <- seq(-90, 90) decDiff <- function(lon, lat) {     old <- magneticField(lon, lat, 2020, version = 13)$declination     new <- magneticField(lon, lat, 2020, version = 12)$declination     new - old } decDiff <- outer(lon, lat, decDiff) decDiff <- ifelse(decDiff > 180, decDiff - 360, decDiff) # Overall (mean) shift -0.1deg t.test(decDiff) #>  #> \tOne Sample t-test #>  #> data:  decDiff #> t = -21.794, df = 65340, p-value < 2.2e-16 #> alternative hypothesis: true mean is not equal to 0 #> 95 percent confidence interval: #>  -0.10399320 -0.08683188 #> sample estimates: #>   mean of x  #> -0.09541254  #>  # View histogram, narrowed to small differences par(mar = c(3.5, 3.5, 2, 2), mgp = c(2, 0.7, 0)) hist(decDiff,     breaks = seq(-180, 180, 0.05), xlim = c(-2, 2),     xlab = \"Declination difference [deg] from version=12 to version=13\",     main = \"Predictions for year 2020\" )  print(quantile(decDiff, c(0.025, 0.975))) #>       2.5%      97.5%  #> -1.6695352  0.7159345  # Note that the large differences are at high latitudes imagep(lon, lat, decDiff, zlim = c(-1, 1) * max(abs(decDiff))) lines(coastlineWorld[[\"longitude\"]], coastlineWorld[[\"latitude\"]])  # }"},{"path":"https://dankelley.github.io/oce/reference/makeFilter.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a Digital Filter — makeFilter","title":"Make a Digital Filter — makeFilter","text":"filter suitable use filter(), convolve() (asKernal=TRUE case) kernapply().  Note convolve() faster filter(), used time series missing values.  Blackman-Harris filter, half-power frequency 1/m cycles per time unit, shown “Examples” section.  using filter() kernapply() filters, use circular=TRUE.","code":""},{"path":"https://dankelley.github.io/oce/reference/makeFilter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a Digital Filter — makeFilter","text":"","code":"makeFilter(   type = c(\"blackman-harris\", \"rectangular\", \"hamming\", \"hann\"),   m,   asKernel = TRUE )"},{"path":"https://dankelley.github.io/oce/reference/makeFilter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a Digital Filter — makeFilter","text":"type string indicating type filter use.  (See Harris (1978) comparison similar filters.) \"blackman-harris\" yields modified raised-cosine filter designated \"4-Term (-92 dB) Blackman-Harris\" Harris (1978; coefficients given table page 65).  also called \"minimum 4-sample Blackman Harris\" author, Table 1, lists figures merit follows: highest side lobe level -92dB; side lobe fall -6 db/octave; coherent gain 0.36; equivalent noise bandwidth 2.00 bins; 3.0-dB bandwidth 1.90 bins; scallop loss 0.83 dB; worst case process loss 3.85 dB; 6.0-db bandwidth 2.72 bins; overlap correlation 46 percent 75\\ 50\\ spectral peak, value 2 indicates cutoff frequency 1/m, m given . \"rectangular\" flat filter.  (just convenience.  Note kernel(\"daniell\",....) gives result, kernel form.) \"hamming\" Hamming filter (raised-cosine taper zero ends) \"hann\" (raised cosine tapers zero ends). m length filter.  odd number, non-rectangular filter. asKernel boolean, set TRUE get smoothing kernel return value.","code":""},{"path":"https://dankelley.github.io/oce/reference/makeFilter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make a Digital Filter — makeFilter","text":"asKernel FALSE, returns list filter coefficients, symmetric midpoint summing 1.  may used filter(), provided argument circular=TRUE avoid phase offsets.  asKernel TRUE, return value smoothing kernel, can applied timeseries kernapply(), whose bandwidth can determined bandwidth.kernel(), print plot methods.","code":""},{"path":"https://dankelley.github.io/oce/reference/makeFilter.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Make a Digital Filter — makeFilter","text":"","code":"# need signal package for this example r <- rnorm(2048) rh <- stats::filter(r, H) rh <- rh[is.finite(rh)] # kludge to remove NA at start/end sR <- spectrum(r, plot=FALSE, spans=c(11, 5, 3)) sRH <- spectrum(rh, plot=FALSE, spans=c(11, 5, 3)) par(mfrow=c(2, 1), mar=c(3, 3, 1, 1), mgp=c(2, 0.7, 0)) plot(sR$freq, sRH$spec/sR$spec, xlab=\"Frequency\", ylab=\"Power Transfer\",      type=\"l\", lwd=5, col=\"gray\") theory <- freqz(H, n=seq(0,pi,length.out=100)) # Note we must square the modulus for the power spectrum lines(theory$f/pi/2, Mod(theory$h)^2, lwd=1, col=\"red\") grid() legend(\"topright\", col=c(\"gray\", \"red\"), lwd=c(5, 1), cex=2/3,        legend=c(\"Practical\", \"Theory\"), bg=\"white\") plot(log10(sR$freq), log10(sRH$spec/sR$spec),      xlab=\"log10 Frequency\", ylab=\"log10 Power Transfer\",      type=\"l\", lwd=5, col=\"gray\") theory <- freqz(H, n=seq(0,pi,length.out=100)) # Note we must square the modulus for the power spectrum lines(log10(theory$f/pi/2), log10(Mod(theory$h)^2), lwd=1, col=\"red\") grid() legend(\"topright\", col=c(\"gray\", \"red\"), lwd=c(5, 1), cex=2/3,        legend=c(\"Practical\", \"Theory\"), bg=\"white\")"},{"path":"https://dankelley.github.io/oce/reference/makeFilter.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Make a Digital Filter — makeFilter","text":"F. J. Harris, 1978.  use windows harmonic analysis discrete Fourier Transform.  Proceedings IEEE, 66(1), 51-83 (http://web.mit.edu/xiphmont/Public/windows.pdf.)","code":""},{"path":"https://dankelley.github.io/oce/reference/makeFilter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Make a Digital Filter — makeFilter","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/makeFilter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make a Digital Filter — makeFilter","text":"","code":"library(oce)  # 1. Demonstrate step-function response y <- c(rep(1, 10), rep(-1, 10)) x <- seq_along(y) plot(x, y, type = \"o\", ylim = c(-1.05, 1.05)) BH <- makeFilter(\"blackman-harris\", 11, asKernel = FALSE) H <- makeFilter(\"hamming\", 11, asKernel = FALSE) yBH <- stats::filter(y, BH) points(x, yBH, col = 2, type = \"o\") yH <- stats::filter(y, H) points(yH, col = 3, type = \"o\") legend(\"topright\",     col = 1:3, cex = 2 / 3, pch = 1,     legend = c(\"input\", \"Blackman Harris\", \"Hamming\") )   # 2. Show theoretical and practical filter gain, where #    the latter is based on random white noise, and #    includes a particular value for the spans #    argument of spectrum(), etc."},{"path":"https://dankelley.github.io/oce/reference/map2lonlat.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert X and Y to Longitude and Latitude — map2lonlat","title":"Convert X and Y to Longitude and Latitude — map2lonlat","text":"Convert x-y coordinates longitude latitude. normally called internally within oce; see “Bugs”. projection must already set , call mapPlot() lonlat2map(). noted projections handled well; see “Bugs”.","code":""},{"path":"https://dankelley.github.io/oce/reference/map2lonlat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert X and Y to Longitude and Latitude — map2lonlat","text":"","code":"map2lonlat(x, y, init = NULL, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/map2lonlat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert X and Y to Longitude and Latitude — map2lonlat","text":"x vector containing x component points projected space, list containing items named x y, case next argument ignored. y vector containing y coordinate points projected space (ignored x list, described ). init vector containing initial guesses longitude latitude, presently ignored. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/map2lonlat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert X and Y to Longitude and Latitude — map2lonlat","text":"list containing longitude latitude, NA values indicating points globe displayed.","code":""},{"path":"https://dankelley.github.io/oce/reference/map2lonlat.html","id":"bugs","dir":"Reference","previous_headings":"","what":"Bugs","title":"Convert X and Y to Longitude and Latitude — map2lonlat","text":"oce uses sf::sf_project() function handle projections. projections inverses permitted within oce, subset, omitted oce developers experienced problems .","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/map2lonlat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert X and Y to Longitude and Latitude — map2lonlat","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/map2lonlat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert X and Y to Longitude and Latitude — map2lonlat","text":"","code":"library(oce) # Cape Split, in the Minas Basin of the Bay of Fundy cs <- list(longitude = -64.49657, latitude = 45.33462) xy <- lonlat2map(cs, projection = \"+proj=merc\") map2lonlat(xy) #> $longitude #> [1] -64.49657 #>  #> $latitude #> [1] 45.33462 #>"},{"path":"https://dankelley.github.io/oce/reference/mapArrows.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Arrows to a Map — mapArrows","title":"Add Arrows to a Map — mapArrows","text":"Plot arrows existing map, e.g. indicate place location. well-suited drawing direction fields, e.g. velocities; , see mapDirectionField(). Adds arrows existing map, analogy arrows().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapArrows.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Arrows to a Map — mapArrows","text":"","code":"mapArrows(   longitude0,   latitude0,   longitude1 = longitude0,   latitude1 = latitude0,   length = 0.25,   angle = 30,   code = 2,   col = par(\"fg\"),   lty = par(\"lty\"),   lwd = par(\"lwd\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/mapArrows.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Arrows to a Map — mapArrows","text":"longitude0, latitude0 starting points arrows. longitude1, latitude1 ending points arrows. length length arrow heads, passed arrows(). angle angle arrow heads, passed arrows(). code numerical code indicating type arrows, passed arrows(). col arrow color, passed arrows(). lty arrow line type, passed arrows(). lwd arrow line width, passed arrows(). ... optional arguments passed arrows().","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapArrows.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Arrows to a Map — mapArrows","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapArrows.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Arrows to a Map — mapArrows","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) mapPlot(coastlineWorld,     longitudelim = c(-120, -60), latitudelim = c(30, 60),     col = \"lightgray\", projection = \"+proj=lcc +lat_1=45 +lon_0=-100\" ) lon <- seq(-120, -75, 15) n <- length(lon) lat <- 45 + rep(0, n) # Draw meridional arrows in N America, from 45N to 60N. mapArrows(lon, lat, lon, lat + 15, length = 0.05, col = \"blue\")  # }"},{"path":"https://dankelley.github.io/oce/reference/mapAxis.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Axis Labels to an Existing Map — mapAxis","title":"Add Axis Labels to an Existing Map — mapAxis","text":"Plot axis labels existing map. advanced function, requiring coordination mapPlot() (possibly) also mapGrid(), best avoided novices, may satisfied defaults used mapPlot().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapAxis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Axis Labels to an Existing Map — mapAxis","text":"","code":"mapAxis(   side = 1:2,   longitude = TRUE,   latitude = TRUE,   axisStyle = 1,   tick = TRUE,   line = NA,   pos = NA,   outer = FALSE,   font = NA,   las = c(0, 0),   lty = \"solid\",   lwd = 1,   lwd.ticks = lwd,   col = NULL,   col.ticks = NULL,   hadj = NA,   padj = NA,   tcl = -0.3,   cex.axis = 1,   mgp = c(0, 0.5, 0),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/mapAxis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Axis Labels to an Existing Map — mapAxis","text":"side side labels drawn.  provided, sides 1 2 used (.e. bottom left-hand sides). longitude either logical value numeric vector longitudes. three possible cases: (1) longitude=TRUE (default) ticks nearby numbers occur longitude grid established previous call mapPlot(); (2) longitude=FALSE longitude ticks numbers drawn; (3) longitude vector numerical values, ticks placed values, numbers written beside . Note cases 1 3, efforts made avoid overdrawing text, longitude values might get ticks numbers. get ticks numbers, set cex.axis=0. latitude similar longitude latitude. axisStyle integer specifying style labels numbers axes.  choices : 1 signed numbers without additional labels; 2 (default) unsigned numbers followed letters indicating hemisphere; 3 signed numbers followed degree sign; 4 unsigned numbers followed degree sign; 5 signed numbers followed degree sign letters indicating hemisphere. tick parameter passed axis(). line parameter passed axis(). pos parameter passed axis(). outer parameter passed axis(). font axis font, passed axis(). las two-element axis label orientation, passed axis(). first value horizontal axis, second vertical axis. See par() meanings permitted values, namely 0, 1, 2 3. lty axis line type, passed axis(). lwd axis line width, passed axis()). lwd.ticks tick line width, passed axis(). col axis color, passed axis(). col.ticks axis tick color, passed axis(). hadj argument transmitted axis(). padj argument transmitted axis(). tcl axis-tick size (see par()). cex.axis axis-label expansion factor (see par()); set 0 prevent numbers placed axes. mgp three-element numerical vector describing axis-label placement (see par()). usually makes sense set first third elements zero. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get .","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapAxis.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Axis Labels to an Existing Map — mapAxis","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapAxis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Axis Labels to an Existing Map — mapAxis","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) par(mar = c(2, 2, 1, 1)) lonlim <- c(-180, 180) latlim <- c(70, 110) # In mapPlot() call, note axes and grid args, to # prevent over-plotting of defaults.  Some adjustments # might be required to the mapGrid() arguments, to # get agreement with the axis. This is why both # mapGrid() and mapAxis() are best avoided; it is # simpler to let mapPlot() handle these things. mapPlot(coastlineWorld,     projection = \"+proj=stere +lat_0=90\",     longitudelim = lonlim, latitudelim = latlim,     col = \"tan\", axes = FALSE, grid = FALSE ) mapGrid(15, 15) mapAxis(axisStyle = 5)  # }"},{"path":"https://dankelley.github.io/oce/reference/mapContour.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Contours on a Existing map — mapContour","title":"Add Contours on a Existing map — mapContour","text":"Draw contour lines existing map, using mapLines(). Note label placement mapContour handled differently contour().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapContour.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Contours on a Existing map — mapContour","text":"","code":"mapContour(   longitude,   latitude,   z,   nlevels = 10,   levels = pretty(range(z, na.rm = TRUE), nlevels),   labcex = 0.6,   drawlabels = TRUE,   underlay = \"erase\",   col = par(\"fg\"),   lty = par(\"lty\"),   lwd = par(\"lwd\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/mapContour.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Contours on a Existing map — mapContour","text":"longitude numeric vector longitudes points plotted, object class topo (see topo), case longitude, latitude z inferred object. Importantly, longitude system must match mapPlot() call made underlying plot. , contours can spurious lines run across plot. See “Dealing longitude conventions” method handling conflicting longitude conventions mapPlot() mapContour(). latitude numeric vector latitudes points plotted. z matrix contoured. number rows columns z must equal lengths longitude latitude, respectively. nlevels number contour levels, levels supplied. levels vector contour levels. labcex cex value used contour labelling. contour(), absolute size, multiple par(\"cex\"). drawlabels logical value vector indicating whether draw contour labels.  length drawlabels less number levels specified, rep() used increase length, providing value contour line. levels thus indicated, labels added, spot contour line closest horizontal page. First, though, region underneath label filled colour given par(\"bg\"). See “Limitations” notes status contour labelling, limitations. underlay character value relating handling labels. equals \"erase\" (default), contour line drawn  first, area label erased (filled white 'ink'), label drawn. can useful drawing coarsely-spaced labelled contours top finely-spaced unlabelled contours. hand, underlay equals \"interrupt\", contour line interrupted region label, closer scheme used base contour() function. col colour contour line, par(\"col\"), except col gets lengthened calling rep(), individual contours can coloured distinctly. lty type contour line, par(\"lty\"), except lengthening, described col. lwd width contour line, par(\"lwd\"), except lengthening, described col lty. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapContour.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Add Contours on a Existing map — mapContour","text":"","code":"library(oce) data(coastlineWorld) if (requireNamespace(\"ocedata\", quietly=TRUE)) {     data(levitus, package = \"ocedata\")     par(mar = rep(1, 4))     mapPlot(coastlineWorld, projection = \"+proj=robin\", col = \"lightgray\")     mapContour(levitus$longitude, levitus$latitude, levitus$SST) }"},{"path":"https://dankelley.github.io/oce/reference/mapContour.html","id":"dealing-with-longitude-conventions","dir":"Reference","previous_headings":"","what":"Dealing with longitude conventions","title":"Add Contours on a Existing map — mapContour","text":"Suppose map plotted using longitudes bound -180 180. overlay contours defined longitude bound 0 360 (built-coastlineWorld dataset), try Clark Richards' method (https://github.com/dankelley/oce/issues/2217, .","code":"# Start with z=z(lon,lat), with lon bound by 0 and 360 z2 <- rbind(z[lon > 180, ], z[lon <= 180, ]) lon2 <- lon + 180 mapContour(lon2, lat, z2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapContour.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Contours on a Existing map — mapContour","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapCoordinateSystem.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw a Coordinate System — mapCoordinateSystem","title":"Draw a Coordinate System — mapCoordinateSystem","text":"Draws arrows map indicate coordinate system, e.g. indicate coordinate system set one axis parallel coastline.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapCoordinateSystem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw a Coordinate System — mapCoordinateSystem","text":"","code":"mapCoordinateSystem(longitude, latitude, L = 100, phi = 0, ...)"},{"path":"https://dankelley.github.io/oce/reference/mapCoordinateSystem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw a Coordinate System — mapCoordinateSystem","text":"longitude numeric vector longitudes degrees. latitude numeric vector latitudes degrees. L axis length km. phi angle, degrees counterclockwise, \"x\" axis makes line latitude. ... plotting arguments, passed mapArrows(); see “Examples” control arrow-head size.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapCoordinateSystem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Draw a Coordinate System — mapCoordinateSystem","text":"preliminary version function. works lines constant latitude horizontal plot.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapCoordinateSystem.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Draw a Coordinate System — mapCoordinateSystem","text":"","code":"library(oce) if (requireNamespace(\"ocedata\", quietly=TRUE)) {     data(coastlineWorldFine, package=\"ocedata\")     HfxLon <- -63.5752     HfxLat <- 44.6488     mapPlot(coastlineWorldFine, proj=\"+proj=merc\",         longitudelim=HfxLon+c(-2,2), latitudelim=HfxLat+c(-2,2),         col=lightgrey\")     mapCoordinateSystem(HfxLon, HfxLat, phi=45, length=0.05)    }"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapCoordinateSystem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Draw a Coordinate System — mapCoordinateSystem","text":"Chantelle Layton","code":""},{"path":"https://dankelley.github.io/oce/reference/mapDirectionField.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a Direction Field to an Existing Map — mapDirectionField","title":"Add a Direction Field to an Existing Map — mapDirectionField","text":"Plot direction field existing map, either using arrows, oceanographic convention, using wind barbs, meteorological convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapDirectionField.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a Direction Field to an Existing Map — mapDirectionField","text":"","code":"mapDirectionField(   longitude,   latitude,   u,   v,   scale = 1,   length = NULL,   code = 2,   lwd = par(\"lwd\"),   col = par(\"fg\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/mapDirectionField.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a Direction Field to an Existing Map — mapDirectionField","text":"longitude, latitude numeric vectors starting points arrows, locations grid cells. u, v numeric vectors matrices holding components vector shown direction field. scale indication length arrows lines. \"arrow\" style, arrow length latitude degrees per unit velocity.  \"barb\" style, length lines, regardless velocity, style velocity indicated barbs pennants. length indication size arrow heads, \"arrow\" style, barbs, \"barb\" style. NULL (default), 0.05 used \"arrow\" style, 0.2 \"barb\" style. code indication style arrow heads barbs. arrow style, number passed arrows(), 2 default, meaning draw arrow conventional vector.  wind-barb style, string \"barb\". lwd numeric value indicating width line segments make speed indicators. col color speed indicators. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapDirectionField.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add a Direction Field to an Existing Map — mapDirectionField","text":"noted “Description”, two styles. 1. Arrow Style: arrows drawn stated locations direction flow defined (u,v) vector. usual convention oceanographic work. 2. Barb Style: create \"wind barbs\", according convention used meteorological charts. Unlike arrows, indicate speed arrow length, barbs indicate speed angled lines possibly triangles located upstream end. Note meanings function parameters vary across two styles. \"arrow\" style quite common oceanographic literature. Arrows point direction velocity defined (u,v), length arrows proportional speed, sqrt(u^2+v^2). contrast, \"barb\" notation, lines equal length (compared distance ground), speed indicated barbs. Many sources explain notation, e.g. https://www.weather.gov/hfo/windbarbinfo. lines extend observation longitude latitude direction opposite velocity. Velocities indicated barbs, .e. short line segments extend angle main line pennants (triangles). Speed given combination pennants barbs. pennant represents 50 speed units, long barb 10 units, short barb 5 units.  Summing values gives speed, rounded 5 units. See “Details” comparison \"arrow\" \"barb\" styles made-velocity data. two possibilities longitude, latitude combined u v. four vectors, matching one--one. useful showing velocities particular individual locations, “Examples”. longitude latitude vectors, u v matrices.  case, lengths longitude latitude must equal number rows columns u v, respectively.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapDirectionField.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add a Direction Field to an Existing Map — mapDirectionField","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapDirectionField.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a Direction Field to an Existing Map — mapDirectionField","text":"","code":"library(oce) data(coastlineWorld) par(mar = rep(2, 4)) mapPlot(coastlineWorld,     border = \"black\",     col = \"grey95\",     projection = \"+proj=lcc +lat_1=40 +lat_2=60 +lon_0=-60\",     longitudelim = c(-70, -50), latitudelim = c(45, 50) ) # Invent wind data for three locations in eastern Canada dataText <- \" lat,lon,u,v,location 44.6476,-63.5728,15,0,Halifax 49.5495,-62.9555,20,20,Anticosti Island 47.5556,-52.7453,0,55,St. John's\" data <- read.csv(text = dataText) # Dots at observation locations, for reference mapPoints(data$lon, data$lat) # Red: arrows that extend downwind from the location mapDirectionField(data$lon, data$lat,     u = data$u, v = data$v, scale = 0.05,     length = .08, code = 2, col = 2, lwd = 2 ) # Blue: barbs that extend upwind from the location mapDirectionField(data$lon, data$lat,     u = data$u, v = data$v, scale = 2, code = \"barb\", lwd = 2, col = 4 )"},{"path":"https://dankelley.github.io/oce/reference/mapGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a Longitude and Latitude Grid to an Existing Map — mapGrid","title":"Add a Longitude and Latitude Grid to an Existing Map — mapGrid","text":"Plot longitude latitude grid existing map. advanced function, requiring coordination mapPlot() (possibly) also mapAxis(), best avoided novices, may satisfied defaults used mapPlot().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a Longitude and Latitude Grid to an Existing Map — mapGrid","text":"","code":"mapGrid(   dlongitude = 15,   dlatitude = 15,   longitude,   latitude,   col = \"darkgray\",   lty = \"solid\",   lwd = 0.5 * par(\"lwd\"),   polarCircle = 0,   longitudelim,   latitudelim,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/mapGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a Longitude and Latitude Grid to an Existing Map — mapGrid","text":"dlongitude increment longitude, ignored longitude supplied, otherwise determines longitude sequence. dlatitude increment latitude, ignored latitude supplied, otherwise determines latitude sequence. longitude numeric vector longitudes, NULL prevent drawing longitude lines. latitude numeric vector latitudes, NULL prevent drawing latitude lines. col color lines lty line type lwd line width polarCircle number indicating number degrees latitude extending poles, within zones drawn. longitudelim optional argument specifying suggested longitude limits grid. supplied, grid lines drawn whole globe, can yield excessively slow drawing speeds small-region plots. , latitudelim, set mapPlot() arguments name passed function. latitudelim similar longitudelim. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 go two function levels deep, 3 go way core functions. value 3 truncated 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add a Longitude and Latitude Grid to an Existing Map — mapGrid","text":"data.frame, returned silently, containing \"side\", \"value\", \"type\", \"\". default call mapPlot() ensures agreement grid axes using return value call mapAxis().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapGrid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add a Longitude and Latitude Grid to an Existing Map — mapGrid","text":"somewhat analogous grid(), except first two arguments latter supply number lines grid, whereas present function increments first two arguments.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapGrid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add a Longitude and Latitude Grid to an Existing Map — mapGrid","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a Longitude and Latitude Grid to an Existing Map — mapGrid","text":"","code":"# \\donttest{ if (utils::packageVersion(\"sf\") != \"0.9.8\") {     # sf version 0.9-8 has a problem with this projection     library(oce)     data(coastlineWorld)     par(mar = c(2, 2, 1, 1))     # In mapPlot() call, note axes and grid args, to     # prevent over-plotting of defaults.     mapPlot(coastlineWorld,         type = \"l\", projection = \"+proj=ortho\",         axes = FALSE, grid = FALSE     )     mapGrid(15, 15) }  # }"},{"path":"https://dankelley.github.io/oce/reference/mapImage.html","id":null,"dir":"Reference","previous_headings":"","what":"Add an Image to a Map — mapImage","title":"Add an Image to a Map — mapImage","text":"Plot image existing map created mapPlot().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapImage.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add an Image to a Map — mapImage","text":"","code":"mapImage(   longitude,   latitude,   z,   zlim,   zclip = FALSE,   breaks,   col,   colormap,   border = NA,   lwd = par(\"lwd\"),   lty = par(\"lty\"),   missingColor = NA,   filledContour = FALSE,   gridder = \"binMean2D\",   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/mapImage.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add an Image to a Map — mapImage","text":"longitude numeric vector longitudes corresponding z matrix. latitude numeric vector latitudes corresponding z matrix. z numeric matrix represented image. zlim limit z (color). zclip logical value, TRUE indicating --range z values painted missingColor FALSE indicating values painted nearest -range color.  zlim given min max set range.  zlim given breaks given, min max breaks sets range used z.  neither zlim breaks given, clipping done, .e. action zclip FALSE. breaks z values breaks color scheme.  length 1, value indicates desired number breaks, supplied pretty(), determining clean break points. col Either vector colors corresponding breaks, length 1 plus number breaks, function specifying colors, e.g. oce.colorsViridis() Viridis scheme. colormap optional colormap, created colormap(). colormap provided, properties takes precedence breaks, col, missingColor, zclip specified mapImage. border Color used borders patches (passed polygon()); default NA means border. lwd line width, used borders drawn. lty line type, used borders drawn. missingColor color used indicate missing data, NA skip drawing regions (retain whatever material already drawn regions). filledContour indication whether use filled contours.  may FALSE (default), TRUE, positive numerical value. FALSE, polygons used. Otherwise, longitude-latitude values transformed x-y values, grid thus require gridding .filled.contour() can plot filled contours.  method used gridding set gridder parameter (see next item). filledContour TRUE, grid constructed aim approximately 3 projected x-y points cell. can leave cells unoccupied, yielding blanks drawn image.  two ways around .  First, gridder can set fill gaps.  Second, numerical value can used filledContour. example, using filledContour equal 1.5 increase grid width height factor 1.5, may enough fill gaps, depending projection area shown. gridder specification gridding done, used filledContour TRUE. value gridder may \"binMean2D\", default, \"interp\", function.  first two cases, gridding done either binMean2D() interp::interp(), respectively. last case, see “Details”. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapImage.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add an Image to a Map — mapImage","text":"Image data regular grid lon-lat space, projected x-y space.  means image() used. Instead, two approaches, depending value filledContour. filledContour FALSE, image \"pixels\" drawn polygon(). can prohibitively slow fine grids. However, filledContour TRUE, \"pixels\" remapped regular grid displayed .filled.contour().  remapping starts converting regular lon-lat grid irregular x-y grid using lonlat2map(). irregular grid interpolated onto regular x-y grid accordance gridder parameter. gridder values \"binMean2D\" \"interp\" produce satisfactory results, advanced users might wish supply function gridding according criteria. function must first 5 arguments (1) x vector, (2) y vector, (3) z matrix corresponds x y usual way, (4) vector holding desired x grid, (5) vector holding desired y grid. return value must list containing items named xmids, ymids result. understand meaning parameters return values, consult documentation binMean2D(). example scheme fill data gaps 1 2 cells:","code":"g <- function(...) binMean2D(..., fill = TRUE, fillgap = 2) mapImage(..., gridder = g, ...)"},{"path":"https://dankelley.github.io/oce/reference/mapImage.html","id":"historical-notes","dir":"Reference","previous_headings":"","what":"Historical Notes","title":"Add an Image to a Map — mapImage","text":"oce 1.7.4, gridder argument set \"akima\", used akima package.  However, package released FOSS license, CRAN requested change interp. Note drawImage() intercepts errors sometimes get reported interp::interp().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapImage.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Add an Image to a Map — mapImage","text":"","code":"library(oce) data(coastlineWorld) data(topoWorld)  # Northern polar region, with color-coded bathymetry par(mfrow = c(1, 1), mar = c(2, 2, 1, 1)) cm <- colormap(zlim = c(-5000, 0), col = oceColorsGebco) drawPalette(colormap = cm) mapPlot(coastlineWorld,     projection = \"+proj=stere +lat_0=90\",     longitudelim = c(-180, 180), latitudelim = c(70, 110) ) # Uncomment one of the next four blocks.  See # https://dankelley.github.io/dek_blog/2024/03/07/mapimage.html # for illustrations.  # Method 1: the default, using polygons for lon-lat patches mapImage(topoWorld, colormap = cm)  # Method 2: filled contours, with ugly missing-data traces # mapImage(topoWorld, colormap = cm, filledContour = TRUE)  # Method 3: filled contours, with a double-sized grid cells # mapImage(topoWorld, colormap = cm, filledContour = 2)  # Method 4: filled contours, with a gap-filling gridder) # g <- function(...) binMean2D(..., fill = TRUE, fillgap = 2) # mapImage(topoWorld, colormap = cm, filledContour = TRUE, gridder = g)  mapGrid(15, 15, polarCircle = 1, col = gray(0.2)) mapPolygon(coastlineWorld[[\"longitude\"]],     coastlineWorld[[\"latitude\"]],     col = \"tan\" )"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapImage.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add an Image to a Map — mapImage","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapLines.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Lines to a Map — mapLines","title":"Add Lines to a Map — mapLines","text":"Plot lines existing map, analogy lines().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapLines.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Lines to a Map — mapLines","text":"","code":"mapLines(longitude, latitude, greatCircle = FALSE, ...)"},{"path":"https://dankelley.github.io/oce/reference/mapLines.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Lines to a Map — mapLines","text":"longitude numeric vector longitudes points plotted, object longitude latitude can inferred (e.g. coastline file, return value mapLocator()), case following two arguments ignored. latitude vector latitudes points plotted. greatCircle logical value indicating whether render line segments great circles.  (Ignored.) ... optional arguments passed lines().","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapLines.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Lines to a Map — mapLines","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapLines.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Lines to a Map — mapLines","text":"","code":"# \\donttest{ if (utils::packageVersion(\"sf\") != \"0.9.8\") {     # sf version 0.9-8 has a problem with this projection     library(oce)     data(coastlineWorld)     mapPlot(coastlineWorld,         type = \"l\",         longitudelim = c(-80, 10), latitudelim = c(0, 120),         projection = \"+proj=ortho +lon_0=-40\"     )     lon <- c(-63.5744, 0.1062) # Halifax CA to London UK     lat <- c(44.6479, 51.5171)     mapPoints(lon, lat, col = \"red\")     mapLines(lon, lat, col = \"red\") }  # }"},{"path":"https://dankelley.github.io/oce/reference/mapLocator.html","id":null,"dir":"Reference","previous_headings":"","what":"Locate Points on a Map — mapLocator","title":"Locate Points on a Map — mapLocator","text":"Locate points existing map. uses map2lonlat() infer location geographical space, suffers limitations function.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapLocator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Locate Points on a Map — mapLocator","text":"","code":"mapLocator(n = 512, type = \"n\", ...)"},{"path":"https://dankelley.github.io/oce/reference/mapLocator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Locate Points on a Map — mapLocator","text":"n number points locate; see locator(). type type connector points; see locator(). ... extra arguments passed locator() (either mapPoints() mapLines(), appropriate) type 'n'.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapLocator.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Locate Points on a Map — mapLocator","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapLongitudeLatitudeXY.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert From Longitude and Latitude to X and Y — mapLongitudeLatitudeXY","title":"Convert From Longitude and Latitude to X and Y — mapLongitudeLatitudeXY","text":"Find (x, y) values corresponding (longitude, latitude) values, using present projection. mainly wrapper around lonlat2map().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapLongitudeLatitudeXY.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert From Longitude and Latitude to X and Y — mapLongitudeLatitudeXY","text":"","code":"mapLongitudeLatitudeXY(longitude, latitude)"},{"path":"https://dankelley.github.io/oce/reference/mapLongitudeLatitudeXY.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert From Longitude and Latitude to X and Y — mapLongitudeLatitudeXY","text":"longitude numeric vector longitudes points, object latitude longitude can inferred (e.g. coastline file, return value mapLocator()), case following two arguments ignored. latitude numeric vector latitudes points, needed inferred first argument.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapLongitudeLatitudeXY.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert From Longitude and Latitude to X and Y — mapLongitudeLatitudeXY","text":"list containing x y.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapLongitudeLatitudeXY.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert From Longitude and Latitude to X and Y — mapLongitudeLatitudeXY","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapLongitudeLatitudeXY.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert From Longitude and Latitude to X and Y — mapLongitudeLatitudeXY","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) par(mfrow = c(2, 1), mar = rep(2, 4)) mapPlot(coastlineWorld, projection = \"+proj=moll\") # sets a projection xy <- mapLongitudeLatitudeXY(coastlineWorld) plot(xy, type = \"l\", asp = 1)  # }"},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw a Map — mapPlot","title":"Draw a Map — mapPlot","text":"Plot coordinates map, using one subset projections provided sf package.  projection information specified mapPlot() call stored global variable can retrieved related functions, making easy add points, lines, text, images contours existing map. “Details” section, , provides list available projections. \"Using map projections\" vignette offers examples several map plots, addition single example provided “Examples” section.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw a Map — mapPlot","text":"","code":"mapPlot(   longitude,   latitude,   longitudelim,   latitudelim,   grid = TRUE,   geographical = 0,   bg,   fill,   border = NULL,   col = NULL,   clip = TRUE,   type = \"polygon\",   axes = TRUE,   axisStyle = 1,   cex,   cex.axis = 1,   mgp = c(0, 0.5, 0),   las = c(0, 0),   drawBox = TRUE,   showHemi = TRUE,   polarCircle = 0,   lonlabels = TRUE,   latlabels = TRUE,   projection = \"+proj=moll\",   tissot = FALSE,   trim = TRUE,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw a Map — mapPlot","text":"longitude either numeric vector longitudes points plotted, something (oce object, list, data frame) longitude latitude may inferred (case latitude argument ignored).  longitude missing, latitude taken built-coastlineWorld dataset. latitude numeric vector latitudes points plotted (ignored first argument contains latitude longitude). longitudelim, latitudelim optional numeric vectors length two, indicating limits plot. warning issued specified together. See “Examples” polar-region example, noting whole-globe span longitudelim used centre plot north pole. grid either number (pair numbers) indicating spacing longitude latitude lines, degrees, logical value (pair values) indicating whether draw auto-scaled grid, whether skip grid drawing.  case numerical values, NA can used turn grid longitude latitude.  Grids set based examination scale used middle 10 percent plot area, projections works quite well.  , one may set grid=FALSE add grid later mapGrid(). geographical flag indicating style axes.  geographical=0, axes conventional, decimal degrees unit, negative signs indicating southern western hemispheres.  geographical=1, signs dropped, axis values decreasing order within southern western hemispheres.  geographical=2, signs dropped axes labelled degrees, minutes seconds, appropriate, hemispheres indicated letters. geographical=3, things geographical=2, hemisphere indication omitted. Finally, geographical=4, unsigned numbers used, followed letters N northern hemisphere, S southern, E eastern, W western. bg color background (ignored). fill deprecated argument; see oce-deprecated. border color coastlines international borders (ignored unless type=\"polygon\". col either color filling polygons (type=\"polygon\") color points line segments (type=\"p\", type=\"l\", type=\"o\"). col=NULL default set: coastline filling type=\"polygon\" case, black coastlines, type=\"p\", type=\"l\", type=\"o\". clip logical value indicating whether trim coastline elements lie wholly outside plot region. can prevent e.g. problem filling whole plot area Arctic stereopolar view, projected trace Antarctica lies outside regions whole world ends \"land\".  Setting clip=FALSE disables action, may benefit rare instances line connecting two points coastline may cross plot domain, even points outside domain. type indication type; may \"polygon\", filled polygon, \"p\" points, \"l\" line segments, \"o\" points overlain line segments. axes logical value indicating whether draw longitude latitude values lower left margin, respectively. may work well projections scales.  See also axisStyle, lonlabels latlabels, offer granular control labelling. axisStyle integer specifying style labels numbers axes.  choices : 1 signed numbers without additional labels; 2 (default) unsigned numbers followed letters indicating hemisphere; 3 signed numbers followed degree sign; 4 unsigned numbers followed degree sign; 5 signed numbers followed degree sign letters indicating hemisphere. cex character expansion factor plot symbols, used type=\"p\" value yields symbols. cex.axis axis-label expansion factor (see par()). mgp three-element numerical vector describing axis-label placement, passed mapAxis(). las two-element axis label orientation, passed axis(). first value horizontal axis, second vertical axis. See par() meanings permitted values, namely 0, 1, 2 3. drawBox logical value indicating whether draw box around plot. helpful many projections sub-global scale. showHemi logical value indicating whether show hemisphere axis tick labels. polarCircle number indicating number degrees latitude extending poles, within zones drawn. lonlabels optional logical value numeric vector controls labelling along horizontal axis. four possibilities: (1) lonlabels TRUE (default), reasonable values inferred axes drawn ticks labels alongside ticks; (2) lonlabels FALSE, ticks drawn, labels; (3) lonlabels NULL, axis ticks labels drawn; (4) lonlabels  vector finite numerical values, tick marks placed  longitudes, labels put alongside . Note R tries avoid overwriting labels axes, instructions case 4 might obeyed exactly. See also latlabels, note setting axes=FALSE ensures longitude latitude axes drawn regardless values lonlabels latlabels. latlabels lonlabels, latitude, left plot axis. projection either character value indicating map projection, output sf::st_crs(). first case, see table “Details” projections available. second case, note mapPlot() reports error similar function old sp package used. tissot logical value indicating whether use mapTissot() plot Tissot indicatrices, .e. ellipses grid intersection points, indicate map distortion. trim logical value indicating whether trim islands lakes containing points -scale current plot box.  solves problem Antarctica overfilling entire domain, Arctic-centred stereographic projection.  perfect solution, though, line segment joining two -scale points might intersect plotting box. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional arguments passed plotting functions.  can useful many ways, e.g.  Example 5 shows use xlim etc reproduce scale exactly two plots.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Draw a Map — mapPlot","text":"calculations map projections done sf package.  Importantly, though, sf projections available oce, reasons relating limitations sf, example relating inverse-projection calculations. oce choices tabulated , e.g. projection=\"+proj=aea\" selects Albers equal area projection. (See also warning, , problem sf version 0.9-8.) details vast array map projections given reference 4.  system rapid development since 2018, reference 5 provides helpful overview changes reasons necessary. Practical examples map projections oce provided reference 6, along notes problems. fascinating treatment history map projections provided reference 7.  get idea projections created nowadays, see reference 8, eqearth projection added oce August 2020.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"available-projections","dir":"Reference","previous_headings":"","what":"Available Projections","title":"Draw a Map — mapPlot","text":"following table lists projections available oce, generated reformatting subset output unix command proj -lP. arguments default values, many projections also optional arguments.  Although e.g. proj -l=aea provides little information particular projections, users consult reference 4 fuller details illustrations.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"choosing-a-projection","dir":"Reference","previous_headings":"","what":"Choosing a projection","title":"Draw a Map — mapPlot","text":"best choice projection depends application. Users may find projection=\"+proj=moll\" useful world-wide plots, ortho hemispheres viewed equator, stere polar views, lcc wide meridional ranges mid latitudes, merc limited-area cases angle preservation important, either aea eqearth (local global scales, respectively) area preservation important. choice becomes important, larger size region represented.  comes publication, can sensible use projection used previous reports.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"problems","dir":"Reference","previous_headings":"","what":"Problems","title":"Draw a Map — mapPlot","text":"Map projection complicated matter addressed limited pragmatic way.  example, mapPlot tries draw axes along box containing map, instead trying find spots along “edge” map put longitude latitude labels. design choice greatly simplifies coding effort, freeing time work issues regarded pressing.  Chief among issues () occurrence horizontal lines maps prime meridians (b) inaccurate filling land regions () occur shifted meridians (c) inaccurate filling Antarctica projections. Generally, issues tackled first commonly used projections, used examples.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"historical-notes","dir":"Reference","previous_headings":"","what":"Historical Notes","title":"Draw a Map — mapPlot","text":"2020-12-24: complete switch rgdal sf, removing testing scheme created 2020-08-03. 2020-08-03: added support eqearth projection (like robin equal-area method). 2020-08-03: dropped support healpix, pconic rhealpix projections, caused errors sf package.  (practical loss, since interrupted projections handled badly mapPlot() case.) 2020-08-03: switch rgdal sf calculations related map projection, owing changes former package broke oce code.  (catch problems, oce set use packages temporarily, issuing warnings results differed 1 metre easting northing values.) 2017-11-19: imw_p removed, problems inverse calculations. also problem standalone PROJ.4 application version 4.9.3, downloaded built OSX. See https://github.com/dankelley/oce/issues/1319 details. 2017-11-17: lsat removed, work rgdal latest standalone PROJ.4 application. also problem standalone PROJ.4 application version 4.9.3, downloaded built OSX. See https://github.com/dankelley/oce/issues/1337 details. 2017-09-30: lcca removed, inverse wildly inaccurate Pacific Antarctic-Alaska application (see https://github.com/dankelley/oce/issues/1303).","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Draw a Map — mapPlot","text":"","code":"# Example 1. # Mollweide (referenc 1 page 54) is an equal-area projection that works well # for whole-globe views. mapPlot(coastlineWorld, projection=\"+proj=moll\", col=\"gray\") mtext(\"Mollweide\", adj=1)  # Example 2. # Note that filling is not employed (`col` is not # given) when the prime meridian is shifted, because # this causes a problem with Antarctica cl180 <- coastlineCut(coastlineWorld, lon_0=-180) mapPlot(cl180, projection=\"+proj=moll +lon_0=-180\") mtext(\"Mollweide with coastlineCut\", adj=1)  # Example 3. # Orthographic projections resemble a globe, making them attractive for # non-technical use, but they are neither conformal nor equal-area, so they # are somewhat limited for serious use on large scales.  See Section 20 of # reference 1. Note that filling is not employed because it causes a problem with # Antarctica. if (utils::packageVersion(\"sf\") != \"0.9.8\") {     # sf version 0.9-8 has a problem with this projection     par(mar=c(3, 3, 1, 1))     mapPlot(coastlineWorld, projection=\"+proj=ortho +lon_0=-180\")     mtext(\"Orthographic\", adj=1) }  # Example 4. # The Lambert conformal conic projection is an equal-area projection # recommended by reference 1, page 95, for regions of large east-west extent # away from the equator, here illustrated for the USA and Canada. par(mar=c(3, 3, 1, 1)) mapPlot(coastlineCut(coastlineWorld, -100),     longitudelim=c(-130,-55), latitudelim=c(35, 60),     projection=\"+proj=lcc +lat_0=30 +lat_1=60 +lon_0=-100\", col=\"gray\") mtext(\"Lambert conformal\", adj=1)  # Example 5. # The stereographic projection (reference 1, page 120) in the standard # form used NSIDC (National Snow and Ice Data Center) for the Arctic. # (See \"A Guide to NSIDC's Polar Stereographic Projection\" at # https://nsidc.org/data/user-resources/help-center.) # Note how the latitude limit extends 20 degrees past the pole, # symmetrically. par(mar=c(3, 3, 1, 1)) mapPlot(coastlineWorld,     longitudelim=c(-180, 180), latitudelim=c(70, 110),     projection=sf::st_crs(\"EPSG:3413\"), col=\"gray\") mtext(\"Stereographic\", adj=1)  # Example 6. # Spinning globe: create PNG files that can be assembled into a movie if (utils::packageVersion(\"sf\") != \"0.9.8\") {     # sf version 0.9-8 has a problem with this projection     png(\"globe-     lons <- seq(360, 0, -15)     par(mar=rep(0, 4))     for (i in seq_along(lons)) {         p <- paste(\"+proj=ortho +lat_0=30 +lon_0=\", lons[i], sep=\"\")         if (i == 1) {             mapPlot(coastlineCut(coastlineWorld, lons[i]), projection=p, col=\"gray\")             xlim <- par(\"usr\")[1:2]             ylim <- par(\"usr\")[3:4]         } else {             mapPlot(coastlineCut(coastlineWorld, lons[i]), projection=p, col=\"gray\",                     xlim=xlim, ylim=ylim, xaxs=\"i\", yaxs=\"i\")         }     }     dev.off() }"},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Draw a Map — mapPlot","text":"Snyder, John P., 1987.  Map Projections: Working Manual.  USGS Professional Paper: 1395 https://pubs.er.usgs.gov/publication/pp1395 Natural Resources Canada https://www.nrcan.gc.ca/earth-sciences/geography/topographic-information/maps/9805 \"List Map Projections.\" Wikipedia, January 26, 2021. https://en.wikipedia.org/w/index.php?title=List_of_map_projections. PROJ contributors (2020). \"PROJ Coordinate Transformation Software Library.\" Open Source Geospatial Foundation, n.d. https://proj.org. Bivand, Roger (2020) CRS, projections transformations changed? gallery map plots provided https://dankelley.github.io/r/2020/08/02/oce-proj.html Snyder, John Parr. Flattening Earth: Two Thousand Years Map Projections. Chicago, IL: University Chicago Press, 1993. https://press.uchicago.edu/ucp/books/book/chicago/F/bo3632853.html Šavrič, Bojan, Tom Patterson, Bernhard Jenny. \"Equal Earth Map Projection.\" International Journal Geographical Information Science 33, . 3 (March 4, 2019): 454-65. doi:10.1080/13658816.2018.1504949","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Draw a Map — mapPlot","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPlot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw a Map — mapPlot","text":"","code":"# NOTE: the map-projection vignette has many more examples. library(oce) data(coastlineWorld) # Demonstrate a high-latitude view using a built-in \"CRS\" value that is used # by the National Snow and Ice Data Center (NSIDC) for representing # the northern-hemisphere ice zone.  The view is meant to mimic the figure # at the top of the document entitled \"A Guide to NSIDC's Polar Stereographic # Projection\" at https://nsidc.org/data/user-resources/help-center, with the # box indicating the region of the NSIDC grid. projection <- sf::st_crs(\"EPSG:3413\") cat(projection$proj4string, \"\\n\") # see the projection details #> +proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  par(mar = c(2, 2, 1, 1)) # tighten margins mapPlot(coastlineWorld,     projection = projection,     col = gray(0.9), geographical = 4,     longitudelim = c(-180, 180), latitudelim = c(10, 90) ) # Coordinates of box from Table 6 of the NSIDC document box <- cbind(     -360 + c(168.35, 102.34, 350.3, 279.26, 168.35),     c(30.98, 31.37, 34.35, 33.92, 30.98) ) mapLines(box[, 1], box[, 2], lwd = 2)"},{"path":"https://dankelley.github.io/oce/reference/mapPoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Points to a Map — mapPoints","title":"Add Points to a Map — mapPoints","text":"Plot points existing map, analogy points().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Points to a Map — mapPoints","text":"","code":"mapPoints(longitude, latitude, debug = getOption(\"oceDebug\"), ...)"},{"path":"https://dankelley.github.io/oce/reference/mapPoints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Points to a Map — mapPoints","text":"longitude Longitudes points plotted, object longitude latitude can inferred case following two arguments ignored.  objects possible include type coastline. latitude numeric vector latitudes points plotted. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... Optional arguments passed points().","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapPoints.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Points to a Map — mapPoints","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPoints.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Points to a Map — mapPoints","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) mapPlot(coastlineWorld,     longitudelim = c(-80, 0), latitudelim = c(20, 50),     col = \"lightgray\", projection = \"+proj=laea +lon_0=-35\" ) data(section) mapPoints(section)  # }"},{"path":"https://dankelley.github.io/oce/reference/mapPolygon.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a Polygon to a Map — mapPolygon","title":"Add a Polygon to a Map — mapPolygon","text":"mapPolygon adds polygon existing map.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPolygon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a Polygon to a Map — mapPolygon","text":"","code":"mapPolygon(   longitude,   latitude,   density = NULL,   angle = 45,   border = NULL,   col = NA,   lty = par(\"lty\"),   ...,   fillOddEven = FALSE )"},{"path":"https://dankelley.github.io/oce/reference/mapPolygon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a Polygon to a Map — mapPolygon","text":"longitude numeric vector longitudes points defining polygon, plotted, object longitude latitude can inferred (e.g. coastline file, return value mapLocator()), case latitude argument ignored. latitude numeric vector latitudes points plotted (ignored longitude latitude can determined first argument). density, angle, border, col, lty, ..., fillOddEven handled polygon() handles arguments.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapPolygon.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add a Polygon to a Map — mapPolygon","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapPolygon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a Polygon to a Map — mapPolygon","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) data(topoWorld)  # Bathymetry near southeastern Canada par(mfrow = c(1, 1), mar = c(2, 2, 1, 1)) cm <- colormap(zlim = c(-5000, 0), col = oceColorsGebco) drawPalette(colormap = cm) lonlim <- c(-60, -50) latlim <- c(40, 60) mapPlot(coastlineWorld,     longitudelim = lonlim,     latitudelim = latlim, projection = \"+proj=merc\", grid = FALSE ) mapImage(topoWorld, colormap = cm) mapPolygon(coastlineWorld[[\"longitude\"]], coastlineWorld[[\"latitude\"]], col = \"lightgray\")  # }"},{"path":"https://dankelley.github.io/oce/reference/mapScalebar.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a Scalebar to a Map — mapScalebar","title":"Add a Scalebar to a Map — mapScalebar","text":"Draw scalebar map created mapPlot() otherwise.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapScalebar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a Scalebar to a Map — mapScalebar","text":"","code":"mapScalebar(   x,   y = NULL,   length,   lwd = 1.5 * par(\"lwd\"),   cex = par(\"cex\"),   col = \"black\" )"},{"path":"https://dankelley.github.io/oce/reference/mapScalebar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a Scalebar to a Map — mapScalebar","text":"x, y position scalebar.  Eventually may similar corresponding arguments legend(), moment y must NULL x must \"topleft\" \"topright\". length distance indicate, kilometres.  provided, reasonable choice made, based existing plot. lwd line width scalebar. cex character expansion factor scalebar text. col color scalebar.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapScalebar.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add a Scalebar to a Map — mapScalebar","text":"scale appropriate centre plot, become increasingly inaccurate away spot, error depending projection fraction earth shown. December 2020, required map drawn mapPlot(), now can diagram showing longitude latitude degrees.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapScalebar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add a Scalebar to a Map — mapScalebar","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapScalebar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a Scalebar to a Map — mapScalebar","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) # Arctic Ocean par(mar = c(2.5, 2.5, 1, 1)) mapPlot(coastlineWorld,     latitudelim = c(60, 120), longitudelim = c(-130, -50),     col = \"lightgray\", projection = \"+proj=stere +lat_0=90\" ) mapScalebar()  # }"},{"path":"https://dankelley.github.io/oce/reference/mapText.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Text to a Map — mapText","title":"Add Text to a Map — mapText","text":"Plot text existing map, analogy text().","code":""},{"path":"https://dankelley.github.io/oce/reference/mapText.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Text to a Map — mapText","text":"","code":"mapText(longitude, latitude, labels, ...)"},{"path":"https://dankelley.github.io/oce/reference/mapText.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Text to a Map — mapText","text":"longitude numeric vector longitudes text plotted. latitude numeric vector latitudes text plotted. labels vector labels text plotted. ... optional arguments passed text(), e.g. adj, pos, etc.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapText.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Text to a Map — mapText","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapText.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Text to a Map — mapText","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) longitude <- coastlineWorld[[\"longitude\"]] latitude <- coastlineWorld[[\"latitude\"]] mapPlot(longitude, latitude,     type = \"l\", grid = 5,     longitudelim = c(-70, -50), latitudelim = c(45, 50),     projection = \"+proj=merc\" ) lon <- -63.5744 # Halifax lat <- 44.6479 mapPoints(lon, lat, pch = 20, col = \"red\") mapText(lon, lat, \"Halifax\", col = \"red\", pos = 1, offset = 1)  # }"},{"path":"https://dankelley.github.io/oce/reference/mapTissot.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Tissot Indicatrices to a Map — mapTissot","title":"Add Tissot Indicatrices to a Map — mapTissot","text":"Plot ellipses grid intersection points, method indicating distortion inherent projection, somewhat analogous scheme used reference 1. (ellipse drawn 64 segments.)","code":""},{"path":"https://dankelley.github.io/oce/reference/mapTissot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Tissot Indicatrices to a Map — mapTissot","text":"","code":"mapTissot(grid = rep(15, 2), scale = 0.2, crosshairs = FALSE, ...)"},{"path":"https://dankelley.github.io/oce/reference/mapTissot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Tissot Indicatrices to a Map — mapTissot","text":"grid numeric vector length 2, specifying increment longitude latitude grid. Indicatrices drawn e.g. longitudes seq(-180, 180, grid[1]). scale numerical scale factor ellipses. multiplied min(grid) result radius circle earth, latitude degrees. crosshairs logical value indicating whether draw constant-latitude constant-longitude crosshairs within ellipses.  (drawn 10 line segments .) can helpful cases desired use mapGrid() draw longitude/latitude grid. ... extra arguments passed plotting functions, e.g. col=\"red\" yields red indicatrices.","code":""},{"path":"https://dankelley.github.io/oce/reference/mapTissot.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Add Tissot Indicatrices to a Map — mapTissot","text":"Snyder, John P., 1987.  Map Projections: Working Manual.  USGS Professional Paper: 1395","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/mapTissot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Tissot Indicatrices to a Map — mapTissot","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/mapTissot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Tissot Indicatrices to a Map — mapTissot","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) par(mfrow = c(1, 1), mar = c(2, 2, 1, 1)) p <- \"+proj=aea +lat_1=10 +lat_2=60 +lon_0=-45\" mapPlot(coastlineWorld,     projection = p, col = \"gray\",     longitudelim = c(-90, 0), latitudelim = c(0, 50) ) mapTissot(c(15, 15), col = \"red\")  # }"},{"path":"https://dankelley.github.io/oce/reference/matchBytes.html","id":null,"dir":"Reference","previous_headings":"","what":"Locate Byte Sequences in a Raw Vector — matchBytes","title":"Locate Byte Sequences in a Raw Vector — matchBytes","text":"Find spots raw vector match given byte sequence.","code":""},{"path":"https://dankelley.github.io/oce/reference/matchBytes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Locate Byte Sequences in a Raw Vector — matchBytes","text":"","code":"matchBytes(input, b1, ...)"},{"path":"https://dankelley.github.io/oce/reference/matchBytes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Locate Byte Sequences in a Raw Vector — matchBytes","text":"input vector raw (byte) values. b1 vector bytes match (must length 2 3 present; 1-byte, use ()). ... additional bytes match (2 permitted)","code":""},{"path":"https://dankelley.github.io/oce/reference/matchBytes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Locate Byte Sequences in a Raw Vector — matchBytes","text":"matchBytes returns double vector indices input match start bytes sequence.  (double vector returned instead integer vector, avoid problems large files.)","code":""},{"path":"https://dankelley.github.io/oce/reference/matchBytes.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Locate Byte Sequences in a Raw Vector — matchBytes","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/matchBytes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Locate Byte Sequences in a Raw Vector — matchBytes","text":"","code":"buf <- as.raw(c(0xa5, 0x11, 0xaa, 0xa5, 0x11, 0x00)) print(buf) #> [1] a5 11 aa a5 11 00 print(matchBytes(buf, 0xa5, 0x11)) #> [1] 1 4"},{"path":"https://dankelley.github.io/oce/reference/matrixShiftLongitude.html","id":null,"dir":"Reference","previous_headings":"","what":"Rearrange Areal Matrix so Greenwich is Near the Centre — matrixShiftLongitude","title":"Rearrange Areal Matrix so Greenwich is Near the Centre — matrixShiftLongitude","text":"Sometimes datasets provided matrix form, first index corresponding longitudes ranging 0 360. matrixShiftLongitude cuts matrices longitude=180, swaps pieces dateline left matrix, middle.","code":""},{"path":"https://dankelley.github.io/oce/reference/matrixShiftLongitude.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rearrange Areal Matrix so Greenwich is Near the Centre — matrixShiftLongitude","text":"","code":"matrixShiftLongitude(m, longitude)"},{"path":"https://dankelley.github.io/oce/reference/matrixShiftLongitude.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rearrange Areal Matrix so Greenwich is Near the Centre — matrixShiftLongitude","text":"m matrix modified. longitude vector containing longitude 0-360 convention. missing, constructed range 0 360, many elements first index m.","code":""},{"path":"https://dankelley.github.io/oce/reference/matrixShiftLongitude.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rearrange Areal Matrix so Greenwich is Near the Centre — matrixShiftLongitude","text":"list containing m longitude, rearranged appropriate.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/matrixSmooth.html","id":null,"dir":"Reference","previous_headings":"","what":"Smooth a Matrix — matrixSmooth","title":"Smooth a Matrix — matrixSmooth","text":"values edge matrix unaltered.  interior points, result defined terms terms original follows. \\(r_{,j} = (2 m_{,j} + m_{-1,j} + m_{+1,j} + m_{,j-1} + m_{,j+1})/6\\).  Note missing values propagate neighbours.","code":""},{"path":"https://dankelley.github.io/oce/reference/matrixSmooth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Smooth a Matrix — matrixSmooth","text":"","code":"matrixSmooth(m, passes = 1)"},{"path":"https://dankelley.github.io/oce/reference/matrixSmooth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Smooth a Matrix — matrixSmooth","text":"m matrix smoothed. passes integer specifying number times smoothing applied.","code":""},{"path":"https://dankelley.github.io/oce/reference/matrixSmooth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Smooth a Matrix — matrixSmooth","text":"smoothed matrix.","code":""},{"path":"https://dankelley.github.io/oce/reference/matrixSmooth.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Smooth a Matrix — matrixSmooth","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/matrixSmooth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Smooth a Matrix — matrixSmooth","text":"","code":"library(oce) opar <- par(no.readonly = TRUE) m <- matrix(rep(seq(0, 1, length.out = 5), 5), nrow = 5, byrow = TRUE) m[3, 3] <- 2 m1 <- matrixSmooth(m) m2 <- matrixSmooth(m1) m3 <- matrixSmooth(m2) par(mfrow = c(2, 2)) image(m, col = rainbow(100), zlim = c(0, 4), main = \"original image\") image(m1, col = rainbow(100), zlim = c(0, 4), main = \"smoothed 1 time\") image(m2, col = rainbow(100), zlim = c(0, 4), main = \"smoothed 2 times\") image(m3, col = rainbow(100), zlim = c(0, 4), main = \"smoothed 3 times\")  par(opar)"},{"path":"https://dankelley.github.io/oce/reference/met-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Meteorological Data — met-class","title":"Class to Store Meteorological Data — met-class","text":"class stores meteorological data. objects created read.met(), data slot contain columns within original file (guesses units) addition several calculated quantities u v, velocities m/s (km/h stored typical data files), obey oceanographic convention u>0 wind towards east.","code":""},{"path":"https://dankelley.github.io/oce/reference/met-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Meteorological Data — met-class","text":"data oce objects, data slot met objects list containing main data object. metadata oce objects, metadata slot met objects list containing information data object . processingLog oce objects, processingLog slot met objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/met-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Meteorological Data — met-class","text":"Although [[<- operator may permit modification contents met objects (see [[<-,met-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/met-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Meteorological Data — met-class","text":"full contents data metadata slots met object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,met-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,met-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/met-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Meteorological Data — met-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/met.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample met Data — met","title":"Sample met Data — met","text":"sample met object containing data Halifax, Nova Scotia, September 2003 (period Hurricane Juan struck city).","code":""},{"path":"https://dankelley.github.io/oce/reference/met.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample met Data — met","text":"Environment Canada website October 19, 2019.","code":""},{"path":"https://dankelley.github.io/oce/reference/met.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample met Data — met","text":"data file downloaded   Note using download.met() avoids navigate awkward Environment Canada website, imposes burden know station ID number.  data -hand, object created (timezone adjusted)   Historical note. data(met) object changed October 19, 2019, based data provided Environment Canada time. previous version data(met), created 2017, based data format Environment Canada longer provided 2019.  See notes type argument read.met() shift Environment Canada data format.","code":"metFile <- download.met(id=6358, year=2003, month=9, destdir=\".\", type=\"xml\") met <- read.met(metFile) met <- oceSetData(met, \"time\", met[[\"time\"]]+4*3600,                  note=\"add 4h to local time to get UTC time\")"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/metNames2oceNames.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert met Data Name to oce Name — metNames2oceNames","title":"Convert met Data Name to oce Name — metNames2oceNames","text":"Interoperability oce functions requires standardized data names used, e.g. \"temperature\" -situ temperature. data-file headers name temperature column exactly way, however, function provided try guess names. task complicated fact Environment Canada seems change names columns, e.g. sometimes symbol used degree sign, times .","code":""},{"path":"https://dankelley.github.io/oce/reference/metNames2oceNames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert met Data Name to oce Name — metNames2oceNames","text":"","code":"metNames2oceNames(names, scheme)"},{"path":"https://dankelley.github.io/oce/reference/metNames2oceNames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert met Data Name to oce Name — metNames2oceNames","text":"names vector character strings original names scheme optional indication scheme employed. may \"ODF\", case ODFNames2oceNames() used, \"met\", case tentative code met files used.","code":""},{"path":"https://dankelley.github.io/oce/reference/metNames2oceNames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert met Data Name to oce Name — metNames2oceNames","text":"Vector strings decoded names. unknown scheme provided, just names.","code":""},{"path":"https://dankelley.github.io/oce/reference/metNames2oceNames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert met Data Name to oce Name — metNames2oceNames","text":"Several quantities returned object differ values source file. example, speed converted km/h m/s, angles converted tens degrees degrees. Also, items created scratch, e.g. u v, eastward northward velocity, computed speed direction. (Note e.g. u positive wind blows east; data thus normal Physics convention.)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/metNames2oceNames.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert met Data Name to oce Name — metNames2oceNames","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/moonAngle.html","id":null,"dir":"Reference","previous_headings":"","what":"Lunar Angle as Function of Space and Time — moonAngle","title":"Lunar Angle as Function of Space and Time — moonAngle","text":"calculations based formulae provided Meeus (1982), primarily chapters 6, 18, 30.  first step compute sidereal time formulated Meeus (1982) chapter 7, turn uses Julian day computed according formulae Meeus (1982) chapter 3.  Using quantities, formulae Meeus (1982) chapter 30 used compute geocentric longitude (\\(lambda\\), Meeus notation), geocentric latitude (\\(beta\\)), parallax.  obliquity ecliptic computed Meeus (1982) equation 18.4.  Equatorial coordinates (right ascension declination) computed equations 8.3 8.4 Meeus (1982), using eclipticalToEquatorial().  hour angle (\\(H\\)) computed using unnumbered equation preceding Meeus's (1982) equation 8.1.  Finally, Meeus (1982) equations 8.5 8.6 used calculate local azimuth altitude moon, using equatorialToLocalHorizontal().","code":""},{"path":"https://dankelley.github.io/oce/reference/moonAngle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lunar Angle as Function of Space and Time — moonAngle","text":"","code":"moonAngle(t, longitude = 0, latitude = 0, useRefraction = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/moonAngle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Lunar Angle as Function of Space and Time — moonAngle","text":"t time, POSIXt object (converted timezone \"UTC\", already timezone), character numeric value corresponds time. longitude observer longitude degrees east latitude observer latitude degrees north useRefraction boolean, set TRUE apply correction atmospheric refraction.  (Ignored present.)","code":""},{"path":"https://dankelley.github.io/oce/reference/moonAngle.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Lunar Angle as Function of Space and Time — moonAngle","text":"list containing following. time azimuth moon azimuth, degrees eastward north, 0 360. Note: convention used Meeus, uses degrees westward South. , convention chosen closely match expectation oceanographers. altitude moon altitude, degrees -90 90. rightAscension ' degrees. declination degrees. lambda geocentric longitude, degrees. beta geocentric latitude, degrees. diameter lunar diameter, degrees. distance earth-moon distance, kilometers. illuminatedFraction fraction moon's visible disk illuminated. phase phase moon, defined equation 32.3 Meeus (1982). fractional part 0 new moon, 1/4 first quarter, 1/2 full moon, 3/4 last quarter.","code":""},{"path":"https://dankelley.github.io/oce/reference/moonAngle.html","id":"alternate-formulations","dir":"Reference","previous_headings":"","what":"Alternate formulations","title":"Lunar Angle as Function of Space and Time — moonAngle","text":"Formulae provide Meeus (1982) used calculations .  Meeus (1991) provides formulae similar, differ 5th 6th digits.  example, formula ephemeris time Meeus (1991) differs Meeus (1992) 5th digit, almost approximately 200 coefficients relevant formulae also differ 5th 6th digits.  Discussion changing formulations best left members astronomical community.  present purpose, may sufficient note moonAngle, based Meeus (1982), reproduces values provided example 45.Meeus (1991) 4 significant digits, e.g. angles matching 2 minutes arc.","code":""},{"path":"https://dankelley.github.io/oce/reference/moonAngle.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Lunar Angle as Function of Space and Time — moonAngle","text":"Meeus, Jean. Astronomical Formulas Calculators. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1982. Meeus, Jean. Astronomical Algorithms. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1991.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/moonAngle.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Lunar Angle as Function of Space and Time — moonAngle","text":"Dan Kelley, based formulae Meeus (1982).","code":""},{"path":"https://dankelley.github.io/oce/reference/moonAngle.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Lunar Angle as Function of Space and Time — moonAngle","text":"","code":"library(oce) par(mfrow = c(3, 2)) y <- 2012 m <- 4 days <- 1:3 # Halifax sunrise/sunset (see e.g. https://www.timeanddate.com/worldclock) rises <- ISOdatetime(y, m, days, c(13, 15, 16), c(55, 04, 16), 0, tz = \"UTC\") + 3 * 3600 # ADT sets <- ISOdatetime(y, m, days, c(3, 4, 4), c(42, 15, 45), 0, tz = \"UTC\") + 3 * 3600 azrises <- c(69, 75, 82) azsets <- c(293, 288, 281) latitude <- 44.65 longitude <- -63.6 for (i in 1:3) {     t <- ISOdatetime(y, m, days[i], 0, 0, 0, tz = \"UTC\") + seq(0, 24 * 3600, 3600 / 4)     ma <- moonAngle(t, longitude, latitude)     oce.plot.ts(t, ma$altitude, type = \"l\", mar = c(2, 3, 1, 1), cex = 1 / 2, ylab = \"Altitude\")     abline(h = 0)     points(rises[i], 0, col = \"red\", pch = 3, lwd = 2, cex = 1.5)     points(sets[i], 0, col = \"blue\", pch = 3, lwd = 2, cex = 1.5)     oce.plot.ts(t, ma$azimuth, type = \"l\", mar = c(2, 3, 1, 1), cex = 1 / 2, ylab = \"Azimuth\")     points(rises[i], -180 + azrises[i], col = \"red\", pch = 3, lwd = 2, cex = 1.5)     points(sets[i], -180 + azsets[i], col = \"blue\", pch = 3, lwd = 2, cex = 1.5) }"},{"path":"https://dankelley.github.io/oce/reference/netcdfTOC.html","id":null,"dir":"Reference","previous_headings":"","what":"Print an overview of the contents of a NetCDF file — netcdfTOC","title":"Print an overview of the contents of a NetCDF file — netcdfTOC","text":"prints overview variables NetCDF file, along time, longitude latitude, last three stored dimensions.","code":""},{"path":"https://dankelley.github.io/oce/reference/netcdfTOC.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print an overview of the contents of a NetCDF file — netcdfTOC","text":"","code":"netcdfTOC(file, level = 1L, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/netcdfTOC.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print an overview of the contents of a NetCDF file — netcdfTOC","text":"file character value naming NetCDF file. level integer indicating level overview.  level 1, default, list holding names variables dimensions printed (returned, silently).  level 2, information printed. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/netcdfTOC.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print an overview of the contents of a NetCDF file — netcdfTOC","text":"level 1, printed list variables dimensions returned (silently).  Otherwise, much printed, return value first case.","code":""},{"path":"https://dankelley.github.io/oce/reference/netcdfTOC.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Print an overview of the contents of a NetCDF file — netcdfTOC","text":"alternative examine printed running ncdf4::nc_open() given filename, output can bit confusing read, especially files voluminous global attributes.","code":""},{"path":"https://dankelley.github.io/oce/reference/netcdfTOC.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print an overview of the contents of a NetCDF file — netcdfTOC","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/netcdfTOC.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print an overview of the contents of a NetCDF file — netcdfTOC","text":"","code":"library(oce) # Saving to a temporary file for CRAN testing; in practice, # it's more likely that the user will retain this file, or already # have a target file on the local system. if (requireNamespace(\"ncdf4\") &&     requireNamespace(\"jsonlite\") &&     requireNamespace(\"curl\")) {     urlroot <- \"ftp://ftp.ifremer.fr/ifremer/argo/dac/bodc/6900388/profiles/\"     remotefile <- \"D6900388_001.nc\"     localfile <- tempfile(fileext = \".nc\")     curl::curl_download(paste0(urlroot, remotefile), localfile)     netcdfTOC(localfile)     unlink(localfile) } #> Loading required namespace: ncdf4 #> $variables #>  [1] \"DATA_TYPE\"                    \"FORMAT_VERSION\"               #>  [3] \"HANDBOOK_VERSION\"             \"REFERENCE_DATE_TIME\"          #>  [5] \"DATE_CREATION\"                \"DATE_UPDATE\"                  #>  [7] \"PLATFORM_NUMBER\"              \"PROJECT_NAME\"                 #>  [9] \"PI_NAME\"                      \"STATION_PARAMETERS\"           #> [11] \"CYCLE_NUMBER\"                 \"DIRECTION\"                    #> [13] \"DATA_CENTRE\"                  \"DC_REFERENCE\"                 #> [15] \"DATA_STATE_INDICATOR\"         \"DATA_MODE\"                    #> [17] \"INST_REFERENCE\"               \"WMO_INST_TYPE\"                #> [19] \"JULD\"                         \"JULD_QC\"                      #> [21] \"JULD_LOCATION\"                \"LATITUDE\"                     #> [23] \"LONGITUDE\"                    \"POSITION_QC\"                  #> [25] \"POSITIONING_SYSTEM\"           \"PROFILE_PRES_QC\"              #> [27] \"PRES\"                         \"PRES_QC\"                      #> [29] \"PRES_ADJUSTED\"                \"PRES_ADJUSTED_QC\"             #> [31] \"PRES_ADJUSTED_ERROR\"          \"PROFILE_PSAL_QC\"              #> [33] \"PSAL\"                         \"PSAL_QC\"                      #> [35] \"PSAL_ADJUSTED\"                \"PSAL_ADJUSTED_QC\"             #> [37] \"PSAL_ADJUSTED_ERROR\"          \"PROFILE_TEMP_QC\"              #> [39] \"TEMP\"                         \"TEMP_QC\"                      #> [41] \"TEMP_ADJUSTED\"                \"TEMP_ADJUSTED_QC\"             #> [43] \"TEMP_ADJUSTED_ERROR\"          \"PARAMETER\"                    #> [45] \"SCIENTIFIC_CALIB_EQUATION\"    \"SCIENTIFIC_CALIB_COEFFICIENT\" #> [47] \"SCIENTIFIC_CALIB_COMMENT\"     \"CALIBRATION_DATE\"             #> [49] \"HISTORY_INSTITUTION\"          \"HISTORY_STEP\"                 #> [51] \"HISTORY_SOFTWARE\"             \"HISTORY_SOFTWARE_RELEASE\"     #> [53] \"HISTORY_REFERENCE\"            \"HISTORY_DATE\"                 #> [55] \"HISTORY_ACTION\"               \"HISTORY_PARAMETER\"            #> [57] \"HISTORY_START_PRES\"           \"HISTORY_STOP_PRES\"            #> [59] \"HISTORY_PREVIOUS_VALUE\"       \"HISTORY_QCTEST\"               #>  #> $dimensions #>  [1] \"DATE_TIME\" \"STRING256\" \"STRING64\"  \"STRING32\"  \"STRING16\"  \"STRING8\"   #>  [7] \"STRING4\"   \"STRING2\"   \"N_PROF\"    \"N_PARAM\"   \"N_LEVELS\"  \"N_CALIB\"   #> [13] \"N_HISTORY\" #>"},{"path":"https://dankelley.github.io/oce/reference/numberAsHMS.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a Numeric Time to Hour, Minute, and Second — numberAsHMS","title":"Convert a Numeric Time to Hour, Minute, and Second — numberAsHMS","text":"Convert Numeric Time Hour, Minute, Second","code":""},{"path":"https://dankelley.github.io/oce/reference/numberAsHMS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a Numeric Time to Hour, Minute, and Second — numberAsHMS","text":"","code":"numberAsHMS(t, default = 0)"},{"path":"https://dankelley.github.io/oce/reference/numberAsHMS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a Numeric Time to Hour, Minute, and Second — numberAsHMS","text":"t vector factors character strings, format 1200 12:00, 0900 09:00, etc. default value used returned hour, minute second something wrong input value (e.g. length exceeds 4 characters, contains non-numeric characters)","code":""},{"path":"https://dankelley.github.io/oce/reference/numberAsHMS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a Numeric Time to Hour, Minute, and Second — numberAsHMS","text":"list containing hour, minute, second, last always zero.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/numberAsHMS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert a Numeric Time to Hour, Minute, and Second — numberAsHMS","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/numberAsHMS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a Numeric Time to Hour, Minute, and Second — numberAsHMS","text":"","code":"t <- c(\"0900\", \"1234\") numberAsHMS(t) #> $hour #> [1]  9 12 #>  #> $minute #> [1]  0 34 #>  #> $second #> [1] 0 0 #>"},{"path":"https://dankelley.github.io/oce/reference/numberAsPOSIXct.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a Numeric Time to a POSIXct Time — numberAsPOSIXct","title":"Convert a Numeric Time to a POSIXct Time — numberAsPOSIXct","text":"converts numerical values POSIXct times.  many schemes , type parameter used select .  See “Details” listing, broken scheme.","code":""},{"path":"https://dankelley.github.io/oce/reference/numberAsPOSIXct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a Numeric Time to a POSIXct Time — numberAsPOSIXct","text":"","code":"numberAsPOSIXct(t, type = \"unix\", tz = \"UTC\", leap = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/numberAsPOSIXct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a Numeric Time to a POSIXct Time — numberAsPOSIXct","text":"t integer corresponding time, way depends type. type character value indicating time type.  permitted values \"argo\", \"epic\", \"excel\", \"gps\", \"matlab\", \"ncep1\", \"ncep2\", \"sas\", \"spss\", \"unix\", \"yearday\", first default. tz string indicating time zone, default \"UTC\". leap logical value, TRUE default, applies type \"gps\".  leap TRUE, built-dataset named .leap.seconds consulted find number leap seconds 1980 (GPS program started) time computed parameters, return value decreased accordingly (see Example 3).","code":""},{"path":"https://dankelley.github.io/oce/reference/numberAsPOSIXct.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a Numeric Time to a POSIXct Time — numberAsPOSIXct","text":"POSIXct() time vector.","code":""},{"path":"https://dankelley.github.io/oce/reference/numberAsPOSIXct.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert a Numeric Time to a POSIXct Time — numberAsPOSIXct","text":"possible choices type listed . \"unix\" handles Unix times, measured seconds since start year 1970. \"matlab\" handles Matlab times, measured days since MathWorks (reference 1) calls “January 0, 0000” (.e.  ISOdatetime(0, 1, 1, 0, 0, 0) R notation). \"gps\" handles Global Positioning System convention. scheme complicated, owing hardware limitations GPS satellites.  illustrated Example 3, t may matrix either 2 3 columns. 2-column format, first column holds number weeks 1999-08-22, modulo 1024 (approximately 19.6 years), second column (also 3-column format) holds number seconds referenced week, leap seconds handled leap parameter. modulo calculation required GPS satellites dedicate 10 bits week number. resultant ambiguity (e.g. rollover 2019-04-07) addressed 3-column format, last column holds number 1024-week rollover events since 1980-01-06. Users set column 0 times prior 1999-08-22, 1 later times prior 2019-04-07, 2 later times prior 2038-11-21, etc. However, exception rule, satellites start dedicating 12 bits week value. data, third column need 0 times prior 2137-01-06. \"argo\" handles Argo times, measured days since start year 1900. \"excel\" handles Excel times, measured days since start year 1900. (Note excel incorrectly regards 1900 leap year, 1 day subtracted t unless time less equal 1900 Feb 28.  Note NA returned day 60, excel codes \"Feb 29, 1900\", non-existing day excel accepts. \"ncep1\" handles NCEP times, measured hours since start year 1800. \"ncep2\" handles NCEP times, measured days since start year 1. (Note , reasons unknown time, simple R expression definition two days compared UDUNITS library, used NCEP. Therefore, two-day offset applied. See references 2 3.) \"sas\" handles SAS times, indicated type=\"sas\", origin start 1960. \"spss\" handles SPSS times, seconds 1582-10-14. \"yearday\" handles convention t two-column matrix, first column year, second yearday (starting 1 first second January 1, match convention used Sea-Bird CTD software). \"epic\" handles convention used EPIC software library, Pacific Marine Environmental Laboratory, t two-column matrix, first column julian Day (defined julianDay(), example), second column millisecond within day. See reference 4. \"vms\" handles convention used VMS operating system Modified Julian Day, t number seconds past 1859-11-17T00:00:00 UTC. See reference 5.","code":""},{"path":"https://dankelley.github.io/oce/reference/numberAsPOSIXct.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert a Numeric Time to a POSIXct Time — numberAsPOSIXct","text":"Matlab times: https://www.mathworks.com/help/matlab/ref/datenum.html NCEP times: https://psl.noaa.gov/data/gridded/faq.html Problem NCEP times: https://github.com/dankelley/oce/issues/738 EPIC times: software manuals https://www.pmel.noaa.gov/epic/download/index.html#epslib; see also Denbo, Donald W., Nancy N. Soreide. “EPIC.” Oceanography 9 (1996). doi:10.5670/oceanog.1996.10 VMS times: https://en.wikipedia.org/wiki/Epoch_(computing) GPS times: https://www.labsat.co.uk/index.php/en/gps-time-calculator","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/numberAsPOSIXct.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert a Numeric Time to a POSIXct Time — numberAsPOSIXct","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/numberAsPOSIXct.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a Numeric Time to a POSIXct Time — numberAsPOSIXct","text":"","code":"# Example 1. default (unix) numberAsPOSIXct(0) #> [1] \"1970-01-01 UTC\"  # Example 2. Matlab numberAsPOSIXct(1, type = \"matlab\") #> [1] \"0000-01-01 UTC\"  # Example 3. GPS with default week rollover or with no rollover (Canada Day, year 2010) numberAsPOSIXct(cbind(566, 345615), type = \"gps\") #> [1] \"2010-07-01 UTC\" numberAsPOSIXct(cbind(566, 345615, 1), type = \"gps\") #> [1] \"2010-07-01 UTC\" numberAsPOSIXct(cbind(1024 + 566, 345615, 0), type = \"gps\") #> [1] \"2010-07-01 UTC\" # Show how to deal with leap seconds (15 of them, in this case) sum(as.POSIXct(\"1980-01-01\") < .leap.seconds & .leap.seconds <= as.POSIXct(\"2010-07-01\")) #> [1] 15 -15 + numberAsPOSIXct(cbind(1024 + 566, 345615, 0), type = \"gps\", leap = FALSE) #> [1] \"2010-07-01 UTC\"  # Example 4. yearday numberAsPOSIXct(cbind(2013, 1), type = \"yearday\") # start of 2013 #> [1] \"2013-01-01 UTC\"  # Example 5. Epic time, one hour into Canada Day of year 2018. In computing the # Julian day, note that this starts at noon. jd <- julianDay(as.POSIXct(\"2018-07-01 12:00:00\", tz = \"UTC\")) numberAsPOSIXct(cbind(jd, 1e3 * 1 * 3600), type = \"epic\", tz = \"UTC\") #> [1] \"2018-07-01 01:00:00 UTC\"  # Example 6. Julian day, note that this starts at noon. jd <- julianDay(as.POSIXct(\"2018-07-01 12:00:00\", tz = \"UTC\")) numberAsPOSIXct(cbind(jd, 1e3 * 1 * 3600), type = \"epic\", tz = \"UTC\") #> [1] \"2018-07-01 01:00:00 UTC\""},{"path":"https://dankelley.github.io/oce/reference/oce-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Base Class for oce Objects — oce-class","title":"Base Class for oce Objects — oce-class","text":"mainly used within oce create sub-classes, although users can use new(\"oce\") create blank oce object, desired.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Base Class for oce Objects — oce-class","text":"metadata list containing information data. contents vary across sub-classes, e.g. adp object information beam patterns, obviously make sense ctd object addition, classes items named units flags, used store information units data, data quality. data list containing data. processingLog list containing time-stamped processing steps, typically stored object oce functions.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oce-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Base Class for oce Objects — oce-class","text":"","code":"str(new(\"oce\")) #> Formal class 'oce' [package \"oce\"] with 3 slots #>   ..@ metadata     :List of 2 #>   .. ..$ units: list() #>   .. ..$ flags: list() #>   ..@ data         : list() #>   ..@ processingLog:List of 2 #>   .. ..$ time : POSIXct[1:1], format: \"2024-09-24 10:28:35\" #>   .. ..$ value: chr \"Create oce object\""},{"path":"https://dankelley.github.io/oce/reference/oce-deprecated.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated and Defunct Elements of the oce Package — oce-deprecated","title":"Deprecated and Defunct Elements of the oce Package — oce-deprecated","text":"Certain functions function arguments still provided compatibility older versions oce, removed soon. oce scheme removing functions similar used Bioconductor: items marked \"deprecated\" one release, marked \"defunct\" next, removed next . goal provide gentle migration path users keep packages reasonably --date.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce-deprecated.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Deprecated and Defunct Elements of the oce Package — oce-deprecated","text":"following marked \"deprecated\" present CRAN release oce. Please use replacement functions listed . upcoming CRAN release oce mark \"defunct\", last step outright removal. following marked \"defunct\", calling present version produces error message hints replacement function. function marked \"defunct\" one CRAN release, slated outright deletion subsequent release. following functions removed marked \"deprecated\" least one CRAN release, possibly \"defunct\" least one CRAN release.  (version number table first version lack named function.) Several “oce” function arguments considered \"defunct\", means removed next CRAN release. follows. fill argument mapPlot() confusing users, designated deprecated June 2016. (confusion stemmed subtle differences plot() polygon(), problem mapPlot() can use either functions, according whether coastlines filled.) functionality preserved, col argument.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oce.as.raw.html","id":null,"dir":"Reference","previous_headings":"","what":"Version of as.raw() That Clips Data — oce.as.raw","title":"Version of as.raw() That Clips Data — oce.as.raw","text":"version .raw() clips data prevent warnings","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.as.raw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Version of as.raw() That Clips Data — oce.as.raw","text":"","code":"oce.as.raw(x)"},{"path":"https://dankelley.github.io/oce/reference/oce.as.raw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Version of as.raw() That Clips Data — oce.as.raw","text":"x values converted raw","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.as.raw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Version of as.raw() That Clips Data — oce.as.raw","text":"Raw values corresponding x.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.as.raw.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Version of as.raw() That Clips Data — oce.as.raw","text":"Negative values clipped 0, values 255 clipped 255; result passed .raw() returned.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.as.raw.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Version of as.raw() That Clips Data — oce.as.raw","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.as.raw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Version of as.raw() That Clips Data — oce.as.raw","text":"","code":"x <- c(-0.1, 0, 1, 255, 255.1) data.frame(x, oce.as.raw(x)) #>       x oce.as.raw.x. #> 1  -0.1            00 #> 2   0.0            00 #> 3   1.0            01 #> 4 255.0            ff #> 5 255.1            ff"},{"path":"https://dankelley.github.io/oce/reference/oce.axis.POSIXct.html","id":null,"dir":"Reference","previous_headings":"","what":"Oce Version of axis.POSIXct — oce.axis.POSIXct","title":"Oce Version of axis.POSIXct — oce.axis.POSIXct","text":"specialized variant axis.POSIXct() produces results less ambiguity axis labels.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.axis.POSIXct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Oce Version of axis.POSIXct — oce.axis.POSIXct","text":"","code":"oce.axis.POSIXct(   side,   x,   at,   tformat,   labels = TRUE,   drawTimeRange,   abbreviateTimeRange = FALSE,   drawFrequency = FALSE,   cex.axis = par(\"cex.axis\"),   cex.lab = par(\"cex.lab\"),   cex.main = par(\"cex.main\"),   mar = par(\"mar\"),   mgp = par(\"mgp\"),   main = \"\",   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/oce.axis.POSIXct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Oce Version of axis.POSIXct — oce.axis.POSIXct","text":"side axis.POSIXct(). x axis.POSIXct(). axis.POSIXct(). tformat format axis.POSIXct() now, may eventually new features multiline labels, e.g. day one line month another. labels axis.POSIXct(). drawTimeRange Optional indication whether/draw time range margin side plot opposite time axis. supplied, defaults value returned getOption(\"oceDrawTimeRange\"), option set, defaults TRUE. time range drawn drawTimeRange FALSE. TRUE, range shown. range refers range x axis (data). format elements range set getOption(\"oceTimeFormat\") (default value empty string, option set). timezone indicated time range week.  preliminary work, makes sense use drawTimeRange=TRUE, published work can better drop label indicate something time figure caption. abbreviateTimeRange boolean, TRUE abbreviate second number time range, e.g. dropping year first number. drawFrequency boolean, TRUE show frequency sampling data cex.axis, cex.lab, cex.main character expansion factors axis numbers, axis names plot titles; see par(). mar value par(mar) axis mgp value par(mgp) axis main title plot debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... axis.POSIXct().","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.axis.POSIXct.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Oce Version of axis.POSIXct — oce.axis.POSIXct","text":"vector times corresponding axis ticks returned silently.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.axis.POSIXct.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Oce Version of axis.POSIXct — oce.axis.POSIXct","text":"tick marks set automatically based examination time range axis. scheme devised constructing test cases typical plot size font size, wide range time scales. categories, small tick marks interspersed large ones. user may set format axis numbers tformat argument. supplied, format set based time span axis: time span less minute, time axis labels seconds (fractional seconds, interval less 2 seconds), leading zeros small integers. (Fractional seconds enabled trick: usual R format \"\\%S\" supplemented new format e.g. \"\\%.2S\", meaning use two digits decimal.) time span exceeds minute less 1.5 days, label format \"\\%H:\\%M:\\%S\". time span exceeds 1.5 days less 1 year, format \"\\%b \\%d\" (e.g. Jul 15) , , tick marks set several subcategories. time span exceeds year, format \"\\%Y\", .e. year displayed 4 digits. noted scheme differs R approach several ways. First, R writes day names time ranges, convention seldom seen literature. Second, R write nn:mm HH:MM MM:SS, ambiguity might confuse readers. Third, use large small tick marks something R . Bear mind tformat may set alter number format, tick mark scheme (presently) controlled.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oce.axis.POSIXct.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Oce Version of axis.POSIXct — oce.axis.POSIXct","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.contour.html","id":null,"dir":"Reference","previous_headings":"","what":"Oce Variant of contour — oce.contour","title":"Oce Variant of contour — oce.contour","text":"provides something analogous contour(), ability flip x y. Setting revy=TRUE can helpful y data represent pressure depth surface.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.contour.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Oce Variant of contour — oce.contour","text":"","code":"oce.contour(   x,   y,   z,   revx = FALSE,   revy = FALSE,   add = FALSE,   tformat,   drawTimeRange = getOption(\"oceDrawTimeRange\"),   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/oce.contour.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Oce Variant of contour — oce.contour","text":"x values x grid. y values y grid. z matrix values contoured.  first dimension z must equal number items x, etc. revx set TRUE reverse order labels x axis drawn revy set TRUE reverse order labels y axis drawn add logical value indicating whether contours added pre-existing plot. tformat time format; supplied, reasonable choice made oce.axis.POSIXct(), draws time axes. drawTimeRange logical, used x axis time.  TRUE, indication time range data (axis) indicated top-left margin graph.  useful labels time axes indicate hours range less day, etc. debug flag turns debugging; set 1 information processing. ... optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.contour.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Oce Variant of contour — oce.contour","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.contour.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Oce Variant of contour — oce.contour","text":"","code":"library(oce) data(topoWorld) # coastline now, and in last glacial maximum lon <- topoWorld[[\"longitude\"]] lat <- topoWorld[[\"latitude\"]] z <- topoWorld[[\"z\"]] oce.contour(lon, lat, z, levels = 0, drawlabels = FALSE) oce.contour(lon, lat, z, levels = -130, drawlabels = FALSE, col = \"blue\", add = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/oce.grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a Grid to an Existing Oce Plot — oce.grid","title":"Add a Grid to an Existing Oce Plot — oce.grid","text":"Add Grid Existing Oce Plot","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a Grid to an Existing Oce Plot — oce.grid","text":"","code":"oce.grid(xat, yat, col = \"lightgray\", lty = \"dotted\", lwd = par(\"lwd\"))"},{"path":"https://dankelley.github.io/oce/reference/oce.grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a Grid to an Existing Oce Plot — oce.grid","text":"xat either list x values draw grid, return value oce plotting function yat list y values plot grid (ignored gx return value oce plotting function) col color grid lines (see par()) lty type grid lines (see par()) lwd width grid lines (see par())","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.grid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add a Grid to an Existing Oce Plot — oce.grid","text":"plots created oce functions, missing xat yat, call grid() missing nx ny. However, xat return value certain oce functions, sophisticated grid constructed. problem grid() handle axes non-uniform grids, e.g. time axes span months differing lengths. early February 2015, oce.grid handles xat produced return value following functions: imagep() oce.plot.ts(), plot,adp-method(), plot,echosounder-method(), plotTS(). makes sense try use oce.grid multipanel oce plots, e.g. default plot plot,adp-method().","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a Grid to an Existing Oce Plot — oce.grid","text":"","code":"library(oce) i <- imagep(volcano) oce.grid(i, lwd = 2)   data(sealevel) i <- oce.plot.ts(sealevel[[\"time\"]], sealevel[[\"elevation\"]]) oce.grid(i, col = \"red\")   data(ctd) i <- plotTS(ctd) oce.grid(i, col = \"red\")   data(adp) i <- plot(adp, which = 1) oce.grid(i, col = \"gray\", lty = 1)   data(echosounder) i <- plot(echosounder) oce.grid(i, col = \"pink\", lty = 1)"},{"path":"https://dankelley.github.io/oce/reference/oce.html","id":null,"dir":"Reference","previous_headings":"","what":"A Package for Oceanographic Analysis — oce","title":"A Package for Oceanographic Analysis — oce","text":"oce package provides functions working Oceanographic data, calculations specific Oceanography, producing graphics match conventions field.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"A Package for Oceanographic Analysis — oce","text":"dozen specialized data types handled oce, generic plots summaries , along specialized functions needed typical Oceanographic analysis. See oce summary class structure links documentation many subclasses oce objects, aligned class instrument type dataset.  task-oriented approach, see several vignettes provided oce, book (Kelley, Dan E. Oceanographic Analysis R. New York: Springer-Verlag, 2018. https://link.springer.com/book/10.1007/978-1-4939-8844-0) written one oce co-authors.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.html","id":"specialized-functions","dir":"Reference","previous_headings":"","what":"Specialized Functions","title":"A Package for Oceanographic Analysis — oce","text":"key function read.oce(), attempt read Oceanographic data raw format. uses oceMagic() try detect file type, based file name contents. detection possible, users need go beyond read.oce(), using specialized function, e.g. read.ctd() CTD files, read.ctd.sbe() Teledyne-Seabird files, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.html","id":"generic-methods","dir":"Reference","previous_headings":"","what":"Generic Methods","title":"A Package for Oceanographic Analysis — oce","text":"list generic methods oce provided methods(class=\"oce\"); used frequently follows. [[ Finds value item object's metadata data slot. item exist, can calculated items, calculated value returned. example latter, consider built-ctd dataset, contain potential temperature, \"theta\". Using ctd[[\"theta\"]] therefore causes swTheta() called, calculate theta. See [[,oce-method type ?\"[[,oce-method\" learn general functioning, specialized method like [[,ctd-method CTD data, etc. [[<- Alters named item object's metadata data slot.  item exist, created. See [[<-,oce-method type ?\"[[<-,oce-method\" learn general methodology, specialized method like [[<-,ctd-method CTD data, etc. summary() Displays information object named argument, including elements metadata slot statistics contents data slot. See summary,oce-method type ?\"summary,oce-method\" learn general functioning, specialized method like summary,ctd-method CTD data, etc. subset() Takes subset oce object. See subset,oce-method type ?\"subset,oce-method\" learn general functioning, specialized method like subset,ctd-method CTD data, etc.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oce.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A Package for Oceanographic Analysis — oce","text":"Maintainer: Dan Kelley Dan.Kelley@Dal.Ca (ORCID) Authors: Clark Richards clark.richards@gmail.com (ORCID) contributors: Chantelle Layton chantelle.layton@dal.ca (ORCID) (curl() coauthor) [contributor] British Geological Survey (magnetic-field subroutine) [contributor, copyright holder]","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.plot.ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Oce Variant of plot.ts — oce.plot.ts","title":"Oce Variant of plot.ts — oce.plot.ts","text":"Plot time-series, obeying timezone possibly drawing range top-left margin.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.plot.ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Oce Variant of plot.ts — oce.plot.ts","text":"","code":"oce.plot.ts(   x,   y,   type = \"l\",   xlim,   ylim,   log = \"\",   logStyle = \"r\",   flipy = FALSE,   xlab,   ylab,   drawTimeRange,   simplify = 2560,   fill = FALSE,   col = par(\"col\"),   pch = par(\"pch\"),   cex = par(\"cex\"),   cex.axis = par(\"cex.axis\"),   cex.lab = par(\"cex.lab\"),   cex.main = par(\"cex.main\"),   xaxs = par(\"xaxs\"),   yaxs = par(\"yaxs\"),   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + if (nchar(xlab) > 0) 1.5 else 1, mgp[1] + 1.5, mgp[2] + 1, mgp[2] +     3/4),   main = \"\",   despike = FALSE,   axes = TRUE,   tformat,   marginsAsImage = FALSE,   grid = FALSE,   grid.col = \"lightgray\",   grid.lty = \"dotted\",   grid.lwd = par(\"lwd\"),   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/oce.plot.ts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Oce Variant of plot.ts — oce.plot.ts","text":"x times observations.  POSIXt object, attempt made convert one using .POSIXct(). y observations. type plot type, \"l\" lines, \"p\" points. xlim optional limit x axis.  additional effect, beyond conventional R functions: effectively windows data, autoscaling yield limits y make sense within window. ylim optional limit y axis. log character value must either empty (default) linear y axis, \"y\" logarithmic y axis.  (Unlike plot.default() etc., oce.plot.ts permit logarithmic time, x axis.) logStyle character value indicates draw y axis, log=\"y\".  \"r\" (default) conventional R style used, logarithmic transform connects y values position \"page\" plot device, tics nonlinearly spaced, organized integral powers 10.  However, \"decade\", style used scientific literature, large tick marks used integral powers 10, smaller tick marks integral multiples powers, labels use exponential format values 100 0.01.  value logStyle passed oceAxis(), draws axis. flipy Logical, TRUE indicating graph y axis reversed, .e. smaller values bottom page. xlab name x axis; defaults \"\". ylab name y axis; defaults plotted item. drawTimeRange optional indication whether/draw time range, top-left margin plot; see oce.axis.POSIXct() details. simplify integer value indicates whether speed type=\"l\" plots replacing data minimum maximum values within subsampled time mesh. can speed plots large datasets (e.g. factor 20 10^7 points), sometimes minor changes appearance. procedure skipped simplify NA number visible data points less 5 times simplify. Otherwise, oce.plot.ts creates simplify intervals ranging across visible time range. Intervals 2 finite y data ignored. rest, y values replaced range, x values replaced repeated midpoint time. Thus, retained sub-interval exactly 2 data points. warning printed replacement done. default value simplify means cases 2560 visible points plotted conventionally. fill boolean, set TRUE fill curve zero (incorrectly missing values y). col colours points (type==\"p\") lines (type==\"l\"). type=\"p\" case, fewer col values x values, col values recycled standard fashion. type=\"l\" case, line plotted first colour specified. pch character code, used type==\"p\". fewer pch values x values, pch values recycled standard fashion. See points() possible values pch. cex numeric character expansion factor points plots, ignored unless type \"p\".  may single number, applied points, vector numbers applied points sequence.  fewer pch values x values, pch values recycled standard fashion. See par() cex. cex.axis, cex.lab, cex.main numeric character expansion factors axis numbers, axis names plot titles; see par(). xaxs control x axis ending; see par(\"xaxs\"). yaxs control y axis ending; see par(\"yaxs\"). mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\") set margins. default value uses significantly tighter margins norm R, gives space data.  However, , existing par(\"mar\") value ignored, contradicts values may set previous call drawPalette().  get plot palette, first call drawPalette(), call oce.plot.ts mar=par(\"mar\"). main title plot. despike boolean flag can turn despiking despike(). axes boolean, set TRUE get axes plotted tformat optional format labels time axis marginsAsImage boolean indicating whether set right-hand margin width normally taken image drawn imagep(). grid TRUE, grid drawn panel.  (argument needed, calling grid() sequence plots result useful results individual panels. grid.col color grid grid.lty line type grid grid.lwd line width grid debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... graphical parameters passed plot().","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.plot.ts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Oce Variant of plot.ts — oce.plot.ts","text":"list silently returned, containing xat yat, values can used oce.grid() add grid plot.","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.plot.ts.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Oce Variant of plot.ts — oce.plot.ts","text":"Depending version R, standard plot() plot.ts() routines obey time zone data. routine gets around problem.  can also plot time range top-left margin, desired; string includes timezone, remove possible confusion. time axis drawn oce.axis.POSIXct().","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.plot.ts.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Oce Variant of plot.ts — oce.plot.ts","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.plot.ts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Oce Variant of plot.ts — oce.plot.ts","text":"","code":"library(oce) t0 <- as.POSIXct(\"2008-01-01\", tz = \"UTC\") t <- seq(t0, length.out = 48, by = \"30 min\") y <- sin(as.numeric(t - t0) * 2 * pi / (12 * 3600)) oce.plot.ts(t, y, type = \"l\", xaxs = \"i\")  # Show how col, pch and cex get recycled oce.plot.ts(t, y,     type = \"p\", xaxs = \"i\",     col = 1:3, pch = c(rep(1, 6), rep(20, 6)), cex = sqrt(1:6) )  # Trimming x; note the narrowing of the y view oce.plot.ts(t, y, type = \"p\", xlim = c(t[6], t[12]))  # Flip the y axis oce.plot.ts(t, y, flipy = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/oce.write.table.html","id":null,"dir":"Reference","previous_headings":"","what":"Write the Data Portion of Object to a File — oce.write.table","title":"Write the Data Portion of Object to a File — oce.write.table","text":"output line containing names columns x$data, enclosed double quotes.  line lines data .  default separate data items single space character, can altered using sep argument ... list; see utils::write.table().","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.write.table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write the Data Portion of Object to a File — oce.write.table","text":"","code":"oce.write.table(x, file = \"\", ...)"},{"path":"https://dankelley.github.io/oce/reference/oce.write.table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write the Data Portion of Object to a File — oce.write.table","text":"x oce object. file file name, passed utils::write.table().  Use \"\" get listing terminal window. ... optional arguments passed utils::write.table().","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.write.table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write the Data Portion of Object to a File — oce.write.table","text":"value returned utils::write.table().","code":""},{"path":"https://dankelley.github.io/oce/reference/oce.write.table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Write the Data Portion of Object to a File — oce.write.table","text":"function little thin wrapper around utils::write.table(), difference row names omitted , making file format conventional Oceanography.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oce.write.table.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Write the Data Portion of Object to a File — oce.write.table","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceApprox.html","id":null,"dir":"Reference","previous_headings":"","what":"Interpolate 1D Data with UNESCO or Reiniger-Ross Algorithm — oceApprox","title":"Interpolate 1D Data with UNESCO or Reiniger-Ross Algorithm — oceApprox","text":"Interpolate one-dimensional data using schemes permit curvature tends minimize extrema well-indicated data.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceApprox.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interpolate 1D Data with UNESCO or Reiniger-Ross Algorithm — oceApprox","text":"","code":"oceApprox(x, y, xout, method = c(\"rr\", \"unesco\"))"},{"path":"https://dankelley.github.io/oce/reference/oceApprox.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interpolate 1D Data with UNESCO or Reiniger-Ross Algorithm — oceApprox","text":"x independent variable (z p, usually). y dependent variable. xout values independent variable interpolation done. method method use.  See “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceApprox.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Interpolate 1D Data with UNESCO or Reiniger-Ross Algorithm — oceApprox","text":"vector interpolated values, corresponding xout values equal number.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceApprox.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Interpolate 1D Data with UNESCO or Reiniger-Ross Algorithm — oceApprox","text":"Setting method=\"rr\" yields weighted-parabola algorithm Reiniger Ross (1968).  procedure follows.  First, interpolant xout value outside range x set NA.  Next, linear interpolation used xout value one smaller neighboring x value, one larger neighboring value.  values xout, 4 neighboring points x sought, two smaller two larger.  two parabolas determined, one two smaller points plus nearest larger point, nearest smaller point two larger points.  weighted sum two parabolas provides interpolated value.  Note , notation Reiniger Ross (1968), algorithm uses m=2 n=1.  (future version routine might provide ability modify values.) Setting method=\"unesco\" yields method used U.S. National Oceanographic Data Center. described pages 48-50 reference 2; reference 3 presumably contains information easily accessible.  method works follows. data 5m depth, surface value taken equal shallowest recorded value. Distance bounds put four neighboring points, Reiniger-Ross method used interpolated points sufficiently four close neighbors.  bounds described table 15 reference 2 -called standard depths; present instance transformed following rules.  Inner neighbors must within 5m data 10m, 50m 250m 100m 900m, 200m 2000m, within 1000m otherwise.  Outer neighbors must within 200m 500m, 400m 1300m, 1000m otherwise.  two points meet criteria, Lagrangian interpolation used.  , NA used interpolant. rules applied, interpolated value compared values immediately , outside range, simple linear interpolation used.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceApprox.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Interpolate 1D Data with UNESCO or Reiniger-Ross Algorithm — oceApprox","text":"R.F. Reiniger C.K. Ross, 1968.  method interpolation application oceanographic data.  Deep Sea Research, 15, 185-193. Daphne R. Johnson, Tim P. Boyer, Hernan E. Garcia, Ricardo . Locarnini, Olga K. Baranova, Melissa M. Zweng, 2011. World Ocean Database 2009 Documentation.  NODC Internal report 20.  Ocean Climate Laboratory, National Oceanographic Data Center.  Silver Spring, Maryland. UNESCO, 1991. Processing oceanographic station data, 138 pp., Imprimerie des Presses Universitaires de France, United Nations Educational, Scientific Cultural Organization, France.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceApprox.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Interpolate 1D Data with UNESCO or Reiniger-Ross Algorithm — oceApprox","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceApprox.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Interpolate 1D Data with UNESCO or Reiniger-Ross Algorithm — oceApprox","text":"","code":"library(oce) if (require(ocedata)) {     data(RRprofile)     zz <- seq(0, 2000, 2)     plot(RRprofile$temperature, RRprofile$depth, ylim = c(500, 0), xlim = c(2, 11))     # Contrast two methods     a1 <- oce.approx(RRprofile$depth, RRprofile$temperature, zz, \"rr\")     a2 <- oce.approx(RRprofile$depth, RRprofile$temperature, zz, \"unesco\")     lines(a1, zz)     lines(a2, zz, col = \"red\")     legend(\"bottomright\", lwd = 1, col = 1:2, legend = c(\"rr\", \"unesco\"), cex = 3 / 4) } #> Loading required package: ocedata"},{"path":"https://dankelley.github.io/oce/reference/oceAxis.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw an Axis, Possibly with Decade-style Logarithmic Scaling — oceAxis","title":"Draw an Axis, Possibly with Decade-style Logarithmic Scaling — oceAxis","text":"Draw Axis, Possibly Decade-style Logarithmic Scaling","code":""},{"path":"https://dankelley.github.io/oce/reference/oceAxis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw an Axis, Possibly with Decade-style Logarithmic Scaling — oceAxis","text":"","code":"oceAxis(side, labels = TRUE, logStyle = \"r\", ...)"},{"path":"https://dankelley.github.io/oce/reference/oceAxis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw an Axis, Possibly with Decade-style Logarithmic Scaling — oceAxis","text":"side integer specifying axis draw, 1 bottom axis, 2 left axis, 3 top axis, 4 right axis (axis()). labels either vector character values used labels logical value indicating whether draw labels.  first form works coordinate logarithmic, logStyle \"r\". logStyle character value indicates draw y axis, log=\"y\".  \"r\" (default) conventional R style used, logarithmic transform connects y values position \"page\" plot device, tics nonlinearly spaced, organized integral powers 10.  However, \"decade\", style used scientific literature, large tick marks used integral powers 10, smaller tick marks integral multiples powers, labels use exponential format values 100 0.01. ... graphical parameters, passed axis().","code":""},{"path":"https://dankelley.github.io/oce/reference/oceAxis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw an Axis, Possibly with Decade-style Logarithmic Scaling — oceAxis","text":"Numerical values tick marks drawn (drawn, labels specified draw ).","code":""},{"path":"https://dankelley.github.io/oce/reference/oceAxis.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Draw an Axis, Possibly with Decade-style Logarithmic Scaling — oceAxis","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceAxis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw an Axis, Possibly with Decade-style Logarithmic Scaling — oceAxis","text":"","code":"library(oce) Ra <- 10^seq(4, 10, 0.1) Nu <- 0.085 * Ra^(1 / 3) plot(Ra, Nu, log = \"xy\", axes = FALSE) box() oceAxis(1, logStyle = \"decade\") oceAxis(2, logStyle = \"decade\")"},{"path":"https://dankelley.github.io/oce/reference/oceCRS.html","id":null,"dir":"Reference","previous_headings":"","what":"Coordinate Reference System Strings for Some Oceans — oceCRS","title":"Coordinate Reference System Strings for Some Oceans — oceCRS","text":"Create coordinate reference string (CRS), suitable use projection argument mapPlot() plot,coastline-method().","code":""},{"path":"https://dankelley.github.io/oce/reference/oceCRS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coordinate Reference System Strings for Some Oceans — oceCRS","text":"","code":"oceCRS(region)"},{"path":"https://dankelley.github.io/oce/reference/oceCRS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coordinate Reference System Strings for Some Oceans — oceCRS","text":"region character string indicating region. must following list (string matches just one entry, pmatch()): \"North Atlantic\", \"South Atlantic\", \"Atlantic\", \"North Pacific\", \"South Pacific\", \"Pacific\", \"Arctic\",  \"Antarctic\".","code":""},{"path":"https://dankelley.github.io/oce/reference/oceCRS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coordinate Reference System Strings for Some Oceans — oceCRS","text":"string contain CRS, can used projection mapPlot().","code":""},{"path":"https://dankelley.github.io/oce/reference/oceCRS.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Coordinate Reference System Strings for Some Oceans — oceCRS","text":"preliminary version function, results likely change autumn 2016, guided real-world usage.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceCRS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coordinate Reference System Strings for Some Oceans — oceCRS","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceCRS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coordinate Reference System Strings for Some Oceans — oceCRS","text":"","code":"# \\donttest{ library(oce) data(coastlineWorld) par(mar = c(2, 2, 1, 1)) plot(coastlineWorld, projection = oceCRS(\"Atlantic\"), span = 12000)  plot(coastlineWorld, projection = oceCRS(\"North Atlantic\"), span = 8000)  plot(coastlineWorld, projection = oceCRS(\"South Atlantic\"), span = 8000)  plot(coastlineWorld, projection = oceCRS(\"Arctic\"), span = 4000)  plot(coastlineWorld, projection = oceCRS(\"Antarctic\"), span = 10000)  # Avoid ugly horizontal lines, an artifact of longitude shifting. # Note: we cannot fill the land once we shift, either. pacific <- coastlineCut(coastlineWorld, -180) plot(pacific, proj = oceCRS(\"Pacific\"), span = 15000, col = NULL)  plot(pacific, proj = oceCRS(\"North Pacific\"), span = 12000, col = NULL)  plot(pacific, proj = oceCRS(\"South Pacific\"), span = 12000, col = NULL)  # }"},{"path":"https://dankelley.github.io/oce/reference/oceColors9B.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors in a Red-Yellow-Blue Color Scheme — oceColors9B","title":"Create Colors in a Red-Yellow-Blue Color Scheme — oceColors9B","text":"results similar oceColorsJet(), white hues centre, rather green ones. scheme may useful displaying signed quantities, thus somewhat analogous oceColorsTwo(), except viewers may able distinguish colors oceColors9B.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColors9B.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors in a Red-Yellow-Blue Color Scheme — oceColors9B","text":"","code":"oceColors9B(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColors9B.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors in a Red-Yellow-Blue Color Scheme — oceColors9B","text":"n number colors","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColors9B.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors in a Red-Yellow-Blue Color Scheme — oceColors9B","text":"following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColors9B.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors in a Red-Yellow-Blue Color Scheme — oceColors9B","text":"","code":"library(oce) imagep(volcano,     col = oceColors9B(128),     zlab = \"oceColors9B\" )"},{"path":"https://dankelley.github.io/oce/reference/oceColorsCDOM.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for CDOM Fields — oceColorsCDOM","title":"Create Colors Suitable for CDOM Fields — oceColorsCDOM","text":"Create set colors displaying CDOM values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsCDOM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for CDOM Fields — oceColorsCDOM","text":"","code":"oceColorsCDOM(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsCDOM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for CDOM Fields — oceColorsCDOM","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsCDOM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for CDOM Fields — oceColorsCDOM","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsCDOM.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for CDOM Fields — oceColorsCDOM","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsCDOM.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for CDOM Fields — oceColorsCDOM","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsCDOM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for CDOM Fields — oceColorsCDOM","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsCDOM(128),     zlab=\"oceColorsCDOM\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsChlorophyll.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for chlorophyll Fields — oceColorsChlorophyll","title":"Create Colors Suitable for chlorophyll Fields — oceColorsChlorophyll","text":"Create set colors displaying chlorophyll values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsChlorophyll.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for chlorophyll Fields — oceColorsChlorophyll","text":"","code":"oceColorsChlorophyll(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsChlorophyll.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for chlorophyll Fields — oceColorsChlorophyll","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsChlorophyll.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for chlorophyll Fields — oceColorsChlorophyll","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsChlorophyll.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for chlorophyll Fields — oceColorsChlorophyll","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsChlorophyll.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for chlorophyll Fields — oceColorsChlorophyll","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsChlorophyll.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for chlorophyll Fields — oceColorsChlorophyll","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsChlorophyll(128),     zlab=\"oceColorsChlorophyll\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsClosure.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Color Functions — oceColorsClosure","title":"Create Color Functions — oceColorsClosure","text":"function generates functions used specify colors. used within oce create oceColorsTemperature() many cousins. Users may also find helpful, creating custom color schemes (see “Examples”).","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsClosure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Color Functions — oceColorsClosure","text":"","code":"oceColorsClosure(spec)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsClosure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Color Functions — oceColorsClosure","text":"spec Specification color scheme. may character string, case must name item stored data(ocecolors), either 3-column data frame matrix, case columns specify red, green blue values (range 0 1).","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsClosure.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Create Color Functions — oceColorsClosure","text":"","code":"# Update oxygen color scheme to latest matplotlib value. library(oce) oxy <- \"https://raw.githubusercontent.com/matplotlib/cmocean/master/cmocean/rgb/oxy-rgb.txt\" oxyrgb <- read.table(oxy, header=FALSE) oceColorsOxygenUpdated <- oceColorsClosure(oxyrgb) par(mfrow=c(1, 2)) m <- matrix(1:256) imagep(m, col=oceColorsOxygen, zlab=\"oxygen\") imagep(m, col=oceColorsOxygenUpdated, zlab=\"oxygenUpdated\")"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsDensity.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for density Fields — oceColorsDensity","title":"Create Colors Suitable for density Fields — oceColorsDensity","text":"Create set colors displaying density values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsDensity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for density Fields — oceColorsDensity","text":"","code":"oceColorsDensity(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsDensity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for density Fields — oceColorsDensity","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsDensity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for density Fields — oceColorsDensity","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsDensity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for density Fields — oceColorsDensity","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsDensity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for density Fields — oceColorsDensity","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsDensity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for density Fields — oceColorsDensity","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsDensity(128),     zlab=\"oceColorsDensity\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsFreesurface.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for freesurface Fields — oceColorsFreesurface","title":"Create Colors Suitable for freesurface Fields — oceColorsFreesurface","text":"Create set colors displaying freesurface values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsFreesurface.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for freesurface Fields — oceColorsFreesurface","text":"","code":"oceColorsFreesurface(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsFreesurface.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for freesurface Fields — oceColorsFreesurface","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsFreesurface.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for freesurface Fields — oceColorsFreesurface","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsFreesurface.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for freesurface Fields — oceColorsFreesurface","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsFreesurface.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for freesurface Fields — oceColorsFreesurface","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsFreesurface.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for freesurface Fields — oceColorsFreesurface","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsFreesurface(128),     zlab=\"oceColorsFreesurface\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsGebco.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors in a GEBCO-like Scheme — oceColorsGebco","title":"Create Colors in a GEBCO-like Scheme — oceColorsGebco","text":"colours determined examination paper charts printed GEBCO Fifth Edition era. hues range dark blue light blue, light brown dark brown.  used show topography scheme centred z=0, means near-coastal regions light tone, darker colours representing mountains deep sea.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsGebco.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors in a GEBCO-like Scheme — oceColorsGebco","text":"","code":"oceColorsGebco(   n = 9,   region = c(\"water\", \"land\", \"both\"),   type = c(\"fill\", \"line\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/oceColorsGebco.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors in a GEBCO-like Scheme — oceColorsGebco","text":"n Number colors return region String indicating application region, one \"water\", \"land\", \"\". type String indicating purpose, one \"fill\" \"line\". debug flag turns debugging.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsGebco.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors in a GEBCO-like Scheme — oceColorsGebco","text":"","code":"library(oce) imagep(volcano, col = oceColorsGebco(128, region = \"both\"))"},{"path":"https://dankelley.github.io/oce/reference/oceColorsJet.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Similar to the Matlab Jet Scheme — oceColorsJet","title":"Create Colors Similar to the Matlab Jet Scheme — oceColorsJet","text":"Create Colors Similar Matlab Jet Scheme","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsJet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Similar to the Matlab Jet Scheme — oceColorsJet","text":"","code":"oceColorsJet(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsJet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Similar to the Matlab Jet Scheme — oceColorsJet","text":"n number colors","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsJet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Similar to the Matlab Jet Scheme — oceColorsJet","text":"following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsJet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Similar to the Matlab Jet Scheme — oceColorsJet","text":"","code":"library(oce) imagep(volcano, col = oceColorsJet, zlab = \"oceColorsJet\")"},{"path":"https://dankelley.github.io/oce/reference/oceColorsOxygen.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for oxygen Fields — oceColorsOxygen","title":"Create Colors Suitable for oxygen Fields — oceColorsOxygen","text":"Create set colors displaying oxygen values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsOxygen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for oxygen Fields — oceColorsOxygen","text":"","code":"oceColorsOxygen(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsOxygen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for oxygen Fields — oceColorsOxygen","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsOxygen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for oxygen Fields — oceColorsOxygen","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsOxygen.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for oxygen Fields — oceColorsOxygen","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsOxygen.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for oxygen Fields — oceColorsOxygen","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsOxygen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for oxygen Fields — oceColorsOxygen","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsOxygen(128),     zlab=\"oceColorsOxygen\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsPAR.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for PAR Fields — oceColorsPAR","title":"Create Colors Suitable for PAR Fields — oceColorsPAR","text":"Create set colors displaying PAR values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsPAR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for PAR Fields — oceColorsPAR","text":"","code":"oceColorsPAR(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsPAR.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for PAR Fields — oceColorsPAR","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsPAR.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for PAR Fields — oceColorsPAR","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsPAR.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for PAR Fields — oceColorsPAR","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsPAR.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for PAR Fields — oceColorsPAR","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsPAR.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for PAR Fields — oceColorsPAR","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsPAR(128),     zlab=\"oceColorsPAR\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsPalette.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a Vector of Colors — oceColorsPalette","title":"Create a Vector of Colors — oceColorsPalette","text":"available schemes : =1 red-white-blue scheme. =2 red-yellow-blue scheme. =9.01, =\"9A\" =\"jet\" oceColorsJet(n). =9.02 =\"9B\" oceColors9B(n).","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsPalette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a Vector of Colors — oceColorsPalette","text":"","code":"oceColorsPalette(n, which = 1)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsPalette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a Vector of Colors — oceColorsPalette","text":"n number colors create integer character string indicating palette use; see “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsPalette.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create a Vector of Colors — oceColorsPalette","text":"following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsPhase.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for phase Fields — oceColorsPhase","title":"Create Colors Suitable for phase Fields — oceColorsPhase","text":"Create set colors displaying phase values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsPhase.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for phase Fields — oceColorsPhase","text":"","code":"oceColorsPhase(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsPhase.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for phase Fields — oceColorsPhase","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsPhase.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for phase Fields — oceColorsPhase","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsPhase.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for phase Fields — oceColorsPhase","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsPhase.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for phase Fields — oceColorsPhase","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsPhase.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for phase Fields — oceColorsPhase","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsPhase(128),     zlab=\"oceColorsPhase\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsSalinity.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for salinity Fields — oceColorsSalinity","title":"Create Colors Suitable for salinity Fields — oceColorsSalinity","text":"Create set colors displaying salinity values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsSalinity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for salinity Fields — oceColorsSalinity","text":"","code":"oceColorsSalinity(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsSalinity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for salinity Fields — oceColorsSalinity","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsSalinity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for salinity Fields — oceColorsSalinity","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsSalinity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for salinity Fields — oceColorsSalinity","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsSalinity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for salinity Fields — oceColorsSalinity","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsSalinity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for salinity Fields — oceColorsSalinity","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsSalinity(128),     zlab=\"oceColorsSalinity\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsTemperature.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for temperature Fields — oceColorsTemperature","title":"Create Colors Suitable for temperature Fields — oceColorsTemperature","text":"Create set colors displaying temperature values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTemperature.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for temperature Fields — oceColorsTemperature","text":"","code":"oceColorsTemperature(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsTemperature.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for temperature Fields — oceColorsTemperature","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTemperature.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for temperature Fields — oceColorsTemperature","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTemperature.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for temperature Fields — oceColorsTemperature","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsTemperature.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for temperature Fields — oceColorsTemperature","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTemperature.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for temperature Fields — oceColorsTemperature","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsTemperature(128),     zlab=\"oceColorsTemperature\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbidity.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for turbidity Fields — oceColorsTurbidity","title":"Create Colors Suitable for turbidity Fields — oceColorsTurbidity","text":"Create set colors displaying turbidity values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbidity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for turbidity Fields — oceColorsTurbidity","text":"","code":"oceColorsTurbidity(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbidity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for turbidity Fields — oceColorsTurbidity","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbidity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for turbidity Fields — oceColorsTurbidity","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbidity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for turbidity Fields — oceColorsTurbidity","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbidity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for turbidity Fields — oceColorsTurbidity","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbidity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for turbidity Fields — oceColorsTurbidity","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsTurbidity(128),     zlab=\"oceColorsTurbidity\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbo.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Similar to the Google Turbo Scheme — oceColorsTurbo","title":"Create Colors Similar to the Google Turbo Scheme — oceColorsTurbo","text":"uses coefficients published (Apache license) google, described Mikhailo (2019).","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Similar to the Google Turbo Scheme — oceColorsTurbo","text":"","code":"oceColorsTurbo(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Similar to the Google Turbo Scheme — oceColorsTurbo","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbo.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Similar to the Google Turbo Scheme — oceColorsTurbo","text":"Mikhailo, Anton. “Turbo, Improved Rainbow Colormap Visualization.” Google AI (blog), August 20, 2019. https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-.html following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Similar to the Google Turbo Scheme — oceColorsTurbo","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTurbo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Similar to the Google Turbo Scheme — oceColorsTurbo","text":"","code":"library(oce) imagep(volcano,     col = oceColorsTurbo(128),     zlab = \"oceColorsTurbo\" )"},{"path":"https://dankelley.github.io/oce/reference/oceColorsTwo.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Two-Color Palette — oceColorsTwo","title":"Create Two-Color Palette — oceColorsTwo","text":"Create colors ranging two specified limits, white middle.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsTwo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Two-Color Palette — oceColorsTwo","text":"","code":"oceColorsTwo(n, low = 2/3, high = 0, smax = 1, alpha = 1)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsTwo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Two-Color Palette — oceColorsTwo","text":"n number colors generate. low, high numerical values (range 0 1) specifying hue low high ends color scale. smax numerical value (range 0 1) color saturation. alpha numerical value (ragne 0 1) alpha (transparency) colors.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsTwo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Two-Color Palette — oceColorsTwo","text":"","code":"library(oce) imagep(volcano - mean(range(volcano)),     col = oceColorsTwo(128),     zlim = \"symmetric\", zlab = \"oceColorsTwo\" )"},{"path":"https://dankelley.github.io/oce/reference/oceColorsVelocity.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for velocity Fields — oceColorsVelocity","title":"Create Colors Suitable for velocity Fields — oceColorsVelocity","text":"Create set colors displaying velocity values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsVelocity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for velocity Fields — oceColorsVelocity","text":"","code":"oceColorsVelocity(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsVelocity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for velocity Fields — oceColorsVelocity","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsVelocity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for velocity Fields — oceColorsVelocity","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsVelocity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for velocity Fields — oceColorsVelocity","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsVelocity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for velocity Fields — oceColorsVelocity","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsVelocity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for velocity Fields — oceColorsVelocity","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsVelocity(128),     zlab=\"oceColorsVelocity\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceColorsViridis.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Similar to the Matlab Viridis Scheme — oceColorsViridis","title":"Create Colors Similar to the Matlab Viridis Scheme — oceColorsViridis","text":"patterned matlab/python scheme blends yellow blue way designed reproduce well black--white, interpretable certain forms color blindness.  See references notes issues colour blindness computer graphics. alternative oceColorsViridis provided viridis package, illustrated Example 2.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsViridis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Similar to the Matlab Viridis Scheme — oceColorsViridis","text":"","code":"oceColorsViridis(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsViridis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Similar to the Matlab Viridis Scheme — oceColorsViridis","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsViridis.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Similar to the Matlab Viridis Scheme — oceColorsViridis","text":"following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006 following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsViridis.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Similar to the Matlab Viridis Scheme — oceColorsViridis","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsViridis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Similar to the Matlab Viridis Scheme — oceColorsViridis","text":"","code":"library(oce) # Example 1: oceColorsViridis imagep(volcano,     col = oceColorsViridis(128),     zlab = \"oceColorsViridis\" )"},{"path":"https://dankelley.github.io/oce/reference/oceColorsVorticity.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Colors Suitable for vorticity Fields — oceColorsVorticity","title":"Create Colors Suitable for vorticity Fields — oceColorsVorticity","text":"Create set colors displaying vorticity values, based scheme devised Thyng et al. (2016) presented python package Thyng (2019). color specifications transliterated python R 2015-09-29, adjusted since, even though python source changed.  prevent breaking old oce code.  get latest versions colours colours, use cmocean R package (Thyng, Richards, Krylov, 2019) directly, illustrated (\"matter\" scheme) Example 2. Note cmocean core functions provide way select various versions colour schemes. also worth considering palettes provided viridis package, illustrated (\"inferno\" scheme) Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsVorticity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Colors Suitable for vorticity Fields — oceColorsVorticity","text":"","code":"oceColorsVorticity(n)"},{"path":"https://dankelley.github.io/oce/reference/oceColorsVorticity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Colors Suitable for vorticity Fields — oceColorsVorticity","text":"n number colors create.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsVorticity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Colors Suitable for vorticity Fields — oceColorsVorticity","text":"vector color specifications.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsVorticity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Colors Suitable for vorticity Fields — oceColorsVorticity","text":"Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, Steven DiMarco. “True Colors Oceanography: Guidelines Effective Accurate Colormap Selection.” Oceanography 29, . 3 (September 1, 2016): 9–13. doi:10.5670/oceanog.2016.66 Thyng, Kristen. Kthyng/Cmocean. Python, 2019. https://github.com/kthyng/cmocean. Thyng, Kristen, Clark Richards, Ivan Krylov. Cmocean: Beautiful Colour Maps Oceanography (version 0.2), 2019. https://CRAN.R-project.org/package=cmocean. following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceColorsVorticity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Colors Suitable for vorticity Fields — oceColorsVorticity","text":"Krysten M. Thyng (Python version), Dan Kelley (R transliteration)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceColorsVorticity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Colors Suitable for vorticity Fields — oceColorsVorticity","text":"","code":"library(oce)  # Example 1 imagep(volcano, col=oceColorsVorticity(128),     zlab=\"oceColorsVorticity\")  if (FALSE) { # \\dontrun{ # Example 2 (requires the cmocean package) imagep(volcano, col=cmocean::cmocean(\"matter\"),     zlab=\"cmocean::cmocean(\\\"matter\\\")\")} # }  if (FALSE) { # \\dontrun{ # Example 3 (requires the viridis package) imagep(volcano, col=viridis::inferno,     zlab=\"viridis::inferno\")} # }"},{"path":"https://dankelley.github.io/oce/reference/oceConvolve.html","id":null,"dir":"Reference","previous_headings":"","what":"Convolve Two Time Series — oceConvolve","title":"Convolve Two Time Series — oceConvolve","text":"Convolve two time series, using backward-looking method. function provides straightforward convolution, may useful prefer use convolve() filter stats package.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceConvolve.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convolve Two Time Series — oceConvolve","text":"","code":"oceConvolve(x, f, end = 2)"},{"path":"https://dankelley.github.io/oce/reference/oceConvolve.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convolve Two Time Series — oceConvolve","text":"x numerical vector observations. f numerical vector filter coefficients. end flag controls handle points x series indices less length f.  end=0, values set 0.  end=1, original x values used .  end=2, fraction f values overlap x used.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceConvolve.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convolve Two Time Series — oceConvolve","text":"vector convolution output.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceConvolve.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convolve Two Time Series — oceConvolve","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceConvolve.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convolve Two Time Series — oceConvolve","text":"","code":"library(oce) t <- 0:1027 n <- length(t) signal <- ifelse(sin(t * 2 * pi / 128) > 0, 1, 0) tau <- 10 filter <- exp(-seq(5 * tau, 0) / tau) filter <- filter / sum(filter) observation <- oce.convolve(signal, filter) plot(t, signal, type = \"l\") lines(t, observation, lty = \"dotted\")"},{"path":"https://dankelley.github.io/oce/reference/oceDebug.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a Debugging Message — oceDebug","title":"Print a Debugging Message — oceDebug","text":"Print indented debugging message. Many oce functions decrease debug level 1 call functions, effect nesting, space deeper function level.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceDebug.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a Debugging Message — oceDebug","text":"","code":"oceDebug(debug = 0, ..., unindent = 0, sep = \"\", style = \"plain\")"},{"path":"https://dankelley.github.io/oce/reference/oceDebug.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a Debugging Message — oceDebug","text":"debug integer, less equal zero message, greater zero increasing levels debugging.  Values greater 4 treated like 4. ... items supplied cat(), printing.  Note newline printed unless ... contains string newline character (example). unindent integer giving number levels un-indent, e.g. start end lines called function. sep character insert elements ..., passing cat(). style either string function. string, must \"plain\" (default) plain text, \"bold\", \"italic\", \"red\", \"green\" \"blue\" (obvious meanings).  Note none effect non-interactive use, make difficult work R-markdown similar documents run latex. style function, must prepend postpend text control codes, cyan-coloured example; note crayon provides many functions work well style.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceDebug.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print a Debugging Message — oceDebug","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceDebug.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print a Debugging Message — oceDebug","text":"","code":"oceDebug(debug = 1, \"Example\", 1, \"Plain text\") #>         Example1Plain text oceDebug(debug = 1, \"Example\", 2, \"Bold\", style = \"bold\") #>         Example2Bold oceDebug(debug = 1, \"Example\", 3, \"Italic\", style = \"italic\") #>         Example3Italic oceDebug(debug = 1, \"Example\", 4, \"Red\", style = \"red\") #>         Example4Red oceDebug(debug = 1, \"Example\", 5, \"Green\", style = \"green\") #>         Example5Green oceDebug(debug = 1, \"Example\", 6, \"Blue\", style = \"blue\") #>         Example6Blue mycyan <- function(...) paste(\"\\033[36m\", paste(..., sep = \" \"), \"\\033[0m\", sep = \"\") oceDebug(debug = 1, \"Example\", 7, \"User-set cyan\", style = mycyan) #>         Example 7 User-set cyan"},{"path":"https://dankelley.github.io/oce/reference/oceDeleteData.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete Something From the data Slot of an oce Object — oceDeleteData","title":"Delete Something From the data Slot of an oce Object — oceDeleteData","text":"Return copy supplied object lacks named element data slot, note deletion processing log.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceDeleteData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete Something From the data Slot of an oce Object — oceDeleteData","text":"","code":"oceDeleteData(object, name)"},{"path":"https://dankelley.github.io/oce/reference/oceDeleteData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete Something From the data Slot of an oce Object — oceDeleteData","text":"object oce object. name String indicating name item deleted.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceDeleteData.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Delete Something From the data Slot of an oce Object — oceDeleteData","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceDeleteMetadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete Something in an oce metadata Slot — oceDeleteMetadata","title":"Delete Something in an oce metadata Slot — oceDeleteMetadata","text":"Return copy supplied object lacks named element metadata slot, note deletion processing log.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceDeleteMetadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete Something in an oce metadata Slot — oceDeleteMetadata","text":"","code":"oceDeleteMetadata(object, name)"},{"path":"https://dankelley.github.io/oce/reference/oceDeleteMetadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete Something in an oce metadata Slot — oceDeleteMetadata","text":"object oce object. name String indicating name item deleted.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceDeleteMetadata.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Delete Something in an oce metadata Slot — oceDeleteMetadata","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceEdit.html","id":null,"dir":"Reference","previous_headings":"","what":"Edit an Oce Object — oceEdit","title":"Edit an Oce Object — oceEdit","text":"Edit element oce object, inserting note processing log returned object.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceEdit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Edit an Oce Object — oceEdit","text":"","code":"oceEdit(   x,   item,   value,   action,   reason = \"\",   person = \"\",   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/oceEdit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Edit an Oce Object — oceEdit","text":"x oce object.  exact action oceEdit() depends sub-class x. item supplied, character string naming item object's metadata data slot, former checked first. exception item starts \"data@\" \"metadata@\", case named slot updated changed value contents item @ character. value new value item, supplied. action optional character string containing R code carry action object. reason character string giving reason change. person character string giving name person making change. debug integer specifies level debugging, 0 less indicating debugging, 1 indicating debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceEdit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Edit an Oce Object — oceEdit","text":"oce object, altered appropriately, log item indicating nature alteration.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceEdit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Edit an Oce Object — oceEdit","text":"several ways use function. item value supplied, either object's metadata data slot may altered. two ways can done. Case 1A. item string contain @ character, metadata slot examined entry named item, modified . Alternatively, item found metadata, value modified. However, item found either metadata data, error reported (see 1B add something yet exist). Case 1B. item string contains @ character, text left character must either \"metadata\" \"data\", names slot change done. contrast case 1A, create new item, already existence. item value supplied, action must supplied.  character string specifying action performed object, e.g. manipulation column.  action must refer object x, Example 2. case, log entry stored object, document change. Indeed, main benefit using function, instead altering object directly.  log entry useful contains brief note reason change, name person work.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceEdit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Edit an Oce Object — oceEdit","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceEdit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Edit an Oce Object — oceEdit","text":"","code":"library(oce) data(ctd) # Example 1: change latitude ctd2 <- oceEdit(ctd,     item = \"latitude\", value = 47.8879,     reason = \"illustration\", person = \"Dan Kelley\" ) # Example 2: add 0.1 dbar to pressure ctd3 <- oceEdit(ctd, action = \"x@data$pressure<-x@data$pressure+0.1\")"},{"path":"https://dankelley.github.io/oce/reference/oceFileTrim.html","id":null,"dir":"Reference","previous_headings":"","what":"Trim an oce File — oceFileTrim","title":"Trim an oce File — oceFileTrim","text":"Create oce file copying first n data chunks another file. can useful supplying small sample files bug reports. file types (inferred oceMagic()) permitted.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceFileTrim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trim an oce File — oceFileTrim","text":"","code":"oceFileTrim(infile, n = 100L, outfile, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/oceFileTrim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trim an oce File — oceFileTrim","text":"infile name AD2CP source file. n integer indicating number data chunks keep. default keep 100 chunks, common good choice sample files. outfile optional name new file created. supplied, default used, adding _trimmed base filename, e.g. AD2CP file named \".ad2cp\", constructed value outfile a_trimmed.ad2cp. debug integer value indicating level debugging. 1L, brief indication given processing steps. > 1L, information given data chunk, can yield extensive output.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceFileTrim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trim an oce File — oceFileTrim","text":"oceFileTrim() returns name output file, either provided outfile parameter constructed function.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceFileTrim.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Trim an oce File — oceFileTrim","text":"","code":"# Can only be run by the developer, since it uses a private file. f  <- \"~/Dropbox/oce_secret_data/ad2cp/byg_trimmed.ad2cp\" if (file.exists(f)) {     oceFileTrim(f, 10L) # this file holds 100 data segments }"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceFileTrim.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trim an oce File — oceFileTrim","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceFilter.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter a Time Series — oceFilter","title":"Filter a Time Series — oceFilter","text":"Filter time-series, possibly recursively","code":""},{"path":"https://dankelley.github.io/oce/reference/oceFilter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter a Time Series — oceFilter","text":"","code":"oceFilter(x, a = 1, b, zero.phase = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/oceFilter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter a Time Series — oceFilter","text":"x vector numeric values, filtered time series. vector numeric values, giving \\(\\) coefficients (see “Details”). b vector numeric values, giving \\(b\\) coefficients (see “Details”). zero.phase boolean, set TRUE run filter forwards, backwards, thus removing phase shifts associated filter.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceFilter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter a Time Series — oceFilter","text":"numeric vector filtered results, \\(y\\), denoted “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceFilter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Filter a Time Series — oceFilter","text":"filter defined e.g.  \\(y[]=b[1]*x[] + \\)\\( b[2]*x[-1] + b[3]*x[-2] + ... - [2]*y[-1] - [3]*y[-2] - \\)\\( [4]*y[-3] - ...\\), illustrated terms omitted lengths b small, terms dropped start time series index x less 1. contrast filter() function R, oce.filter lacks option circular filter.  consequence, oceFilter introduces phase lag.  One way remove lag run filter forwards backwards, “Examples”. However, result still problematic, sense applying reverse order yield different result.  (Matlab's filtfilt shares problem.)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceFilter.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Filter a Time Series — oceFilter","text":"first value vector ignored, length() equals 1, non-recursive filter results.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceFilter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Filter a Time Series — oceFilter","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceFilter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter a Time Series — oceFilter","text":"","code":"library(oce) par(mar = c(4, 4, 1, 1)) b <- rep(1, 5) / 5 a <- 1 x <- seq(0, 10) y <- ifelse(x == 5, 1, 0) f1 <- oceFilter(y, a, b) plot(x, y, ylim = c(-0, 1.5), pch = \"o\", type = \"b\") points(x, f1, pch = \"x\", col = \"red\")  # remove the phase lag f2 <- oceFilter(y, a, b, TRUE) points(x, f2, pch = \"+\", col = \"blue\")  legend(\"topleft\",     col = c(\"black\", \"red\", \"blue\"), pch = c(\"o\", \"x\", \"+\"),     legend = c(\"data\", \"normal filter\", \"zero-phase filter\") ) mtext(\"note that normal filter rolls off at end\")"},{"path":"https://dankelley.github.io/oce/reference/oceGetData.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From the data Slot of an oce Object — oceGetData","title":"Extract Something From the data Slot of an oce Object — oceGetData","text":"contrast various [[ functions, guaranteed look within data slot. named item found, NULL returned.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceGetData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From the data Slot of an oce Object — oceGetData","text":"","code":"oceGetData(object, name)"},{"path":"https://dankelley.github.io/oce/reference/oceGetData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From the data Slot of an oce Object — oceGetData","text":"object oce object. name String indicating name item found.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceGetData.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From the data Slot of an oce Object — oceGetData","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceGetMetadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From the metadata Slot of an oce Object — oceGetMetadata","title":"Extract Something From the metadata Slot of an oce Object — oceGetMetadata","text":"contrast various [[ functions, guaranteed look within metadata slot. named item found, NULL returned.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceGetMetadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From the metadata Slot of an oce Object — oceGetMetadata","text":"","code":"oceGetMetadata(object, name)"},{"path":"https://dankelley.github.io/oce/reference/oceGetMetadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From the metadata Slot of an oce Object — oceGetMetadata","text":"object oce object. name String indicating name item found.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceGetMetadata.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From the metadata Slot of an oce Object — oceGetMetadata","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceMagic.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the Type of an Oceanographic Data File — oceMagic","title":"Find the Type of an Oceanographic Data File — oceMagic","text":"oceMagic tries infer file type, based data within file, file name, combination two.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceMagic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the Type of an Oceanographic Data File — oceMagic","text":"","code":"oceMagic(file, encoding = \"latin1\", debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/oceMagic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the Type of an Oceanographic Data File — oceMagic","text":"file connection character string giving name file checked. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer, set non-zero turn debugging.  Higher values indicate debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceMagic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the Type of an Oceanographic Data File — oceMagic","text":"character string indicating file type, \"unknown\", type determined. result contains \"/\" characters, separate list describing file type, first element general type, second element manufacturer, third element manufacturer's name instrument. example, \"adp/nortek/aquadopp\" indicates acoustic-doppler profiler made NorTek, model type called Aquadopp.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceMagic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find the Type of an Oceanographic Data File — oceMagic","text":"oceMagic previously called oce.magic, alias removed version 0.9.24; see oce-defunct.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceMagic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find the Type of an Oceanographic Data File — oceMagic","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceNames2whpNames.html","id":null,"dir":"Reference","previous_headings":"","what":"Translate Oce Data Names to WHP Data Names — oceNames2whpNames","title":"Translate Oce Data Names to WHP Data Names — oceNames2whpNames","text":"Translate oce-style names WOCE names, using gsub() match patterns. example, pattern \"oxygen\" taken mean \"CTDOXY\".","code":""},{"path":"https://dankelley.github.io/oce/reference/oceNames2whpNames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Translate Oce Data Names to WHP Data Names — oceNames2whpNames","text":"","code":"oceNames2whpNames(names)"},{"path":"https://dankelley.github.io/oce/reference/oceNames2whpNames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Translate Oce Data Names to WHP Data Names — oceNames2whpNames","text":"names vector strings holding oce-style names.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceNames2whpNames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Translate Oce Data Names to WHP Data Names — oceNames2whpNames","text":"vector strings holding WHP-style names.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceNames2whpNames.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Translate Oce Data Names to WHP Data Names — oceNames2whpNames","text":"Several online sources list WHP names. example https://cchdo.github.io/hdo-assets/documentation/manuals/pdf/90_1/chap4.pdf","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceNames2whpNames.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Translate Oce Data Names to WHP Data Names — oceNames2whpNames","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ocePmatch.html","id":null,"dir":"Reference","previous_headings":"","what":"Partial Matching of Strings or Numbers — ocePmatch","title":"Partial Matching of Strings or Numbers — ocePmatch","text":"extended version pmatch() allows x numeric string-based.  pmatch(), partial string matches handled. wrapper useful mainly arguments plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/ocePmatch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Partial Matching of Strings or Numbers — ocePmatch","text":"","code":"ocePmatch(x, table, nomatch = NA_integer_, duplicates.ok = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/ocePmatch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Partial Matching of Strings or Numbers — ocePmatch","text":"x code, vector codes.  may numeric, case simply returned without analysis arguments, may string-based, case pmatch() used find numeric matches. table list maps strings numbers; pmatch() used names(table).  name contains characters normally permitted variable name, use quotes, e.g. list(salinity=1, temperature=2, \"salinity+temperature\"=3). nomatch value returned cases match (passed pmatch(). duplicates.ok code handling duplicates (passed pmatch()).","code":""},{"path":"https://dankelley.github.io/oce/reference/ocePmatch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Partial Matching of Strings or Numbers — ocePmatch","text":"number, vector numbers, corresponding matches. Non-matches indicated NA values, whatever value given NA argument.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ocePmatch.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Partial Matching of Strings or Numbers — ocePmatch","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ocePmatch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Partial Matching of Strings or Numbers — ocePmatch","text":"","code":"library(oce) oce.pmatch(c(\"s\", \"at\", \"te\"), list(salinity = 1, temperature = 3.1)) #> [1] 1.0  NA 3.1"},{"path":"https://dankelley.github.io/oce/reference/oceProject.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper to sf::sf_project() — oceProject","title":"Wrapper to sf::sf_project() — oceProject","text":"function used isolate oce functions changes map-projection functions done sf package.  (2020 December, rgdal package used, year tests ensuring results two packages .)","code":""},{"path":"https://dankelley.github.io/oce/reference/oceProject.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper to sf::sf_project() — oceProject","text":"","code":"oceProject(xy, proj, inv = FALSE, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/oceProject.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper to sf::sf_project() — oceProject","text":"xy two-column numeric matrix specifying locations.  inv False, xy[,1] hold longitude xy[,2] hold latitude, inv True, columns easting northing values (metres). proj character value specifying desired map projection.  See projection parameter mapPlot() details, including historical note dated 2023-04-11 now-deprecated sp package. inv logical value, False default, indicating whether inverse projection requested. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceProject.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper to sf::sf_project() — oceProject","text":"oceProject returns two-column matrix, first column holding either longitude x, second column holding either latitude y.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceProject.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Wrapper to sf::sf_project() — oceProject","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceRenameData.html","id":null,"dir":"Reference","previous_headings":"","what":"Rename Something in the data slot of an oce Object — oceRenameData","title":"Rename Something in the data slot of an oce Object — oceRenameData","text":"Rename item within data slot oce object, also changing dataNamesOriginal metadata slot, [[ accessor still work original name stored data.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceRenameData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rename Something in the data slot of an oce Object — oceRenameData","text":"","code":"oceRenameData(object, old, new, note = \"\")"},{"path":"https://dankelley.github.io/oce/reference/oceRenameData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rename Something in the data slot of an oce Object — oceRenameData","text":"object oce object. old character value matches name item object's data slot. new character value used new name matches name item object's data slot. Thus must name something already data slot. new  old, object returned unaltered. note character value holds explanation reason change. string non-zero length, inserted processing log returned value. NULL, entry added processing log.  Otherwise, processing log gets new item constructed function call.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceRenameData.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rename Something in the data slot of an oce Object — oceRenameData","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceRenameData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rename Something in the data slot of an oce Object — oceRenameData","text":"","code":"library(oce) data(ctd) CTD <- oceRenameData(ctd, \"salinity\", \"SALT\") stopifnot(all.equal(ctd[[\"salinity\"]], CTD[[\"SALT\"]])) stopifnot(all.equal(ctd[[\"sal00\"]], CTD[[\"SALT\"]]))"},{"path":"https://dankelley.github.io/oce/reference/oceRenameMetadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Rename Something in the metadata Slot of an oce Object — oceRenameMetadata","title":"Rename Something in the metadata Slot of an oce Object — oceRenameMetadata","text":"Rename item within metadata slot oce object.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceRenameMetadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rename Something in the metadata Slot of an oce Object — oceRenameMetadata","text":"","code":"oceRenameMetadata(object, old, new, note = \"\")"},{"path":"https://dankelley.github.io/oce/reference/oceRenameMetadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rename Something in the metadata Slot of an oce Object — oceRenameMetadata","text":"object oce object. old character value matches name item object's metadata slot. new character value used new name matches name item object's metadata slot. Thus must name something already metadata slot. new  old, object returned unaltered. note character value holds explanation reason change. string non-zero length, inserted processing log returned value. NULL, entry added processing log.  Otherwise, processing log gets new item constructed function call.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceRenameMetadata.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rename Something in the metadata Slot of an oce Object — oceRenameMetadata","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSetData.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Something in the data Slot of an oce Object — oceSetData","title":"Set Something in the data Slot of an oce Object — oceSetData","text":"Create copy object element data slot altered, added.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSetData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Something in the data Slot of an oce Object — oceSetData","text":"","code":"oceSetData(object, name, value, unit, originalName, note = \"\")"},{"path":"https://dankelley.github.io/oce/reference/oceSetData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Something in the data Slot of an oce Object — oceSetData","text":"object oce object. name String indicating name data item set. value Value item. unit optional indication units item. three possible forms (see “Details”). originalName Optional character string giving 'original' name (e.g. stored header data file). note Either empty (default), character string, NULL, control additions made processing log return value. note=\"\" entry created based deparsing function call. note non-empty string, string gets added added processing log. Finally, note=NULL, nothing added processing log. last form useful cases oceSetData called many times succession, resulting overly verbose processing log; cases, might help add note e.g. processingLog() <- \"QC (memo dek-2018-01/31)\"","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSetData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Something in the data Slot of an oce Object — oceSetData","text":"oce object, data slot altered either adding new item modifying existing item.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSetData.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set Something in the data Slot of an oce Object — oceSetData","text":"trickiest argument set unit.  three possibilities : unit named unnamed list() contains two items. list named, names must unit scale. list unnamed, stated names assigned items, stated order. Either way, unit item must expression() specifies unit, scale item must string describes scale. example, modern temperatures unit=list(unit=expression(degree*C), scale=\"-90\"). unit expression() giving unit . case, scale set \"\". unit character string converted expression parse(text=unit), scale set \"\".","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceSetData.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set Something in the data Slot of an oce Object — oceSetData","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSetData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Something in the data Slot of an oce Object — oceSetData","text":"","code":"data(ctd) Tf <- swTFreeze(ctd) ctd <- oceSetData(ctd, \"freezing\", Tf,     unit = list(unit = expression(degree * C), scale = \"ITS-90\") ) plotProfile(ctd, \"freezing\")"},{"path":"https://dankelley.github.io/oce/reference/oceSetMetadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Something in the metadata Slot of an oce Object — oceSetMetadata","title":"Set Something in the metadata Slot of an oce Object — oceSetMetadata","text":"Create copy object element metadata slot altered, added.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSetMetadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Something in the metadata Slot of an oce Object — oceSetMetadata","text":"","code":"oceSetMetadata(object, name, value, note = \"\")"},{"path":"https://dankelley.github.io/oce/reference/oceSetMetadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Something in the metadata Slot of an oce Object — oceSetMetadata","text":"object oce object. name String indicating name metadata item set. value Value item. note Either empty (default), character string, NULL, control additions made processing log return value. note=\"\" entry created based deparsing function call. note non-empty string, string gets added added processing log. Finally, note=NULL, nothing added processing log.  last form useful cases oceSetData called many times succession, resulting overly verbose processing log; case, might helpful use processingLog<- add summary entry object's processing log.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSetMetadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Something in the metadata Slot of an oce Object — oceSetMetadata","text":"oce object, metadata slot altered either adding new item modifying existing item.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceSetMetadata.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set Something in the metadata Slot of an oce Object — oceSetMetadata","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSetMetadata.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Something in the metadata Slot of an oce Object — oceSetMetadata","text":"","code":"# Add an estimate of MLD (mixed layer depth) to a ctd object library(oce) data(ctd) ctdWithMLD <- oceSetMetadata(ctd, \"MLD\", 3) ctdWithMLD[[\"MLD\"]] # 3 #> [1] 3"},{"path":"https://dankelley.github.io/oce/reference/oceSmooth.html","id":null,"dir":"Reference","previous_headings":"","what":"Smooth an oce Object — oceSmooth","title":"Smooth an oce Object — oceSmooth","text":"data element smoothed timeseries. ADP data, done along time, distance.  Time vectors, , smoothed.  good use oce.smooth despiking noisy data.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSmooth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Smooth an oce Object — oceSmooth","text":"","code":"oceSmooth(x, ...)"},{"path":"https://dankelley.github.io/oce/reference/oceSmooth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Smooth an oce Object — oceSmooth","text":"x oce object. ... parameters supplied smooth(), actual work.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSmooth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Smooth an oce Object — oceSmooth","text":"oce object smoothed appropriately.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceSmooth.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Smooth an oce Object — oceSmooth","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSmooth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Smooth an oce Object — oceSmooth","text":"","code":"library(oce) data(ctd) d <- oce.smooth(ctd) plot(d)"},{"path":"https://dankelley.github.io/oce/reference/oceSpectrum.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalize a Spectrum — oceSpectrum","title":"Normalize a Spectrum — oceSpectrum","text":"wrapper around R spectrum() function, returns spectral values adjusted integral values equals variance input x.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSpectrum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalize a Spectrum — oceSpectrum","text":"","code":"oceSpectrum(x, ...)"},{"path":"https://dankelley.github.io/oce/reference/oceSpectrum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalize a Spectrum — oceSpectrum","text":"x univariate multivariate time series, spectrum(). ... extra arguments passed spectrum().","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSpectrum.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Normalize a Spectrum — oceSpectrum","text":"spectrum values integrate variance.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceSpectrum.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Normalize a Spectrum — oceSpectrum","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/oceSpectrum.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Normalize a Spectrum — oceSpectrum","text":"","code":"x <- rnorm(1e3) s <- spectrum(x, plot = FALSE) ss <- oce.spectrum(x, plot = FALSE) cat(\"variance of x=\", var(x), \"\\n\") #> variance of x= 0.9757407  cat(\"integral of     spectrum=\", sum(s$spec) * diff(s$freq[1:2]), \"\\n\") #> integral of     spectrum= 0.4903071  cat(\"integral of oce.spectrum=\", sum(ss$spec) * diff(ss$freq[1:2]), \"\\n\") #> integral of oce.spectrum= 0.9757407"},{"path":"https://dankelley.github.io/oce/reference/oceUnits2whpUnits.html","id":null,"dir":"Reference","previous_headings":"","what":"Translate oce Unit to WHP Unit — oceUnits2whpUnits","title":"Translate oce Unit to WHP Unit — oceUnits2whpUnits","text":"Translate oce units WHP-style strings, match patterns.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceUnits2whpUnits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Translate oce Unit to WHP Unit — oceUnits2whpUnits","text":"","code":"oceUnits2whpUnits(units, scales)"},{"path":"https://dankelley.github.io/oce/reference/oceUnits2whpUnits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Translate oce Unit to WHP Unit — oceUnits2whpUnits","text":"units vector expressions units oce notation. scales vector strings scales oce notation.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceUnits2whpUnits.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Translate oce Unit to WHP Unit — oceUnits2whpUnits","text":"vector strings holding WOCE-style names.","code":""},{"path":"https://dankelley.github.io/oce/reference/oceUnits2whpUnits.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Translate oce Unit to WHP Unit — oceUnits2whpUnits","text":"Several online sources list WOCE names. example https://cchdo.github.io/hdo-assets/documentation/manuals/pdf/90_1/chap4.pdf","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/oceUnits2whpUnits.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Translate oce Unit to WHP Unit — oceUnits2whpUnits","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ocecolors.html","id":null,"dir":"Reference","previous_headings":"","what":"Data That Define Some Color Palettes — ocecolors","title":"Data That Define Some Color Palettes — ocecolors","text":"ocecolors dataset list containing color-schemes, used oceColorsClosure() create functions oceColorsViridis().","code":""},{"path":"https://dankelley.github.io/oce/reference/ocecolors.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Data That Define Some Color Palettes — ocecolors","text":"data come matplotlib site https://github.com/matplotlib/matplotlib.","code":""},{"path":"https://dankelley.github.io/oce/reference/ocecolors.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Data That Define Some Color Palettes — ocecolors","text":"following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006 following references provide information choosing colour schemes, suitable viewers colour deficiencies. Light, Adam, Patrick J. Bartlein. \"End Rainbow? Color Schemes Improved Data Graphics.\" Eos, Transactions American Geophysical Union 85, . 40 (2004): 385. DOI: 10.1029/2004EO400002 Stephenson, David B. \"Comment 'Color Schemes Improved Data Graphics', Light P.J. Bartlein.\" Eos, Transactions American Geophysical Union 86, .  20 (2005): 196. DOI: 10.1029/2005EO200005 Light, Adam, Patrick J. Bartlein. \"Reply 'Comment Color Schemes Improved Data Graphics,' . Light P.J.  Bartlein'.\" Eos, Transactions American Geophysical Union 86, . 20 (2005): 196–196. DOI: 10.1029/2005EO200006","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/ocecolors.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Data That Define Some Color Palettes — ocecolors","text":"Authored matplotlib contributers, packaged (license permission) oce Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/odf-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store ODF Data — odf-class","title":"Class to Store ODF Data — odf-class","text":"class data stored format used Canadian Department Fisheries Oceans laboratories. somewhat similar bremen class, sense apply just particular instrument.","code":""},{"path":"https://dankelley.github.io/oce/reference/odf-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store ODF Data — odf-class","text":"data oce objects, data slot odf objects list containing main data object. metadata oce objects, metadata slot odf objects list containing information data object . processingLog oce objects, processingLog slot odf objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/odf-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store ODF Data — odf-class","text":"Although [[<- operator may permit modification contents odf objects (see [[<-,odf-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/odf-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store ODF Data — odf-class","text":"full contents data metadata slots odf object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,odf-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,odf-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":"https://dankelley.github.io/oce/reference/odf-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Class to Store ODF Data — odf-class","text":"Anthony W. Isenor David Kellow, 2011. ODF Format Specification Version 2.0. (.doc file obtained June 2011 Dan Kelley, longer seems made available DFO website.) (Unknown authors), October 2014. ODF Format Description (MLI), https://ogsl.ca/wp-content/uploads/ODF_format_desc_en_0.pdf, (Link worked early March 16, 2022, failed later day.) sample ODF file DFO format available system.file(\"extdata\",\"CTD_BCD2014666_008_1_DN.ODF.gz\",package=\"oce\") sample ODF file MLI format may available https://ogsl.ca/wp-content/uploads/ODF_file_example_en_0.pdf. (Link worked early March 16, 2022, failed later day.)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/odf-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store ODF Data — odf-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/parseLatLon.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse a Latitude or Longitude String — parseLatLon","title":"Parse a Latitude or Longitude String — parseLatLon","text":"Parse latitude longitude string, e.g. header CTD file following formats understood (, e.g. latitude):   Note iconv() called convert string ASCII decoding, change degree (non-ASCII) symbols blanks.","code":"** NMEA Latitude = 47 54.760 N ** Latitude: 47 53.27 N"},{"path":"https://dankelley.github.io/oce/reference/parseLatLon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse a Latitude or Longitude String — parseLatLon","text":"","code":"parseLatLon(line, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/parseLatLon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse a Latitude or Longitude String — parseLatLon","text":"line character string containing indication latitude longitude. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get .","code":""},{"path":"https://dankelley.github.io/oce/reference/parseLatLon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse a Latitude or Longitude String — parseLatLon","text":"numerical value latitude longitude.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/parseLatLon.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Parse a Latitude or Longitude String — parseLatLon","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-adp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an adp Object — plot,adp-method","title":"Plot an adp Object — plot,adp-method","text":"Create summary plot data measured acoustic Doppler profiler.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-adp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an adp Object — plot,adp-method","text":"","code":"# S4 method for class 'adp' plot(   x,   which,   j,   col,   breaks,   zlim,   titles,   lwd = par(\"lwd\"),   type = \"l\",   ytype = c(\"profile\", \"distance\"),   drawTimeRange = getOption(\"oceDrawTimeRange\"),   useSmoothScatter,   missingColor = \"gray\",   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1.5, mgp[1] + 1.5, 1.5, 1.5),   mai.palette = rep(0, 4),   tformat,   marginsAsImage = FALSE,   cex = par(\"cex\"),   cex.axis = par(\"cex.axis\"),   cex.lab = par(\"cex.lab\"),   xlim,   ylim,   control,   useLayout = FALSE,   coastline = \"coastlineWorld\",   span = 300,   main = \"\",   grid = FALSE,   grid.col = \"darkgray\",   grid.lty = \"dotted\",   grid.lwd = 1,   xlab = NULL,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-adp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an adp Object — plot,adp-method","text":"x adp object. list desired plot types.  graphed panels running top page.  given, plot show images distance-time dependence velocity beam. See “Details” meanings various values . j optional string specifying sub-class . Nortek Aquadopp profilers, may either \"default\" (missing) get main signal, \"diagnostic\" get diagnostic signal. col optional indication color(s) use.  provided, default images oce.colorsPalette(128,1), lines points black. breaks optional breaks color scheme zlim range used zlim parameter imagep() call used create image.  omitted, zlim set panel individually, encompass data panel centred around zero.  provided two-element vector, used panel.  provided two-column matrix, panel graph uses corresponding row matrix; example, setting zlim=rbind(c(-1,1),c(-1,1),c(-.1,.1)) might make sense =1:3, two horizontal velocities one scale, smaller vertical velocity another. titles optional vector character strings used labels plot panels.  images, strings placed right hand side top margin.  timeseries, strings ignored.  provided, length must equal . lwd plot time-series scattergraph format lines, used usual way; otherwise, e.g. image formats, ignored. type plot time-series scattergraph format, used usual way, e.g. \"l\" lines, etc.; otherwise, image formats, ignored. ytype character string controlling type y axis images (ignored time series).  \"distance\", y axis distance sensor head, smaller distances nearer bottom graph.  \"profile\", still true upward-looking instruments, y axis flipped downward-looking instruments, either case, top graph represent sample nearest sea surface. drawTimeRange boolean applies panels time horizontal axis, indicating whether draw time range top-left margin plot. useSmoothScatter boolean indicates whether use smoothScatter() various plots, =\"uv\".  provided default used, smoothScatter() used 2000 points plot. missingColor color used indicate NA values images (see imagep()); set NULL avoid indication. mgp 3-element numerical vector used par(\"mgp\") control spacing axis elements.  default tighter R default. mar 4-element numerical vector used par(\"mar\") control plot margins. default tighter R default. mai.palette margins, inches, added calculated palette; alter default caution tformat optional argument passed oce.plot.ts(), plot types call function.  (See strptime() format used.) marginsAsImage boolean, TRUE put wide margin right time-series plots, even images list. (margin made wide images sequence.) cex numeric character expansion factor plot symbols; see par(). cex.axis, cex.lab character expansion factors axis numbers axis names; see par(). xlim optional 2-element list xlim, 2-column matrix, case rows used, order, panels graph. ylim optional 2-element list ylim, 2-column matrix, case rows used, order, panels graph. control optional list parameters may used different plot types.  Possibilities drawBottom (boolean indicates whether draw bottom) bin (numeric giving index bin act, explained “Details”). useLayout set FALSE prevent using layout() set plot.  needed call part sequence set e.g. par(mfrow). coastline coastline object, character string naming one.  used =\"map\".  See notes plot,ctd-method() information built-coastlines. span approximate span map km main main title plot, used just top panel, several panels. grid TRUE, grid drawn panel.  (argument needed, calling grid() sequence plots result useful results individual panels. grid.col color grid grid.lty line type grid grid.lwd line width grid xlab optional character value giving label x axis. NULL (default) label determined automatically. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. ... optional arguments passed plotting functions.  example, supplying despike=TRUE cause time-series panels de-spiked despike().  Another common action set color missing values image plots, argument missingColor (see imagep()).  Note error give breaks ..., formal argument zlim also given, contradict .","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-adp-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an adp Object — plot,adp-method","text":"list silently returned, containing xat yat, values can used oce.grid() add grid plot.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-adp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot an adp Object — plot,adp-method","text":"plot may one panels, content controlled argument. =1:4 (=\"u1\" \"u4\") yield distance-time image plot velocity component.  x beam coordinates (signalled metadata$oce.coordinate==\"beam\"), beam velocity, labelled b[1] etc.  x xyz coordinates (sometimes called frame coordinates, ship coordinates), velocity component right frame ship (labelled u etc). Finally, x \"enu\" coordinates, image show eastward component (labelled east).  x \"\" coordinates, component corresponding east, rotation (labelled u\\').  Note coordinate set read.adp(), beamToXyzAdp(), xyzToEnuAdp(), enuToOtherAdp(). =5:8 (=\"a1\" \"a4\") yield distance-time images backscatter intensity respective beams.  (data derived Teledyne-RDI instruments, item called “echo intensity.”) =9:12 (=\"q1\" \"q4\") yield distance-time images signal quality respective beams.  (RDI data derived instruments, item called “correlation magnitude.”) =60 =\"map\" draw map location(s). =70:73 (=\"g1\" \"g4\") yield distance-time images percent-good respective beams.  (data derived Teledyne-RDI instruments, instruments yield item, called “percent good.”) =80:83 (=\"vv\", =\"va\", =\"vq\", =\"vg\") yield distance-time images vertical beam fields 5 beam \"SentinelV\" ADCP Teledyne RDI. =\"vertical\" yields two panel distance-time image vertical beam velocity amplitude. =13 (=\"salinity\") yields time-series plot salinity. =14 (=\"temperature\") yields time-series plot temperature. =15 (=\"pressure\") yields time-series plot pressure. =16 (=\"heading\") yields time-series plot instrument heading. =17 (=\"pitch\") yields time-series plot instrument pitch. =18 (=\"roll\") yields time-series plot instrument roll. =19 yields time-series plot distance-averaged velocity beam 1, rightward velocity, eastward velocity, rotated-eastward velocity, depending coordinate system. =20 yields time-series distance-averaged velocity beam 2, foreward velocity, northward velocity, rotated-northward velocity, depending coordinate system. =21 yields time-series distance-averaged velocity beam 3, -frame velocity, upward velocity, rotated-upward velocity, depending coordinate system. =22 yields time-series distance-averaged velocity beam 4, beam coordinates, velocity estimate, coordinates.  (ignored 3-beam data.) =\"progressiveVector\" (=23) yields progressive-vector diagram horizontal plane, plotted asp=1.  Normally, depth-averaged velocity components used, control list contains item named bin, depth bin used (error resulting bin range). =24 yields time-averaged profile first component velocity (see =19 meaning component, various coordinate systems). =25 24, second component. =26 24, third component. =27 24, fourth component (makes sense, given instrument). =28 \"uv\" yields velocity plot horizontal plane, .e. u[2] versus u[1].  number data points small, scattergraph used, large, smoothScatter() used. =29 \"uv+ellipse\" \"uv\" case, added indication tidal ellipse, calculated eigen vectors covariance matrix. =30 \"uv+ellipse+arrow\" \"uv+ellipse\" case, added arrow indicating mean current. =40 \"bottomRange\" average bottom range beams instrument. =41 44 (\"bottomRange1\" \"bottomRange4\") bottom range beams 1 4. =50 \"bottomVelocity\" average bottom velocity beams instrument. =51 54 (\"bottomVelocity1\" \"bottomVelocity4\") bottom velocity beams 1 4. =55 (\"heaving\") time-integrated, depth-averaged, vertical velocity, .e. time series heaving. =60 (\"map\") map. =100 (\"soundSpeed\") time series sound speed. =200 (\"accelerometerx\") time-series x component accelerometer reading. =201 (\"accelerometery\") time-series y component accelerometer reading. =202 (\"accelerometerz\") time-series z component accelerometer reading. =210 (\"magnetometerx\") time-series x component magnetometer reading. =211 (\"magnetometery\") time-series y component magnetometer reading. =212 (\"magnetometerz\") time-series z component magnetometer reading. addition , following shortcuts defined: =\"velocity\" equivalent =1:3 1:4 (depending device) velocity components. =\"amplitude\" equivalent =5:7 5:8 (depending device) backscatter intensity components. =\"quality\" equivalent =9:11 9:12 (depending device) quality components. =\"hydrography\" equivalent =14:15 temperature pressure. =\"angles\" equivalent =16:18 heading, pitch roll. =\"accelerometer\" plot 3-panel timeseries acceleration, equivalent =110:102. color scheme image plots (1:12) provided col argument, passed image() actual plotting.  See “Examples” comparisons. common quick-look plot assess mooring movement use =15:18 (pressure included signal tide, tidal currents may dislodge mooring cause settle). default, plot,adp-method uses zlim value image() constructed contain data, symmetric zero.  done per-panel basis, scale plotted top-right corner, along name variable plotted. may also supply zlim one ... arguments, aware reasonable limit horizontal velocity components unlikely much use vertical component. good first step analysis measurements made moored device (stored d, say) plot(d, =14:18).  shows time series water properties sensor orientation, helpful deciding data trim start end deployment, measured dock ship travelled mooring site.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-adp-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an adp Object — plot,adp-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-adp-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an adp Object — plot,adp-method","text":"","code":"library(oce) data(adp) plot(adp, which = 1:3)  plot(adp, which = \"temperature\", tformat = \"%H:%M\")"},{"path":"https://dankelley.github.io/oce/reference/plot-adv-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an adv Object — plot,adv-method","title":"Plot an adv Object — plot,adv-method","text":"Plot adv data.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-adv-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an adv Object — plot,adv-method","text":"","code":"# S4 method for class 'adv' plot(   x,   which = c(1:3, 14, 15),   col,   titles,   type = \"l\",   lwd = par(\"lwd\"),   drawTimeRange = getOption(\"oceDrawTimeRange\"),   drawZeroLine = FALSE,   useSmoothScatter,   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1.5, mgp[1] + 1.5, 1.5, 1.5),   tformat,   marginsAsImage = FALSE,   cex = par(\"cex\"),   cex.axis = par(\"cex.axis\"),   cex.lab = par(\"cex.lab\"),   cex.main = par(\"cex.main\"),   xlim,   ylim,   brushCorrelation,   colBrush = \"red\",   main = \"\",   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-adv-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an adv Object — plot,adv-method","text":"x adv object. List desired plot types.  graphed panels running top page.  See “Details” meanings various values . col Optional indication color(s) use.  provided, default images oce.colorsPalette(128,1), lines points black. titles Optional vector character strings used labels plot panels.  images, strings placed right hand side top margin.  timeseries, strings ignored.  provided, length must equal . type Type plot, plot(). lwd plot time-series scattergraph format lines, used usual way; otherwise, e.g. image formats, ignored. drawTimeRange Logical value applies panels time horizontal axis, indicating whether draw time range top-left margin plot. drawZeroLine Logical value indicating whether draw zero lines velocities. useSmoothScatter Logical value indicating whether use smoothScatter() various plots, =\"uv\".  provided default used, smoothScatter() used 2000 points plot. mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar Value used par(\"mar\"). tformat Optional argument passed oce.plot.ts(), plot types call function.  (See strptime() format used.) marginsAsImage Logical value indicating whether put wide margin right time-series plots, matching space used palette imagep() plot. cex numeric character expansion factor plot symbols; see par(). cex.axis, cex.lab, cex.main character expansion factors axis numbers, axis names plot titles; see par(). xlim Optional 2-element list xlim, 2-column matrix, case rows used, order, panels graph. ylim Optional 2-element list ylim, 2-column matrix, case rows used, order, panels graph. brushCorrelation Optional number 0 100, indicating per-beam correlation threshold data considered suspect. plot type p, suspect points (velocity, backscatter amplitude, correlation) colored red; otherwise, argument ignored. colBrush Color use brushed (bad) data, brushCorrelation active. main Main title plot, used just top panel, several panels. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... Optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-adv-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot an adv Object — plot,adv-method","text":"Creates multi-panel summary plot data measured ADV. panels controlled argument.  (Note gaps sequence, e.g. 4 8 used.) =1 3 (\"u1\" \"u3\") yield timeseries first, second, third components velocity (beam, xyz enu coordinates). =4 permitted (since ADV 3-beam devices) =5 7 (\"a1\" \"a3\") yield timeseries amplitudes beams 1 3.  (Note data called data$[,1], data$[,2] data$[,3], three timeseries.) =8 permitted (since ADV 3-beam devices) =9 11 (\"q1\" \"q3\") yield timeseries correlation beams 1 3.  (Note data called data$c[,1], data$c[,2] data$c[,3], three timeseries.) =12 permitted (since ADVs 3-beam devices) =13 permitted (since ADVs measure salinity) =14 =\"temperature\" yields timeseries temperature. =15 =\"pressure\" yields timeseries pressure. =16 =\"heading\" yields timeseries heading. =17 =\"pitch\"yields timeseries pitch. =18 =\"roll\"yields timeseries roll. =19 21 yields plots correlation versus amplitude, beams 1 3, using smoothScatter(). =22 permitted (since ADVs 3-beam devices) =23 \"progressive vector\" yields progressive-vector diagram horizontal plane, plotted asp=1, taking beam1 beam2 eastward northward components velocity, respectively. =28 \"uv\" yields velocity plot horizontal plane, .e. u[2] versus u[1].  number data points small, scattergraph used, large, smoothScatter() used. =29 \"uv+ellipse\" \"uv\" case, added indication tidal ellipse, calculated eigen vectors covariance matrix. =30 \"uv+ellipse+arrow\" \"uv+ellipse\" case, added arrow indicating mean current. =50 \"analog1\" plots time series analog1 signal, one. =51 \"analog2\" plots time series analog2 signal, one. =100 \"voltage\" plots voltage timeseries, voltage exists dataset. addition , groupings defined: =\"velocity\" equivalent =1:3 (three velocity components) =\"amplitude\" equivalent =5:7 (three amplitude components) =\"backscatter\" equivalent =9:11 (three backscatter components) =\"hydrography\" equivalent =14:15 (temperature pressure) =\"angles\" equivalent =16:18 (heading, pitch roll)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-adv-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an adv Object — plot,adv-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-adv-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an adv Object — plot,adv-method","text":"","code":"library(oce) data(adv) plot(adv)"},{"path":"https://dankelley.github.io/oce/reference/plot-amsr-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an amsr Object — plot,amsr-method","title":"Plot an amsr Object — plot,amsr-method","text":"Plot image component amsr object.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-amsr-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an amsr Object — plot,amsr-method","text":"","code":"# S4 method for class 'amsr' plot(   x,   y,   asp = NULL,   breaks,   col,   colormap,   zlim,   zlab,   pass = NULL,   missingColor,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-amsr-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an amsr Object — plot,amsr-method","text":"x amsr object. y character value indicating name band plot; provided, SST (variant thereof) used; see documentation amsr class list bands. asp optional numerical value giving aspect ratio plot.  default value, NULL, means use aspect ratio 1 world views, value computed ylim, latter specified ... argument. breaks optional numeric vector z values breaks color scheme. colormap provided, takes precedence breaks col. col optional argument, either vector colors corresponding breaks, length 1 less number breaks, function specifying colors. neither col colormap provided, col defaults oceColorsTemperature(). colormap provided, takes precedence breaks col. colormap specification colormap use, created colormap().  colormap NULL, default, colormap created cover range data values, using oceColorsTemperature color scheme. colormap provided, takes precedence breaks col. See “Examples” example using \"turbo\" color scheme. zlim optional numeric vector length 2, giving limits plotted quantity.  reasonable default computed, given. zlab optional character value shown top-right margin plot. given, defaults name plotted variable. pass either NULL (default), character value either \"ascending\" \"descending\".  value pass examined realtime data, hold ascending descending passes SST related arrays. missingColor optional list specifying colors use non-data categories.  provided, default used.  type 1, default list(land=\"papayaWhip\", none=\"lightGray\", bad=\"gray\", rain=\"plum\", ice=\"mediumVioletRed\").  type 2, list(coast=\"gray\", land=\"papayaWhip\", noObs=\"lightGray\", seaIce=\"mediumVioletRed\").  colors may used place , names must match, names must present. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. ... extra arguments passed imagep(), e.g. control view xlim (longitude) ylim (latitude).","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-amsr-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot an amsr Object — plot,amsr-method","text":"addition fields named directly object, SSTDay SSTNight, also possible plot computed fields, SST, combines day night fields.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-amsr-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an amsr Object — plot,amsr-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-amsr-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an amsr Object — plot,amsr-method","text":"","code":"library(oce) data(coastlineWorld) data(amsr) # see ?amsr for how to read and composite such objects  # Example 1: plot with default color scheme, oceColorsTemperature() plot(amsr, \"SST\") lines(coastlineWorld[[\"longitude\"]], coastlineWorld[[\"latitude\"]])   # Example 2: 'turbo' color scheme plot(amsr, \"SST\", col = oceColorsTurbo) lines(coastlineWorld[[\"longitude\"]], coastlineWorld[[\"latitude\"]])"},{"path":"https://dankelley.github.io/oce/reference/plot-argo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an argo Object — plot,argo-method","title":"Plot an argo Object — plot,argo-method","text":"Plot summary diagram argo data.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-argo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an argo Object — plot,argo-method","text":"","code":"# S4 method for class 'argo' plot(   x,   which = 1,   level,   coastline = c(\"best\", \"coastlineWorld\", \"coastlineWorldMedium\", \"coastlineWorldFine\",     \"none\"),   cex = 1,   pch = 1,   type = \"p\",   col = 1,   fill = FALSE,   projection = NULL,   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1.5, mgp[1] + 1.5, 1.5, 1.5),   tformat,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-argo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an argo Object — plot,argo-method","text":"x argo object. list desired plot types, one following. Note oce.pmatch() used try complete partial character matches, error occur match complete (e.g. \"salinity\" matches \"salinity ts\" \"salinity profile\".). =1, =\"trajectory\" =\"map\" gives plot argo trajectory, coastline, one provided. =2 \"salinity ts\" gives time series salinity indicated level(s) =3 \"temperature ts\" gives time series temperature indicated level(s) =4 \"TS\" gives TS diagram indicated level(s) =5 \"salinity profile\" gives salinity profile =6 \"temperature profile\" gives temperature profile =7 \"sigma0 profile\" gives sigma0 profile =8 \"spice profile\" gives spiciness profile, referenced surface.  (using =9.) =9 \"spiciness0 profile\" gives profile spiciness referenced pressure 0 dbar, .e. surface.  (using =8.) =10 \"spiciness1 profile\" gives profile spiciness referenced pressure 1000 dbar. =11 \"spiciness2 profile\" gives profile spiciness referenced pressure 2000 dbar. level depth pseudo-level plot, =2 higher. May integer, case refers index depth (1 top) may string \"\" means plot data. coastline character string giving coastline used Argo-location map, \"best\" pick one highest resolution, \"none\" avoid drawing coastline. cex size plotting symbols used type=\"p\". pch type plotting symbols used type=\"p\". type plot type, either \"l\" \"p\". col optional list colors plotting. fill either logical, indicating whether fill land light-gray, color name.  Owing problems projections, default fill. projection character value indicating projection used trajectory maps. NULL, projection used, although plot aspect ratio set yield zero shape distortion mean float latitude.  projection=\"automatic\", one two projections used: stereopolar (.e. \"+proj=stere +lon_0=X\" X mean longitude), Mercator (.e. \"+proj=merc\") otherwise.  Otherwise, projection must character string specifying projection notation used oceProject() mapPlot(). mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\"). tformat optional argument passed oce.plot.ts(), plot types call function.  (See strptime() format used.) debug debugging flag. ... optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-argo-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an argo Object — plot,argo-method","text":"None.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-argo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an argo Object — plot,argo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-argo-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an argo Object — plot,argo-method","text":"","code":"library(oce) data(argo) tc <- cut(argo[[\"time\"]], \"year\") # Example 1: plot map, which reveals float trajectory. plot(argo, pch = as.integer(tc)) year <- substr(levels(tc), 1, 4) data(topoWorld) contour(topoWorld[[\"longitude\"]], topoWorld[[\"latitude\"]],     topoWorld[[\"z\"]],     add = TRUE ) legend(\"bottomleft\", pch = seq_along(year), legend = year, bg = \"white\", cex = 3 / 4)   # Example 2: plot map, TS, T(z) and S(z). Note the use # of handleFlags(), to skip over questionable data. plot(handleFlags(argo), which = c(1, 4, 6, 5))"},{"path":"https://dankelley.github.io/oce/reference/plot-bremen-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a bremen Object — plot,bremen-method","title":"Plot a bremen Object — plot,bremen-method","text":"Plot bremen object. first argument seems CTD dataset, uses plot,ctd-method(); otherwise, argument assumed ladp object, two-panel plot created plot,ladp-method() show velocity variation pressure.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-bremen-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a bremen Object — plot,bremen-method","text":"","code":"# S4 method for class 'bremen' plot(x, type, ...)"},{"path":"https://dankelley.github.io/oce/reference/plot-bremen-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a bremen Object — plot,bremen-method","text":"x bremen object. type Optional string indicating type x coerced plotting. choices ctd ladp. ... arguments, passed plotting functions.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-bremen-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a bremen Object — plot,bremen-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-cm-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a cm Object — plot,cm-method","title":"Plot a cm Object — plot,cm-method","text":"Creates multi-panel summary plot data measured current meter.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-cm-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a cm Object — plot,cm-method","text":"","code":"# S4 method for class 'cm' plot(   x,   which = c(1:2),   type = \"l\",   xlim,   ylim,   xaxs = \"r\",   yaxs = \"r\",   drawTimeRange = getOption(\"oceDrawTimeRange\"),   drawZeroLine = FALSE,   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1.5, mgp[1] + 1.5, 1.5, 1.5),   small = 2000,   main = \"\",   tformat,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-cm-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a cm Object — plot,cm-method","text":"x cm object. list desired plot types.  graphed panels running top page.  See “Details” meanings various values . type type plot, plot(). xlim, ylim optional limit x y axes, passed oce.plot.ts() time-series plots. xaxs, yaxs optional controls limits x y axes, passed oce.plot.ts() time-series plots.  values default \"r\", meaning use regular method extend plot past normal limits.  common use \"\" make graph extend panel limits. drawTimeRange boolean applies panels time horizontal axis, indicating whether draw time range top-left margin plot. drawZeroLine boolean indicates whether draw zero lines velocities. mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\"). small integer indicating size data set considered \"small\", plotted points lines using standard plot() function.  Data sets small points plotted smoothScatter() instead. main main title plot, used just top panel, several panels. tformat optional argument passed oce.plot.ts(), plot types call function.  (See strptime() format used.) debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... Optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-cm-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a cm Object — plot,cm-method","text":"panels controlled argument, follows. =1 =\"u\" time-series graph eastward velocity, u, function time. =2 =\"v\" time-series graph northward velocity, u, function time. =3 \"progressive vector\" progressive-vector plot =4 \"uv\" plot v versus u. (Dots used small datasets, smoothScatter large ones.) =5 \"uv+ellipse\" \"uv\" case, added indication tidal ellipse, calculated eigen vectors covariance matrix. =6 \"uv+ellipse+arrow\" \"uv+ellipse\" case, added arrow indicating mean current. =7 \"pressure\" pressure =8 \"salinity\" salinity =9 \"temperature\" temperature =10 \"TS\" TS diagram =11 \"conductivity\" conductivity =20 \"direction\" direction flow","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-cm-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a cm Object — plot,cm-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-cm-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a cm Object — plot,cm-method","text":"","code":"library(oce) data(cm) summary(cm) #> Cm summary #> ---------- #>  #> * File source:   \"/Users/kelley/Dropbox/data/archive/sleiwex/2008/moorings/m11/cm/interocean_0811786/manufacturer/cm_interocean_0811786.s4a.tab\" #> * Instr. type:   (2Hz)S4 #> * Serial Num.:   8111786 #> * Version:       2.399 #> * North:         magnetic #> * Time: 2008-06-26 to 2008-06-26 23:59:00 (1440 samples, mean increment 1 min) #> * Data Overview #>  #>                              Min.       Mean                Max.                Dim. NAs  OriginalName #>     Sample..                 842        1561.5              2281                1440 0    \"Sample #\"   #>     Date                     NA         NA                  NA                  1440 0    \"Date\"       #>     Time                     NA         NA                  NA                  1440 0    \"Time\"       #>     dec.S                    0          0                   0                   1440 0    \"dec S\"      #>     v [m/s]                  -0.862     -0.088736           0.74                1440 0    \"Vnorth\"     #>     u [m/s]                  -0.478     0.02761             0.654               1440 0    \"Veast\"      #>     Speed                    1.44       53.569              98.29               1440 0    \"Speed\"      #>     Dir                      7          126.99              352.1               1440 0    \"Dir\"        #>     Vref                     NA         NA                  NA                  1440 1440 \"Vref\"       #>     Hx                       -210       -31.052             177                 1440 0    \"Hx\"         #>     Hy                       -212       -0.58889            211                 1440 0    \"Hy\"         #>     conductivity [mS/cm]     36.8       36.924              37.2                1440 0    \"Cond\"       #>     temperature [°C, ITS-90] 1.204      2.0773              3.065               1440 0    \"T-Temp\"     #>     Depth                    73.242     74.767              77.148              1440 0    \"Depth\"      #>     none                     NA         NA                  NA                  1440 1440 \"none\"       #>     none.1                   NA         NA                  NA                  1440 1440 \"none\"       #>     Hdg                      0          175.79              359.2               1440 0    \"Hdg\"        #>     X                        NA         NA                  NA                  1440 1440 \"-\"          #>     salinity [PSS-78]        41.307     42.71               44.205              1440 0    \"Sal\"        #>     Dens                     1033.3     1034.5              1035.8              1440 0    \"Dens\"       #>     SV                       1467.9     1469.8              1472.2              1440 0    \"SV\"         #>     X.1                      NA         NA                  NA                  1440 1440 \"-\"          #>     N.S.Dist                 -2535.2    4159.5              10349               1440 0    \"N-S Dist\"   #>     E.W.Dist                 -2033.5    893.81              4687.5              1440 0    \"E-W Dist\"   #>     X.2                      NA         NA                  NA                  1440 1440 \"-\"          #>     SRB.Date                 NA         NA                  NA                  1440 1440 \"SRB Date\"   #>     SRB.Time                 NA         NA                  NA                  1440 0    \"SRB Time\"   #>     Vref.1                   1.226      1.2263              1.23                1440 1152 \"Vref\"       #>     Hx.1                     NA         NA                  NA                  1440 1440 \"Hx\"         #>     Hy.1                     NA         NA                  NA                  1440 1440 \"Hy\"         #>     Cond.1                   NA         NA                  NA                  1440 1440 \"Cond\"       #>     T.Temp.1                 NA         NA                  NA                  1440 1440 \"T-Temp\"     #>     Depth.1                  NA         NA                  NA                  1440 1440 \"Depth\"      #>     none.2                   NA         NA                  NA                  1440 1440 \"none\"       #>     none.3                   NA         NA                  NA                  1440 1440 \"none\"       #>     Hdg.1                    NA         NA                  NA                  1440 1440 \"Hdg\"        #>     X.3                      NA         NA                  NA                  1440 1440 \"-\"          #>     Sal.1                    NA         NA                  NA                  1440 1440 \"Sal\"        #>     Dens.1                   NA         NA                  NA                  1440 1440 \"Dens\"       #>     SV.1                     NA         NA                  NA                  1440 1440 \"SV\"         #>     pressure [dbar]          73.855     75.392              77.794              1440 0    \"-\"          #>     time                     2008-06-26 2008-06-26 11:59:30 2008-06-26 23:59:00 1440 0    \"-\"          #>  #> * Processing Log #>  #>     - 2023-02-10 12:50:57 UTC: `create 'cm' object` #>     - 2023-02-10 12:50:57 UTC: `read.oce(\"~/data/archive/sleiwex/2008/moorings/m11/cm/interocean_0811786/manufacturer/cm_interocean_0811786.s4a.tab\", ...)` #>     - 2023-02-10 12:50:57 UTC: `subset.cm(x, subset=time < as.POSIXct(\"2008-06-27 00:00:00\", tz = \"UTC\"))` plot(cm)"},{"path":"https://dankelley.github.io/oce/reference/plot-coastline-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a coastline Object — plot,coastline-method","title":"Plot a coastline Object — plot,coastline-method","text":"function plots coastline.  attempt made fill space plot, done limiting either longitude range latitude range, appropriate, modifying eastern northern limit, appropriate.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-coastline-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a coastline Object — plot,coastline-method","text":"","code":"# S4 method for class 'coastline' plot(   x,   xlab = \"\",   ylab = \"\",   showHemi = TRUE,   asp,   clongitude,   clatitude,   span,   lonlabels = TRUE,   latlabels = TRUE,   projection = NULL,   expand = 1,   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1, mgp[1] + 1, 1, 1),   bg,   fill,   type = \"polygon\",   border = NULL,   col = NULL,   axes = TRUE,   cex.axis = par(\"cex.axis\"),   add = FALSE,   inset = FALSE,   geographical = 0,   longitudelim,   latitudelim,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-coastline-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a coastline Object — plot,coastline-method","text":"x coastline object. xlab label x axis ylab label y axis showHemi logical indicating whether show hemisphere axis tick labels. asp Aspect ratio plot.  default plot,coastline-method set aspect ratio give natural latitude-longitude scaling somewhere near centre latitude plot. Often, makes sense set asp , e.g. get correct shapes 45N, use asp=1/cos(45*pi/180).  Note land mass symmetric equator, get good world views set asp=1 set ylim symmetric zero. given value asp ignored, clongitude clatitude given (latter two inferred projection. clongitude, clatitude optional center latitude map, decimal degrees.  clongitude clatitude provided, alternatively can inferred substrings +lon_0 +lat_0 projection, provided value asp ignored, instead plot aspect ratio computed based center latitude.  clongitude clatitude known, span must also provided, case, permitted also specify longitudelim latitudelim. span optional suggested diagonal span plot, kilometers. plotted span usually close suggestion, although details depend plot aspect ratio factors, adjustment may required fine-tune plot.  value span must supplied, clongitude clatitude supplied (inferred projection). lonlabels, latlabels optional vectors longitude latitude label sides plot, passed mapPlot() control axis labelling, plots done map projections (.e. cases projection NULL). projection optional map projection use (see mapPlot() argument name). set FALSE projection used, data plotted cartesion frame, aspect ratio set reduce distortion near middle plot.  option useful coastline produces spurious horizontal lines owing islands crossing plot edges (problem plagues map projections).  projection set, Mercator projection used latitudes 70 degrees, projection=\"+proj=merc\" supplied, Stereopolar one used projection=\"+proj=stere\".  Otherwise, projection must character string identifying projection accepted mapPlot(). expand numerical factor expansion plot limits, showing area outside plot, e.g. showing ship track coastline, actual coastline show ocean boundary.  value expand ignored either xlim ylim given. mgp 3-element numerical vector use par(\"mgp\"), also par(mar), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\"). bg optional color used background map.  comes handy drawing insets (see “details”). fill legacy parameter permitted temporarily; see “History”. type indication type; may \"polygon\", filled polygon, \"p\" points, \"l\" line segments, \"o\" points overlain line segments. See color note value type alters meaning color argument. border color used indicate land (type=\"polygon\") coastline international borders (type=\"l\"). col either color filling polygons (type=\"polygon\") color points line segments (type=\"p\", type=\"l\", type=\"o\"). axes boolean, set TRUE plot axes. cex.axis value axis font size factor. add boolean, set TRUE draw coastline existing plot.  Note retains aspect ratio existing plot, important set correctly, e.g. asp=1/cos(lat * pi / 180), clat central latitude plot. inset set TRUE use within plotInset().  effect prevent present function adjusting margins, necessary margin adjustment basis method used plotInset(). geographical flag indicating style axes.  geographical=0, axes conventional, decimal degrees unit, negative signs indicating southern western hemispheres.  geographical=1, signs dropped, axis values decreasing order within southern western hemispheres.  geographical=2, signs dropped axes labelled degrees, minutes seconds, appropriate, hemispheres indicated letters. geographical=3, things geographical=2, hemisphere indication omitted. Finally, geographical=4, unsigned numbers used, followed letters N northern hemisphere, S southern, E eastern, W western. longitudelim latitudelim provide second way suggest plot ranges. Note may supplied clongitude, clatitude span given. latitudelim see longitudelim. debug set TRUE get debugging information processing. ... optional arguments passed plotting functions.  example, set yaxp=c(-90,90,4) plot extending pole pole.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-coastline-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot a coastline Object — plot,coastline-method","text":"None.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-coastline-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a coastline Object — plot,coastline-method","text":"longitudelim, latitudelim projection given, arguments passed mapPlot() produce plot. (call uses bg col, uses col, fill border directly.) results need customization, users use mapPlot() directly. projection provided without longitudelim latitudelim, mapPlot() still called, longitudelim latitudelim computed clongitude, clatitude span. projection provided, much simpler plots produced. Cartesian, aspect ratio set minimize shape distortion central latitude. Although crude, benefit always working, said true map projections, can problematic various ways owing difficulties inverting projection calculations. get inset map inside another map, draw first map, par(new=TRUE), call plot,coastline-method() value mar moves inset plot desired location existing plot, bg=\"white\".","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-coastline-method.html","id":"history","dir":"Reference","previous_headings":"","what":"History","title":"Plot a coastline Object — plot,coastline-method","text":"February, 2016, plot,coastline-method relied now-defunct argument fill control colors; col used now, instead.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-coastline-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a coastline Object — plot,coastline-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-coastline-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a coastline Object — plot,coastline-method","text":"","code":"# \\donttest{ library(oce) par(mar = c(2, 2, 1, 1)) data(coastlineWorld) plot(coastlineWorld)  plot(coastlineWorld, clongitude = -63.6, clatitude = 44.6, span = 1000)   # Canada in Lambert projection plot(coastlineWorld,     clongitude = -95, clatitude = 65, span = 5500,     grid = 10, projection = \"+proj=laea +lon_0=-100 +lat_0=55\" )  # }"},{"path":"https://dankelley.github.io/oce/reference/plot-ctd-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a ctd Object — plot,ctd-method","title":"Plot a ctd Object — plot,ctd-method","text":"Plot CTD data many different ways. many cases, best choice use default values parameters first.  yields 4-panel plot displays basic overview data, combined profile salinity temperature top left, combined plot density square buoyancy frequency top right, TS diagram bottom left, map bottom right.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-ctd-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a ctd Object — plot,ctd-method","text":"","code":"# S4 method for class 'ctd' plot(   x,   which,   col = par(\"fg\"),   fill,   borderCoastline = NA,   colCoastline = \"lightgray\",   eos = getOption(\"oceEOS\", default = \"gsw\"),   ref.lat = NaN,   ref.lon = NaN,   grid = TRUE,   coastline = \"best\",   Slim,   Clim,   Tlim,   plim,   densitylim,   sigmalim,   N2lim,   Rrholim,   dpdtlim,   timelim,   drawIsobaths = FALSE,   clongitude,   clatitude,   span,   showHemi = TRUE,   lonlabels = TRUE,   latlabels = TRUE,   latlon.pch = 20,   latlon.cex = 1.5,   latlon.col = \"red\",   projection = NULL,   cex = 1,   cex.axis = par(\"cex.axis\"),   pch = 1,   useSmoothScatter = FALSE,   df,   keepNA = FALSE,   type,   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1.5, mgp[1] + 1.5, mgp[1] + 1.5, mgp[1] + 1),   inset = FALSE,   add = FALSE,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-ctd-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a ctd Object — plot,ctd-method","text":"x ctd object. numeric character vector specifying desired plot types. supplied, default used. default depends deploymentType metadata slot x.  deploymentType \"profile\" missing, defaults c(1, 2, 3, 5).  deploymentType \"moored\" \"thermosalinograph\" defaults c(30, 3, 31, 5). Finally, deploymentType towyo defaults c(30, 31, 32, 3). details individual values follows. entries refer EOS (equation state seawater), may either \"gsw\" modern Gibbs Seawater system, \"unesco\" older UNESCO system. EOS may set eos argument plot,ctd-method() using options(), options(oceEOS=\"unesco\") options(oceEOS=\"unesco\"). default EOS \"gsw\". =1 =\"salinity+temperature\" gives combined profile temperature salinity.  EOS \"gsw\" Conservative Temperature Absolute Salinity shown; otherwise -situ temperature practical salinity shown. =2 =\"density+N2\" gives combined profile density anomaly, computed swSigma0(), along square buoyancy frequency, computed swN2(). eos parameter passed functions, desired EOS used. =3 =\"TS\" gives TS plot. EOS \"gsw\", T Conservative Temperature S Absolute Salinity; otherwise, -situ temperature practical salinity, respectively. =4 =\"text\" gives textual  summary aspects data. =5 =\"map\" gives map plotted plot,coastline-method(), dot station location.  Notes near top boundary map give station number, sampling date, name chief scientist, known. Note longitude converted value -180 180 plotting.  (See also notes span.) =5.1 =5, except file name drawn map. =6 =\"density+dpdt\" gives profile density \\(dP/dt\\), useful evaluating whether instrument dropping properly water column.  EOS \"gsw\" \\(\\sigma_0\\) shown; otherwise, \\(\\sigma_\\theta\\) shown. =7 =\"density+time\" gives profile density time. =8 =\"index\" gives profile index number, can provide useful information trimming ctdTrim(). =9 =\"salinity\" gives profile Absolute Salinity EOS \"gsw\", practical salinity otherwise. =10 =\"temperature\" gives profile Conservative Temperature EOS \"gsw\", -situ temperature otherwise. =11 =\"density\" gives profile density computed swRho(), eos parameter passed. =12 =\"N2\" gives \\(N^2\\) profile. =13 =\"spice\" gives profile UNESCO-defined spice variable. =14 =\"tritium\" gives tritium profile. =15 =\"Rrho\" gives diffusive-case density ratio profile. =16 =\"RrhoSF\" gives salt-finger case density ratio profile. =17 =\"conductivity\" gives conductivity profile. =20 =\"CT\" gives profile Conservative Temperature. =21 =\"SA\" gives profile Absolute Salinity. =30 =\"Sts\" gives time series Salinity Absolute Salinity EOS \"gsw\" practical salinity otherwise. =31 =\"Tts\" gives time series Conservative Temperature EOS \"gsw\" -situ temperature otherwise. =32 =\"pts\" gives time series pressure =33 =\"rhots\" gives time series density anomaly, \\(\\sigma_0\\) EOS \"gsw\" \\(\\sigma_\\theta\\) otherwise. otherwise, interpreted character value checked data dataDerived fields returned x[[\"?\"]. match found profile corresponding quantity plotted.  match, error reported. col color lines symbols. fill legacy parameter permitted temporarily; see “History”. borderCoastline color coastlines international borders, passed plot,coastline-method() map included . colCoastline fill color coastlines international borders, passed plot,coastline-method() map included . Set NULL avoid filling. eos character value indicating equation state used, either \"unesco\" \"gsw\".  default use value stored options() e.g. options(oceEOS=\"unesco\"). ref.lat latitude reference point distance calculation. permitted range -90 90. ref.lon longitude reference point distance calculation. permitted range -180 180. grid logical value indicating whether draw grid plot. coastline specification coastline used =\"map\".  may coastline object, whether built-supplied user, character string.  later, may name built-coastline (\"coastlineWorld\", \"coastlineWorldFine\", \"coastlineWorldCoarse\"), \"best\", choose suitable coastline locale, \"none\" prevent drawing coastline.  speed penalty providing coastline character string, forces plot,coastline-method() load every call.  , plot,coastline-method() called several times given coastline, makes sense load first call, supply object argument, opposed name object. Slim, Clim, Tlim, plim, densitylim, sigmalim, N2lim, Rrholim, dpdtlim, timelim optional numeric vectors length 2, give axis limits salinity (Absolute Salinity, eos \"gsw\"), conductivity, -situ potential temperature (Conservative Temperature, eos `\"gsw\"'), pressure, density, density anomaly (either sigma-theta sigma0), square buoyancy frequency, density ratio, dp/dt, time, respectively. drawIsobaths logical value indicating whether draw depth contours maps, addition coastline. argument effect except panels value equals \"map\" equivalent numerical code, 5. drawIsobaths FALSE, contours drawn. drawIsobaths TRUE, contours selected automatically, using pretty(c(0, 300)) station depth 100m pretty(c(0, 5500)) otherwise. drawIsobaths numerical vector, indicated depths drawn. plots drawn projection set NULL, contours added contour() otherwise mapContour() used. customize resultant contours, e.g. setting particular line types colors, users call functions directly (see e.g. Example 2). clongitude, clatitude, span controls map area view, used =\"map\". clongitude clatitude specify centre view, span specifies approximate extend view, kilometres.  (span given, determined small multiple distance nearest point land, attempt show station familiar geographical context.) showHemi, lonlabels, latlabels controls axis labelling, used =\"map\". showHemi logical value indicating whether show hemisphere axis tick labels. lonlabels latlabels numeric character values control axis labelling. latlon.pch, latlon.cex, latlon.col controls station location, used =\"map\".  latlon.pch sets symbol code, latlon.cex sets character expansion factor, latlon.col sets colour. projection controls map projection (), ignored unless =\"map\". possibilities follows.  (1) projection=NULL (default) projection used; map simply show longitude latitude Cartesian frame, scaled retain shapes centre.  (2) projection=\"automatic\"either Mercator Stereographic projection used, depending whether CTD station within 70 degrees equator higher latitudes. (3) Ifprojection` string format used mapPlot(), passed function. cex size used plot symbols (see par()). cex.axis size factor axis labels (see par()). pch code plotting symbol (see par()). useSmoothScatter logical value indicating whether use smoothScatter() instead plot() draw plot. df optional numeric argument ignored except plotting buoyancy frequency; case, passed swN2(). keepNA logical value indicating whether NA values yield breaks lines drawn type b, l, o. default value FALSE.  Setting keepNA TRUE can helpful working multiple profiles strung together one ctd object, otherwise extraneous lines joining deepest point one profile shallowest next profile. type type plot draw, using scheme plot(). supplied, increased length , necessary, supplied individual plot calls. supplied, plot calls use defaults (e.g. using line plotProfile(), using dots plotTS(), etc). mgp three-element numerical vector specifying axis-label geometry, passed par(). default establishes tighter margins usual R setup. mar four-element numerical vector specifying margin geometry, passed par(). default establishes tighter margins usual R setup. Note value mar ignored map panel multi-panel maps; instead, present value par(\"mar\") used, default call make map plot region equal previously-drawn profiles TS plot. inset logical value indicating whether function used inset.  effect prevent present function adjusting margins, necessary margin adjustment basis method used plotInset(). add logical value indicating whether add existing plot.  works length()=1, yield odd results value match previous plots. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. ... optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-ctd-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a ctd Object — plot,ctd-method","text":"default values arguments chosen useful quick overviews data. However, detailed work common call present function just single value , e.g. four calls get four panels. advantage provides much control display, also permits addition extra display elements (lines, points, margin notes, etc.) individual panels. Note panels draw one curve (e.g. =\"salinity+temperature\" draws temperature salinity profiles one graph), value par(\"usr\") established second profile drawn. experimentation reveal profile , permitted case, although seems unlikely help much ... simple fact drawing two profiles one graph useful quick overview, useful e.g. interactive analysis locator() flag bad data, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-ctd-method.html","id":"history-of-changes","dir":"Reference","previous_headings":"","what":"History of Changes","title":"Plot a ctd Object — plot,ctd-method","text":"January 2022: Add ability profile anything stored data slot, anything can computed information slot. list possibilities found examining data dataDerived elements x[[\"?\"]]. Drop lonlim latlim parameters, marked removal 2014; use clongitude, clatitude span instead (see plot,coastline-method()). February 2016: Drop fill parameter land colour; use colCoastline instead. Add borderCoastline argument, control colour coastlines international boundaries.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-ctd-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a ctd Object — plot,ctd-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-ctd-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a ctd Object — plot,ctd-method","text":"","code":"# 1. simple plot library(oce) data(ctd) plot(ctd)   # 2. how to customize depth contours par(mfrow = c(1, 2)) data(section) stn <- section[[\"station\", 105]] plot(stn, which = \"map\", drawIsobaths = TRUE) plot(stn, which = \"map\") data(topoWorld) tlon <- topoWorld[[\"longitude\"]] tlat <- topoWorld[[\"latitude\"]] tdep <- -topoWorld[[\"z\"]] contour(tlon, tlat, tdep,     drawlabels = FALSE,     levels = seq(1000, 6000, 1000), col = \"lightblue\", add = TRUE ) contour(tlon, tlat, tdep,     vfont = c(\"sans serif\", \"bold\"),     levels = stn[[\"waterDepth\"]], col = \"red\", lwd = 2, add = TRUE )"},{"path":"https://dankelley.github.io/oce/reference/plot-echosounder-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an echosounder Object — plot,echosounder-method","title":"Plot an echosounder Object — plot,echosounder-method","text":"Plot echosounder data. Simple linear approximation used newx value specified =2 method, arguably gridding method used, may added future.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-echosounder-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an echosounder Object — plot,echosounder-method","text":"","code":"# S4 method for class 'echosounder' plot(   x,   which = 1,   beam = \"a\",   newx,   xlab,   ylab,   xlim,   ylim,   zlim,   type = \"l\",   col,   lwd = 2,   despike = FALSE,   drawBottom,   ignore = 5,   drawTimeRange = FALSE,   drawPalette = TRUE,   radius,   coastline,   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1], mgp[1] + 1.5, mgp[2] + 1/2, 1/2),   atTop,   labelsTop,   tformat,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-echosounder-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an echosounder Object — plot,echosounder-method","text":"x echosounder object. list desired plot types: =1 =\"zt image\" gives z-time image, =2 =\"zx image\" gives z-distance image, =3 =\"map\" gives map showing cruise track.  image plots, display log10() amplitude, trimmed zero amplitude values less 1 (including missing values, equal 0).  Add 10 numeric codes get secondary data (non-existent single-beam files, beam detailed specification data plotted.  single-beam data, may \"\".  dual-beam data, may \"\" narrow-beam signal, \"b\" wide-beam signal.  split-beam data, may \"\" amplitude, \"b\" x-angle data, \"c\" y-angle data. newx optional vector values appear horizontal axis =1, instead time.  must length time vector, image remapped time newx using approx(). xlab, ylab optional labels horizontal vertical axes; provided, labels depend value . xlim optional range x axis. ylim optional range y axis. zlim optional range color scale. type type graph, \"l\" line, \"p\" points, \"b\" . col function providing color scale image plots. value passed imagep(), draws images.  Since imagep() defaults col oceColorsViridis(), effectively also default present function. (Prior 2023-03-18, present function defaulted col oceColorsJet().) lwd line width (ignored type=\"p\"). despike remove vertical banding using smooth() smooth across image columns, row row. drawBottom optional flag used section images.  TRUE, bottom inferred smoothed version ridge highest image value, data grayed image drawn. drawBottom color, color used, instead white.  bottom detected findBottom(), using ignore value described next. ignore optional flag specifying thickness metres surface region ignored bottom-detection process.  ignored unless drawBottom=TRUE. drawTimeRange TRUE, time range drawn top.  Ignored except =2, .e. distance-depth plots. drawPalette TRUE, palette drawn. radius radius use maps; ignored unless =3 =\"map\". coastline coastline use maps; ignored unless =3 =\"map\". mgp 3-element numerical vector use par(\"mgp\"), also par(\"mar\"), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\"). atTop optional vector time values, labels top plot produced =2.  labelsTop provided, hold labels.  labelsTop provided, labels constructed format() function, may customized supplying format ... arguments. labelsTop optional vector character strings plotted atTop times.  Ignored unless atTop provided. tformat optional argument passed imagep(), plot types call function.  (See strptime() format used.) debug set integer exceeding zero, get debugging information processing. ... optional arguments passed plotting functions.  example, maps, possible specify radius view kilometres, radius.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-echosounder-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an echosounder Object — plot,echosounder-method","text":"list silently returned, containing xat yat, values can used oce.grid() add grid plot.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-echosounder-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an echosounder Object — plot,echosounder-method","text":"Dan Kelley, extensive help Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-echosounder-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an echosounder Object — plot,echosounder-method","text":"","code":"library(oce) data(echosounder) plot(echosounder, drawBottom = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/plot-gps-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a gps Object — plot,gps-method","title":"Plot a gps Object — plot,gps-method","text":"function plots gps object.  attempt made use whole space plot, done limiting either longitude range latitude range, appropriate, modifying eastern northern limit, appropriate. get inset map inside another map, draw first map, par(new=TRUE), call plot.gps value mar moves inset plot desired location existing plot, bg=\"white\".","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-gps-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a gps Object — plot,gps-method","text":"","code":"# S4 method for class 'gps' plot(   x,   xlab = \"\",   ylab = \"\",   asp,   clongitude,   clatitude,   span,   projection,   expand = 1,   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1, mgp[1] + 1, 1, 1),   bg,   axes = TRUE,   cex.axis = par(\"cex.axis\"),   add = FALSE,   inset = FALSE,   geographical = 0,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-gps-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a gps Object — plot,gps-method","text":"x gps object. xlab label x axis ylab label y axis asp Aspect ratio plot.  default plot.gps set aspect ratio give natural latitude-longitude scaling somewhere near centre latitude plot. Often, makes sense set asp , e.g. get correct shapes 45N, use asp=1/cos(45*pi/180).  Note land mass symmetric equator, get good world views set asp=1 set ylim symmetric zero. given value asp ignored, clongitude clatitude given. clongitude, clatitude optional center latitude map, decimal degrees.  clongitude clatitude provided, provided value asp ignored, instead plot aspect ratio computed based center latitude.  clongitude clatitude provided, span must also provided. span optional suggested span plot, kilometers.  suggestion upper limit scale; depending aspect ratio plotting device, radius may smaller span.  value span must supplied, clongitude clatitude supplied. projection optional map projection use (see mapPlot()); given, cartesian frame used, scaled gps shapes near centre plot preserved.  projection provided, coordinate system bear indirect relationship longitude longitude, adornment plot must done e.g.  mapPoints() instead points(). expand numerical factor expansion plot limits, showing area outside plot, e.g. showing ship track gps, actual gps show ocean boundary.  value expand ignored either xlim ylim given. mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\"). bg optional color used background map.  comes handy drawing insets (see “details”). axes boolean, set TRUE plot axes. cex.axis value axis font size factor. add boolean, set TRUE draw gps existing plot. Note retains aspect ratio existing plot, important set correctly, e.g. asp=1/cos(lat * pi / 180), clat central latitude plot. inset set TRUE use within plotInset().  effect prevent present function adjusting margins, necessary margin adjustment basis method used plotInset(). geographical flag indicating style axes.  geographical=0, axes conventional, decimal degrees unit, negative signs indicating southern western hemispheres.  geographical=1, signs dropped, axis values decreasing order within southern western hemispheres.  geographical=2, signs dropped axes labelled degrees, minutes seconds, appropriate. debug set TRUE get debugging information processing. ... optional arguments passed plotting functions.  example, set yaxp=c(-90,90,4) plot extending pole pole.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-gps-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a gps Object — plot,gps-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-ladp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an ladp Object — plot,ladp-method","title":"Plot an ladp Object — plot,ladp-method","text":"Uses plotProfile() create panels depth variation easterly northerly velocity components.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-ladp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an ladp Object — plot,ladp-method","text":"","code":"# S4 method for class 'ladp' plot(x, which = c(\"u\", \"v\"), ...)"},{"path":"https://dankelley.github.io/oce/reference/plot-ladp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an ladp Object — plot,ladp-method","text":"x ladp object. character vector storing names items plotted. ... arguments, passed plotting functions.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-ladp-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an ladp Object — plot,ladp-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-landsat-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a landsat Object — plot,landsat-method","title":"Plot a landsat Object — plot,landsat-method","text":"Plot data within landsat image, information computed data. second category includes possibilities estimate surface temperature \"terralook\" estimate natural-color view.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-landsat-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a landsat Object — plot,landsat-method","text":"","code":"# S4 method for class 'landsat' plot(   x,   band,   which = 1,   decimate = TRUE,   zlim,   utm = FALSE,   col = oce.colorsPalette,   drawPalette = TRUE,   showBandName = TRUE,   alpha.f = 1,   red.f = 1.7,   green.f = 1.5,   blue.f = 6,   offset = c(0, -0.05, -0.2, 0),   transform = diag(c(red.f, green.f, blue.f, alpha.f)),   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-landsat-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a landsat Object — plot,landsat-method","text":"x landsat object. band given, name band.  Landsat-8 data, may one : \"aerosol\", \"blue\", \"green\", \"red\", \"nir\", \"swir1\", \"swir2\", \"panchromatic\", \"cirrus\", \"tirs1\", \"tirs2\".  Landsat-7 data, may one \"blue\", \"green\", \"red\", \"nir\", \"swir1\", \"tirs1\", \"tirs2\", \"swir2\", \"panchromatic\".  Landsat data prior Landsat-7, may one \"blue\", \"green\", \"red\", \"nir\", \"swir1\", \"tirs1\", \"tirs2\", \"swir2\".  band given, (\"tirs1\") used exists object data, otherwise first band used.  addition , using band=\"temperature\" plot estimate -satellite brightness temperature, computed tirs1 band, band=\"terralook\" plot sort natural color combining red, green, blue nir bands according formula provided https://lta.cr.usgs.gov/terralook/what_is_terralook (website worked , failed Feb 2, 2017). Desired plot type; 1=image, 2=histogram. decimate indication desired decimation, passed imagep() image plots. default yields faster plotting.  decimation sensible full-size images, since graphical displays can show 16 thousand pixels side. zlim Either pair numbers giving limits colorscale, \"histogram\" flattened histogram (.e. maximally increase contrast throughout domain.)  given, 1 99 percent quantiles calculated used limits. utm logical value indicating whether use UTS (easting northing) instead longitude latitude plot. col Either function yielding colors, taking single integer argument desired number colors, string \"natural\", combines information red, green blue bands produces natural-hue image.  latter case, band designation ignored, object must contain three color bands. drawPalette Indication type palette draw, . See imagep() details. showBandName logical indicating whether band name plotted top margin, near right-hand side. alpha.f Argument used col=\"natural\", adjust colors adjustcolor(). red.f Argument used col=\"natural\", adjust colors adjustcolor().  Higher values red.f cause red hues emphasized (e.g. dry land). green.f Argument used col=\"natural\", adjust colors adjustcolor().  Higher values green.f emphasize green hues (e.g. forests). blue.f Argument used band=\"terralook\", adjust colors adjustcolor().  Higher values blue.f emphasize blue hues (e.g. ocean). offset Argument used band=\"terralook\", adjust colors adjustcolor(). transform Argument used band=\"terralook\", adjust colors adjustcolor(). debug Set positive value get debugging information processing. ... optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-landsat-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a landsat Object — plot,landsat-method","text":"Landsat-8 data, band may one : \"aerosol\", \"blue\", \"green\", \"red\", \"nir\", \"swir1\", \"swir2\", \"panchromatic\", \"cirrus\", \"tirs1\", \"tirs2\". Landsat-7 data, band may one \"blue\", \"green\", \"red\", \"nir\", \"swir1\", \"tirs1\", \"tirs2\", \"swir2\", \"panchromatic\". Landsat data prior Landsat-7, band may one \"blue\", \"green\", \"red\", \"nir\", \"swir1\", \"tirs1\", \"tirs2\", \"swir2\". band given, (\"tirs1\") used exists object data, otherwise first band used. addition also pseudo-bands can plotted, follows. Setting band=\"temperature\" plot estimate -satellite brightness temperature, computed tirs1 band. Setting band=\"terralook\" plot sort natural color combining red, green, blue nir bands according formula provided https://lta.cr.usgs.gov/terralook/what_is_terralook (website worked , failed Feb 2, 2017), namely red-band data provided red argument rgb() function, green argument computed 2/3 green-band data plus 1/3 nir-band data, blue argument computed 2/3 green-band data minus 1/3 nir-band data. (typo: blue band used.)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-landsat-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a landsat Object — plot,landsat-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-lisst-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a lisst Object — plot,lisst-method","title":"Plot a lisst Object — plot,lisst-method","text":"Creates multi-panel summary plot data measured LISST instrument.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-lisst-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a lisst Object — plot,lisst-method","text":"","code":"# S4 method for class 'lisst' plot(x, which = c(16, 37, 38), tformat, debug = getOption(\"oceDebug\"), ...)"},{"path":"https://dankelley.github.io/oce/reference/plot-lisst-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a lisst Object — plot,lisst-method","text":"x lisst object. list desired plot types.  graphed panels running top page.  See “Details” meanings various values . tformat optional argument passed oce.plot.ts(), plot types call function.  (See strptime() format used.) debug flag turns debugging.  value indicates depth within call stack debugging applies. ... optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-lisst-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a lisst Object — plot,lisst-method","text":"panels controlled argument, follows. =1 32, =\"C1\" \"C32\" time-series graph named column (size class). =33 =\"lts\" time-series plot laser transmission sensor. =34 =\"voltage\" time-series plot instrument voltage. =35 =\"aux\" time-series plot external auxiliary input. =36 =\"lrs\" time-series plot laser reference sensor. =37 =\"pressure\" time-series plot pressure. =38 =\"temperature\" time-series plot temperature. =41 =\"transmission\" time-series plot transmission, percent. =42 =\"beam\" time-series plot beam-C, 1/metre.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-lisst-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a lisst Object — plot,lisst-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-lisst-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a lisst Object — plot,lisst-method","text":"","code":"library(oce) data(lisst) plot(lisst)"},{"path":"https://dankelley.github.io/oce/reference/plot-lobo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a lobo object — plot,lobo-method","title":"Plot a lobo object — plot,lobo-method","text":"Plot summary diagram lobo data.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-lobo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a lobo object — plot,lobo-method","text":"","code":"# S4 method for class 'lobo' plot(   x,   which = c(1, 2, 3),   mgp = getOption(\"oceMgp\"),   mar = c(mgp[2] + 1, mgp[1] + 1, 1, mgp[1] + 1.25),   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-lobo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a lobo object — plot,lobo-method","text":"x lobo object. vector numbers character strings, indicating quantities plot.  stacked single column.  possible values follows: 1 \"temperature\" time series temperature; 2 \"salinity\" salinity; 3 \"TS\" TS diagram (uses eos=\"unesco\"), 4 \"u\" timeseries u component velocity; 5 \"v\" timeseries v component velocity; 6 \"nitrate\" timeseries nitrate concentration; 7 \"fluorescence\" timeseries fluorescence value. mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\"). debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. ... optional arguments passed plotting functions.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-lobo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a lobo object — plot,lobo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-met-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a met Object — plot,met-method","title":"Plot a met Object — plot,met-method","text":"Creates multi-panel summary plot data measured meteorological data set.  cast. panels controlled argument.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-met-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a met Object — plot,met-method","text":"","code":"# S4 method for class 'met' plot(x, which = 1:4, mgp, mar, tformat, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/plot-met-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a met Object — plot,met-method","text":"x met object. list desired plot types. =1 gives time-series plot temperature =2 gives time-series plot pressure =3 gives time-series plot x (eastward) component velocity =4 gives time-series plot y (northward) component velocity =5 gives time-series plot speed =6 gives time-series plot direction (degrees clockwise north; note values returned met[[\"direction\"]] must multiplied 10 get direction plotted) mgp 3-element numerical vector used par(\"mgp\") control spacing axis elements.  default tighter R default. mar 4-element numerical vector used par(\"mar\") control plot margins. default tighter R default. tformat optional argument passed oce.plot.ts(), plot types call function.  (See strptime() format used.) debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-met-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a met Object — plot,met-method","text":"one panel drawn, exit plot.met, value par reset value function call.  However, one panel drawn, adjustments par made within plot.met left place, additions may made plot.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-met-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a met Object — plot,met-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-met-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a met Object — plot,met-method","text":"","code":"library(oce) data(met) plot(met, which = 3:4)   # Wind speed and direction during Hurricane Juan # Compare with the final figure in a white paper by Chris Fogarty # (available at http://www.novaweather.net/Hurricane_Juan_files/McNabs_plot.pdf # downloaded 2017-01-02). library(oce) data(met) t0 <- as.POSIXct(\"2003-09-29 04:00:00\", tz = \"UTC\") dt <- 12 * 3600 juan <- subset(met, t0 - dt <= time & time <= t0 + dt) par(mfrow = c(2, 1)) plot(juan, which = 5) abline(v = t0) plot(juan, which = 6) abline(v = t0)"},{"path":"https://dankelley.github.io/oce/reference/plot-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an oce Object — plot,oce-method","title":"Plot an oce Object — plot,oce-method","text":"creates pairs() plot elements data slot, 2 elements , simple xy plot 2 elements, histogram 1 element.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an oce Object — plot,oce-method","text":"","code":"# S4 method for class 'oce' plot(x, y, ...)"},{"path":"https://dankelley.github.io/oce/reference/plot-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an oce Object — plot,oce-method","text":"x basic oce object, subclass derive base, subclasses plot methods, e.g. calling plot() ctd object dispatches plot,ctd-method(). y Ignored; present S4 object generic plot need second parameter ... parameter. ... Passed hist(), plot(), pairs(), according whichever plotting.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-oce-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an oce Object — plot,oce-method","text":"","code":"library(oce) o <- new(\"oce\") o <- oceSetData(o, \"x\", rnorm(10)) o <- oceSetData(o, \"y\", rnorm(10)) o <- oceSetData(o, \"z\", rnorm(10)) plot(o)"},{"path":"https://dankelley.github.io/oce/reference/plot-odf-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an odf Object — plot,odf-method","title":"Plot an odf Object — plot,odf-method","text":"Plot data contained within ODF object, using oce.plot.ts() create panels time-series plots columns contained odf object (just contain least one finite value, blanks FALSE). object's data slot contain time, pairs() used plot elements data slot contain least one finite value. actions crude arguments control behaviour, function really just stop-gap measure, since practical work odf objects usually cast types, types tend useful plots.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-odf-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an odf Object — plot,odf-method","text":"","code":"# S4 method for class 'odf' plot(x, blanks = TRUE, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/plot-odf-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an odf Object — plot,odf-method","text":"x odf object. blanks logical value indicates whether include dummy plots data items lack finite values. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-odf-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an odf Object — plot,odf-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-rsk-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a rsk Object — plot,rsk-method","title":"Plot a rsk Object — plot,rsk-method","text":"Rsk data may many forms, easy devise general plotting strategy . present function quite crude, assumption users understand datasets, can devise plots best-suited applications.  Sometimes, sensible scheme coerce object another form, e.g. using plot(.ctd(rsk)) object contains CTD-like data.  times, users extract data rsk object construct plots . idea use present function mainly get overview, reason, default plot type (set ) set time-series plots, one thing definitely known rsk objects contain time vector data slot.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-rsk-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a rsk Object — plot,rsk-method","text":"","code":"# S4 method for class 'rsk' plot(   x,   which = \"timeseries\",   tlim,   ylim,   xlab,   ylab,   tformat,   drawTimeRange = getOption(\"oceDrawTimeRange\"),   abbreviateTimeRange = getOption(\"oceAbbreviateTimeRange\"),   useSmoothScatter = FALSE,   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1.5, mgp[1] + 1.5, 1.5, 1.5),   main = \"\",   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-rsk-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a rsk Object — plot,rsk-method","text":"x rsk object. character indicating desired plot types.  graphed panels running top page.  See “Details” meanings various values . tlim optional limits time axis.  provided, value inferred data. ylim optional limits y axis.  provided, value inferred data.  (helpful specify , auto-scaled value inappropriate, e.g. lines added later). Note ignored, unless length() == 1 corresponds one data fields. multipanel plot specific subset data fields desired ylim control, done panel panel (see Examples). xlab optional label x axis. ylab optional label y axis. tformat optional argument passed oce.plot.ts(), plot types call function.  (See strptime() format used.) drawTimeRange boolean applies panels time horizontal axis, indicating whether draw time range top-left margin plot. abbreviateTimeRange boolean applies panels time horizontal axis, indicating whether abbreviate second time time range (e.g. skipping year, month, day, etc. start time). useSmoothScatter boolean cause smoothScatter() used profile plots, instead plot(). mgp 3-element numerical vector use par(\"mgp\"), also par(mar), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\"). main main title plot, used just top panel, several panels. debug flag turns debugging, exceeds 0. ... optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-rsk-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a rsk Object — plot,rsk-method","text":"Plots produced time series plots data object. default, =\"timeseries\" plots data fields, -rides specification. Specific fields can plotted naming field, e.g. =\"temperature\" plot time series just temperature field.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-rsk-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a rsk Object — plot,rsk-method","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-rsk-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a rsk Object — plot,rsk-method","text":"","code":"library(oce) data(rsk) # 1. default timeseries plot of all data fields plot(rsk)  # 2. plot in ctd format plot(as.ctd(rsk))"},{"path":"https://dankelley.github.io/oce/reference/plot-satellite-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a satellite Object — plot,satellite-method","title":"Plot a satellite Object — plot,satellite-method","text":"example using g1sst data, see read.g1sst().","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-satellite-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a satellite Object — plot,satellite-method","text":"","code":"# S4 method for class 'satellite' plot(x, y, asp, debug = getOption(\"oceDebug\"), ...)"},{"path":"https://dankelley.github.io/oce/reference/plot-satellite-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a satellite Object — plot,satellite-method","text":"x satellite object. y String indicating quantity plotted. asp Optional aspect ratio plot. debug debugging flag, integer. ... extra arguments passed imagep(), e.g. set col control colors.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-satellite-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a satellite Object — plot,satellite-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-sealevel-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a sealevel Object — plot,sealevel-method","title":"Plot a sealevel Object — plot,sealevel-method","text":"Creates plot sea-level dataset, one two varieties.  Depending length , either single-panel multi-panel plot drawn.  just one panel, value par used plot,sealevel-method retained upon exit, making convenient add plot.  multi-panel plots, par returned value call.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-sealevel-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a sealevel Object — plot,sealevel-method","text":"","code":"# S4 method for class 'sealevel' plot(   x,   which = 1:3,   drawTimeRange = getOption(\"oceDrawTimeRange\"),   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 0.5, mgp[1] + 1.5, mgp[2] + 1, mgp[2] + 3/4),   marginsAsImage = FALSE,   grid = TRUE,   xlim,   ylim,   xaxs = \"i\",   yaxs = \"r\",   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-sealevel-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a sealevel Object — plot,sealevel-method","text":"x sealevel object. numerical string vector indicating desired plot types, possibilities 1 \"\" time-series elevations, 2 \"month\" time-series just first month, 3 \"spectrum\" power spectrum (truncated frequencies 0.1 cycles per hour, 4 \"cumulativespectrum\" cumulative integral power spectrum. drawTimeRange boolean applies panels time horizontal axis, indicating whether draw time range top-left margin plot. mgp 3-element numerical vector use par(\"mgp\"), also par(\"mar\"), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\"). marginsAsImage logical value indicating whether put wide margin right time-series plots, matching space used palette imagep() plot. grid logical value, indicating whether draw grid grid(). xlim, ylim optional limits axes. supplied, reasonable choices made xaxs, yaxs axis-limit parameters, standard graphics. default make time axis extend edges box, make y axis space range data. debug flag turns debugging, exceeds 0. ... optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-sealevel-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot a sealevel Object — plot,sealevel-method","text":"None.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-sealevel-method.html","id":"historical-note","dir":"Reference","previous_headings":"","what":"Historical Note","title":"Plot a sealevel Object — plot,sealevel-method","text":"2020-02-06, sea-level plots mean value removed, indicated tick mark margin note right-hand side plot. behaviour confusing. change go usual deprecation process, margin-note behaviour documented.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-sealevel-method.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Plot a sealevel Object — plot,sealevel-method","text":"example refers Hurricane Juan, caused great deal damage Halifax 2003.  Since era digital photo, casual web search uncover spectacular images damage, wind storm surge. Landfall, within 30km sealevel gauge, 00:10 00:20 Halifax local time Monday, Sept 29, 2003.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-sealevel-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a sealevel Object — plot,sealevel-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-sealevel-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a sealevel Object — plot,sealevel-method","text":"","code":"library(oce) data(sealevel) # local Halifax time is UTC + 4h juan <- as.POSIXct(\"2003-09-29 00:15:00\", tz = \"UTC\") + 4 * 3600 plot(sealevel, which = 1, xlim = juan + 86400 * c(-7, 7)) abline(v = juan, col = \"red\")"},{"path":"https://dankelley.github.io/oce/reference/plot-section-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a section Object — plot,section-method","title":"Plot a section Object — plot,section-method","text":"Creates summary plot CTD section, one panel value .","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-section-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a section Object — plot,section-method","text":"","code":"# S4 method for class 'section' plot(   x,   which = c(1, 2, 3, 99),   eos,   at = NULL,   labels = TRUE,   grid = FALSE,   contourLevels = NULL,   contourLabels = NULL,   stationIndices,   coastline = \"best\",   colLand = \"gray\",   xlim = NULL,   ylim = NULL,   zlim = NULL,   zbreaks = NULL,   zcol = NULL,   map.xlim = NULL,   map.ylim = NULL,   clongitude,   clatitude,   span,   projection = NULL,   xtype = \"distance\",   ytype = \"depth\",   ztype = \"contour\",   longitude0,   latitude0,   legend.loc = \"bottomright\",   legend.text = NULL,   showStations = FALSE,   showStart = TRUE,   stationTicks = TRUE,   showBottom = TRUE,   showSpine = TRUE,   drawPalette = TRUE,   axes = TRUE,   mgp,   mar,   col,   cex,   pch,   lwd,   labcex = par(\"cex\"),   debug = getOption(\"oceDebug\", 0),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-section-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a section Object — plot,section-method","text":"x section object. list desired plot types, explained “Details”. Plot types listed “Details” can generated using name data section object. may four panels total, desired plots placed panels, reading order.  one panel plotted, par adjusted, makes easy add plot subsequent plotting commands. eos Character indication seawater equation state use. permitted choices \"gsw\" \"unesco\". eos supplied, defaults getOption(\"oceEOS\",default=\"gsw\"). NULL (default), x axis indicate distance stations first section.  (may give errors contouring routine, stations present geographical order.) list, indicates values stations plotted. labels Either logical, indicating whether put labels x axis, vector list labels placed x positions indicated . grid TRUE, points drawn data locations. contourLevels Optional contour levels. contourLabels Optional contour labels. stationIndices Optional list indices stations use.  Note index station number, e.g. show first 4 stations, use station.indices=1:4. coastline Either coastline object used, string.  second case, permitted choices \"best\" (default) pick variant suits scale, \"coastlineWorld\" coarse version provided oce, \"coastlineWorldMedium\" \"coastlineWorldFine\" two coastlines provided ocedata package, \"none\", avoid drawing coastline. colLand colour used fill land areas \"map\"; ignored otherwise. xlim Optional limit x axis (sections, map). ylim Optional limit y axis (sections, map) zlim, zbreaks, zcol Elements control colours image points plot types, .e. ztype either \"points\" \"image\". zlim two-element numerical vector specifying limit plotted field.  provided, defaults data range. zbreaks controls colour breaks, manner similar image() parameter named breaks.  provided, zbreaks inferred zlim. zcol, controls colour scheme, may vector colours (length 1 less zbreaks), function takes integer sole argument returns number colours. provided, zcol defaults oceColorsViridis(). three parameters used Example 6, illustration Atlantic salinity along 36N. map.xlim, map.ylim Optional limits station map; map.ylim ignored map.xlim provided. clongitude, clatitude, span Optional map centre position span (km). projection Parameter specifying map projection; see mapPlot().  projection=\"automatic\", however, projection devised data, stereographic mean latitude exceeds 70N mollweide otherwise. xtype Type x axis, contour plots, either \"distance\" distance (km) first point section, \"track\" distance along cruise track, \"longitude\", \"latitude\", \"time\" \"spine\" (distance along spine added addSpine()).  Note x values order, put order, since might make physical sense, warning issued. ytype Type y axis contour plots, either \"pressure\" pressure (dbar, zero surface) \"depth\" depth (m surface, calculated pressure swDepth()). ztype String indicating whether indicate \"z\" data (R sense, .e. salinity, temperature, etc; mean vertical coordinate) choices : \"contour\" contours, \"image\" image (drawn imagep() filledContours=TRUE), \"points\" draw points. first two cases, data must gridded, identical pressures station. longitude0, latitude0 Location point distance measured. values ignored unless xtype \"distance\". legend.loc Location legend, supplied legend(), set empty string avoid plotting legend. legend.text character value indicating text legend. NULL (default) legend automatically constructed labelWithUnit(), based value . showStations Logical indicating whether draw station numbers maps. showStart Logical indicating whether indicate first station stationTicks logical value indicating whether indicate station locations ticks top margin cross-section plots. Setting parameter FALSE frees user labelling spot. showBottom value indicating whether () indicate ocean bottom cross-section views.  three possibilities. () showBottom FALSE, bottom rendered.  TRUE,  bottom rendered gray polygon. (b) showBottom character value \"polygon\", polygon drawn, similarly lines drawn \"lines\", points \"points\". (c) showBottom topo object, station locations interpolated topography results shown polygon. See “Examples”. showSpine logical value used =\"map\".  showSpine TRUE section spine added addSpine(), spine drawn blue. drawPalette logical value indicating whether draw palette ztype=\"image\" ignored otherwise. axes Logical value indicating whether draw axes. mgp 3-element numerical vector use par(mgp), also par(mar), computed . provided, defaults getOption(\"oceMgp\"). mar Value used par(\"mar\"). provided, default set . col Color line types.  provided, defaults par(\"col\").  See zcol, ztype=\"image\" ztype=\"points\". cex Numerical character-expansion factor, defaults par(\"cex\"). pch Indication symbol type; defaults par(\"pch\") non-map 3 map. lwd line width; defaults par(\"lwd\"). labcex Size characters contour labels (passed contour()). debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. debug supplied, defaults getOption(\"oceDebug\"). ... Optional arguments passed contouring function.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-section-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot a section Object — plot,section-method","text":"original section gridded, return value section. Otherwise, gridded section constructed plot returned. cases, value returned silently. purpose returning section enable subsequent processing grid, including adding elements plot (see example 5).","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-section-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a section Object — plot,section-method","text":"type plot governed , follows. =0 \"potential temperature\" potential temperature contours =1 \"temperature\" -situ temperature contours (default) =2 \"salinity\" salinity contours =3 \"sigmaTheta\" sigma-theta contours =4 \"nitrate\" nitrate concentration contours =5 \"nitrite\" nitrite concentration contours =6 \"oxygen\" oxygen concentration  contours =7 \"phosphate\" phosphate concentration contours =8 \"silicate\" silicate concentration contours =9 \"u\" eastward velocity =10 \"uz\" vertical derivative eastward velocity =11 \"v\" northward velocity =12 \"vz\" vertical derivative northward velocity =20 \"data\" dot data location =99 \"map\" location map y-axis contours pressure, plotted conventional reversed form, water surface appears top plot.  x-axis complicated. supplied, routine calculates x distance first station section stations. (produce error stations ordered geographically, contour() routine handle non-increasing axis coordinates.) specified, taken location, arbitrary units, along x-axis labels specified labels; way works designed axis().","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-section-method.html","id":"ancillary-examples","dir":"Reference","previous_headings":"","what":"Ancillary Examples","title":"Plot a section Object — plot,section-method","text":"following examples part “Examples” section, moved May 2022, reduce build-check time CRAN submission.","code":"library(oce) data(section) GS <- subset(section, 113<=stationId&stationId<=129) GSg <- sectionGrid(GS, p=seq(0, 2000, 100))  # Gulf Stream, salinity data and contoured par(mfrow=c(2, 1)) plot(GS, which=1, ylim=c(2000, 0), ztype=\"points\",      zbreaks=seq(0,30,2), pch=20, cex=3) plot(GSg, which=1, ztype=\"image\", zbreaks=seq(0,30,2))  # Gulf Stream, temperature grid (image) and data (dots) par(mfrow=c(1, 1)) plot(GSg, which=1, ztype=\"image\") T <- GS[[\"temperature\"]] col <- oceColorsViridis(100)[rescale(T, rlow=1, rhigh=100)] points(GS[[\"distance\"]],GS[[\"depth\"]],pch=20,cex=3,col=\"white\") points(GS[[\"distance\"]],GS[[\"depth\"]],pch=20,cex=2.5,col=col)  # 4. Image of temperature, with a high-salinity contour on top; #    note the Mediterranean water. sec <- plot(section, which=\"temperature\", ztype=\"image\") S <- sec[[\"salinity\", \"grid:distance-pressure\"]] contour(S$distance, S$pressure, S$field, level=35.8, lwd=3, add=TRUE)  # 5. Contours of salinity, with dots for high pressure and spice plot(section, which=\"salinity\") distance <- section[[\"distance\"]] depth <- section[[\"depth\"]] spice <- section[[\"spice\"]] look <- spice > 1.8 & depth > 500 points(distance[look], depth[look], col=\"red\")  # Image of Absolute Salinity, with 4-minute bathymetry # It's easy to calculate the desired area for the bathymetry, # but for brevity we'll hard-code it. Note that download.topo() # requires the \"ncdf4\" package to have been installed. if (requireNamespace(\"ncdf4\")) {     f <- download.topo(west=-80, east=0, south=35, north=40, resolution=4)     t <- read.topo(f)     plot(section, which=\"SA\", xtype=\"longitude\", ztype=\"image\", showBottom=t) }  # Temperature with salinity added in red plot(GSg, which=\"temperature\") distance <- GSg[[\"distance\", \"byStation\"]] depth <- GSg[[\"station\", 1]][[\"depth\"]] S <- matrix(GSg[[\"salinity\"]], byrow=TRUE, nrow=length(GSg[[\"station\"]])) contour(distance, depth, S, col=2, add=TRUE)  # Image with controlled colours plot(GSg, which=\"salinity\", ztype=\"image\",     zlim=c(35, 37.5),     zbreaks=seq(35, 37.5, 0.25),     zcol=oceColorsTurbo)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-section-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a section Object — plot,section-method","text":"Dan Kelley, help Clark Richards Chantelle Layton.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-section-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a section Object — plot,section-method","text":"","code":"library(oce) data(section) GS <- subset(section, 113 <= stationId & stationId <= 129) GSg <- sectionGrid(GS, p = seq(0, 2000, 100))  # Gulf Stream, salinity and temperature contours plot(GSg, which = c(\"salinity\", \"temperature\"))   # Gulf Stream, Temperature image plot(GSg,     which = \"temperature\", ztype = \"image\",     zbreaks = seq(0, 25, 2), zcol = oceColorsTemperature )"},{"path":"https://dankelley.github.io/oce/reference/plot-tidem-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a tidem Object — plot,tidem-method","title":"Plot a tidem Object — plot,tidem-method","text":"Plot summary diagram tidal fit.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-tidem-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a tidem Object — plot,tidem-method","text":"","code":"# S4 method for class 'tidem' plot(   x,   which = 1,   constituents = c(\"SA\", \"O1\", \"K1\", \"M2\", \"S2\", \"M4\"),   sides = NULL,   col = \"blue\",   log = \"\",   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1, mgp[1] + 1, mgp[2] + 0.25, mgp[2] + 1),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-tidem-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a tidem Object — plot,tidem-method","text":"x tidem object. integer flag indicating plot type, 1 stair-case spectral, 2 spike spectral. constituents character vector holding names constituents drawn labelled. NULL, constituents shown. sides integer vector length equal constituents, designating side constituent labels drawn. R graphics, value 1 indicates bottom plot, 3 indicates top. sides=NULL, default, labels drawn top. value sides either 1 3 converted 3. col character vector naming colors used constituents. Ignored sides=3. Repeated length constituents, otherwise. log set \"x\", frequency axis logarithmic. mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar value used [par](\"mar\"). ... optional arguments passed plotting functions, obeyed.  example, ... contains type, value ignored set internally, according value .","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-tidem-method.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Plot a tidem Object — plot,tidem-method","text":"","code":"library(oce) data(sealevel) tide <- tidem(sealevel) plot(tide)"},{"path":"https://dankelley.github.io/oce/reference/plot-tidem-method.html","id":"historical-note","dir":"Reference","previous_headings":"","what":"Historical note","title":"Plot a tidem Object — plot,tidem-method","text":"argument named labelIf removed July 2016, discovered never worked documented, useful argument constituents added.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-tidem-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a tidem Object — plot,tidem-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-topo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a topo Object — plot,topo-method","title":"Plot a topo Object — plot,topo-method","text":"plots contours topographic elevation.  plot aspect ratio set based middle latitude plot.  line properties, land.lwd, may either single item, vector; latter case, length must match length corresponding properties, e.g. land.z.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-topo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a topo Object — plot,topo-method","text":"","code":"# S4 method for class 'topo' plot(   x,   xlab = \"\",   ylab = \"\",   asp,   clongitude,   clatitude,   span,   expand = 1.5,   water.z,   col.water,   lty.water,   lwd.water,   land.z,   col.land,   lty.land,   lwd.land,   geographical = FALSE,   location = \"topright\",   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1, mgp[1] + 1, 1, 1),   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-topo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a topo Object — plot,topo-method","text":"x topo object. xlab, ylab Character strings giving label x y axes. asp Aspect ratio plot.  default plot.coastline set aspect ratio give natural latitude-longitude scaling somewhere near centre latitude plot. Often, makes sense set asp , e.g. get correct shapes 45N, use asp=1/cos(45*pi/180). Note land mass symmetric equator, get good world views set asp=1 set ylim symmetric zero.  given value asp ignored, clongitude clatitude given. clongitude Optional center longitude map, degrees east; see clatitude. clatitude Optional center latitude map, degrees north.  clongitude provided, provided value asp ignored, instead plot aspect ratio computed based center latitude.  Also, clongitude clatitude provided, span must , also. span Optional suggested span plot, kilometers (must supplied, clongitude clatitude supplied). expand Numerical factor expansion plot limits, showing area outside plot, e.g. showing ship track coastline, actual coastline show ocean boundary.  value expand ignored either xlim ylim given. water.z Depths plot water contours.  provided, inferred data. col.water Colors corresponding water.z values.  provided, \"fill\" colors oce.colorsGebco(). lty.water Line type(s) water contours. lwd.water Line width(s) water contours. land.z Depths plot land contours.  provided, inferred data.  set NULL, land contours plotted. col.land Colors corresponding land.z values.  provided, \"fill\" colors oce.colorsGebco(). lty.land Line type(s) land contours. lwd.land Line width(s) land contours. geographical Logical, indicating whether plot latitudes longitudes without minus signs. location Location legend (\"none\", legend). mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar Four-element numerical vector used par(\"mar\"). debug Numerical value, positive values indicating higher levels debugging. ... Additional arguments passed plotting functions.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-topo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a topo Object — plot,topo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-topo-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a topo Object — plot,topo-method","text":"","code":"library(oce) data(topoWorld) plot(topoWorld, clongitude = -60, clatitude = 45, span = 10000)"},{"path":"https://dankelley.github.io/oce/reference/plot-windrose-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a windrose Object — plot,windrose-method","title":"Plot a windrose Object — plot,windrose-method","text":"Plot windrose object.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-windrose-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a windrose Object — plot,windrose-method","text":"","code":"# S4 method for class 'windrose' plot(   x,   type = c(\"count\", \"mean\", \"median\", \"fivenum\"),   convention = c(\"meteorological\", \"oceanographic\"),   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1], mgp[1], 1 + mgp[1], mgp[1]),   col,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/plot-windrose-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a windrose Object — plot,windrose-method","text":"x windrose object. type thing plotted, either number counts angle interval, mean values interval, median values, fivenum() representation values. convention String indicating whether use meteorological convention oceanographic convention arrows emanate centre rose.  meteorological convection, arrow emanates towards right diagram wind east; oceanographic convention, arrow indicates flow east. mgp Three-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar Four-element numerical vector used par(\"mar\"). col Optional list colors use.  set, colors c(\"red\", \"pink\", \"blue\", \"lightgray\").  first three types plot, first color list used fill rose, third used petals rose, fourth used grid lines. \"fivenum\" type, region lower hinge first quartile coloured pink, region first quartile third quartile coloured red, region third quartile upper hinge coloured pink.  median drawn black. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-windrose-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a windrose Object — plot,windrose-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-windrose-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a windrose Object — plot,windrose-method","text":"","code":"library(oce) set.seed(1234) theta <- seq(0, 360, 0.25) x <- 1 + cos(pi / 180 * theta) + rnorm(theta) y <- sin(pi / 180 * theta) + rnorm(theta) wr <- as.windrose(x, y) plot(wr)  plot(wr, type = \"fivenum\")"},{"path":"https://dankelley.github.io/oce/reference/plot-xbt-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an xbt Object — plot,xbt-method","title":"Plot an xbt Object — plot,xbt-method","text":"Plots data contained xbt object.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-xbt-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an xbt Object — plot,xbt-method","text":"","code":"# S4 method for class 'xbt' plot(   x,   which = 1,   type = \"l\",   mgp = getOption(\"oceMgp\"),   mar,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plot-xbt-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an xbt Object — plot,xbt-method","text":"x xbt object. list desired plot types; see “Details” meanings various values . type type plot, plot(). mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\"). debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-xbt-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot an xbt Object — plot,xbt-method","text":"panels controlled argument, choices follows. =1 temperature profile function depth. =2 soundSpeed profile function depth.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plot-xbt-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an xbt Object — plot,xbt-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plot-xbt-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an xbt Object — plot,xbt-method","text":"","code":"library(oce) data(xbt) summary(xbt) #> xbt summary #> ----------- #>  #> * File source:        \"/Users/kelley/git/oce/create_data/xbt/xbt.edf\" #> * Serial Number:      0 #> * Longitude:          4.005 #> * Latitude:           -4 #> * Time:               2000-10-10 08:49:38 #> * Data Overview #>  #>                              Min.   Mean   Max.   Dim. NAs OriginalName     #>     depth [m]                5.4    7.0333 8.7    6    0   \"Depth\"          #>     temperature [°C, ITS-90] 20.9   20.905 20.91  6    0   \"Temperature\"    #>     soundSpeed [m/s]         1575.3 1575.3 1575.4 6    0   \"Sound Velocity\" #>  #> * Processing Log #>  #>     - 2020-02-24 15:07:55 UTC: `create 'xbt' object` #>     - 2020-02-24 15:07:55 UTC: `read.xbt.edf(file = file, debug = 10)` plot(xbt)"},{"path":"https://dankelley.github.io/oce/reference/plotInset.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an Inset Diagram — plotInset","title":"Plot an Inset Diagram — plotInset","text":"Adds inset diagram existing plot.  Note inset map coastline, necessary supply inset=TRUE prevent inset diagram occupying whole device width.  plotInset() called, plotting take place within inset, essential finish plot drawing inset.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotInset.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an Inset Diagram — plotInset","text":"","code":"plotInset(   xleft,   ybottom,   xright,   ytop,   expr,   mar = c(2, 2, 1, 1),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/plotInset.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an Inset Diagram — plotInset","text":"xleft location left-hand inset diagram, existing plot units.  (PROVISIONAL FEATURE: may also \"bottomleft\", put inset .  Eventually, positions may added.) ybottom location bottom side inset diagram, existing plot units. xright location right-hand side inset diagram, existing plot units. ytop location top side inset diagram, existing plot units. expr expression draws inset plot.  may single plot command, sequence commands enclosed curly braces. mar margins, line heights, used four sides inset diagram.  (often helpful save space.) debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get .","code":""},{"path":"https://dankelley.github.io/oce/reference/plotInset.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an Inset Diagram — plotInset","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plotInset.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an Inset Diagram — plotInset","text":"","code":"library(oce) # power law in linear and log form x <- 1:10 y <- x^2 plot(x, y, log = \"xy\", type = \"l\") plotInset(3, 1, 10, 8,     expr = plot(x, y, type = \"l\", cex.axis = 3 / 4, mgp = c(3 / 2, 1 / 2, 0)),     mar = c(2.5, 2.5, 1, 1) )   # CTD data with location data(ctd) plot(ctd, which = \"TS\") plotInset(29.9, 2.7, 31, 10,     expr = plot(ctd,         which = \"map\",         coastline = \"coastlineWorld\",         span = 5000, mar = NULL, cex.axis = 3 / 4     ) )"},{"path":"https://dankelley.github.io/oce/reference/plotPolar.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw a Polar Plot — plotPolar","title":"Draw a Polar Plot — plotPolar","text":"Creates crude polar plot.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotPolar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw a Polar Plot — plotPolar","text":"","code":"plotPolar(r, theta, debug = getOption(\"oceDebug\"), ...)"},{"path":"https://dankelley.github.io/oce/reference/plotPolar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw a Polar Plot — plotPolar","text":"r radii points plot. theta angles points plot, degrees. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional arguments passed lower-level plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotPolar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Draw a Polar Plot — plotPolar","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plotPolar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw a Polar Plot — plotPolar","text":"","code":"library(oce) r <- rnorm(50, mean = 2, sd = 0.1) theta <- runif(50, 0, 360) plotPolar(r, theta)"},{"path":"https://dankelley.github.io/oce/reference/plotProfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a ctd Profile — plotProfile","title":"Plot a ctd Profile — plotProfile","text":"Plot profile, showing variation quantity (quantities) pressure, using oceanographic convention putting lower pressures nearer top plot. works oce object pressure column data slot. colors (col.salinity, etc.) used two profiles appear plot.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotProfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a ctd Profile — plotProfile","text":"","code":"plotProfile(   x,   xtype = \"salinity+temperature\",   ytype = \"pressure\",   eos = getOption(\"oceEOS\", default = \"gsw\"),   lty = 1,   xlab = NULL,   ylab = NULL,   col = \"black\",   col.salinity = \"darkgreen\",   col.temperature = \"red\",   col.rho = \"blue\",   col.N2 = \"brown\",   col.dpdt = \"darkgreen\",   col.time = \"darkgreen\",   pt.bg = \"transparent\",   grid = TRUE,   col.grid = \"lightgray\",   lty.grid = \"dotted\",   Slim,   Clim,   Tlim,   densitylim,   sigmalim,   N2lim,   Rrholim,   dpdtlim,   timelim,   plim,   xlim,   ylim,   lwd = par(\"lwd\"),   xaxs = \"r\",   yaxs = \"r\",   cex = 1,   pch = 1,   useSmoothScatter = FALSE,   df,   keepNA = FALSE,   type = \"l\",   mgp = getOption(\"oceMgp\"),   mar,   add = FALSE,   inset = FALSE,   debug = getOption(\"oceDebug\", 0),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plotProfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a ctd Profile — plotProfile","text":"x ctd object. xtype item(s) plotted x axis, either character value taken following list, numeric vector length matching pressure field stored x. (second case, version 1.7-11, label auto-constructed, unless user supplied character value xlab.) \"salinity\" Profile salinity. \"conductivity\" Profile conductivity. \"temperature\" Profile -situ temperature. \"theta\" Profile potential temperature. \"density\" Profile density (expressed \\(\\sigma_\\theta\\)). \"index\" Index sample (useful working ctdTrim()). \"salinity+temperature\" Profile salinity temperature within single axis frame. \"N2\" Profile square buoyancy frequency \\(N^2\\), calculated swN2() optional argument setting df=length(x[[\"pressure\"]])/4 smoothing. \"density+N2\" Profile sigma0 square buoyancy frequency within single axis frame. \"density+dpdt\" Profile sigma0 dP/dt sensor.  latter useful indicating problems deployment. calculated first differencing pressure using smoothing spline result (avoid grid-point wiggles result SBE software writes 3 decimal places pressure).  Note dP/dt may scale factor; problem time column data slot, sample.rate metadata slot. \"sigma0\", \"sigma1\", \"sigma2\", \"sigma3\" \"sigma4\" Profile potential density referenced 0dbar (.e. surface), 1000dbar, 2000dbar, 3000dbar, 4000dbar. \"spice\", \"spiciness0\" \"spiciness1\" \"spiciness2\" Profile named quantity.  spice, swSpice() called eos argument set \"unesco\". Otherwise, gsw::gsw_spiciness0()', gsw::gsw_spiciness1()' gsw::gsw_spiciness2()' called. \"Rrho\" Profile Rrho, defined diffusive sense. \"RrhoSF\" Profile Rrho, defined salt-finger sense. ytype variable use y axis. valid choices : \"pressure\" (default), \"z\", \"depth\", \"sigmaTheta\" \"sigma0\". eos equation state used, either \"unesco\" \"gsw\". lty line type profile. xlab optional label x axis (top plot). provided, label inferred value xtype. user-supplied case, bear mind easy way get units use expression, e.g. xlab=expression(\"Acceleration [\"*m/s^2*\"]\"). ylab optional label y axis.  See xlab note units.  Setting ylab=\"\" prevents labelling axis. col color general profile. col.salinity color salinity profile (see “Details”). col.temperature color temperature (see “Details”). col.rho color density (see “Details”). col.N2 color square buoyancy frequency (see “Details”). col.dpdt color dP/dt. col.time color delta-time. pt.bg inside color symbols pch 21:25 grid logical, set TRUE get grid. col.grid color grid. lty.grid line type grid. Slim optional limit salinity axis, can either represent Practical Salinity Absolute Salinity. Clim optional limit conductivity axis. Tlim optional limit temperature axis, can represent -situ temperature, potential temperature, Conservative Temperature. densitylim optional limit density axis. sigmalim optional limit density-anomaly axis, can represent sigmaTheta, sigma0, sigma1, sigma2, sigma3 sigma4. N2lim optional limit N2 axis. Rrholim optional limit density ratio axis. dpdtlim optional limit dp/dt axis. timelim optional limit delta-time axis. plim optional limit pressure axis, ignored unless ytype==\"pressure\", case takes precedence ylim. xlim optional limit x axis, can apply plot type. ignored plotted x variable something limit may specified argument, e.g. xlim ignored salinity profile, Slim given case. ylim optional limit y axis, can apply plot type, although overridden plim ytype \"pressure\" densitylim ytype \"sigmaTheta\". lwd line width value data line xaxs value par() xaxs use yaxs value par() yaxs use cex size used plot symbols (see par()) pch code plotting symbol (see par()). useSmoothScatter boolean, set TRUE use smoothScatter() instead plot() draw plot. df optional argument, passed swN2() provided, plot using \\(N^2\\) requested. keepNA FALSE type type plot draw, using scheme plot(). mgp 3-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar Four-element numerical value used set plot margins, call par(mar) prior plot. supplied, reasonable default set . add logical value controls whether add existing plot.  (makes sense use add=TRUE panel argument coplot(), example.) inset logical value indicating whether draw inset plot. Setting TRUE prevent present function adjusting margins, necessary margin adjustment basis method used plotInset(). debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional arguments passed functions.  common example set df, use swN2() calculations.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotProfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot a ctd Profile — plotProfile","text":"None.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plotProfile.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a ctd Profile — plotProfile","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plotProfile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a ctd Profile — plotProfile","text":"","code":"library(oce) data(ctd) plotProfile(ctd, xtype = \"temperature\")"},{"path":"https://dankelley.github.io/oce/reference/plotScan.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a ctd Object in a Low-Level Fashion — plotScan","title":"Plot a ctd Object in a Low-Level Fashion — plotScan","text":"Plot CTD data time-series scan number, help trimming extraneous data CTD cast.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotScan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a ctd Object in a Low-Level Fashion — plotScan","text":"","code":"plotScan(   x,   which = 1,   xtype = \"scan\",   flipy = FALSE,   type = \"l\",   mgp = getOption(\"oceMgp\"),   xlim = NULL,   ylim = NULL,   mar = c(mgp[1] + 1.5, mgp[1] + 1.5, mgp[1], mgp[1]),   ...,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/plotScan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a ctd Object in a Low-Level Fashion — plotScan","text":"x ctd object. integer specifying plot drawn: 1 pressure vs 'x', 2 diff(pressure) vs 'x', 3 temperature vs 'x', 4 salinity vs 'x'  , value 'x' determined xtype. xtype Character string indicating variable x axis. permitted values \"scan\" (default), \"time\" \"index\". last created using seq_along() pressure column (assumed present ctd object). xtype=\"index\" guaranteed work objects, indeed value used, either \"scan\" \"time\" requested, unavailable. flipy Logical value, ignored unless 1. flipy TRUE, pressure plot high pressures bottom axis. type Character indicating line type, plot.default(). default \"l\", meaning connect data line segments. Another good choice \"o\", add points data. mgp Three-element numerical vector use par(mgp), also par(mar), computed .  default tighter R default, order use space data less axes. xlim Limits x value. default, NULL, select data. ylim Limits y value. default, NULL, select data. mar Four-element vector used par(\"mar\").  set NULL, par(\"mar\") used.  good choice TS diagram palette right mar=par(\"mar\")+c(0, 0, 0, 1)). ... Optional arguments passed plotting functions. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotScan.html","id":"historical-note","dir":"Reference","previous_headings":"","what":"Historical Note","title":"Plot a ctd Object in a Low-Level Fashion — plotScan","text":"2022-12-07, xtype expanded include \"index\", undocumented multi-panel feature removed.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plotScan.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a ctd Object in a Low-Level Fashion — plotScan","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plotScan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a ctd Object in a Low-Level Fashion — plotScan","text":"","code":"library(oce) data(ctdRaw) plotScan(ctdRaw) abline(v = c(130, 350), col = \"red\") # useful for ctdTrim()"},{"path":"https://dankelley.github.io/oce/reference/plotSticks.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw a Stick Plot — plotSticks","title":"Draw a Stick Plot — plotSticks","text":"arrows drawn directions graph match directions indicated u v components. arrow size set relative units y axis, according value yscale, unit v divided unit y. interpretation diagrams produced plotSticks can difficult, owing overlap arrows.  reason, often good idea smooth u v using function.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotSticks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw a Stick Plot — plotSticks","text":"","code":"plotSticks(   x,   y,   u,   v,   yscale = 1,   add = FALSE,   length = 1/20,   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1, mgp[1] + 1, 1, 1 + par(\"cex\")),   xlab = \"\",   ylab = \"\",   col = 1,   ... )"},{"path":"https://dankelley.github.io/oce/reference/plotSticks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw a Stick Plot — plotSticks","text":"x x coordinates stick origins. y y coordinates stick origins.  supplied, 0 used; length less x, first number repeated rest ignored. u x component stick length. v y component stick length. yscale scale u v y (see “Description”). add boolean, set TRUE add existing plot. length value provided arrows(); , set default smaller normally used, plots tend crowded oceanographic applications. mgp 3-element numerical vector use par(\"mgp\"). Note default mar computed mgp value. default tighter R default, order use space data less axes. mar value used par(\"mar\"). xlab, ylab labels plot axes. default label . col color sticks, either numerical character format. made length matching x call rep(), can handy e.g. colorizing velocity field day. ... graphical parameters passed arrows().  common, example, use smaller arrow heads arrows() uses; see “Examples”.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotSticks.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Draw a Stick Plot — plotSticks","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plotSticks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw a Stick Plot — plotSticks","text":"","code":"library(oce)  # Flow from a point source n <- 16 x <- rep(0, n) y <- rep(0, n) theta <- seq(0, 2 * pi, length.out = n) u <- sin(theta) v <- cos(theta) plotSticks(x, y, u, v, xlim = c(-2, 2), ylim = c(-2, 2))  rm(n, x, y, theta, u, v)  # Oceanographic example data(met) t <- met[[\"time\"]] u <- met[[\"u\"]] v <- met[[\"v\"]] p <- met[[\"pressure\"]] oce.plot.ts(t, p) plotSticks(t, 99, u, v, yscale = 25, add = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/plotTS.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Temperature-Salinity Diagram — plotTS","title":"Plot Temperature-Salinity Diagram — plotTS","text":"Creates temperature-salinity plot CTD cast, labeled isopycnals.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotTS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Temperature-Salinity Diagram — plotTS","text":"","code":"plotTS(   x,   inSitu = FALSE,   type = \"p\",   referencePressure = 0,   nlevels = 6,   levels,   grid = TRUE,   col.grid = \"lightgray\",   lty.grid = \"dotted\",   rho1000 = FALSE,   eos = getOption(\"oceEOS\", default = \"gsw\"),   cex = par(\"cex\"),   col = par(\"col\"),   pch = par(\"pch\"),   bg = \"white\",   pt.bg = \"transparent\",   col.rho = gray(0.5),   cex.rho = 3/4 * par(\"cex\"),   rotate = TRUE,   useSmoothScatter = FALSE,   xlab,   ylab,   Slim,   Tlim,   drawFreezing = TRUE,   trimIsopycnals = TRUE,   gridIsopycnals = c(30, 50),   mgp = getOption(\"oceMgp\"),   mar = c(mgp[1] + 1.5, mgp[1] + 1.5, mgp[1], mgp[1]),   lwd = par(\"lwd\"),   lty = par(\"lty\"),   lwd.rho = par(\"lwd\"),   lty.rho = par(\"lty\"),   add = FALSE,   inset = FALSE,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/plotTS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Temperature-Salinity Diagram — plotTS","text":"x ctd, argo section object, list containing solely ctd objects argo objects. inSitu boolean indicating whether use -situ temperature (default) potential temperature, calculated reference pressure given referencePressure.  ignored eos=\"gsw\", cases y axis necessarily conservative formulation temperature. type representation data, \"p\" points, \"l\" connecting lines, \"b\" spaced connecting lines, \"n\" indication. referencePressure reference pressure, used calculating potential temperature, inSitu FALSE. nlevels Number automatically-selected isopycnal levels (ignored levels supplied). levels Optional vector desired isopycnal levels. grid flag can set TRUE get grid. col.grid color grid. lty.grid line type grid. rho1000 TRUE, label isopycnals e.g. 1024; FALSE, label e.g. 24 eos equation state used, either \"unesco\" \"gsw\". cex character-expansion factor symbols, par(\"cex\"). col color symbols. pch symbol type, par(\"pch\"). bg optional color painted plotting area, plotting.  (useful cases inset=TRUE.) pt.bg inside color symbols pch 21:25 col.rho color isopycnal lines labels. cex.rho size isopycnal labels. rotate TRUE, labels right-hand margin written vertically useSmoothScatter TRUE, use smoothScatter() plot points. xlab optional label x axis, default \"Salinity [PSU]\". ylab optional label y axis, default \"Temperature [C]\". Slim optional limits salinity axis, otherwise inferred visible data (.e. data finite values salinity temperature). Tlim Slim, temperature. drawFreezing logical indication whether draw freezing-point line. based zero pressure. eos=\"unesco\" swTFreeze() used compute curve, whereas eos=\"gsw\" gsw::gsw_CT_freezing() used; case, zero pressure used. trimIsopycnals logical value (TRUE default) indicates whether trim isopycnal curves region temperature-salinity space density computations considered valid context chosen eos; see “Details”. gridIsopycnals parameter controls isopycnals computed.  may NULL, integer vector length 2. Case 1: isopycnals drawn tracing density isopleths salinity-temperature space. method used default prior version 1.7-11, found yield staircase-like isopycnal curves highly zoomed-plots (e.g. millidegree temperature ranges). Case 2: grid density constructed, gridIsopycnals[1] salinity levels gridIsopycnals[2] temperature levels, contourLines() used trace isopycnals. mgp 3-element numerical vector use [par](mgp), also par(mar), computed .  default tighter R default, order use space data less axes. mar value used par(\"mar\").  set NULL, par(\"mar\") used.  good choice TS diagram palette right mar=par(\"mar\")+c(0, 0, 0, 1)). lwd line width lines symbols. lty line type lines symbols. lwd.rho line width density curves. lty.rho line type density curves. add flag controls whether add existing plot.  (makes sense use add=TRUE panel argument coplot(), example.) inset set TRUE use within plotInset().  effect prevent present function adjusting margins, necessary margin adjustment basis method used plotInset(). debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional arguments passed plotting functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotTS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Temperature-Salinity Diagram — plotTS","text":"list silently returned, containing xat yat, values can used oce.grid() add grid plot.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotTS.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot Temperature-Salinity Diagram — plotTS","text":"isopycnal curves (along density constant) drawn drawIsopycnals(), also places labels margins showing density minus 1000 \\(kg/m^3\\). trimIsopycnals TRUE (default), curves trimmed region within results density calculation chosen equation state (eos) considered reliable. eos=\"unesco\" region includes Practical Salinity 0 42 Potential Temperature -2C 40C, accordance Fofonoff Millard (1983, page 23). eos=\"gsw\" lower limit Absolute Salinity validity taken 0 g/kg, accordance McDougall et al. (2003 section 3) TEOS-10/gsw Matlab code -called \"funnel\" validity. However, appropriate upper limit Absolute Salinity clear. , value 42 g/kg chosen match \"funnel\" Matlab code July 2020, two choices might made. One 50 g/kg, since gsw::gsw_SA_from_rho() returns NA values Absolute Salinities exceeding value, another 40 g/kg, McDougall et al. (2003 section 3). Conservative Temperature range set run -2C 33C, McDougall et al. (2003 section 3), even though \"funnel\" imposes upper limit variable.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotTS.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Plot Temperature-Salinity Diagram — plotTS","text":"Fofonoff, N. P., R. C. Millard. \"Algorithms Computation Fundamental Properties Seawater.\" UNESCO Technical Papers Marine Research. SCOR working group Evaluation CTD data; UNESCO/ICES/SCOR/IAPSO Joint Panel Oceanographic Tables Standards, 1983. https://unesdoc.unesco.org/ark:/48223/pf0000059832. McDougall, Trevor J., David R. Jackett, Daniel G. Wright, Rainer Feistel. \"Accurate Computationally Efficient Algorithms Potential Temperature Density Seawater.\" Journal Atmospheric Oceanic Technology 20, . 5 (May 1, 2003): 730-41. https://journals.ametsoc.org/jtech/article/20/5/730/2543/Accurate--Computationally-Efficient-Algorithms.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/plotTS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot Temperature-Salinity Diagram — plotTS","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plotTS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot Temperature-Salinity Diagram — plotTS","text":"","code":"# 1. ctd object library(oce) data(ctd) plotTS(ctd)   # 2. section object (note the outlier!) data(section) plotTS(section)   # 3. argo object data(argo) plotTS(handleFlags(argo))   # 4. oxygen-based colormap marOrig <- par(\"mar\") # so later plots with palettes have same margins cm <- colormap(section[[\"oxygen\"]]) drawPalette(colormap = cm, zlab = \"Oxygen\") plotTS(section, pch = 19, col = cm$zcol, mar = par(\"mar\")) # the mar adjusts for the palette   # 5. waters near Gulf Stream, colour-coded for longitude. sec <- subset(section, abs(longitude + 71.6) < 1) cm <- colormap(sec[[\"longitude\", \"byStation\"]], col = oceColors9B) par(mar = c(3.3, 3.3, 1, 1.5)) drawPalette(colormap = cm, zlab = \"Longitude\") plotTS(sec, type = \"n\", xaxs = \"r\", mar = par(\"mar\")) jnk <- mapply(     function(s, col) {         plotTS(s, type = \"o\", col = \"gray\", pt.bg = col, pch = 21, add = TRUE)     },     sec[[\"station\"]],     col = cm$zcol )   # 6. with added spiciness contours data(ctd) plotTS(ctd, eos = \"gsw\") # MANDATORY so x=SA and y=CT usr <- par(\"usr\") n <- 100 SAgrid <- seq(usr[1], usr[2], length.out = n) CTgrid <- seq(usr[3], usr[4], length.out = n) g <- expand.grid(SA = SAgrid, CT = CTgrid) spiciness <- matrix(gsw::gsw_spiciness0(g$SA, g$CT), nrow = n) contour(SAgrid, CTgrid, spiciness, col = 2, labcex = 1, add = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/plotTaylor.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot a Model-data Comparison Diagram — plotTaylor","title":"Plot a Model-data Comparison Diagram — plotTaylor","text":"Creates diagram described Taylor (2001).  graph form semicircle, radial lines spokes connecting focus point flat (lower) edge.  radius point graph indicates standard deviation corresponding quantity, .e. x columns y.  angle connecting point graph focus provides indication correlation coefficient respect x.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotTaylor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot a Model-data Comparison Diagram — plotTaylor","text":"","code":"plotTaylor(x, y, scale, pch = 1, col = 1, labels, pos = 2, cex = 1)"},{"path":"https://dankelley.github.io/oce/reference/plotTaylor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot a Model-data Comparison Diagram — plotTaylor","text":"x vector reference values quantity, e.g. measured time space. y matrix whose columns hold values values compared x.  (y vector, converted first one-column matrix). scale optional scale, interpreted maximum value standard deviation. pch vector plot symbols, used points plot. length less number columns y, repeated needed match columns. col vector colors points plot, repeated necessary (see pch). labels optional vector strings use labelling points. pos optional vector positions labelling strings, repeated necessary (see pch). cex character expansion factor, repeated necessary (see pch).","code":""},{"path":"https://dankelley.github.io/oce/reference/plotTaylor.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot a Model-data Comparison Diagram — plotTaylor","text":"“east” side graph indicates \\(R=1\\), \\(R=0\\) \"north\" edge \\(R=-1\\) \"west\" side.  x data indicated bullet graph, appearing lower edge right focus distance indicating standard deviation `x`.  points graph represent columns `y`, coded automatically supplied values `pch` `col`. example shows three tidal models Halifax sealevel data, computed tidem() M2 component, S2 component, (auto-selected) components.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotTaylor.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Plot a Model-data Comparison Diagram — plotTaylor","text":"Taylor, Karl E. \"Summarizing Multiple Aspects Model Performance Single Diagram.\" Journal Geophysical Research: Atmospheres 106, . D7 (April 16, 2001): 7183–92. https://doi.org/10.1029/2000JD900719.","code":""},{"path":"https://dankelley.github.io/oce/reference/plotTaylor.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot a Model-data Comparison Diagram — plotTaylor","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/plotTaylor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot a Model-data Comparison Diagram — plotTaylor","text":"","code":"library(oce) data(sealevel) x <- sealevel[[\"elevation\"]] M2 <- predict(tidem(sealevel, constituents = \"M2\")) S2 <- predict(tidem(sealevel, constituents = \"S2\")) all <- predict(tidem(sealevel)) #> Note: the tidal record is too short to fit for constituents: SA, PI1, S1, PSI1, GAM2, H1, H2, T2, R2 plotTaylor(x, cbind(M2, S2, all), labels = c(\"M2\", \"S2\", \"all\"))"},{"path":"https://dankelley.github.io/oce/reference/predict.tidem.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict a Tidal Signal — predict.tidem","title":"Predict a Tidal Signal — predict.tidem","text":"creates time-series predicted tides, based tidal model object created .tidem() tidem().","code":""},{"path":"https://dankelley.github.io/oce/reference/predict.tidem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict a Tidal Signal — predict.tidem","text":"","code":"# S3 method for class 'tidem' predict(object, newdata, ...)"},{"path":"https://dankelley.github.io/oce/reference/predict.tidem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict a Tidal Signal — predict.tidem","text":"object tidem object. newdata vector POSIXt times make prediction.  models created tidem(), newdata argument optional, provided, predictions observation times given tidem(). However, newdata required  .tidem() used create object. ... optional arguments passed children.","code":""},{"path":"https://dankelley.github.io/oce/reference/predict.tidem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Predict a Tidal Signal — predict.tidem","text":"vector predictions.","code":""},{"path":"https://dankelley.github.io/oce/reference/predict.tidem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Predict a Tidal Signal — predict.tidem","text":"tidal constituents stored object used, just statistically significant amplitude exceeding particular value.  respect, predict.tidem() follows pattern established e.g. predict.lm().  Note constituents object straightforward constructed .tidem(), considerably complicated tidem(), documentation latter studied closely, especially regard Rayleigh criterion.","code":""},{"path":"https://dankelley.github.io/oce/reference/predict.tidem.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Predict a Tidal Signal — predict.tidem","text":"","code":"# prediction at specified times data(sealevel) m <- tidem(sealevel) # Check fit over 2 days (interpolating to finer timescale) look <- 1:48 time <- sealevel[[\"time\"]] elevation <- sealevel[[\"elevation\"]] oce.plot.ts(time[look], elevation[look]) # 360s = 10 minute timescale t <- seq(from=time[1], to=time[max(look)], by=360) lines(t, predict(m, newdata=t), col=\"red\") legend(\"topright\", col=c(\"black\",\"red\"), legend=c(\"data\",\"model\"),lwd=1)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/predict.tidem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Predict a Tidal Signal — predict.tidem","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/predict.tidem.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Predict a Tidal Signal — predict.tidem","text":"","code":"# Show non-tidal sealevel signal in Halifax Harbour during # the year 2002. The spike resulted from Hurricane Juan. library(oce) data(sealevel) time <- sealevel[[\"time\"]] elevation <- sealevel[[\"elevation\"]] prediction <- tidem(sealevel) |> predict() #> Note: the tidal record is too short to fit for constituents: SA, PI1, S1, PSI1, GAM2, H1, H2, T2, R2 oce.plot.ts(time, elevation - prediction)"},{"path":"https://dankelley.github.io/oce/reference/preferAdjusted.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Preference for Adjusted Values — preferAdjusted","title":"Set Preference for Adjusted Values — preferAdjusted","text":"argo data can contain \"adjusted\" forms data items, may trustworthy original data, preferAdjusted lets user express preference adjusted data.  means using [[,argo-method results returned preferAdjusted (possible) return adjusted data, also use adjusted data computations derived quantities Absolute Salinity. preference applies also units data-quality flags, can returned [[,argo-method, discussed “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/preferAdjusted.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Preference for Adjusted Values — preferAdjusted","text":"","code":"preferAdjusted(argo, which = \"all\", fallback = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/preferAdjusted.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Preference for Adjusted Values — preferAdjusted","text":"argo argo object. character vector naming items (depending also value fallback) adjusted values sought future calls [[,argo-method. short names used, e.g. =\"oxygen\" means adjusted oxygen returned future calls argo[[\"oxygen\"]].  default, \"\", means  use adjusted values item argo adjusted values. fallback logical value indicating whether fall back unadjusted values data field adjusted values NA.  default value, TRUE, avoids problem biogeochemical fields, adjustment one field may lead insertion \"adjusted\" values fields consist nothing NAs.","code":""},{"path":"https://dankelley.github.io/oce/reference/preferAdjusted.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Preference for Adjusted Values — preferAdjusted","text":"argo object metadata slot altered (adjustedWhich adjustedFallback elements) signal [[,argo-method function object.","code":""},{"path":"https://dankelley.github.io/oce/reference/preferAdjusted.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set Preference for Adjusted Values — preferAdjusted","text":"preferAdjusted() merely sets two items metadata slot returned argo object. real action carried [[,argo-method , convenience, details explained . Consider salinity, example. equals \"\", character vector containing \"salinity\", using [[,argo-method returned object yield adjusted forms salinity data, associated flags, units.  Thus, salinity case, argo[[\"salinity\"]] attempt return argo@data$salinityAdjusted instead returning argo@data$salinity, although adjusted values NA , depending value fallback, unadjusted values may returned; similarly argo[[\"salinityFlags\"]] attempt return argo@metadata$flags$salinityAdjusted instead argo@metadata$flags$salinity, argo[[\"salinityUnits\"]] attempt return argo@metadata$units$salinityAdjusted instead argo@metadata$units$salinity. default value, =\"\", indicates preference adjusted values apply elements data slot returned object, along associated flags units. can handy quick work, analysts may also choose restrict use adjusted values subset variables, based decisions data quality accuracy. default value fallback=TRUE indicates later calls [[,argo-method return unadjusted values data items NA adjusted values.  condition rare core variables (salinity, temperature pressure) annoyingly common biogeochemical variables; see e.g. Section 2.2.5 Reference 1 discussion conditions Argo NetCDF files contain adjusted values. Setting fallback=FALSE means adjusted values (exist) always returned, even useless collection NA values. Error fields, salinityAdjustedError, returned -[[,argo-method, regardless whether object created preferAdjusted. noted , regardless whether preferAdjusted used, analyst can always access either unadjusted adjusted data directly, using original variable names stored source NetCDF file.  example, argo[[\"PSAL\"]] yields unadjusted salinity values, argo[[\"PSAL_ADJUSTED\"]] yields adjusted values (exist, NULL ). Similarly, adjusted value can always obtained using form like argo[[\"salinityAdjusted\"]].","code":""},{"path":"https://dankelley.github.io/oce/reference/preferAdjusted.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Set Preference for Adjusted Values — preferAdjusted","text":"Argo Data Management Team. \"Argo User's Manual V3.3.\" Ifremer, November 28, 2019. doi:10.13155/29825","code":""},{"path":"https://dankelley.github.io/oce/reference/preferAdjusted.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set Preference for Adjusted Values — preferAdjusted","text":"Dan Kelley, based discussions Jaimie Harbin (respect [[,argo-method interface) Clark Richards (respect storing preference metadata slot).","code":""},{"path":"https://dankelley.github.io/oce/reference/preferAdjusted.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Preference for Adjusted Values — preferAdjusted","text":"","code":"library(oce) data(argo) argoAdjusted <- preferAdjusted(argo) all.equal(argo[[\"salinityAdjusted\"]], argoAdjusted[[\"salinity\"]]) #> [1] TRUE all.equal(argo[[\"salinityFlagsAdjusted\"]], argoAdjusted[[\"salinityFlags\"]]) #> [1] TRUE all.equal(argo[[\"salinityUnitsAdjusted\"]], argoAdjusted[[\"salinityUnits\"]]) #> [1] TRUE"},{"path":"https://dankelley.github.io/oce/reference/presentTime.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the Present Time, in a Stated Timezone — presentTime","title":"Get the Present Time, in a Stated Timezone — presentTime","text":"Get Present Time, Stated Timezone","code":""},{"path":"https://dankelley.github.io/oce/reference/presentTime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the Present Time, in a Stated Timezone — presentTime","text":"","code":"presentTime(tz = \"UTC\")"},{"path":"https://dankelley.github.io/oce/reference/presentTime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the Present Time, in a Stated Timezone — presentTime","text":"tz String indicating desired timezone. default use UTC, used commonly oceanographic work. get local time, use tz=\"\" tz=NULL,","code":""},{"path":"https://dankelley.github.io/oce/reference/presentTime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the Present Time, in a Stated Timezone — presentTime","text":"POSIXct()-style object holding present time, indicated timezone.","code":""},{"path":"https://dankelley.github.io/oce/reference/presentTime.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the Present Time, in a Stated Timezone — presentTime","text":"","code":"presentTime() # UTC #> [1] \"2024-09-24 10:29:56 UTC\" presentTime(\"\") # the local timezone #> [1] \"2024-09-24 07:29:56 ADT\""},{"path":"https://dankelley.github.io/oce/reference/prettyPosition.html","id":null,"dir":"Reference","previous_headings":"","what":"Pretty Longitude/Latitude in Degree-Minute-Second Format — prettyPosition","title":"Pretty Longitude/Latitude in Degree-Minute-Second Format — prettyPosition","text":"Round geographical positions degrees, minutes, seconds Depending range values x, rounding done degrees, half-degrees, minutes, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/prettyPosition.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pretty Longitude/Latitude in Degree-Minute-Second Format — prettyPosition","text":"","code":"prettyPosition(x, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/prettyPosition.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pretty Longitude/Latitude in Degree-Minute-Second Format — prettyPosition","text":"x series one values latitude longitude, decimal degrees debug set positive value get debugging information processing.","code":""},{"path":"https://dankelley.github.io/oce/reference/prettyPosition.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pretty Longitude/Latitude in Degree-Minute-Second Format — prettyPosition","text":"vector numbers yield good axis labels formatPosition() used.","code":""},{"path":"https://dankelley.github.io/oce/reference/prettyPosition.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Pretty Longitude/Latitude in Degree-Minute-Second Format — prettyPosition","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/prettyPosition.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pretty Longitude/Latitude in Degree-Minute-Second Format — prettyPosition","text":"","code":"library(oce) formatPosition(prettyPosition(10 + 1:10 / 60 + 2.8 / 3600)) #> expression(c(10, 10, 10, 10, 10, 10, 10), c(0, 2, 4, 6, 8, 10,  #> 12), c(\"N\", NA, NA, NA, NA, NA, NA), NULL, NULL, NULL, NULL)"},{"path":"https://dankelley.github.io/oce/reference/processingLog-set.html","id":null,"dir":"Reference","previous_headings":"","what":"Add an Item to a Processing Log — processingLog<-","title":"Add an Item to a Processing Log — processingLog<-","text":"Add Item Processing Log","code":""},{"path":"https://dankelley.github.io/oce/reference/processingLog-set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add an Item to a Processing Log — processingLog<-","text":"","code":"processingLog(x) <- value"},{"path":"https://dankelley.github.io/oce/reference/processingLog-set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add an Item to a Processing Log — processingLog<-","text":"x oce object. value character string description logged activity.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/processingLog-set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add an Item to a Processing Log — processingLog<-","text":"","code":"data(ctd) processingLogShow(ctd) #> * Processing Log #>  #>     - 2018-11-14 20:03:47 UTC: `create 'ctd' object` #>     - 2018-11-14 20:03:47 UTC: `read.ctd.sbe(file = file, debug = 10, processingLog = processingLog)` #>     - 2018-11-14 20:03:47 UTC: `oce.edit(x = ctd, item = \"startTime\", value = as.POSIXct(gsub(\"1903\",     \"2003\", format(ctd[[\"startTime\"]])), tz = \"UTC\") + 4 * 3600,     reason = \"file had year=1903, instead of 2003\", person = \"Dan Kelley\")` processingLog(ctd) <- \"test\" processingLogShow(ctd) #> * Processing Log #>  #>     - 2018-11-14 20:03:47 UTC: `create 'ctd' object` #>     - 2018-11-14 20:03:47 UTC: `read.ctd.sbe(file = file, debug = 10, processingLog = processingLog)` #>     - 2018-11-14 20:03:47 UTC: `oce.edit(x = ctd, item = \"startTime\", value = as.POSIXct(gsub(\"1903\",     \"2003\", format(ctd[[\"startTime\"]])), tz = \"UTC\") + 4 * 3600,     reason = \"file had year=1903, instead of 2003\", person = \"Dan Kelley\")` #>     - 2024-09-24 10:29:56 UTC: `test`"},{"path":"https://dankelley.github.io/oce/reference/processingLogAppend.html","id":null,"dir":"Reference","previous_headings":"","what":"Append an Item to a Processing Log — processingLogAppend","title":"Append an Item to a Processing Log — processingLogAppend","text":"Append Item Processing Log","code":""},{"path":"https://dankelley.github.io/oce/reference/processingLogAppend.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append an Item to a Processing Log — processingLogAppend","text":"","code":"processingLogAppend(h, value = \"\")"},{"path":"https://dankelley.github.io/oce/reference/processingLogAppend.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append an Item to a Processing Log — processingLogAppend","text":"h either processingLog slot object, oce object processingLog extracted value string indicating text log entry.","code":""},{"path":"https://dankelley.github.io/oce/reference/processingLogAppend.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Append an Item to a Processing Log — processingLogAppend","text":"list() containing items named time value, .e. times entries text notations entries..","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/processingLogItem.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an Item That can be Inserted into a Processing Log — processingLogItem","title":"Create an Item That can be Inserted into a Processing Log — processingLogItem","text":"function used internally initialize processing logs. Users probably prefer use processingLogAppend() instead.","code":""},{"path":"https://dankelley.github.io/oce/reference/processingLogItem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an Item That can be Inserted into a Processing Log — processingLogItem","text":"","code":"processingLogItem(value = \"\")"},{"path":"https://dankelley.github.io/oce/reference/processingLogItem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an Item That can be Inserted into a Processing Log — processingLogItem","text":"value string used item.","code":""},{"path":"https://dankelley.github.io/oce/reference/processingLogItem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an Item That can be Inserted into a Processing Log — processingLogItem","text":"list() containing time, time UTC (calculated presentTime()) moment function called value, string set argument name.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/processingLogShow.html","id":null,"dir":"Reference","previous_headings":"","what":"Show the Processing Log of an oce Object — processingLogShow","title":"Show the Processing Log of an oce Object — processingLogShow","text":"Show Processing Log oce Object","code":""},{"path":"https://dankelley.github.io/oce/reference/processingLogShow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show the Processing Log of an oce Object — processingLogShow","text":"","code":"processingLogShow(x)"},{"path":"https://dankelley.github.io/oce/reference/processingLogShow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show the Processing Log of an oce Object — processingLogShow","text":"x oce object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/pwelch.html","id":null,"dir":"Reference","previous_headings":"","what":"Welch Periodogram — pwelch","title":"Welch Periodogram — pwelch","text":"Compute periodogram using Welch (1967) method. somewhat analogous Matlab function name, intended drop-replacement.","code":""},{"path":"https://dankelley.github.io/oce/reference/pwelch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Welch Periodogram — pwelch","text":"","code":"pwelch(   x,   window,   noverlap,   nfft,   fs,   spec,   demean = FALSE,   detrend = TRUE,   plot = TRUE,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/pwelch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Welch Periodogram — pwelch","text":"x vector timeseries analyzed.  x timeseries, need fs, result error match value inferred x. window optional numeric vector specifying window applied timeseries subsamples.  ignored spec provided. Otherwise, window provided, must either length nfft length 1.  first case, vector multiplied timeseries subsample, length window must equal nfft supplied. second window taken number sub-intervals time series broken , hamming window used sub-interval.  window specified nfft given, window constructed hamming window length nfft.  , neither window nfft specified, x broken 8 portions. noverlap number points overlap windows.  specified, set half window length. nfft length FFT. See window nfft interacts argument. fs frequency time-series.  x time-series, fs supplied, time-series altered frequency fs. spec optional function used computation spectrum, allow finer-grained control processing. provided, spec must accept time-series first argument, must return list containing spectrum spec frequency freq. Note window applied data subsampling, error reported window spec given. error reported spec given nfft given. Note values demean, detrend plot ignored spec given. However, ... argument passed spec. demean, detrend logical values can control spectrum calculation, default case spec.  passed spectrum() thence spec.pgram(); see help pages latter explanation. plot logical, set TRUE plot spectrum. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional extra arguments passed spectrum(), spec, latter given.","code":""},{"path":"https://dankelley.github.io/oce/reference/pwelch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Welch Periodogram — pwelch","text":"pwelch returns list mimicking return value spectrum(), containing frequency freq, spectral power spec, degrees freedom df, bandwidth bandwidth, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/pwelch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Welch Periodogram — pwelch","text":"First, x broken chunks, overlapping specified noverlap.  chunks multiplied window, passed spectrum().  resulting spectra averaged, results stored spec return value.  entries return value mimic returned spectrum(). noted actions several parameters interlocked, can complex function use.  example, window given length exceeding 1, length must equal nfft, latter also provided.","code":""},{"path":"https://dankelley.github.io/oce/reference/pwelch.html","id":"bugs","dir":"Reference","previous_headings":"","what":"Bugs","title":"Welch Periodogram — pwelch","text":"bandwidth degrees freedom just copied values one chunk spectra, thus incorrect.  means cross indicated graph also incorrect.","code":""},{"path":"https://dankelley.github.io/oce/reference/pwelch.html","id":"historical-notes","dir":"Reference","previous_headings":"","what":"Historical notes","title":"Welch Periodogram — pwelch","text":"2021-06-26: date, pwelch() passed subsampled timeseries portions detrend() applying window. practice dropped lead -estimates low frequency energy (noticed Holger Foysi University Siegen), perhaps detrend() considers endpoints therefore can yield inaccurate trend estimates. related change, demean detrend added formal arguments, avoid users trace documentation spectrum() spec.pgram(), learn remove means trends data. control, spec argument added let users sidestep spectrum() entirely, providing spectral computation functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/pwelch.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Welch Periodogram — pwelch","text":"Welch, P. D., 1967. Use Fast Fourier Transform Estimation Power Spectra: Method Based Time Averaging Short, Modified Periodograms. IEEE Transactions Audio Electroacoustics, AU-15, 70–73.","code":""},{"path":"https://dankelley.github.io/oce/reference/pwelch.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Welch Periodogram — pwelch","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/pwelch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Welch Periodogram — pwelch","text":"","code":"library(oce) Fs <- 1000 t <- seq(0, 0.296, 1 / Fs) x <- cos(2 * pi * t * 200) + rnorm(n = length(t)) X <- ts(x, frequency = Fs) s <- spectrum(X, spans = c(3, 2), main = \"random + 200 Hz\", log = \"no\") w <- pwelch(X, plot = FALSE) lines(w$freq, w$spec, col = \"red\") w2 <- pwelch(X, nfft = 75, plot = FALSE) lines(w2$freq, w2$spec, col = \"green\") abline(v = 200, col = \"blue\", lty = \"dotted\")  cat(\"Checking spectral levels with Parseval's theorem:\\n\") #> Checking spectral levels with Parseval's theorem: cat(\"var(x)                              = \", var(x), \"\\n\") #> var(x)                              =  1.399508  cat(\"2 * sum(s$spec) * diff(s$freq[1:2]) = \", 2 * sum(s$spec) * diff(s$freq[1:2]), \"\\n\") #> 2 * sum(s$spec) * diff(s$freq[1:2]) =  1.452406  cat(\"sum(w$spec) * diff(s$freq[1:2])     = \", sum(w$spec) * diff(w$freq[1:2]), \"\\n\") #> sum(w$spec) * diff(s$freq[1:2])     =  0.6915331  cat(\"sum(w2$spec) * diff(s$freq[1:2])    = \", sum(w2$spec) * diff(w2$freq[1:2]), \"\\n\") #> sum(w2$spec) * diff(s$freq[1:2])    =  0.7083285  # co2 par(mar = c(3, 3, 2, 1), mgp = c(2, 0.7, 0)) s <- spectrum(co2, plot = FALSE) plot(log10(s$freq), s$spec * s$freq,     xlab = expression(log[10] * Frequency), ylab = \"Power*Frequency\", type = \"l\" ) title(\"Variance-preserving spectrum\") pw <- pwelch(co2, nfft = 256, plot = FALSE) lines(log10(pw$freq), pw$spec * pw$freq, col = \"red\")"},{"path":"https://dankelley.github.io/oce/reference/rangeExtended.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Range, Extended a Little, as is Done for Axes — rangeExtended","title":"Calculate Range, Extended a Little, as is Done for Axes — rangeExtended","text":"analogous done part R axis range calculation, case xaxs=\"r\".","code":""},{"path":"https://dankelley.github.io/oce/reference/rangeExtended.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Range, Extended a Little, as is Done for Axes — rangeExtended","text":"","code":"rangeExtended(x, extend = 0.04)"},{"path":"https://dankelley.github.io/oce/reference/rangeExtended.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Range, Extended a Little, as is Done for Axes — rangeExtended","text":"x numeric vector. extend fraction extend either end","code":""},{"path":"https://dankelley.github.io/oce/reference/rangeExtended.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Range, Extended a Little, as is Done for Axes — rangeExtended","text":"two-element vector extended range x.","code":""},{"path":"https://dankelley.github.io/oce/reference/rangeExtended.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate Range, Extended a Little, as is Done for Axes — rangeExtended","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/rangeLimit.html","id":null,"dir":"Reference","previous_headings":"","what":"Substitute NA for Data Outside a Range — rangeLimit","title":"Substitute NA for Data Outside a Range — rangeLimit","text":"Substitute NA data outside range, e.g. remove wild spikes data.","code":""},{"path":"https://dankelley.github.io/oce/reference/rangeLimit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Substitute NA for Data Outside a Range — rangeLimit","text":"","code":"rangeLimit(x, min, max)"},{"path":"https://dankelley.github.io/oce/reference/rangeLimit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Substitute NA for Data Outside a Range — rangeLimit","text":"x vector values min minimum acceptable value.  supplied, max also supplied, min 0.5 percentile used. max maximum acceptable value.  supplied, min also supplied, min 0.995 percentile used.","code":""},{"path":"https://dankelley.github.io/oce/reference/rangeLimit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Substitute NA for Data Outside a Range — rangeLimit","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/rangeLimit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Substitute NA for Data Outside a Range — rangeLimit","text":"","code":"ten.to.twenty <- rangeLimit(1:100, 10, 20)"},{"path":"https://dankelley.github.io/oce/reference/read.adp.ad2cp.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","title":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","text":"function active development may change without notice.  contrast oce reading functions, read.adp.ad2cp() focusses just one data type within source file.  Another difference can either return object holding data just data frame holding description data types file; indeed, latter default. See “Details” reasons departures usual oce pattern.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.ad2cp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","text":"","code":"read.adp.ad2cp(   file,   from = 1L,   to = 0L,   by = 1L,   dataType = NULL,   dataSet = 1L,   tz = getOption(\"oceTz\"),   longitude = NA,   latitude = NA,   plan,   TOC = FALSE,   debug = getOption(\"oceDebug\"),   orientation,   distance,   monitor,   despike,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.adp.ad2cp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","text":"file connection character string giving name file load. integer indicating index number first record read. must equal 1, version read.adp.ad2cp.  (provided, defaults 1.) integer indicating final record read. 0L, default, value changed internally 1e9, reading stops end file. ignored. dataType indication data type extracted.  NULL (default) read.adp.ad2cp() returns data frame indicating data type occurrence rate file.  Otherwise, dataType must either numeric character value (see “Details”).  numeric case, includes base-10 numbers raw values, dataType converted integer taken indicate data type via ID. permitted values follow Nortek convention, summary shown table start “Details” section.  character case, must string taken table. dataSet positive integer indicates possibly several data sets stored within file focussed upon.  default, first data set chosen. Note data sets found trying match text data chunk regular expression \"^GETCLOCKSTR,TIME=\". tz character value indicating time zone. used interpreting times stored file. longitude, latitude numerical values indicating observation location. plan optional integer specifying 'plan' focus (see TOC logical value.  FALSE (default) parameters function used select data indicated filename, adp object returned. However, TOC TRUE, number datasets held within file returned. debug integer value indicating level debugging.  Set 1 get moderate amount debugging information, R code , 2 get debugging information C++ code used parse data chunks, 3 intensive debugging levels. orientation, distance, monitor, despike ignored, provided calling compatibility functions read adp files.  warning issued supplied call read.adp.ad2cp(). ... ignored parameters might passed read.adp.ad2cp() read.oce().","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.ad2cp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","text":"read.adp.ad2cp() returns either adp object number data sets within file, according value TOC.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.ad2cp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","text":"read.adp.ad2cp() focus parts data file? answer lies AD2CP format , may combine data subsets differing natures break oce system pairing metadata slot data slot.  example, conventional ADP dataset, metadata slot items sampling times, number beams, blanking distance, cell size, number cells, etc.  items natural pairing elements data slot, oce uses pairing constructing plots items. However, AD2CP file might combine data echosounder measurements, different values number beams forth.  poses challenge naming conventions within oce object, ripple effects plotting data access.  ripple effects extend beyond oce user code.  avoid problems, read.adp.ad2cp() designed focus one data type time, relying users keep track resultant object, perhaps combine objects within AD2CP file files, normal R manner. permitted values dataType shown table ; dataType argument read.adp.ad2cp() may chosen three columns table.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.ad2cp.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","text":"","code":"d <- read.adp.ad2cp(\"~/test.ad2cp\", to=100) # or read.oce()"},{"path":"https://dankelley.github.io/oce/reference/read.adp.ad2cp.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.ad2cp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","text":"Nortek . “Signature Integration 55|250|500|1000kHz.” Nortek , 2017. Nortek . “Signature Integration 55|250|500|1000kHz.” Nortek , 2018. Nortek . “Signature Integration 55|250|500|1000kHz.” Nortek , March 31, 2022.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adp.ad2cp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.ad2cp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an adp File in Nortek AD2CP Format — read.adp.ad2cp","text":"","code":"library(oce) # You can run this within the oce directory, if you clone from github. file <- \"tests/testthat/local_data/ad2cp/S102791A002_Barrow_v2.ad2cp\" if (file.exists(file)) {     library(oce)     d <- read.oce(file) }"},{"path":"https://dankelley.github.io/oce/reference/read.adp.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adp File — read.adp","title":"Read an adp File — read.adp","text":"Read ADP data file, producing adp object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adp File — read.adp","text":"","code":"read.adp(   file,   from,   to,   by,   tz = getOption(\"oceTz\"),   longitude = NA,   latitude = NA,   manufacturer,   encoding = NA,   monitor = FALSE,   despike = FALSE,   processingLog,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.adp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adp File — read.adp","text":"file connection character string giving name file load.  (read.adp.sontek.serial, generally list files, concatenated.) indication first profile read.  can integer, sequence number first profile read, POSIXt time profiles skipped, character string converts POSIXt time (assuming UTC timezone).  See “Examples”, make careful note use tz argument. supplied, defaults 1. optional indication last profile read, format described .  special case, =0 means read file end.  supplied, defaults 0. optional indication stride length use walking file.  integer, -1 profiles skipped pair profiles read, e.g. default =1 means read data.  (RDI files , extra features avoid running memory; see “Memory considerations”.) tz character string indicating time zone assumed data. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. manufacturer optional character string indicating manufacturer, used general function read.adp select subsidiary function use. given, oceMagic() used try infer type. provided, value \"rdi\" cause read.adp.rdi() used, \"nortek\" cause read.adp.nortek() used, \"sontek\" cause read.adp.sontek() used. encoding ignored. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. despike TRUE, despike() used clean anomalous spikes heading, etc. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.) debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional additional arguments () read.adp.*() functions pass lower-level functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adp File — read.adp","text":"adp object. contents object make sense particular instrument type study, e.g. data file contains NMEA strings, navigational data stored item called nmea data slot).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an adp File — read.adp","text":"Several file types can handled.  functions wrappers map device names, e.g. read.aquadoppProfiler work calling read.adp.nortek; context, worth noting “aquadopp” instrument one-cell profiler might just well documented heading read.adv().","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adp File — read.adp","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adp File — read.adp","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.nortek.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adp File in Nortek Format — read.adp.nortek","title":"Read an adp File in Nortek Format — read.adp.nortek","text":"Read adp File Nortek Format","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.nortek.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adp File in Nortek Format — read.adp.nortek","text":"","code":"read.adp.nortek(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   longitude = NA,   latitude = NA,   type = NULL,   orientation,   distance,   encoding = NA,   monitor = FALSE,   despike = FALSE,   processingLog,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.adp.nortek.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adp File in Nortek Format — read.adp.nortek","text":"file connection character string giving name file load.  (read.adp.sontek.serial, generally list files, concatenated.) indication first profile read.  can integer, sequence number first profile read, POSIXt time profiles skipped, character string converts POSIXt time (assuming UTC timezone).  See “Examples”, make careful note use tz argument. supplied, defaults 1. optional indication last profile read, format described .  special case, =0 means read file end.  supplied, defaults 0. optional indication stride length use walking file.  integer, -1 profiles skipped pair profiles read, e.g. default =1 means read data.  (RDI files , extra features avoid running memory; see “Memory considerations”.) tz character string indicating time zone assumed data. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. type character string indicating type instrument. NULL (default), oceMagic() used infer type. non-NULL, value must one : \"aquadoppHR\", \"aquadoppProfiler\", \"aquadopp\", \"aquadoppPlusMagnetometer\". orientation optional character string specifying orientation sensor, provided cases inferred data file.  valid choices \"upward\", \"downward\", \"sideward\". distance optional vector holding distances bin centres sensor.  argument ignored except Nortek profilers, need given function determines distances correctly data.  problem distance poorly documented Nortek System Integrator Guide (2008 edition, page 31), function must rely word--mouth formulae work cases. encoding ignored. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. despike logical value indicating whether use despike() remove anomalous spikes heading, etc. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.) debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional additional arguments () read.adp.*() functions pass lower-level functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.nortek.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adp File in Nortek Format — read.adp.nortek","text":"adp object. contents object make sense particular instrument type study, e.g. data file contains NMEA strings, navigational data stored item called nmea data slot).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.nortek.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adp File in Nortek Format — read.adp.nortek","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.nortek.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adp File in Nortek Format — read.adp.nortek","text":"Information Nortek profilers (including System Integrator Guide, explains data format byte--byte) available https://www.nortekusa.com/.  (One must join site see manuals.) Nortek Knowledge Center https://www.nortekusa.com/en/knowledge-center may help problems arise dealing data Nortek instruments.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adp.nortek.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adp File in Nortek Format — read.adp.nortek","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"Read Teledyne/RDI ADCP file (called 'adp' oce). can handle variety file/instrument types, recognizing telltale byte sequences data. scope limited types documented adequately Teledyne/RDI manuals. instances, manuals provide information enough enable inclusion , example case wave data (see https://github.com/dankelley/oce/issues/2216).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"","code":"read.adp.rdi(   file,   from,   to,   by,   tz = getOption(\"oceTz\"),   longitude = NA,   latitude = NA,   type = c(\"workhorse\"),   which,   encoding = NA,   monitor = FALSE,   despike = FALSE,   processingLog,   testing = FALSE,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"file connection character string giving name file load.  (read.adp.sontek.serial, generally list files, concatenated.) indication first profile read.  can integer, sequence number first profile read, POSIXt time profiles skipped, character string converts POSIXt time (assuming UTC timezone).  See “Examples”, make careful note use tz argument. supplied, defaults 1. optional indication last profile read, format described .  special case, =0 means read file end.  supplied, defaults 0. optional indication stride length use walking file.  integer, -1 profiles skipped pair profiles read, e.g. default =1 means read data.  (RDI files , extra features avoid running memory; see “Memory considerations”.) tz character string indicating time zone assumed data. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. type character string indicating type instrument. optional character value.  \"??\" parameters examined file debug, read.adp.rdi() works locating indices file data segments begin, storing index list returned. entry list time, time observation. encoding ignored. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. despike TRUE, despike() used clean anomalous spikes heading, etc. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.) testing logical value (IGNORED). debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional additional arguments () read.adp.*() functions pass lower-level functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"adp object. contents object make sense particular instrument type study, e.g. data file contains NMEA strings, navigational data stored item called nmea data slot).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"heading bias set EB command setup deployment, heading bias stored file's header.  value stored object's metadata metadata$heading.bias.  Importantly, value subtracted headings stored file, result subtraction stored objects heading value (data$heading). noted read.adp.rdi() tested firmware version 16.30.  versions, may problems.  example, serial number recognized properly version 16.28. Teledyne/RDI ADP data files, velocities coded signed 2-byte integers, scale factor used convert velocity metres per second.  two facts control maximum recordable velocity velocity resolution, values may retrieved ADP object name d d[[\"velocityMaximum\"]] d[[\"velocityResolution\"]].","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"handling-of-old-file-formats","dir":"Reference","previous_headings":"","what":"Handling of old file formats","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"Early PD0 file formats stored year sampling different base year used modern files.  accommodate , read.adp.rdi examines inferred year, greater 2050, 100 years subtracted time. offset inferred tests sample files, RDI documentation, somewhat risky.  authors can find RDI documentation indicates condition century offset required, change made code. Even , method cause problems long time.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"names-of-items-in-data-slot","dir":"Reference","previous_headings":"","what":"Names of items in data slot","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"names items data slot . items present ll file varieties; use e.g. names(d[[\"data\"]]) determine names used object named d. list, items either vector (one sample per time measurement), matrix first index time second bin number, array first index time, second bin number, third beam number. Items vector type, unless otherwise indicated.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"memory-considerations","dir":"Reference","previous_headings":"","what":"Memory considerations","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"RDI files , case specified, attempt made avoid running memory skipping profiles large input files. applies integers; times, none rest section applies. key issue RDI files store velocities 2-byte values, format R supports. velocities become 8-byte (numeric) values R. Thus, R object created read.adp.rdi require memory data file. scale factor can estimated ignoring vector quantities (e.g. time, just one value per profile) concentrating matrix properties velocity, backscatter, correlation. three elements equal dimensions. Thus, 4-byte slide data file (2 bytes + 1 byte + 1 byte) corresponds 10 bytes object (8 bytes + 1 byte + 1 byte). Rounding resultant 10/4 3 safety, conclude limit size R object corresponds 3X smaller limit file size. Various things can limit size objects R, strong upper limit set space operating system provides R. least-performant machines typical use appear Microsoft-Windows systems, limit R objects 2e6 bytes (see ?Memory-limits).  Since R routinely duplicates objects certain tasks (e.g. call--value function evaluation), read.adp.rdi uses safety factor calculation auto-decimate file. factor set 3, based partly developers' experience datasets possession. Multiplied previously stated safety factor 3, suggests 2 GB limit R objects corresponds approximately 222 MB limit file size. present version read.adp.rdi, value lowered 200 MB simplicity. Larger files considered \"big\", decimated unless user supplies value argument. decimation procedure two cases. =1 =0 (neither given), intention process full span data.  input file 200 MB, defaults 1, profiles read. larger files, set ceiling() ratio input file size 200 MB. exceeds 1, /nonzero, intention process interior subset file. case, calculated ceiling() ratio bbp*(1+-) 200 MB, bbp number file bytes per profile. course, set 1, ratio less 1. result calculations exceeds 1, messages printed alert user file decimated, also monitor set TRUE, textual progress bar shown (session interactive).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"development-notes","dir":"Reference","previous_headings":"","what":"Development Notes","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"important part work function recognize called \"data chunks\" two-byte ID sequences. function developed practical way, emphasis focussed data files possession developers. Since Teledyne-RDI tends introduce new ID codes new instruments, means read.adp.rdi may work recently-developed instruments. following two-byte ID codes recognized read.adp.rdi time (bytes listed natural order, LSB byte MSB). Items preceded asterisk recognized, handled, produce warning. Lacking comprehensive Teledyne-RDI listing ID codes, authors cobbled together listing documents access, follows. Table 33 reference 3 lists codes follows: Table 6 p90 reference 4 lists \"Fixed Leader Navigation\" ID codes (none handled read.adp.rdi yet) follows (format reproduced literally; note e.g. 0x2100 0x00,0x21 oce notation): following pages manual reveal following meanings","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"error-recovery","dir":"Reference","previous_headings":"","what":"Error recovery","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"Files can sometimes corrupted, read.adp.rdi ways handle two types error noticed files supplied users. two bytes within ensemble indicate number bytes check within ensemble, get checksum. Sometimes, two bytes can erroneous, wrong number bytes checked, leading failed checksum. preventative measure, read.adp.rdi checks stated ensemble length, whenever detects failed checksum. length agrees length recent ensemble good checksum, ensemble declared faulty ignored. However, length differs recent accepted ensemble, read.adp.rdi goes back just start ensemble, searches forward next two-byte pair, namely 0x7f 0x7f, designates start ensemble. Distinct notifications given two cases, give byte numbers original file, way help analysts want look data stream tools. end ensemble, next two characters 0x7f 0x7f, , next ensemble faulty. error occurs, read.adp.rdi attempts recover searching forward next instance two-byte pair, discarding information present mangled ensemble. cases, warnings printed ensembles seem problematic. Advanced users want diagnose problem might find helpful examine original data file using tools. end, read.adp.rdi inserts element named ensembleInFile metadata slot. gives starting byte number inferred ensemble within original data file.  example, d object read read.adp.rdi, using   can good way narrow problems.","code":"plot(d[[\"time\"]][-1], diff(d[[\"ensembleInFile\"]]))"},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"changes","dir":"Reference","previous_headings":"","what":"Changes","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"bq (bottom-track quality) field called bc 2023-02-09. See https://github.com/dankelley/oce/issues/2039 discussion.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"Teledyne-RDI, 2007. WorkHorse commands output data format. P/N 957-6156-00 (November 2007).  (Section 5.3 h details binary format, e.g. file start byte 0x7f repeated twice, profile starts bytes 0x80, followed 0x00, followed sequence number profile, represented little-endian two-byte short integer.  read.adp.rdi uses sequences interpret data files.) Teledyne RD Instruments, 2015. V Series monitor, sentinel Output Data Format. P/N 95D-6022-00 (May 2015). SV_ODF_May15.pdf Teledyne RD Instruments, 2014. Ocean Surveyor / Ocean Observer Technical Manual. P/N 95A-6012-00 (April 2014). OS_TM_Apr14.pdf Teledyne RD Instruments, 2001. WinRiver User's Guide International Version. P/N 957-6171-00 (June 2001) WinRiver User Guide International Version.pdf.pdf","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.rdi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an adp File in Teledyne/RDI Format — read.adp.rdi","text":"","code":"adp <- read.adp.rdi(system.file(\"extdata\", \"adp_rdi.000\", package = \"oce\")) summary(adp) #> ADP Summary #> ----------- #>  #> * Filename:          \"/private/var/folders/8b/l4h64m1j22v5pb7vj049ff140000gn/T/RtmpFbPNQ2/temp_libpath17ff52acea456/oce/extdata/adp_rdi.000\" #> * Instrument:        adcp #> * Manufacturer:      teledyne rdi #> * Serial number:     unknown #> * Firmware:          16.28 #> * Cell Size:         0.50 m #> * Beam Angle:        20 deg #> * Location:          unknown latitude, unknown longitude #> * Frequency:         600 kHz #> * Ensemble Numbers:   1, 2, ..., 8, 9 #> * Transformation matrix:: #>      1.462  -1.462   0.000   0.000 #>      0.000   0.000  -1.462   1.462 #>      0.266   0.266   0.266   0.266 #>      1.034   1.034  -1.034  -1.034 #> * Time: 2008-06-25 10:00:00 to 2008-06-25 10:01:20 (9 samples, mean increment 10 s) #> * Data Overview #>  #>                              Min.                Mean                Max.                Dim.     NAs #>     v [m/s]                  -0.416              0.011534            0.406               \"9x84x4\" 0   #>     q                        NA                  NA                  NA                  \"9x84x4\" 0   #>     a                        NA                  NA                  NA                  \"9x84x4\" 0   #>     g                        NA                  NA                  NA                  \"9x84x4\" 0   #>     distance [m]             2.23                22.98               43.73               84       0   #>     time                     2008-06-25 10:00:00 2008-06-25 10:00:40 2008-06-25 10:01:20 9        0   #>     pressure [dbar]          -0.274              -0.23489            -0.193              9        0   #>     temperature [°C, ITS-90] 12.06               12.082              12.11               9        0   #>     salinity [PSS-78]        35                  35                  35                  9        0   #>     depth [m]                0                   0                   0                   9        0   #>     soundSpeed [m/s]         1497                1497                1497                9        0   #>     heading [°]              276.39              277.14              278.14              9        0   #>     pitch [°]                1.1209              1.2033              1.4212              9        0   #>     roll [°]                 -2.49               -2.4033             -2.35               9        0   #>     headingStd [°]           0                   0.22222             1                   9        0   #>     pitchStd [°]             0.1                 0.11111             0.2                 9        0   #>     rollStd [°]              0                   0.088889            0.1                 9        0   #>     pressureStd              76                  100                 135                 9        0   #>     xmitCurrent              61                  61                  61                  9        0   #>     xmitVoltage              155                 155                 155                 9        0   #>     ambientTemp              103                 103                 103                 9        0   #>     pressurePlus             77                  77                  77                  9        0   #>     pressureMinus            76                  76.778              77                  9        0   #>     attitudeTemp             101                 101                 101                 9        0   #>     attitude [°]             130                 130                 130                 9        0   #>     contaminationSensor      159                 159                 159                 9        0   #>  #> * Processing Log #>  #>     - 2024-09-24 10:30:02 UTC: `read.adp.rdi(file = system.file(\"extdata\", \"adp_rdi.000\", package = \"oce\"))`"},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adp File in Sontek Format — read.adp.sontek","title":"Read an adp File in Sontek Format — read.adp.sontek","text":"Read Sontek acoustic-Doppler profiler file (see reference 1).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adp File in Sontek Format — read.adp.sontek","text":"","code":"read.adp.sontek(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   longitude = NA,   latitude = NA,   type = c(\"adp\", \"pcadp\"),   encoding = NA,   monitor = FALSE,   despike = FALSE,   processingLog,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adp File in Sontek Format — read.adp.sontek","text":"file connection character string giving name file load.  (read.adp.sontek.serial, generally list files, concatenated.) indication first profile read.  can integer, sequence number first profile read, POSIXt time profiles skipped, character string converts POSIXt time (assuming UTC timezone).  See “Examples”, make careful note use tz argument. supplied, defaults 1. optional indication last profile read, format described .  special case, =0 means read file end.  supplied, defaults 0. optional indication stride length use walking file.  integer, -1 profiles skipped pair profiles read, e.g. default =1 means read data.  (RDI files , extra features avoid running memory; see “Memory considerations”.) tz character string indicating time zone assumed data. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. type character string indicating type instrument. encoding ignored. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. despike TRUE, despike() used clean anomalous spikes heading, etc. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.) debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional additional arguments () read.adp.*() functions pass lower-level functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adp File in Sontek Format — read.adp.sontek","text":"adp object. contents object make sense particular instrument type study, e.g. data file contains NMEA strings, navigational data stored item called nmea data slot).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adp File in Sontek Format — read.adp.sontek","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adp File in Sontek Format — read.adp.sontek","text":"Information Sontek profilers available https://www.sontek.com.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adp File in Sontek Format — read.adp.sontek","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.serial.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adp File in Serial Sontek Format — read.adp.sontek.serial","title":"Read an adp File in Serial Sontek Format — read.adp.sontek.serial","text":"Read Sontek acoustic-Doppler profiler file, serial form possibly unique Dalhousie University.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.serial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adp File in Serial Sontek Format — read.adp.sontek.serial","text":"","code":"read.adp.sontek.serial(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   longitude = NA,   latitude = NA,   type = c(\"adp\", \"pcadp\"),   beamAngle = 25,   orientation,   encoding = NA,   monitor = FALSE,   processingLog,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.serial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adp File in Serial Sontek Format — read.adp.sontek.serial","text":"file connection character string giving name file load.  (read.adp.sontek.serial, generally list files, concatenated.) indication first profile read.  can integer, sequence number first profile read, POSIXt time profiles skipped, character string converts POSIXt time (assuming UTC timezone).  See “Examples”, make careful note use tz argument. supplied, defaults 1. optional indication last profile read, format described .  special case, =0 means read file end.  supplied, defaults 0. optional indication stride length use walking file.  integer, -1 profiles skipped pair profiles read, e.g. default =1 means read data.  (RDI files , extra features avoid running memory; see “Memory considerations”.) tz character string indicating time zone assumed data. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. type character string indicating type instrument. beamAngle angle instrument axis beams, degrees. orientation optional character string specifying orientation sensor, provided cases inferred data file.  valid choices \"upward\", \"downward\", \"sideward\". encoding ignored. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.) debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional additional arguments () read.adp.*() functions pass lower-level functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.serial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adp File in Serial Sontek Format — read.adp.sontek.serial","text":"adp object. contents object make sense particular instrument type study, e.g. data file contains NMEA strings, navigational data stored item called nmea data slot).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.serial.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adp File in Serial Sontek Format — read.adp.sontek.serial","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adp.sontek.serial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adp File in Serial Sontek Format — read.adp.sontek.serial","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adv File — read.adv","title":"Read an adv File — read.adv","text":"Read ADV data file, producing object type adv. function works transferring control specialized function, e.g. read.adp.nortek() read.adp.sontek(), many cases users find preferable either use several even specialized functions, file type known.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adv File — read.adv","text":"","code":"read.adv(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   type = c(\"nortek\", \"sontek\", \"sontek.adr\", \"sontek.text\"),   header = TRUE,   encoding = NA,   longitude = NA,   latitude = NA,   start = NULL,   deltat = NA,   debug = getOption(\"oceDebug\"),   monitor = FALSE,   processingLog = NULL )"},{"path":"https://dankelley.github.io/oce/reference/read.adv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adv File — read.adv","text":"file connection character string giving name file load.  also possible give file vector filenames, handle case data split files data logger.  multi-file case, header must FALSE, start must vector times, deltat must provided. index number first profile read, time profile, created .POSIXct() (hint: use tz=\"UTC\").  argument ignored header==FALSE. See “Examples”. indication last profile read, format matching .  ignored header==FALSE. indication stride length use walking file.  ignored header==FALSE.  Otherwise, integer, -1 profiles skipped pair profiles read. may make much sense, data equi-spaced time.  string representing time interval, colon-separated format, interval divided sampling interval, get stride length. BUG: partially works; see “Bugs”. tz character string indicating time zone assumed data. type character string indicating type file, used read.adv dispatch one speciality functions. header logical value indicating whether file starts header. (case files created data loggers chop raw data series sub-files, e.g. per hour.) encoding ignored. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. start time first sample, typically created .POSIXct().  may vector times, filename vector file names. deltat time samples. (mandatory header=FALSE.) debug flag turns debugging.  value indicates depth within call stack debugging applies.  example, read.adv.nortek() calls read.header.nortek(), read.adv.nortek(...,debug=2) provides information just main body data file, also details header. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. processingLog provided, action item stored log. parameter typically provided internal calls; default provides better normal calls user.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adv File — read.adv","text":"adv object contains measurements made ADV device. metadata contains information given following table. Nortek name'' name used Nortek System Integrator Guide (reference 1) Sontek name” name used relevant Sontek documentation.  References given square brackets. data list contains items names corresponding adp objects, exception Nortek data.  Nortek instruments report things time interval longer velocity sampling, stored data timeSlow, headingSlow, pitchSlow, rollSlow, temperatureSlow; burst sampling used, also items recordsBurst timeBurst. processingLog standard format.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an adv File — read.adv","text":"Files without headers may created experiments data logger set monitor serial data stream instrument.  lack header information places burden user, must supply basic information times observations, instrument orientation, instrument coordinate system, etc.  Example 3 shows deal files.  Three things noted. user must choose appropriate read.adv variant corresponding instrument question.  (necessary oceMagic(), used generic read.oce() routine, determine type instrument examining file lacks header.) call read function must include start time (start) number seconds data (deltat), , instrument data stream may lack things device set serial mode.  Also, course, necessary set header=FALSE function call. file read , user obliged specify information, object well-formed.  example, read function way knowing instrument orientation, coordinate system used, transformation matrix go \"beam\" \"xyz\" coordinates, instrument heading, pitch, roll, go \"xyz\" coordinates \"enu\" coordinates. things illustrated example 3 . ADV data files, velocities coded signed 2-byte integers, scale factor used convert velocity metres per second.  two facts control maximum recordable velocity velocity resolution, values may retrieved ADV object name d d[[\"velocityMaximum\"]] d[[\"velocityResolution\"]].","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.html","id":"nortek-files","dir":"Reference","previous_headings":"","what":"Nortek files","title":"Read an adv File — read.adv","text":"Sampling-rate similar issues data format inferred System Integrator Guide (reference 1A) System Integrator Manual (reference 1B).  document lacks clarity spots, read.adv.nortek contains assumptions noted , users aware possible problems. prominent example specification sampling rate, stored metadata$sampingRate return value.  Repeated examination System Integrator Guide (reference 1) failed indicate value stored various headers contained Vector datasets.  experimentation data files, read.adv.nortek set calculate metadata$samplingRate 512/AvgInterval AvgInterval part User Configuration'' header (reference 1 p30), explanation average interval seconds”).  formula developed trial error, confirmed later Nortek discussion group, appear upcoming versions (reference 1). Another basic issue determination whether instrument recorded continuous mode burst mode.  One might infer TimCtrlReg User Configuration'' header (reference 1 p30) determines , bits 1 2.  However, case test files available author.  reason, `read.adv.nortek` infers mode reverse engineering data files known configuration.  present version `read.adv.nortek` determines sampling mode ```NRecords`'' item Vector Velocity Data” header, seems 0 data collected continuously, non-zero data collected bursts. Taking things together, come upon issue infer sampling times Nortek instruments.  seem definitive documents , read.adv.nortek based partly information (unknown quality) found Nortek discussion boards.  present version read.adv.nortek infers times velocity observations differently, depending whether instrument set record burst mode continuous mode.  burst mode, times stated burst headers used, continuous mode, times stated “vector system data” used.  advice found Nortek discussion board, burst-mode times offset 2 seconds allow instrument warm-period. Handling IMU (inertial measurement unit) data Starting March 2016, read.adv.nortek offered support handling IMU (inertial measurement unit) data incorporated Nortek binary files. described Nortek document named System Integrator Guide'' (reference 1A) appeared System Integrator Manual” (reference 1B; reference 1C). Confusingly, 1B described 3 varieties data, whereas 1C describe , describes instead fourth variety. March 2016, read.adv.nortek handles 4 varieties, files various schemes appear exist. oce, varieties named byte code flags .  (Variety c3 one described (reference 1C); others described (reference 1B).) variety stored metadata slot returned object string named IMUtype. variety, reader cautioned strong tests performed code.  One way test code compare textual data files produced Nortek software.  March 2016, oce user shared dataset c3 variety, permitted detailed comparison text file values inferred read.adv.nortek. test suggested agreement (within resolution printed text file) velocity (v data slot), signal amplitude (), correlation (q), pressure (p), three components IMU delta angle (IMUdeltaAngleX etc), components rotation matrix (IMUrotation).  However, delta velocity signals match, IMUdeltaVelocityX disagreeing second decimal place, IMUdeltaVelocityY component disagreeing first, IMUdeltaVelocityZ factor 10. github issue 893 (https://github.com/dankelley/oce/issues/893). Variety c3 (signalled byte 5 sequence 0xc3) provides information Nortek calls DeltaAngle, DeltaVelocity Orientation Matrix. (Apart orientation matrix, Nortek provides documentation quantities mean.) object returned read.adv.nortek, stored data slot IMUdeltaAngleX, IMUdeltaAngleY, IMUdeltaAngleZ, IMUdeltaVelocityX, IMUdeltaVelocityY, IMUdeltaVelocityZ, IMUrotation, vectors except last, 3D array. addition , IMUtimestamp time-stamp, defined Nortek documents seems, IMU documents (reference 5), defined based clock ticks per 16 microseconds. Caution may required dealing timestamp, since seemed sensible one test case (variety d3) kept reseting zero another (variety c3). lack Nortek documentation quantities roadblock implementing oce functions dealing IMU-enabled datasets Variety cc (signalled byte 5 sequence 0xcc) provides information acceleration, angular rotation rate, magnetic vector orientation matrix.  timeseries. Acceleration stored data slot IMUaccelX, IMUaccelY, IMUaccelz. angular rotation components IMUngrtX, IMUngrtY IMUngrtz. magnetic data IMUmagrtx, IMUmagrty IMUmagrtz. Finally, IMUmatrix rotation matrix made elements named M11, M12, etc Nortek documentation.  addition , IMUtime stores time seconds, origin whose definition stated reference 1B. Variety d2 (signalled byte 5 0xd2) provides information gyro-stabilized acceleration, angular rate magnetometer vectors.  data stored MUaccelX, IMUangrtX, IMUmagrtX, similar Y Z.  , time IMUtime. data type tested mid-March 2016, developers test file test. Variety d3 (signalled byte 5 0xd3) provides information DeltaAngle, DeltaVelocity magnetometer vectors, stored IMUdeltaAngleX, IMUdeltaVelocityX, IMUdeltaMagVectorX, similar Y Z. , time IMUtime. data type tested mid-March 2016, developers test file test.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adv File — read.adv","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adv File — read.adv","text":"1A. Nortek .  System Integrator Guide (paradopp family products). June 2008.  (Doc : PSI00-0101-0608).  (Users may find helpful also examine newer versions guide.) 1B. Nortek .  System Integrator Manual. Dec 2014. (system-integrator-manual_Dec2014_jan.pdf) 1C. Nortek .  System Integrator Manual. March 2016. (system-integrator-manual_Mar2016.pdf) SonTek/YSI ADVField/Hydra Acoustic Doppler Velocimeter (Field) Technical Documentation (Sept 1, 2001). Appendix 2.2.3 Sontek ADV operation Manual, Firmware Version 4.0 (Oct 1997). Nortek Knowledge Center (http://www.nortekusa.com/en/knowledge-center) document describing IMU unit seems close one named (references 1B C) adjunct Nortek Vector systems http://files.microstrain.com/3DM-GX3-35-Data-Communications-Protocol.pdf","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adv File — read.adv","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an adv File — read.adv","text":"","code":"if (FALSE) { # \\dontrun{ library(oce) # A nortek Vector file d <- read.oce(\"/data/archive/sleiwex/2008/moorings/m05/adv/nortek_1943/raw/adv_nortek_1943.vec\",               from=as.POSIXct(\"2008-06-26 00:00:00\", tz=\"UTC\"),               to=as.POSIXct(\"2008-06-26 00:00:10\", tz=\"UTC\")) plot(d, which=c(1:3,15)) } # }"},{"path":"https://dankelley.github.io/oce/reference/read.adv.nortek.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adv File — read.adv.nortek","title":"Read an adv File — read.adv.nortek","text":"Read ADV data file, producing object type adv. function works transferring control specialized function, e.g. read.adp.nortek() read.adp.sontek(), many cases users find preferable either use several even specialized functions, file type known.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.nortek.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adv File — read.adv.nortek","text":"","code":"read.adv.nortek(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   header = TRUE,   longitude = NA,   latitude = NA,   encoding = NA,   type = c(\"vector\", \"aquadopp\"),   haveAnalog1 = FALSE,   haveAnalog2 = FALSE,   debug = getOption(\"oceDebug\"),   monitor = FALSE,   processingLog = NULL )"},{"path":"https://dankelley.github.io/oce/reference/read.adv.nortek.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adv File — read.adv.nortek","text":"file connection character string giving name file load.  also possible give file vector filenames, handle case data split files data logger.  multi-file case, header must FALSE, start must vector times, deltat must provided. index number first profile read, time profile, created .POSIXct() (hint: use tz=\"UTC\").  argument ignored header==FALSE. See “Examples”. indication last profile read, format matching .  ignored header==FALSE. indication stride length use walking file.  ignored header==FALSE.  Otherwise, integer, -1 profiles skipped pair profiles read. may make much sense, data equi-spaced time.  string representing time interval, colon-separated format, interval divided sampling interval, get stride length. BUG: partially works; see “Bugs”. tz character string indicating time zone assumed data. header logical value indicating whether file starts header. (case files created data loggers chop raw data series sub-files, e.g. per hour.) longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. encoding ignored. type string indicating type Nortek device produced data file, vector aquadopp. haveAnalog1 logical value indicating whether data file 'analog1' data. haveAnalog2 logical value indicating whether data file 'analog2' data. debug flag turns debugging.  value indicates depth within call stack debugging applies.  example, read.adv.nortek() calls read.header.nortek(), read.adv.nortek(...,debug=2) provides information just main body data file, also details header. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. processingLog provided, action item stored log. parameter typically provided internal calls; default provides better normal calls user.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.nortek.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adv File — read.adv.nortek","text":"adv object contains measurements made ADV device. metadata contains information given following table. Nortek name'' name used Nortek System Integrator Guide (reference 1) Sontek name” name used relevant Sontek documentation.  References given square brackets. data list contains items names corresponding adp objects, exception Nortek data.  Nortek instruments report things time interval longer velocity sampling, stored data timeSlow, headingSlow, pitchSlow, rollSlow, temperatureSlow; burst sampling used, also items recordsBurst timeBurst. processingLog standard format.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.nortek.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an adv File — read.adv.nortek","text":"Files without headers may created experiments data logger set monitor serial data stream instrument.  lack header information places burden user, must supply basic information times observations, instrument orientation, instrument coordinate system, etc.  Example 3 shows deal files.  Three things noted. user must choose appropriate read.adv variant corresponding instrument question.  (necessary oceMagic(), used generic read.oce() routine, determine type instrument examining file lacks header.) call read function must include start time (start) number seconds data (deltat), , instrument data stream may lack things device set serial mode.  Also, course, necessary set header=FALSE function call. file read , user obliged specify information, object well-formed.  example, read function way knowing instrument orientation, coordinate system used, transformation matrix go \"beam\" \"xyz\" coordinates, instrument heading, pitch, roll, go \"xyz\" coordinates \"enu\" coordinates. things illustrated example 3 . ADV data files, velocities coded signed 2-byte integers, scale factor used convert velocity metres per second.  two facts control maximum recordable velocity velocity resolution, values may retrieved ADV object name d d[[\"velocityMaximum\"]] d[[\"velocityResolution\"]].","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.nortek.html","id":"nortek-files","dir":"Reference","previous_headings":"","what":"Nortek files","title":"Read an adv File — read.adv.nortek","text":"Sampling-rate similar issues data format inferred System Integrator Guide (reference 1A) System Integrator Manual (reference 1B).  document lacks clarity spots, read.adv.nortek contains assumptions noted , users aware possible problems. prominent example specification sampling rate, stored metadata$sampingRate return value.  Repeated examination System Integrator Guide (reference 1) failed indicate value stored various headers contained Vector datasets.  experimentation data files, read.adv.nortek set calculate metadata$samplingRate 512/AvgInterval AvgInterval part User Configuration'' header (reference 1 p30), explanation average interval seconds”).  formula developed trial error, confirmed later Nortek discussion group, appear upcoming versions (reference 1). Another basic issue determination whether instrument recorded continuous mode burst mode.  One might infer TimCtrlReg User Configuration'' header (reference 1 p30) determines , bits 1 2.  However, case test files available author.  reason, `read.adv.nortek` infers mode reverse engineering data files known configuration.  present version `read.adv.nortek` determines sampling mode ```NRecords`'' item Vector Velocity Data” header, seems 0 data collected continuously, non-zero data collected bursts. Taking things together, come upon issue infer sampling times Nortek instruments.  seem definitive documents , read.adv.nortek based partly information (unknown quality) found Nortek discussion boards.  present version read.adv.nortek infers times velocity observations differently, depending whether instrument set record burst mode continuous mode.  burst mode, times stated burst headers used, continuous mode, times stated “vector system data” used.  advice found Nortek discussion board, burst-mode times offset 2 seconds allow instrument warm-period. Handling IMU (inertial measurement unit) data Starting March 2016, read.adv.nortek offered support handling IMU (inertial measurement unit) data incorporated Nortek binary files. described Nortek document named System Integrator Guide'' (reference 1A) appeared System Integrator Manual” (reference 1B; reference 1C). Confusingly, 1B described 3 varieties data, whereas 1C describe , describes instead fourth variety. March 2016, read.adv.nortek handles 4 varieties, files various schemes appear exist. oce, varieties named byte code flags .  (Variety c3 one described (reference 1C); others described (reference 1B).) variety stored metadata slot returned object string named IMUtype. variety, reader cautioned strong tests performed code.  One way test code compare textual data files produced Nortek software.  March 2016, oce user shared dataset c3 variety, permitted detailed comparison text file values inferred read.adv.nortek. test suggested agreement (within resolution printed text file) velocity (v data slot), signal amplitude (), correlation (q), pressure (p), three components IMU delta angle (IMUdeltaAngleX etc), components rotation matrix (IMUrotation).  However, delta velocity signals match, IMUdeltaVelocityX disagreeing second decimal place, IMUdeltaVelocityY component disagreeing first, IMUdeltaVelocityZ factor 10. github issue 893 (https://github.com/dankelley/oce/issues/893). Variety c3 (signalled byte 5 sequence 0xc3) provides information Nortek calls DeltaAngle, DeltaVelocity Orientation Matrix. (Apart orientation matrix, Nortek provides documentation quantities mean.) object returned read.adv.nortek, stored data slot IMUdeltaAngleX, IMUdeltaAngleY, IMUdeltaAngleZ, IMUdeltaVelocityX, IMUdeltaVelocityY, IMUdeltaVelocityZ, IMUrotation, vectors except last, 3D array. addition , IMUtimestamp time-stamp, defined Nortek documents seems, IMU documents (reference 5), defined based clock ticks per 16 microseconds. Caution may required dealing timestamp, since seemed sensible one test case (variety d3) kept reseting zero another (variety c3). lack Nortek documentation quantities roadblock implementing oce functions dealing IMU-enabled datasets Variety cc (signalled byte 5 sequence 0xcc) provides information acceleration, angular rotation rate, magnetic vector orientation matrix.  timeseries. Acceleration stored data slot IMUaccelX, IMUaccelY, IMUaccelz. angular rotation components IMUngrtX, IMUngrtY IMUngrtz. magnetic data IMUmagrtx, IMUmagrty IMUmagrtz. Finally, IMUmatrix rotation matrix made elements named M11, M12, etc Nortek documentation.  addition , IMUtime stores time seconds, origin whose definition stated reference 1B. Variety d2 (signalled byte 5 0xd2) provides information gyro-stabilized acceleration, angular rate magnetometer vectors.  data stored MUaccelX, IMUangrtX, IMUmagrtX, similar Y Z.  , time IMUtime. data type tested mid-March 2016, developers test file test. Variety d3 (signalled byte 5 0xd3) provides information DeltaAngle, DeltaVelocity magnetometer vectors, stored IMUdeltaAngleX, IMUdeltaVelocityX, IMUdeltaMagVectorX, similar Y Z. , time IMUtime. data type tested mid-March 2016, developers test file test.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.nortek.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adv File — read.adv.nortek","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.nortek.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adv File — read.adv.nortek","text":"1A. Nortek .  System Integrator Guide (paradopp family products). June 2008.  (Doc : PSI00-0101-0608).  (Users may find helpful also examine newer versions guide.) 1B. Nortek .  System Integrator Manual. Dec 2014. (system-integrator-manual_Dec2014_jan.pdf) 1C. Nortek .  System Integrator Manual. March 2016. (system-integrator-manual_Mar2016.pdf) SonTek/YSI ADVField/Hydra Acoustic Doppler Velocimeter (Field) Technical Documentation (Sept 1, 2001). Appendix 2.2.3 Sontek ADV operation Manual, Firmware Version 4.0 (Oct 1997). Nortek Knowledge Center (http://www.nortekusa.com/en/knowledge-center) document describing IMU unit seems close one named (references 1B C) adjunct Nortek Vector systems http://files.microstrain.com/3DM-GX3-35-Data-Communications-Protocol.pdf","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adv.nortek.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adv File — read.adv.nortek","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.nortek.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an adv File — read.adv.nortek","text":"","code":"if (FALSE) { # \\dontrun{ library(oce) # A nortek Vector file d <- read.oce(\"/data/archive/sleiwex/2008/moorings/m05/adv/nortek_1943/raw/adv_nortek_1943.vec\",               from=as.POSIXct(\"2008-06-26 00:00:00\", tz=\"UTC\"),               to=as.POSIXct(\"2008-06-26 00:00:10\", tz=\"UTC\")) plot(d, which=c(1:3,15)) } # }"},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adv File — read.adv.sontek.adr","title":"Read an adv File — read.adv.sontek.adr","text":"Read ADV data file, producing object type adv. function works transferring control specialized function, e.g. read.adp.nortek() read.adp.sontek(), many cases users find preferable either use several even specialized functions, file type known.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adv File — read.adv.sontek.adr","text":"","code":"read.adv.sontek.adr(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   header = TRUE,   longitude = NA,   latitude = NA,   encoding = NA,   debug = getOption(\"oceDebug\"),   monitor = FALSE,   processingLog = NULL )"},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adv File — read.adv.sontek.adr","text":"file connection character string giving name file load.  also possible give file vector filenames, handle case data split files data logger.  multi-file case, header must FALSE, start must vector times, deltat must provided. index number first profile read, time profile, created .POSIXct() (hint: use tz=\"UTC\").  argument ignored header==FALSE. See “Examples”. indication last profile read, format matching .  ignored header==FALSE. indication stride length use walking file.  ignored header==FALSE.  Otherwise, integer, -1 profiles skipped pair profiles read. may make much sense, data equi-spaced time.  string representing time interval, colon-separated format, interval divided sampling interval, get stride length. BUG: partially works; see “Bugs”. tz character string indicating time zone assumed data. header logical value indicating whether file starts header. (case files created data loggers chop raw data series sub-files, e.g. per hour.) longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. encoding ignored. debug flag turns debugging.  value indicates depth within call stack debugging applies.  example, read.adv.nortek() calls read.header.nortek(), read.adv.nortek(...,debug=2) provides information just main body data file, also details header. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. processingLog provided, action item stored log. parameter typically provided internal calls; default provides better normal calls user.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adv File — read.adv.sontek.adr","text":"adv object contains measurements made ADV device. metadata contains information given following table. Nortek name'' name used Nortek System Integrator Guide (reference 1) Sontek name” name used relevant Sontek documentation.  References given square brackets. data list contains items names corresponding adp objects, exception Nortek data.  Nortek instruments report things time interval longer velocity sampling, stored data timeSlow, headingSlow, pitchSlow, rollSlow, temperatureSlow; burst sampling used, also items recordsBurst timeBurst. processingLog standard format.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an adv File — read.adv.sontek.adr","text":"Files without headers may created experiments data logger set monitor serial data stream instrument.  lack header information places burden user, must supply basic information times observations, instrument orientation, instrument coordinate system, etc.  Example 3 shows deal files.  Three things noted. user must choose appropriate read.adv variant corresponding instrument question.  (necessary oceMagic(), used generic read.oce() routine, determine type instrument examining file lacks header.) call read function must include start time (start) number seconds data (deltat), , instrument data stream may lack things device set serial mode.  Also, course, necessary set header=FALSE function call. file read , user obliged specify information, object well-formed.  example, read function way knowing instrument orientation, coordinate system used, transformation matrix go \"beam\" \"xyz\" coordinates, instrument heading, pitch, roll, go \"xyz\" coordinates \"enu\" coordinates. things illustrated example 3 . ADV data files, velocities coded signed 2-byte integers, scale factor used convert velocity metres per second.  two facts control maximum recordable velocity velocity resolution, values may retrieved ADV object name d d[[\"velocityMaximum\"]] d[[\"velocityResolution\"]].","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":"nortek-files","dir":"Reference","previous_headings":"","what":"Nortek files","title":"Read an adv File — read.adv.sontek.adr","text":"Sampling-rate similar issues data format inferred System Integrator Guide (reference 1A) System Integrator Manual (reference 1B).  document lacks clarity spots, read.adv.nortek contains assumptions noted , users aware possible problems. prominent example specification sampling rate, stored metadata$sampingRate return value.  Repeated examination System Integrator Guide (reference 1) failed indicate value stored various headers contained Vector datasets.  experimentation data files, read.adv.nortek set calculate metadata$samplingRate 512/AvgInterval AvgInterval part User Configuration'' header (reference 1 p30), explanation average interval seconds”).  formula developed trial error, confirmed later Nortek discussion group, appear upcoming versions (reference 1). Another basic issue determination whether instrument recorded continuous mode burst mode.  One might infer TimCtrlReg User Configuration'' header (reference 1 p30) determines , bits 1 2.  However, case test files available author.  reason, `read.adv.nortek` infers mode reverse engineering data files known configuration.  present version `read.adv.nortek` determines sampling mode ```NRecords`'' item Vector Velocity Data” header, seems 0 data collected continuously, non-zero data collected bursts. Taking things together, come upon issue infer sampling times Nortek instruments.  seem definitive documents , read.adv.nortek based partly information (unknown quality) found Nortek discussion boards.  present version read.adv.nortek infers times velocity observations differently, depending whether instrument set record burst mode continuous mode.  burst mode, times stated burst headers used, continuous mode, times stated “vector system data” used.  advice found Nortek discussion board, burst-mode times offset 2 seconds allow instrument warm-period. Handling IMU (inertial measurement unit) data Starting March 2016, read.adv.nortek offered support handling IMU (inertial measurement unit) data incorporated Nortek binary files. described Nortek document named System Integrator Guide'' (reference 1A) appeared System Integrator Manual” (reference 1B; reference 1C). Confusingly, 1B described 3 varieties data, whereas 1C describe , describes instead fourth variety. March 2016, read.adv.nortek handles 4 varieties, files various schemes appear exist. oce, varieties named byte code flags .  (Variety c3 one described (reference 1C); others described (reference 1B).) variety stored metadata slot returned object string named IMUtype. variety, reader cautioned strong tests performed code.  One way test code compare textual data files produced Nortek software.  March 2016, oce user shared dataset c3 variety, permitted detailed comparison text file values inferred read.adv.nortek. test suggested agreement (within resolution printed text file) velocity (v data slot), signal amplitude (), correlation (q), pressure (p), three components IMU delta angle (IMUdeltaAngleX etc), components rotation matrix (IMUrotation).  However, delta velocity signals match, IMUdeltaVelocityX disagreeing second decimal place, IMUdeltaVelocityY component disagreeing first, IMUdeltaVelocityZ factor 10. github issue 893 (https://github.com/dankelley/oce/issues/893). Variety c3 (signalled byte 5 sequence 0xc3) provides information Nortek calls DeltaAngle, DeltaVelocity Orientation Matrix. (Apart orientation matrix, Nortek provides documentation quantities mean.) object returned read.adv.nortek, stored data slot IMUdeltaAngleX, IMUdeltaAngleY, IMUdeltaAngleZ, IMUdeltaVelocityX, IMUdeltaVelocityY, IMUdeltaVelocityZ, IMUrotation, vectors except last, 3D array. addition , IMUtimestamp time-stamp, defined Nortek documents seems, IMU documents (reference 5), defined based clock ticks per 16 microseconds. Caution may required dealing timestamp, since seemed sensible one test case (variety d3) kept reseting zero another (variety c3). lack Nortek documentation quantities roadblock implementing oce functions dealing IMU-enabled datasets Variety cc (signalled byte 5 sequence 0xcc) provides information acceleration, angular rotation rate, magnetic vector orientation matrix.  timeseries. Acceleration stored data slot IMUaccelX, IMUaccelY, IMUaccelz. angular rotation components IMUngrtX, IMUngrtY IMUngrtz. magnetic data IMUmagrtx, IMUmagrty IMUmagrtz. Finally, IMUmatrix rotation matrix made elements named M11, M12, etc Nortek documentation.  addition , IMUtime stores time seconds, origin whose definition stated reference 1B. Variety d2 (signalled byte 5 0xd2) provides information gyro-stabilized acceleration, angular rate magnetometer vectors.  data stored MUaccelX, IMUangrtX, IMUmagrtX, similar Y Z.  , time IMUtime. data type tested mid-March 2016, developers test file test. Variety d3 (signalled byte 5 0xd3) provides information DeltaAngle, DeltaVelocity magnetometer vectors, stored IMUdeltaAngleX, IMUdeltaVelocityX, IMUdeltaMagVectorX, similar Y Z. , time IMUtime. data type tested mid-March 2016, developers test file test.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adv File — read.adv.sontek.adr","text":"SonTek/YSI Incorporated. \"ADVField/Hydra Operation Manual,\" September 1, 2001. SonTek/YSI Incorporated. \"Argonaut Acoustic Doppler Current Meter Operation Manual Firmware Version 7.9.\" SonTek/YSI, May 1, 2001. https://eng.ucmerced.edu/snsjho/files/San_Joaquin/Sensors_and_Loggers/SonTek/SonTek_Argonaut/ArgonautXR.pdf.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adv File — read.adv.sontek.adr","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":"references-1","dir":"Reference","previous_headings":"","what":"References","title":"Read an adv File — read.adv.sontek.adr","text":"1A. Nortek .  System Integrator Guide (paradopp family products). June 2008.  (Doc : PSI00-0101-0608).  (Users may find helpful also examine newer versions guide.) 1B. Nortek .  System Integrator Manual. Dec 2014. (system-integrator-manual_Dec2014_jan.pdf) 1C. Nortek .  System Integrator Manual. March 2016. (system-integrator-manual_Mar2016.pdf) SonTek/YSI ADVField/Hydra Acoustic Doppler Velocimeter (Field) Technical Documentation (Sept 1, 2001). Appendix 2.2.3 Sontek ADV operation Manual, Firmware Version 4.0 (Oct 1997). Nortek Knowledge Center (http://www.nortekusa.com/en/knowledge-center) document describing IMU unit seems close one named (references 1B C) adjunct Nortek Vector systems http://files.microstrain.com/3DM-GX3-35-Data-Communications-Protocol.pdf","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adv File — read.adv.sontek.adr","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.adr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an adv File — read.adv.sontek.adr","text":"","code":"if (FALSE) { # \\dontrun{ library(oce) # A nortek Vector file d <- read.oce(\"/data/archive/sleiwex/2008/moorings/m05/adv/nortek_1943/raw/adv_nortek_1943.vec\",               from=as.POSIXct(\"2008-06-26 00:00:00\", tz=\"UTC\"),               to=as.POSIXct(\"2008-06-26 00:00:10\", tz=\"UTC\")) plot(d, which=c(1:3,15)) } # }"},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.serial.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adv File — read.adv.sontek.serial","title":"Read an adv File — read.adv.sontek.serial","text":"Read ADV data file, producing object type adv. function works transferring control specialized function, e.g. read.adp.nortek() read.adp.sontek(), many cases users find preferable either use several even specialized functions, file type known.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.serial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adv File — read.adv.sontek.serial","text":"","code":"read.adv.sontek.serial(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   longitude = NA,   latitude = NA,   start = NULL,   deltat = NULL,   encoding = NA,   monitor = FALSE,   debug = getOption(\"oceDebug\"),   processingLog = NULL )"},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.serial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adv File — read.adv.sontek.serial","text":"file connection character string giving name file load.  also possible give file vector filenames, handle case data split files data logger.  multi-file case, header must FALSE, start must vector times, deltat must provided. index number first profile read, time profile, created .POSIXct() (hint: use tz=\"UTC\").  argument ignored header==FALSE. See “Examples”. indication last profile read, format matching .  ignored header==FALSE. indication stride length use walking file.  ignored header==FALSE.  Otherwise, integer, -1 profiles skipped pair profiles read. may make much sense, data equi-spaced time.  string representing time interval, colon-separated format, interval divided sampling interval, get stride length. BUG: partially works; see “Bugs”. tz character string indicating time zone assumed data. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. start time first sample, typically created .POSIXct().  may vector times, filename vector file names. deltat time samples. encoding ignored. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. debug flag turns debugging.  value indicates depth within call stack debugging applies.  example, read.adv.nortek() calls read.header.nortek(), read.adv.nortek(...,debug=2) provides information just main body data file, also details header. processingLog provided, action item stored log. parameter typically provided internal calls; default provides better normal calls user.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.serial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adv File — read.adv.sontek.serial","text":"adv object contains measurements made ADV device. metadata contains information given following table. Nortek name'' name used Nortek System Integrator Guide (reference 1) Sontek name” name used relevant Sontek documentation.  References given square brackets. data list contains items names corresponding adp objects, exception Nortek data.  Nortek instruments report things time interval longer velocity sampling, stored data timeSlow, headingSlow, pitchSlow, rollSlow, temperatureSlow; burst sampling used, also items recordsBurst timeBurst. processingLog standard format.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.serial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an adv File — read.adv.sontek.serial","text":"Files without headers may created experiments data logger set monitor serial data stream instrument.  lack header information places burden user, must supply basic information times observations, instrument orientation, instrument coordinate system, etc.  Example 3 shows deal files.  Three things noted. user must choose appropriate read.adv variant corresponding instrument question.  (necessary oceMagic(), used generic read.oce() routine, determine type instrument examining file lacks header.) call read function must include start time (start) number seconds data (deltat), , instrument data stream may lack things device set serial mode.  Also, course, necessary set header=FALSE function call. file read , user obliged specify information, object well-formed.  example, read function way knowing instrument orientation, coordinate system used, transformation matrix go \"beam\" \"xyz\" coordinates, instrument heading, pitch, roll, go \"xyz\" coordinates \"enu\" coordinates. things illustrated example 3 . ADV data files, velocities coded signed 2-byte integers, scale factor used convert velocity metres per second.  two facts control maximum recordable velocity velocity resolution, values may retrieved ADV object name d d[[\"velocityMaximum\"]] d[[\"velocityResolution\"]].","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.serial.html","id":"nortek-files","dir":"Reference","previous_headings":"","what":"Nortek files","title":"Read an adv File — read.adv.sontek.serial","text":"Sampling-rate similar issues data format inferred System Integrator Guide (reference 1A) System Integrator Manual (reference 1B).  document lacks clarity spots, read.adv.nortek contains assumptions noted , users aware possible problems. prominent example specification sampling rate, stored metadata$sampingRate return value.  Repeated examination System Integrator Guide (reference 1) failed indicate value stored various headers contained Vector datasets.  experimentation data files, read.adv.nortek set calculate metadata$samplingRate 512/AvgInterval AvgInterval part User Configuration'' header (reference 1 p30), explanation average interval seconds”).  formula developed trial error, confirmed later Nortek discussion group, appear upcoming versions (reference 1). Another basic issue determination whether instrument recorded continuous mode burst mode.  One might infer TimCtrlReg User Configuration'' header (reference 1 p30) determines , bits 1 2.  However, case test files available author.  reason, `read.adv.nortek` infers mode reverse engineering data files known configuration.  present version `read.adv.nortek` determines sampling mode ```NRecords`'' item Vector Velocity Data” header, seems 0 data collected continuously, non-zero data collected bursts. Taking things together, come upon issue infer sampling times Nortek instruments.  seem definitive documents , read.adv.nortek based partly information (unknown quality) found Nortek discussion boards.  present version read.adv.nortek infers times velocity observations differently, depending whether instrument set record burst mode continuous mode.  burst mode, times stated burst headers used, continuous mode, times stated “vector system data” used.  advice found Nortek discussion board, burst-mode times offset 2 seconds allow instrument warm-period. Handling IMU (inertial measurement unit) data Starting March 2016, read.adv.nortek offered support handling IMU (inertial measurement unit) data incorporated Nortek binary files. described Nortek document named System Integrator Guide'' (reference 1A) appeared System Integrator Manual” (reference 1B; reference 1C). Confusingly, 1B described 3 varieties data, whereas 1C describe , describes instead fourth variety. March 2016, read.adv.nortek handles 4 varieties, files various schemes appear exist. oce, varieties named byte code flags .  (Variety c3 one described (reference 1C); others described (reference 1B).) variety stored metadata slot returned object string named IMUtype. variety, reader cautioned strong tests performed code.  One way test code compare textual data files produced Nortek software.  March 2016, oce user shared dataset c3 variety, permitted detailed comparison text file values inferred read.adv.nortek. test suggested agreement (within resolution printed text file) velocity (v data slot), signal amplitude (), correlation (q), pressure (p), three components IMU delta angle (IMUdeltaAngleX etc), components rotation matrix (IMUrotation).  However, delta velocity signals match, IMUdeltaVelocityX disagreeing second decimal place, IMUdeltaVelocityY component disagreeing first, IMUdeltaVelocityZ factor 10. github issue 893 (https://github.com/dankelley/oce/issues/893). Variety c3 (signalled byte 5 sequence 0xc3) provides information Nortek calls DeltaAngle, DeltaVelocity Orientation Matrix. (Apart orientation matrix, Nortek provides documentation quantities mean.) object returned read.adv.nortek, stored data slot IMUdeltaAngleX, IMUdeltaAngleY, IMUdeltaAngleZ, IMUdeltaVelocityX, IMUdeltaVelocityY, IMUdeltaVelocityZ, IMUrotation, vectors except last, 3D array. addition , IMUtimestamp time-stamp, defined Nortek documents seems, IMU documents (reference 5), defined based clock ticks per 16 microseconds. Caution may required dealing timestamp, since seemed sensible one test case (variety d3) kept reseting zero another (variety c3). lack Nortek documentation quantities roadblock implementing oce functions dealing IMU-enabled datasets Variety cc (signalled byte 5 sequence 0xcc) provides information acceleration, angular rotation rate, magnetic vector orientation matrix.  timeseries. Acceleration stored data slot IMUaccelX, IMUaccelY, IMUaccelz. angular rotation components IMUngrtX, IMUngrtY IMUngrtz. magnetic data IMUmagrtx, IMUmagrty IMUmagrtz. Finally, IMUmatrix rotation matrix made elements named M11, M12, etc Nortek documentation.  addition , IMUtime stores time seconds, origin whose definition stated reference 1B. Variety d2 (signalled byte 5 0xd2) provides information gyro-stabilized acceleration, angular rate magnetometer vectors.  data stored MUaccelX, IMUangrtX, IMUmagrtX, similar Y Z.  , time IMUtime. data type tested mid-March 2016, developers test file test. Variety d3 (signalled byte 5 0xd3) provides information DeltaAngle, DeltaVelocity magnetometer vectors, stored IMUdeltaAngleX, IMUdeltaVelocityX, IMUdeltaMagVectorX, similar Y Z. , time IMUtime. data type tested mid-March 2016, developers test file test.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.serial.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adv File — read.adv.sontek.serial","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.serial.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adv File — read.adv.sontek.serial","text":"1A. Nortek .  System Integrator Guide (paradopp family products). June 2008.  (Doc : PSI00-0101-0608).  (Users may find helpful also examine newer versions guide.) 1B. Nortek .  System Integrator Manual. Dec 2014. (system-integrator-manual_Dec2014_jan.pdf) 1C. Nortek .  System Integrator Manual. March 2016. (system-integrator-manual_Mar2016.pdf) SonTek/YSI ADVField/Hydra Acoustic Doppler Velocimeter (Field) Technical Documentation (Sept 1, 2001). Appendix 2.2.3 Sontek ADV operation Manual, Firmware Version 4.0 (Oct 1997). Nortek Knowledge Center (http://www.nortekusa.com/en/knowledge-center) document describing IMU unit seems close one named (references 1B C) adjunct Nortek Vector systems http://files.microstrain.com/3DM-GX3-35-Data-Communications-Protocol.pdf","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.serial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adv File — read.adv.sontek.serial","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.serial.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an adv File — read.adv.sontek.serial","text":"","code":"if (FALSE) { # \\dontrun{ library(oce) # A nortek Vector file d <- read.oce(\"/data/archive/sleiwex/2008/moorings/m05/adv/nortek_1943/raw/adv_nortek_1943.vec\",               from=as.POSIXct(\"2008-06-26 00:00:00\", tz=\"UTC\"),               to=as.POSIXct(\"2008-06-26 00:00:10\", tz=\"UTC\")) plot(d, which=c(1:3,15)) } # }"},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adv File — read.adv.sontek.text","title":"Read an adv File — read.adv.sontek.text","text":"Read ADV data file, producing object type adv. function works transferring control specialized function, e.g. read.adp.nortek() read.adp.sontek(), many cases users find preferable either use several even specialized functions, file type known.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adv File — read.adv.sontek.text","text":"","code":"read.adv.sontek.text(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   originalCoordinate = \"xyz\",   transformationMatrix,   longitude = NA,   latitude = NA,   encoding = \"latin1\",   monitor = FALSE,   debug = getOption(\"oceDebug\"),   processingLog = NULL )"},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adv File — read.adv.sontek.text","text":"file connection character string giving name file load.  also possible give file vector filenames, handle case data split files data logger.  multi-file case, header must FALSE, start must vector times, deltat must provided. index number first profile read, time profile, created .POSIXct() (hint: use tz=\"UTC\").  argument ignored header==FALSE. See “Examples”. indication last profile read, format matching .  ignored header==FALSE. indication stride length use walking file.  ignored header==FALSE.  Otherwise, integer, -1 profiles skipped pair profiles read. may make much sense, data equi-spaced time.  string representing time interval, colon-separated format, interval divided sampling interval, get stride length. BUG: partially works; see “Bugs”. tz character string indicating time zone assumed data. originalCoordinate character string indicating coordinate system, one \"beam\", \"xyz\", \"enu\" \"\".  (needed case multiple files created data logger, header information normally lost instances.) transformationMatrix transformation matrix use converting beam coordinates xyz coordinates.  -ride matrix file header, one.  example rbind(c(2.710, -1.409, -1.299), c(0.071, 2.372, -2.442), c(0.344, 0.344, 0.344)). longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. debug flag turns debugging.  value indicates depth within call stack debugging applies.  example, read.adv.nortek() calls read.header.nortek(), read.adv.nortek(...,debug=2) provides information just main body data file, also details header. processingLog provided, action item stored log. parameter typically provided internal calls; default provides better normal calls user.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adv File — read.adv.sontek.text","text":"adv object contains measurements made ADV device. metadata contains information given following table. Nortek name'' name used Nortek System Integrator Guide (reference 1) Sontek name” name used relevant Sontek documentation.  References given square brackets. data list contains items names corresponding adp objects, exception Nortek data.  Nortek instruments report things time interval longer velocity sampling, stored data timeSlow, headingSlow, pitchSlow, rollSlow, temperatureSlow; burst sampling used, also items recordsBurst timeBurst. processingLog standard format.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an adv File — read.adv.sontek.text","text":"Files without headers may created experiments data logger set monitor serial data stream instrument.  lack header information places burden user, must supply basic information times observations, instrument orientation, instrument coordinate system, etc.  Example 3 shows deal files.  Three things noted. user must choose appropriate read.adv variant corresponding instrument question.  (necessary oceMagic(), used generic read.oce() routine, determine type instrument examining file lacks header.) call read function must include start time (start) number seconds data (deltat), , instrument data stream may lack things device set serial mode.  Also, course, necessary set header=FALSE function call. file read , user obliged specify information, object well-formed.  example, read function way knowing instrument orientation, coordinate system used, transformation matrix go \"beam\" \"xyz\" coordinates, instrument heading, pitch, roll, go \"xyz\" coordinates \"enu\" coordinates. things illustrated example 3 . ADV data files, velocities coded signed 2-byte integers, scale factor used convert velocity metres per second.  two facts control maximum recordable velocity velocity resolution, values may retrieved ADV object name d d[[\"velocityMaximum\"]] d[[\"velocityResolution\"]].","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":"nortek-files","dir":"Reference","previous_headings":"","what":"Nortek files","title":"Read an adv File — read.adv.sontek.text","text":"Sampling-rate similar issues data format inferred System Integrator Guide (reference 1A) System Integrator Manual (reference 1B).  document lacks clarity spots, read.adv.nortek contains assumptions noted , users aware possible problems. prominent example specification sampling rate, stored metadata$sampingRate return value.  Repeated examination System Integrator Guide (reference 1) failed indicate value stored various headers contained Vector datasets.  experimentation data files, read.adv.nortek set calculate metadata$samplingRate 512/AvgInterval AvgInterval part User Configuration'' header (reference 1 p30), explanation average interval seconds”).  formula developed trial error, confirmed later Nortek discussion group, appear upcoming versions (reference 1). Another basic issue determination whether instrument recorded continuous mode burst mode.  One might infer TimCtrlReg User Configuration'' header (reference 1 p30) determines , bits 1 2.  However, case test files available author.  reason, `read.adv.nortek` infers mode reverse engineering data files known configuration.  present version `read.adv.nortek` determines sampling mode ```NRecords`'' item Vector Velocity Data” header, seems 0 data collected continuously, non-zero data collected bursts. Taking things together, come upon issue infer sampling times Nortek instruments.  seem definitive documents , read.adv.nortek based partly information (unknown quality) found Nortek discussion boards.  present version read.adv.nortek infers times velocity observations differently, depending whether instrument set record burst mode continuous mode.  burst mode, times stated burst headers used, continuous mode, times stated “vector system data” used.  advice found Nortek discussion board, burst-mode times offset 2 seconds allow instrument warm-period. Handling IMU (inertial measurement unit) data Starting March 2016, read.adv.nortek offered support handling IMU (inertial measurement unit) data incorporated Nortek binary files. described Nortek document named System Integrator Guide'' (reference 1A) appeared System Integrator Manual” (reference 1B; reference 1C). Confusingly, 1B described 3 varieties data, whereas 1C describe , describes instead fourth variety. March 2016, read.adv.nortek handles 4 varieties, files various schemes appear exist. oce, varieties named byte code flags .  (Variety c3 one described (reference 1C); others described (reference 1B).) variety stored metadata slot returned object string named IMUtype. variety, reader cautioned strong tests performed code.  One way test code compare textual data files produced Nortek software.  March 2016, oce user shared dataset c3 variety, permitted detailed comparison text file values inferred read.adv.nortek. test suggested agreement (within resolution printed text file) velocity (v data slot), signal amplitude (), correlation (q), pressure (p), three components IMU delta angle (IMUdeltaAngleX etc), components rotation matrix (IMUrotation).  However, delta velocity signals match, IMUdeltaVelocityX disagreeing second decimal place, IMUdeltaVelocityY component disagreeing first, IMUdeltaVelocityZ factor 10. github issue 893 (https://github.com/dankelley/oce/issues/893). Variety c3 (signalled byte 5 sequence 0xc3) provides information Nortek calls DeltaAngle, DeltaVelocity Orientation Matrix. (Apart orientation matrix, Nortek provides documentation quantities mean.) object returned read.adv.nortek, stored data slot IMUdeltaAngleX, IMUdeltaAngleY, IMUdeltaAngleZ, IMUdeltaVelocityX, IMUdeltaVelocityY, IMUdeltaVelocityZ, IMUrotation, vectors except last, 3D array. addition , IMUtimestamp time-stamp, defined Nortek documents seems, IMU documents (reference 5), defined based clock ticks per 16 microseconds. Caution may required dealing timestamp, since seemed sensible one test case (variety d3) kept reseting zero another (variety c3). lack Nortek documentation quantities roadblock implementing oce functions dealing IMU-enabled datasets Variety cc (signalled byte 5 sequence 0xcc) provides information acceleration, angular rotation rate, magnetic vector orientation matrix.  timeseries. Acceleration stored data slot IMUaccelX, IMUaccelY, IMUaccelz. angular rotation components IMUngrtX, IMUngrtY IMUngrtz. magnetic data IMUmagrtx, IMUmagrty IMUmagrtz. Finally, IMUmatrix rotation matrix made elements named M11, M12, etc Nortek documentation.  addition , IMUtime stores time seconds, origin whose definition stated reference 1B. Variety d2 (signalled byte 5 0xd2) provides information gyro-stabilized acceleration, angular rate magnetometer vectors.  data stored MUaccelX, IMUangrtX, IMUmagrtX, similar Y Z.  , time IMUtime. data type tested mid-March 2016, developers test file test. Variety d3 (signalled byte 5 0xd3) provides information DeltaAngle, DeltaVelocity magnetometer vectors, stored IMUdeltaAngleX, IMUdeltaVelocityX, IMUdeltaMagVectorX, similar Y Z. , time IMUtime. data type tested mid-March 2016, developers test file test.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":"note-on-file-name","dir":"Reference","previous_headings":"","what":"Note on file name","title":"Read an adv File — read.adv.sontek.text","text":"file argument actually name file. names basename file. actual file names created appending suffix .hd1 one file .ts1 another.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adv File — read.adv.sontek.text","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adv File — read.adv.sontek.text","text":"1A. Nortek .  System Integrator Guide (paradopp family products). June 2008.  (Doc : PSI00-0101-0608).  (Users may find helpful also examine newer versions guide.) 1B. Nortek .  System Integrator Manual. Dec 2014. (system-integrator-manual_Dec2014_jan.pdf) 1C. Nortek .  System Integrator Manual. March 2016. (system-integrator-manual_Mar2016.pdf) SonTek/YSI ADVField/Hydra Acoustic Doppler Velocimeter (Field) Technical Documentation (Sept 1, 2001). Appendix 2.2.3 Sontek ADV operation Manual, Firmware Version 4.0 (Oct 1997). Nortek Knowledge Center (http://www.nortekusa.com/en/knowledge-center) document describing IMU unit seems close one named (references 1B C) adjunct Nortek Vector systems http://files.microstrain.com/3DM-GX3-35-Data-Communications-Protocol.pdf","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adv File — read.adv.sontek.text","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.adv.sontek.text.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an adv File — read.adv.sontek.text","text":"","code":"if (FALSE) { # \\dontrun{ library(oce) # A nortek Vector file d <- read.oce(\"/data/archive/sleiwex/2008/moorings/m05/adv/nortek_1943/raw/adv_nortek_1943.vec\",               from=as.POSIXct(\"2008-06-26 00:00:00\", tz=\"UTC\"),               to=as.POSIXct(\"2008-06-26 00:00:10\", tz=\"UTC\")) plot(d, which=c(1:3,15)) } # }"},{"path":"https://dankelley.github.io/oce/reference/read.amsr.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an amsr File — read.amsr","title":"Read an amsr File — read.amsr","text":"Read amsr file, generating amsr object. Two file types handled: type 1 gzipped files available perhaps year 2022, type 2 NetCDF files available afterwards. type stored metadata slot type, detected functions relating amsr data.  best way locate amsr files use download.amsr(), fails, may necessary search web source.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.amsr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an amsr File — read.amsr","text":"","code":"read.amsr(file, encoding = NA, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/read.amsr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an amsr File — read.amsr","text":"file String indicating name compressed file. See “File sources”. encoding ignored. debug debugging flag, integer.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.amsr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an amsr File — read.amsr","text":"Dan Kelley Chantelle Layton","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadopp.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adp File in Nortek Aquadopp Format — read.aquadopp","title":"Read an adp File in Nortek Aquadopp Format — read.aquadopp","text":"R code based information Nortek System Integrator Guide (2017), postings Nortek “knowledge center” discussion board, discussions Nortek engineers (Dec. 2020).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadopp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adp File in Nortek Aquadopp Format — read.aquadopp","text":"","code":"read.aquadopp(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   longitude = NA,   latitude = NA,   type = \"aquadopp\",   orientation,   distance,   monitor = FALSE,   despike = FALSE,   encoding = NA,   processingLog,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.aquadopp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adp File in Nortek Aquadopp Format — read.aquadopp","text":"file connection character string giving name file load.  (read.adp.sontek.serial, generally list files, concatenated.) indication first profile read.  can integer, sequence number first profile read, POSIXt time profiles skipped, character string converts POSIXt time (assuming UTC timezone).  See “Examples”, make careful note use tz argument. supplied, defaults 1. optional indication last profile read, format described .  special case, =0 means read file end.  supplied, defaults 0. optional indication stride length use walking file.  integer, -1 profiles skipped pair profiles read, e.g. default =1 means read data.  (RDI files , extra features avoid running memory; see “Memory considerations”.) tz character string indicating time zone assumed data. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. type Either \"aquadopp\" standard aquadopp file (default), \"aquadoppPlusMagnetometer\" file includes raw magnetometer data. orientation Optional character string specifying orientation sensor, provided cases inferred data file.  valid choices \"upward\", \"downward\", \"sideward\". distance Optional vector holding distances bin centres sensor.  argument ignored except Nortek profilers, need given function determines distances correctly data. problem distance poorly documented Nortek System Integrator Guide (2008 edition, page 31), function must rely word--mouth formulae work cases. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. despike TRUE, despike() used clean anomalous spikes heading, etc. encoding ignored. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.) debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional additional arguments () read.adp.*() functions pass lower-level functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadopp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adp File in Nortek Aquadopp Format — read.aquadopp","text":"adp object. contents object make sense particular instrument type study, e.g. data file contains NMEA strings, navigational data stored item called nmea data slot).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadopp.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adp File in Nortek Aquadopp Format — read.aquadopp","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadopp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adp File in Nortek Aquadopp Format — read.aquadopp","text":"Information Nortek profilers (including System Integrator Guide, explains data format byte--byte) available https://www.nortekusa.com/.  (One must join site see manuals.) Nortek Knowledge Center https://www.nortekusa.com/en/knowledge-center may help problems arise dealing data Nortek instruments.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.aquadopp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adp File in Nortek Aquadopp Format — read.aquadopp","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppHR.html","id":null,"dir":"Reference","previous_headings":"","what":"Read Nortek Aquadopp-HR File — read.aquadoppHR","title":"Read Nortek Aquadopp-HR File — read.aquadoppHR","text":"R code based information Nortek System Integrator Guide (2008) postings Nortek “knowledge center” discussion board.  One might assume latter less authoritative former.  example, inference cell size follows advice found https://www.nortekusa.com/en/knowledge-center/forum/hr-profilers/736804717, contains typo early posting corrected later .","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppHR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read Nortek Aquadopp-HR File — read.aquadoppHR","text":"","code":"read.aquadoppHR(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   longitude = NA,   latitude = NA,   orientation = orientation,   distance,   monitor = FALSE,   despike = FALSE,   encoding = NA,   processingLog,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppHR.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read Nortek Aquadopp-HR File — read.aquadoppHR","text":"file connection character string giving name file load.  (read.adp.sontek.serial, generally list files, concatenated.) indication first profile read.  can integer, sequence number first profile read, POSIXt time profiles skipped, character string converts POSIXt time (assuming UTC timezone).  See “Examples”, make careful note use tz argument. supplied, defaults 1. optional indication last profile read, format described .  special case, =0 means read file end.  supplied, defaults 0. optional indication stride length use walking file.  integer, -1 profiles skipped pair profiles read, e.g. default =1 means read data.  (RDI files , extra features avoid running memory; see “Memory considerations”.) tz character string indicating time zone assumed data. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. orientation Optional character string specifying orientation sensor, provided cases inferred data file.  valid choices \"upward\", \"downward\", \"sideward\". distance Optional vector holding distances bin centres sensor.  argument ignored except Nortek profilers, need given function determines distances correctly data. problem distance poorly documented Nortek System Integrator Guide (2008 edition, page 31), function must rely word--mouth formulae work cases. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. despike TRUE, despike() used clean anomalous spikes heading, etc. encoding ignored. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.) debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional additional arguments () read.adp.*() functions pass lower-level functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppHR.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read Nortek Aquadopp-HR File — read.aquadoppHR","text":"adp object. contents object make sense particular instrument type study, e.g. data file contains NMEA strings, navigational data stored item called nmea data slot).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppHR.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read Nortek Aquadopp-HR File — read.aquadoppHR","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppHR.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read Nortek Aquadopp-HR File — read.aquadoppHR","text":"Information Nortek profilers (including System Integrator Guide, explains data format byte--byte) available https://www.nortekusa.com/.  (One must join site see manuals.) Nortek Knowledge Center https://www.nortekusa.com/en/knowledge-center may help problems arise dealing data Nortek instruments.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppHR.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read Nortek Aquadopp-HR File — read.aquadoppHR","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppProfiler.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an adp File in Nortek Aquadopp Format — read.aquadoppProfiler","title":"Read an adp File in Nortek Aquadopp Format — read.aquadoppProfiler","text":"R code based information Nortek System Integrator Guide (2008) postings Nortek “knowledge center” discussion board.  One might assume latter less authoritative former.  example, inference cell size follows advice found https://www.nortekusa.com/en/knowledge-center/forum/hr-profilers/736804717, contains typo early posting corrected later .","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppProfiler.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an adp File in Nortek Aquadopp Format — read.aquadoppProfiler","text":"","code":"read.aquadoppProfiler(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   longitude = NA,   latitude = NA,   orientation,   distance,   monitor = FALSE,   despike = FALSE,   encoding = NA,   processingLog,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppProfiler.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an adp File in Nortek Aquadopp Format — read.aquadoppProfiler","text":"file connection character string giving name file load.  (read.adp.sontek.serial, generally list files, concatenated.) indication first profile read.  can integer, sequence number first profile read, POSIXt time profiles skipped, character string converts POSIXt time (assuming UTC timezone).  See “Examples”, make careful note use tz argument. supplied, defaults 1. optional indication last profile read, format described .  special case, =0 means read file end.  supplied, defaults 0. optional indication stride length use walking file.  integer, -1 profiles skipped pair profiles read, e.g. default =1 means read data.  (RDI files , extra features avoid running memory; see “Memory considerations”.) tz character string indicating time zone assumed data. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. orientation Optional character string specifying orientation sensor, provided cases inferred data file.  valid choices \"upward\", \"downward\", \"sideward\". distance Optional vector holding distances bin centres sensor.  argument ignored except Nortek profilers, need given function determines distances correctly data. problem distance poorly documented Nortek System Integrator Guide (2008 edition, page 31), function must rely word--mouth formulae work cases. monitor boolean value indicating whether indicate progress reading file, using txtProgressBar() otherwise.  value monitor changed FALSE automatically, non-interactive sessions. despike TRUE, despike() used clean anomalous spikes heading, etc. encoding ignored. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.) debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... optional additional arguments () read.adp.*() functions pass lower-level functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppProfiler.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an adp File in Nortek Aquadopp Format — read.aquadoppProfiler","text":"adp object. contents object make sense particular instrument type study, e.g. data file contains NMEA strings, navigational data stored item called nmea data slot).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppProfiler.html","id":"how-the-binary-file-is-decoded","dir":"Reference","previous_headings":"","what":"How the binary file is decoded","title":"Read an adp File in Nortek Aquadopp Format — read.aquadoppProfiler","text":"file type, like acoustic-Doppler types, read hybrid R/C++ system, efficiency. processing steps sketched , users want inspect code build upon . R, readBin() used insert file contents vector type raw. C++, raw vector scanned byte byte, find starting indices data \"chunks\", subsections data correspond individual sampling times. Checksum computations also done stage, detect possible data corruption.  Warnings issued bad chunks, skipped processing. valid starting points passed back R vector type integer. R, readBin() used read components chunk. speed, done vectorized fashion. example, velocities whole file read single call readBin(). process done data fields handled.  Importantly, readBin() calls tailored data, using values size, endian signed parameters tailored structure given component. Scaling factors applied required, convert components physical units. Finally, R, acquired items inserted data metadata slot return value, according oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppProfiler.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an adp File in Nortek Aquadopp Format — read.aquadoppProfiler","text":"Information Nortek profilers (including System Integrator Guide, explains data format byte--byte) available https://www.nortekusa.com/.  (One must join site see manuals.) Nortek Knowledge Center https://www.nortekusa.com/en/knowledge-center may help problems arise dealing data Nortek instruments.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.aquadoppProfiler.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an adp File in Nortek Aquadopp Format — read.aquadoppProfiler","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.argo.copernicus.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an argo File in Copernicus Format — read.argo.copernicus","title":"Read an argo File in Copernicus Format — read.argo.copernicus","text":"function added read particular file downloaded Fleet Monitoring website (Reference 1).  format inferred examination file brief study document (Reference 2) describes format.  fields read function; see Reference 3 full list note author happy add new entries (spend hours entering ).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.argo.copernicus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an argo File in Copernicus Format — read.argo.copernicus","text":"","code":"read.argo.copernicus(   file,   encoding = NA,   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.argo.copernicus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an argo File in Copernicus Format — read.argo.copernicus","text":"file character string giving name file load. encoding ignored. debug flag turns debugging.  Set 1 get moderate amount debugging information, 0 (default) silent operation. processingLog ignored. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.argo.copernicus.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an argo File in Copernicus Format — read.argo.copernicus","text":"https://fleetmonitoring.euro-argo.eu/float/4902489 Copernicus Marine Situ Tac Data Management Team. Copernicus Marine Situ NetCDF Format Manual (version V1.43). Pdf. Copernicus situ TAC, 2021. https://doi.org/10.13155/59938 (link checked 2022-04-11). Variable names provided files https://doi.org/10.13155/53381 (link checked 2022-04-12)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.argo.copernicus.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an argo File in Copernicus Format — read.argo.copernicus","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.argo.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an Argo Data File — read.argo","title":"Read an Argo Data File — read.argo","text":"read.argo used read Argo file, producing argo object. file must ARGO-style NetCDF format described Argo documentation (see references 2 3).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.argo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an Argo Data File — read.argo","text":"","code":"read.argo(   file,   encoding = NA,   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.argo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an Argo Data File — read.argo","text":"file character string giving name file load. encoding ignored. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.) ... additional arguments, passed called routines.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.argo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an Argo Data File — read.argo","text":"read.argo returns argo object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.argo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an Argo Data File — read.argo","text":"See Argo documentation (see references 2 3) details files contain. Many items listed section 2.2.3 reference 3 read file stored metadata slot, exception longitude latitude, stored data slot, alongside hydrographic information.  details storage return value somewhat complex, although following notes might helpful readers seeking learn . 1. Variable renaming. names several data parameters stored within NetCDF file altered fit oce context. example, PRES becomes pressure, matching name variable oce data types. original names reported summary,argo-method, data may extracted [[,argo-method using names, renaming inconvenient Argo experts new oce. Argo NetCDF files employ \"SNAKE_CASE\" naming scheme (sometimes using lower case) inconsistent \"camelCase\" scheme used oce. Since argo objects just small part oce, decision made rename argo items. example, \"CYCLE_NUMBER\" NetCDF file becomes \"cycleNumber\" oce object returned read.argo. (Note [[,argo-method also accepts \"cycle\" item.) conversion objects data slot often also involves expanding argo abbreviations, e.g. \"PSAL\" becomes \"salinity\". renaming work carried argoNames2oceNames() handles name expansion several dozen special cases, snakeToCamel() specialCase argument set \"QC\". results variable names make sense general oce context (, example, salinity expected stored variable named \"salinity\"), may confusing argo experts just starting use oce.  people might find helpful use e.g. sort(names(x[[\"metadata\"]])) get list items metadata slot (similar \"data\"), since working reverse may easier simply guessing names oce chosen. (Note prior 2020 June 24, metadata items stored \"SNAKE_CASE\".) 2. Metadata. Several NetCDF global attributes also renamed placement metadata slot return value.  include conventions, featureType, history, institution, nParameters, nProfiles,  references, source, title, userManualVersion. names derived NetCDF file, mainly follow pattern explained “Variable renaming convention” section. profile data (indicated NetCDF global attribute named \"featureType\" equal \"trajectoryProfile\"), NetCDF item named \"STATION_PARAMETERS\" controls whether variables source file stored metadata data slot returned object. STATION_PARAMETERS present, case trajectory files (detected featureType \"trajectory\"), guesses made goes data metadata slots. 3. Data variants. data item can variants, described Sections 2.3.4 reference 3. example, \"PRES\" found STATION_PARAMETERS, PRES (pressure) data sought file, along PRES_QC, PRES_ADJUSTED, PRES_ADJUSTED_QC, PRES_ERROR. pattern works profile data. variables stored names created explained “Variable renaming convention” section . Note flags, stored variables ending \"_QC\" NetCDF file, stored flags item within metadata slot returned object; thus, example, PRES_QC stored pressure flags. 4. time handled. NetCDF files profile data store time item named juld, holds overall profile time, Argo documentation calls Julian days, respect reference time also stored file.  Based information, POSIXct value named time stored metadata slot returned value, may found e.g. [[\"time\"]], returned value. Importantly, value matches time listed profile index files. addition, profile data files contain field called MTIME, holds offset (days) time individual measurements overall profile time. files, measurement times may computed [[\"time\"]]+86400*[[\"mtime\"]]. (formula used .ctd(), first argument argo object created supplying read.argo() data file.) 5. Data sources. Argo data made available several websites. bit detective work can required track data. servers provide data floats surfaced given ocean given day, anonymous FTP server usgodae.org/pub/outgoing/argo/geo/ example. servers provide data per-float basis. complicating factor data tend categorized \"dac\" (data archiving centre), makes difficult find particular float. example, https://www.usgodae.org/ftp/outgoing/argo/ top level repository. ID float known \"dac\", first step download text file https://www.usgodae.org/ftp/outgoing/argo/ar_index_global_meta.txt search ID. first lines file header, format simple, columns separated slash (/). dac first column float ID second. simple search reveal dac. example data(argo) based float 6900388, line containing token bodc/6900388/6900388_meta.nc,846,BO,20120225005617, dac seen British Oceanographic Data Centre (bodc). Armed information, visit https://www.usgodae.org/ftp/outgoing/argo/dac/bodc/6900388 see directory called profiles contains NetCDF file profile float made. can read read.argo. also possible, probably common, read NetCDF file containing profiles together purpose file https://www.usgodae.org/ftp/outgoing/argo/dac/bodc/6900388/6900388_prof.nc downloaded provided file argument read.argo.  can automated Example 2, although readers cautioned URL structures tend change time. Similar steps can followed servers.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.argo.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Read an Argo Data File — read.argo","text":"","code":"# Example 1: read from a local file library(oce) d <- read.argo(\"~/data/OAR/6900388_prof.nc\") summary(d) plot(d)  # Example 2: construct URL for download (brittle) id <- \"6900388\" url <- \"https://www.usgodae.org/ftp/outgoing/argo\" if (!length(list.files(pattern=\"argo_index.txt\")))     download.file(paste(url, \"ar_index_global_meta.txt\", sep=\"/\"), \"argo_index.txt\") index <- readLines(\"argo_index.txt\") line <- grep(id, index) if (0 == length(line))     stop(\"id \", id, \" not found\") if (1 < length(line))     stop(\"id \", id, \" found multiple times\") dac <- strsplit(index[line], \"/\")[[1]][1] profile <- paste(id, \"_prof.nc\", sep=\"\") float <- paste(url, \"dac\", dac, id, profile, sep=\"/\") download.file(float, profile) argo <- read.argo(profile) summary(argo)"},{"path":"https://dankelley.github.io/oce/reference/read.argo.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an Argo Data File — read.argo","text":"https://argo.ucsd.edu Argo User's Manual Version 3.2, Dec 29th, 2015, available https://archimer.ifremer.fr/doc/00187/29825/ online. User's Manual (ar-um-02-01) 13 July 2010, available http://www.argodatamgt.org/content/download/4729/34634/file/argo-dm-user-manual-version-2.3.pdf, main document describing argo data.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.argo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an Argo Data File — read.argo","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.bremen.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a bremen File — read.bremen","title":"Read a bremen File — read.bremen","text":"Read file Bremen format.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.bremen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a bremen File — read.bremen","text":"","code":"read.bremen(file, encoding = \"latin1\")"},{"path":"https://dankelley.github.io/oce/reference/read.bremen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a bremen File — read.bremen","text":"file connection character string giving name file load. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.bremen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a bremen File — read.bremen","text":"bremen object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.bremen.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a bremen File — read.bremen","text":"Velocities assumed cm/s, converted m/s follow oce convention. Shears (variables named uz vz assumed represent) assumed (cm/s)/m, although 1/s something else; lack documentation problem . Also, note assumed shears just first-difference estimates velocity, given results sample dataset:","code":"> head(data.frame(b[[\"data\"]]))   pressure      u      v       uz       vz 1        0  0.092 -0.191  0.00000  0.00000 2       10  0.092 -0.191  0.02183 -0.35412 3       20  0.092 -0.191  0.03046 -0.09458 4       30  0.026 -0.246 -0.03948  0.02169 5       40 -0.003 -0.212 -0.02614  0.03111 6       50 -0.023 -0.169 -0.03791  0.01706"},{"path":"https://dankelley.github.io/oce/reference/read.bremen.html","id":"issues","dir":"Reference","previous_headings":"","what":"Issues","title":"Read a bremen File — read.bremen","text":"function may renamed (removed) without notice. created read data used particular research project, rendered useless Bremen changes data format.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.bremen.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a bremen File — read.bremen","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.cm.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a cm File — read.cm","title":"Read a cm File — read.cm","text":"Read current-meter data file, producing cm object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.cm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a cm File — read.cm","text":"","code":"read.cm(   file,   from = 1,   to,   by = 1,   tz = getOption(\"oceTz\"),   type = c(\"s4\"),   longitude = NA,   latitude = NA,   debug = getOption(\"oceDebug\"),   encoding = \"latin1\",   monitor = FALSE,   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.cm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a cm File — read.cm","text":"file connection character string giving name file load. index number first measurement read, time measurement, created .POSIXct() (hint: use tz=\"UTC\"). indication last measurement read, format matching . indication stride length use walking file. integer, -1 measurements skipped pair profiles read. may make much sense, data equi-spaced time.  string representing time interval, colon-separated format, interval divided sampling interval, get stride length. BUG: data equi-spaced, odd results occur. tz character string indicating time zone assumed data. type character string indicating type file (ignored present). longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. debug flag turns debugging.  value indicates depth within call stack debugging applies. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. monitor ignored. processingLog provided, action item stored log.  parameter typically provided internal calls; default provides better normal calls user.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.cm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a cm File — read.cm","text":"cm object. data slot contain data file, names determined tokens line 3 file, passed make.names(), except Vnorth renamed v (conversion cm/s m/s), Veast renamed u (conversion cm/s m/s), Cond renamed conductivity, T.Temp renamed temperature Sal renamed salinity, new column named time (POSIX time) constructed information file header, another named pressure constructed column named Depth. least single file studied creation function, columns unnamed line 3 header; yield data items names X, X.1, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.cm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a cm File — read.cm","text":"function tested single file, data-scanning algorithm based visual inspection file.  Whether work generally open question. noted sample file several odd characteristics, listed . file contained two columns named \"Cond\", guessed stand conductivity. Since first contained data, second ignored, may case files. unit \"Cond\" stated file \"mS\", makes sense, unit assumed mS/cm. file contained column named \"T-Temp\", something author seen career. assumed stand -situ temperature. file contained column named \"Depth\", something instrument can measure. Presumably calculated pressure (atmospheric offset, though?) pressure inferred using swPressure(). file contained several columns lacked names. ignored. file contained several columns seem derived actual measured data, \"Speed\", \"Dir\", \"N-S Dist\", etc. ignored. file contained several columns basically mystery author, e.g. \"Hx\", \"Hy\", \"Vref\", etc. ignored. Based considerations, read.cm() reads columns reasonably well-understood based sample file. Users need columns contact author. user produce document explaining data format especially appreciated!","code":""},{"path":"https://dankelley.github.io/oce/reference/read.cm.html","id":"historical-note","dir":"Reference","previous_headings":"","what":"Historical note","title":"Read a cm File — read.cm","text":"Prior late July, 2016, direction current flow stored return value, longer stored, since can derived u v values.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.cm.html","id":"changes","dir":"Reference","previous_headings":"","what":"Changes","title":"Read a cm File — read.cm","text":"2023-02-09 item named north added metadata slot.  initialized \"magnetic\" read.cm(), really just guess, users consider using applyMagneticDeclination() take magnetic declination account.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.cm.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Read a cm File — read.cm","text":"","code":"library(oce) cm <- read.oce(\"cm_interocean_0811786.s4a.tab\") summary(cm) plot(cm)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.cm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a cm File — read.cm","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a coastline File — read.coastline","title":"Read a coastline File — read.coastline","text":"Read coastline file R, Splus, mapgen, shapefile, openstreetmap format. S R formats identical, consist two columns, lon lat, land-jump segments separated lines two NAs. MapGen format form BUG: 'arc/info ungenerate' format yet understood.","code":"# -b -16.179081 28.553943 -16.244793 28.563330"},{"path":"https://dankelley.github.io/oce/reference/read.coastline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a coastline File — read.coastline","text":"","code":"read.coastline(   file,   type = c(\"R\", \"S\", \"mapgen\", \"shapefile\", \"openstreetmap\"),   encoding = \"latin1\",   monitor = FALSE,   debug = getOption(\"oceDebug\"),   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.coastline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a coastline File — read.coastline","text":"file name file containing coastline data. type type file, one \"R\", \"S\", \"mapgen\", \"shapefile\" \"openstreetmap\". encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. monitor print dot every coastline segment read (ignored except reading \"shapefile\" type) debug set TRUE print information header, etc. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.)","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a coastline File — read.coastline","text":"coastline object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a coastline File — read.coastline","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.openstreetmap.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a coastline File in Openstreetmap Format — read.coastline.openstreetmap","title":"Read a coastline File in Openstreetmap Format — read.coastline.openstreetmap","text":"Read coastline data stored openstreetmap format.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.openstreetmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a coastline File in Openstreetmap Format — read.coastline.openstreetmap","text":"","code":"read.coastline.openstreetmap(   file,   lonlim = c(-180, 180),   latlim = c(-90, 90),   monitor = FALSE,   encoding = NA,   debug = getOption(\"oceDebug\"),   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.coastline.openstreetmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a coastline File in Openstreetmap Format — read.coastline.openstreetmap","text":"file name file containing coastline data (file ending .shp) zipfile contains file, corresponding name. second scheme useful files downloaded NaturalEarth website (see reference 2). lonlim, latlim numerical vectors specifying west east edges (south north edges) focus window. Coastline polygons intersect defined box skipped, can useful narrowing high-resolution world-scale data local application. monitor Logical indicating whether print indication progress file. encoding ignored. debug set TRUE print information header, etc. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.)","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.openstreetmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a coastline File in Openstreetmap Format — read.coastline.openstreetmap","text":"coastline object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.coastline.openstreetmap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a coastline File in Openstreetmap Format — read.coastline.openstreetmap","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.shapefile.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a coastline File in Shapefile Format — read.coastline.shapefile","title":"Read a coastline File in Shapefile Format — read.coastline.shapefile","text":"Read coastline data stored shapefile format (see reference 1).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.shapefile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a coastline File in Shapefile Format — read.coastline.shapefile","text":"","code":"read.coastline.shapefile(   file,   lonlim = c(-180, 180),   latlim = c(-90, 90),   encoding = NA,   monitor = FALSE,   debug = getOption(\"oceDebug\"),   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.coastline.shapefile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a coastline File in Shapefile Format — read.coastline.shapefile","text":"file name file containing coastline data (file ending .shp) zipfile contains file, corresponding name. second scheme useful files downloaded NaturalEarth website (see reference 2). lonlim, latlim numerical vectors specifying west east edges (south north edges) focus window. Coastline polygons intersect defined box skipped, can useful narrowing high-resolution world-scale data local application. encoding ignored. monitor Logical indicating whether print indication progress file. debug set TRUE print information header, etc. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.)","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.shapefile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a coastline File in Shapefile Format — read.coastline.shapefile","text":"x coastline object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.shapefile.html","id":"a-hack-for-depth-contours","dir":"Reference","previous_headings":"","what":"A hack for depth contours","title":"Read a coastline File in Shapefile Format — read.coastline.shapefile","text":"following demonstrates code getting close working depth contours.  handled internally, new object depth contours constructed, coastlines subset.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.coastline.shapefile.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a coastline File in Shapefile Format — read.coastline.shapefile","text":"“shapefile” format described ESRI Shapefile Technical Description, March 1998, available https://www.esri.com/content/dam/esrisites/sitecore-archive/Files/Pdfs/library/whitepapers/pdfs/shapefile.pdf (last checked 2021-03-24). NaturalEarth website https://www.naturalearthdata.com/downloads/ provides coastline datasets three resolutions, along similar files lakes rivers, borders, etc. highly recommended.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.coastline.shapefile.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a coastline File in Shapefile Format — read.coastline.shapefile","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a ctd File in AML Format — read.ctd.aml","title":"Read a ctd File in AML Format — read.ctd.aml","text":"read.ctd.aml() reads files hold data acquired AML Oceanographic Base.X2 CTD instrument. software associated device can output data multiple formats, read.ctd.aml() can read three, based files provided author users. format parameter supplied, function attempts infer first line file; see “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a ctd File in AML Format — read.ctd.aml","text":"","code":"read.ctd.aml(   file,   format,   encoding = \"UTF-8-BOM\",   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a ctd File in AML Format — read.ctd.aml","text":"file connection character string giving name file load. format integer indicating format type.  supplied, first line examined make guess format (see “Details”). encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. processingLog ignored. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a ctd File in AML Format — read.ctd.aml","text":"read.ctd.aml() returns ctd object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a ctd File in AML Format — read.ctd.aml","text":"format supplied, first line file examined. line contains [cast header] (case insensitive), format 1 inferred. contains comma (.e. header present) format 2 inferred.  (AML documentation cautions saving format.) contains [header] (case insensitive) format 3 inferred. Support types 1 2 added year 2017, whereas type 3 added 2024. Documentation available formats 1 2, exact match sample files provided author read.ctd.aml(). documentation seemed available format 3, code written manual inspection sample file. Given things, users advised lookout problems.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a ctd File in AML Format — read.ctd.aml","text":"AML Oceanographic. \"SeaCast 4 User Manual (Version 2.06).\" AML Oceanographic, May 2016.  available <www.subsseateechnologies.com> website, neither new version located author's search website September 2024.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a ctd File in AML Format — read.ctd.aml","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read a ctd File in AML Format — read.ctd.aml","text":"","code":"library(oce) # Show S,T and p for first 5 lines of a format=1 file f1 <- system.file(\"extdata\", \"ctd_aml_type1.csv.gz\", package = \"oce\") d1 <- read.ctd.aml(f1) data.frame(S = d1[[\"salinity\"]], T = d1[[\"temperature\"]], p = d1[[\"pressure\"]]) #>           S     T    p #> 1  5.577871 5.671 0.23 #> 2  9.978261 5.509 0.22 #> 3 14.628767 5.400 0.22 #> 4 19.406751 5.325 0.24  # Show S,T and p for first 5 lines of a format=3 file f3 <- system.file(\"extdata\", \"ctd_aml_type3.csv.gz\", package = \"oce\") d3 <- read.ctd.aml(f3) data.frame(S = d3[[\"salinity\"]], T = d3[[\"temperature\"]], p = d3[[\"pressure\"]]) #>        S      T    p #> 1 37.797 25.871 0.00 #> 2 37.907 25.890 0.19 #> 3 37.914 25.861 0.44 #> 4 37.920 25.862 0.68 #> 5 37.932 25.838 0.90"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.type3.html","id":null,"dir":"Reference","previous_headings":"","what":"Read AML ctd format 3 (not exported) — read.ctd.aml.type3","title":"Read AML ctd format 3 (not exported) — read.ctd.aml.type3","text":"ad-hoc attempt read files provided user late September, 2024.  See “Details” provisos.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.type3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read AML ctd format 3 (not exported) — read.ctd.aml.type3","text":"","code":"read.ctd.aml.type3(file, encoding, debug = 0)"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.type3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read AML ctd format 3 (not exported) — read.ctd.aml.type3","text":"file character value naming file. encoding ignored. debug ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.type3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read AML ctd format 3 (not exported) — read.ctd.aml.type3","text":"function based 4 sample files, evidently created AML Sailfish 1.4.8.0 software. documentation made available, code written inspection files guessing format.  means code likely brittle file variations. envisioned much support provided file format, given lack documentation.  third format seen AML files, seems likely formats existence. Another factor mitigating oce adding high support format fact files made available author contain startling errors stated units density sound speed, raises questions development state AML software.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.aml.type3.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read AML ctd format 3 (not exported) — read.ctd.aml.type3","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a ctd File in General Format — read.ctd","title":"Read a ctd File in General Format — read.ctd","text":"Read ctd File General Format","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a ctd File in General Format — read.ctd","text":"","code":"read.ctd(   file,   type = NULL,   columns = NULL,   station = NULL,   missingValue,   deploymentType = \"unknown\",   monitor = FALSE,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a ctd File in General Format — read.ctd","text":"file either connection character value naming file. read.ctd.sbe() read.ctd.woce(), may wildcard (e.g. \"*.cnv\" \"*.csv\") case return value vector containing CTD objects created reading files list.files() pattern set specified wildcard pattern. type NULL, first line studied, order determine file type, control dispatched specialized function handle type.  Otherwise, type must string. type=\"SBE19\" Seabird file format assumed, control dispatched read.ctd.sbe(). type=\"WOCE\" WOCE-exchange file assumed, control dispatched read.ctd.woce(). type=\"ITP\" ice-tethered profiler file assumed, control dispatched read.ctd.itp(). type=\"ODF\" ODF file (used Canadian Department Fisheries Ocean) assumed, control dispatched read.ctd.odf(). Finally, type=\"ODV\" ODV file (used Ocean Data View software) assumed, control dispatched read.ctd.odv(). columns optional list can used convert unrecognized data names resultant variable names.  used read.ctd.sbe() read.ctd.odf(). example, data file named salinity \"SAL\", using   assign \"SAL\" column salinity entry data slot CTD object returned read.* function. station optional character string containing identifying name number station. can useful routine determine name automatically, another name preferred. missingValue optional missing-value flag; data matching value set NA upon reading. provided, overrules missing-value flag found data. Seabird (.cnv) files, usually need set missingValue, can inferred header (typically -9.990e-29). Set missingValue=NULL turn missing-value detection, even .cnv files contain missing-value codes headers. missingValue specified, attempt made infer value data, testing whether salinity /temperature minimum -8 value; catch common values files, without false positives. warning issued case, note inserted processing log return value. deploymentType character string indicating type deployment. Use \"unknown\" known, \"profile\" profile (data acquired downcast, device lowered water column, perhaps also including upcast; \"moored\" device installed fixed mooring, \"thermosalinograph\" (\"tsg\") device mounted moving vessel, record near-surface properties, \"towyo\" device repeatedly lowered raised. monitor boolean, set TRUE provide indication progress.  useful filename wildcard. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. processingLog provided, action item stored log. typically provided internal calls; default provides better normal calls user. ... additional arguments, passed called routines.","code":"d <- read.ctd(f, columns=list(     salinity=list(name=\"SAL\",                   unit=list(unit=expression(),                   scale=\"PSS-78\"))))"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a ctd File in General Format — read.ctd","text":"function returns ctd object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.ctd.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a ctd File in General Format — read.ctd","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.itp.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a ctd File in ITP Format — read.ctd.itp","title":"Read a ctd File in ITP Format — read.ctd.itp","text":"Read ctd File ITP Format","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.itp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a ctd File in ITP Format — read.ctd.itp","text":"","code":"read.ctd.itp(   file,   columns = NULL,   station = NULL,   missingValue,   deploymentType = \"unknown\",   encoding = \"latin1\",   monitor = FALSE,   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.itp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a ctd File in ITP Format — read.ctd.itp","text":"file either connection character value naming file. read.ctd.sbe() read.ctd.woce(), may wildcard (e.g. \"*.cnv\" \"*.csv\") case return value vector containing CTD objects created reading files list.files() pattern set specified wildcard pattern. columns optional list can used convert unrecognized data names resultant variable names.  used read.ctd.sbe() read.ctd.odf(). example, data file named salinity \"SAL\", using   assign \"SAL\" column salinity entry data slot CTD object returned read.* function. station optional character string containing identifying name number station. can useful routine determine name automatically, another name preferred. missingValue optional missing-value flag; data matching value set NA upon reading. provided, overrules missing-value flag found data. Seabird (.cnv) files, usually need set missingValue, can inferred header (typically -9.990e-29). Set missingValue=NULL turn missing-value detection, even .cnv files contain missing-value codes headers. missingValue specified, attempt made infer value data, testing whether salinity /temperature minimum -8 value; catch common values files, without false positives. warning issued case, note inserted processing log return value. deploymentType character string indicating type deployment. Use \"unknown\" known, \"profile\" profile (data acquired downcast, device lowered water column, perhaps also including upcast; \"moored\" device installed fixed mooring, \"thermosalinograph\" (\"tsg\") device mounted moving vessel, record near-surface properties, \"towyo\" device repeatedly lowered raised. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. monitor boolean, set TRUE provide indication progress.  useful filename wildcard. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. processingLog provided, action item stored log. typically provided internal calls; default provides better normal calls user. ... additional arguments, passed called routines.","code":"d <- read.ctd(f, columns=list(     salinity=list(name=\"SAL\",                   unit=list(unit=expression(),                   scale=\"PSS-78\"))))"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.itp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a ctd File in ITP Format — read.ctd.itp","text":"function returns ctd object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.itp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a ctd File in ITP Format — read.ctd.itp","text":"Information ice-tethered profile data provided https://www.whoi.edu/page.?pid=23096, also provides link downloading data.  Note present version handles data profiler-mode, fixed-depth mode.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.ctd.itp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a ctd File in ITP Format — read.ctd.itp","text":"Dan Kelley read.ctd.itp() reads ice-tethered-profiler data stored format files used WHOI servers 2016-2017. Lacking documentation format, author constructed function work files -hand. Whether function prove robust open question. Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odf.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a ctd File in odf Format — read.ctd.odf","title":"Read a ctd File in odf Format — read.ctd.odf","text":"Read ctd File odf Format","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a ctd File in odf Format — read.ctd.odf","text":"","code":"read.ctd.odf(   file,   columns = NULL,   station = NULL,   missingValue,   deploymentType = \"unknown\",   monitor = FALSE,   exclude = NULL,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a ctd File in odf Format — read.ctd.odf","text":"file either connection character value naming file. read.ctd.sbe() read.ctd.woce(), may wildcard (e.g. \"*.cnv\" \"*.csv\") case return value vector containing CTD objects created reading files list.files() pattern set specified wildcard pattern. columns optional list can used convert unrecognized data names resultant variable names.  used read.ctd.sbe() read.ctd.odf(). example, data file named salinity \"SAL\", using   assign \"SAL\" column salinity entry data slot CTD object returned read.* function. station optional character string containing identifying name number station. can useful routine determine name automatically, another name preferred. missingValue optional missing-value flag; data matching value set NA upon reading. provided, overrules missing-value flag found data. Seabird (.cnv) files, usually need set missingValue, can inferred header (typically -9.990e-29). Set missingValue=NULL turn missing-value detection, even .cnv files contain missing-value codes headers. missingValue specified, attempt made infer value data, testing whether salinity /temperature minimum -8 value; catch common values files, without false positives. warning issued case, note inserted processing log return value. deploymentType character string indicating type deployment. Use \"unknown\" known, \"profile\" profile (data acquired downcast, device lowered water column, perhaps also including upcast; \"moored\" device installed fixed mooring, \"thermosalinograph\" (\"tsg\") device mounted moving vessel, record near-surface properties, \"towyo\" device repeatedly lowered raised. monitor boolean, set TRUE provide indication progress.  useful filename wildcard. exclude either character value holding regular expression used grep() remove lines header processing, NULL (default), meaning exclude lines.  purpose argument solve problems files, can thousands lines indicate details may little value processing.  example, files thousands lines excluded using exclude=\"PROCESS='Nulled .* value\" function call. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. processingLog provided, action item stored log. typically provided internal calls; default provides better normal calls user. ... additional arguments, passed called routines.","code":"d <- read.ctd(f, columns=list(     salinity=list(name=\"SAL\",                   unit=list(unit=expression(),                   scale=\"PSS-78\"))))"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a ctd File in odf Format — read.ctd.odf","text":"function returns ctd object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a ctd File in odf Format — read.ctd.odf","text":"read.ctd.odf reads files stored Ocean Data Format, used Canadian hydrographic databases.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odf.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Read a ctd File in odf Format — read.ctd.odf","text":"Lacking detailed documentation ODF file format, read.odf() read.ctd.odf() functions crafted based inspection data files, guesses made. PARAMETER_HEADER chunks describing quality-control flags case point.  contain NAME components refer PARAMETER_HEADER chunks hold measured data.  However, references always matched well data names, even match, cross-reference syntax used Bedford Institute Oceanography differs used l’Institut Maurice-Lamontagne. simplify coding, assumed quality-control sequence applies data sequence immediately preceding .  (assumption made analysis systems.) also prudent pay attention units decoding, read.odf() handles calling unitFromString(). lookout incorrect temperature scales, sometimes reported nonstandard strings ODF files. Also, note may see warnings conductivity ratios, ODF files incorrectly suggest dimensions.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a ctd File in odf Format — read.ctd.odf","text":"sources describe ODF format, see documentation odf class.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a ctd File in odf Format — read.ctd.odf","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odv.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a ","title":"Read a ","text":"Read \"ctd\" File ODV Format","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a ","text":"","code":"read.ctd.odv(   file,   columns = NULL,   station = NULL,   missingValue,   deploymentType,   encoding = \"latin1\",   monitor = FALSE,   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a ","text":"file either connection character value naming file. read.ctd.sbe() read.ctd.woce(), may wildcard (e.g. \"*.cnv\" \"*.csv\") case return value vector containing CTD objects created reading files list.files() pattern set specified wildcard pattern. columns optional list can used convert unrecognized data names resultant variable names.  used read.ctd.sbe() read.ctd.odf(). example, data file named salinity \"SAL\", using   assign \"SAL\" column salinity entry data slot CTD object returned read.* function. station optional character string containing identifying name number station. can useful routine determine name automatically, another name preferred. missingValue optional missing-value flag; data matching value set NA upon reading. provided, overrules missing-value flag found data. Seabird (.cnv) files, usually need set missingValue, can inferred header (typically -9.990e-29). Set missingValue=NULL turn missing-value detection, even .cnv files contain missing-value codes headers. missingValue specified, attempt made infer value data, testing whether salinity /temperature minimum -8 value; catch common values files, without false positives. warning issued case, note inserted processing log return value. deploymentType character string indicating type deployment. Use \"unknown\" known, \"profile\" profile (data acquired downcast, device lowered water column, perhaps also including upcast; \"moored\" device installed fixed mooring, \"thermosalinograph\" (\"tsg\") device mounted moving vessel, record near-surface properties, \"towyo\" device repeatedly lowered raised. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. monitor boolean, set TRUE provide indication progress.  useful filename wildcard. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. processingLog provided, action item stored log. typically provided internal calls; default provides better normal calls user. ... additional arguments, passed called routines.","code":"d <- read.ctd(f, columns=list(     salinity=list(name=\"SAL\",                   unit=list(unit=expression(),                   scale=\"PSS-78\"))))"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a ","text":"function returns ctd object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a ","text":"read.ctd.odv() attempts read files stored ODV format, used European data providers. works crudely, 2020-05-17. particular, translation ODV parameter names oce names limited.  example, one dozens possibilities variants phosphate handled moment, variant supplied test file sent author 2020-05-16.  unlikely full support ODV files become available read.ctd.odv(), given lack comprehensive source listing ODV variable names meanings, low user interest.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a ","text":"https://www.bodc.ac.uk/resources/delivery_formats/odv_format/ describes ODV format. https://vocab.nerc.ac.uk/collection/P07/current/ may worth consulting variable names.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.ctd.odv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a ","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.saiv.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a ctd File in SAIV Format — read.ctd.saiv","title":"Read a ctd File in SAIV Format — read.ctd.saiv","text":"read.ctd.saiv() reads files hold data acquired SAIV model SD204 CTD profiler (reference 1). Since documentation format available author, function written based examination particular data file.  almost certainly yield limitations files, particular data names differ sample file (see “Details” limitations).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.saiv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a ctd File in SAIV Format — read.ctd.saiv","text":"","code":"read.ctd.saiv(   file,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.saiv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a ctd File in SAIV Format — read.ctd.saiv","text":"file character string naming file read. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. processingLog ignored. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.saiv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a ctd File in SAIV Format — read.ctd.saiv","text":"read.ctd.saiv() returns ctd object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.saiv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a ctd File in SAIV Format — read.ctd.saiv","text":"variable names change oce convention, e.g. \"Sal.\" becomes \"salinity\", \"Temp\" becomes \"temperature\", etc.  first version code, renaming done based examination single file. list expanded user kindly supplied one-page document explains variable names units. functions reading oce data, read.ctd.saiv() resolves duplicate variable names appending 2 second instance, 3 third, etc. ctd objects, [[ operator handles original name file, converted oce name. worth noting following oddities present sample file upon read.ctd.saiv() based. header line names data columns ends tab, indicating presence 12 columns (last unnamed), data contain 11 columns.  Therefore, last tab character ignored read.ctd.saiv(). test file lacked longitude latitude information.  means modern quantities like Absolute Salinity Conservative Temperature computed.  Users know location information insert values object returned read.ctd.saiv() using oceSetMetadata(). previous point, possible compute pressure accurately depth (header suggests file contains) unless latitude known. read.ctd.saiv(), latitude assumed 45 degrees north, default used swPressure().","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.saiv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a ctd File in SAIV Format — read.ctd.saiv","text":"https://saiv./sd204-ctd-profiler","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.ctd.saiv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a ctd File in SAIV Format — read.ctd.saiv","text":"Dan Kelley, help github member handle 'Rdescoteaux', kindly supplied sample file document listing SAIV variable names.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a ctd File in Seabird Format — read.ctd.sbe","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"Read ctd File Seabird Format","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"","code":"read.ctd.sbe(   file,   columns = NULL,   station = NULL,   missingValue,   deploymentType = \"unknown\",   btl = FALSE,   monitor = FALSE,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"file either connection character value naming file. read.ctd.sbe() read.ctd.woce(), may wildcard (e.g. \"*.cnv\" \"*.csv\") case return value vector containing CTD objects created reading files list.files() pattern set specified wildcard pattern. columns optional list can used convert unrecognized data names resultant variable names.  used read.ctd.sbe() read.ctd.odf(). example, data file named salinity \"SAL\", using   assign \"SAL\" column salinity entry data slot CTD object returned read.* function. station optional character string containing identifying name number station. can useful routine determine name automatically, another name preferred. missingValue optional missing-value flag; data matching value set NA upon reading. provided, overrules missing-value flag found data. Seabird (.cnv) files, usually need set missingValue, can inferred header (typically -9.990e-29). Set missingValue=NULL turn missing-value detection, even .cnv files contain missing-value codes headers. missingValue specified, attempt made infer value data, testing whether salinity /temperature minimum -8 value; catch common values files, without false positives. warning issued case, note inserted processing log return value. deploymentType character string indicating type deployment. Use \"unknown\" known, \"profile\" profile (data acquired downcast, device lowered water column, perhaps also including upcast; \"moored\" device installed fixed mooring, \"thermosalinograph\" (\"tsg\") device mounted moving vessel, record near-surface properties, \"towyo\" device repeatedly lowered raised. btl logical value, TRUE indicating .BTL file FALSE (default) indicating .CNV file.  Note btl TRUE, data column names taken directly file (without e.g. translating \"Sal00\" \"salinity\".  Also, \"avg\" \"sdev\" columns blended together, latter named file, \"_sdev\" appended. monitor boolean, set TRUE provide indication progress.  useful filename wildcard. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. processingLog provided, action item stored log. typically provided internal calls; default provides better normal calls user. ... additional arguments, passed called routines.","code":"d <- read.ctd(f, columns=list(     salinity=list(name=\"SAL\",                   unit=list(unit=expression(),                   scale=\"PSS-78\"))))"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"function returns ctd object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"function reads files stored Seabird .cnv format. Note files can contain multiple sensors given field. example, file might contain column named t090C one temperature sensor t190C second. first denoted temperature data slot return value, second denoted temperature1. means first sensor used future processing accesses temperature. convenience processing, pose limitation, data second sensor also available e.g. x[[\"temperature1\"]], x name returned value.  details mapping .cnv names ctd names, see cnvName2oceName(). names elements data slot returned value depend file type, signalled btl argument.  default case .cnv files, original data names stored file stored within metadata slot dataNamesOriginal, displayed summary alongside numerical summary; see Appendix VI reference 2 meanings names (\"Short Name\" column table spanning pages 161 172). However, case .btl files, column names described documentation entry btl argument.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":"a-note-on-hand-entered-headers","dir":"Reference","previous_headings":"","what":"A note on hand-entered headers","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"CNV files may section contains human-entered information. detected read.ctd.sbe() lines begin two asterisks. Decoding information can tricky, humans many ways writing things. example, consider date item metadata slot returned value.  read.ctd.sbe() infers value one two ways.  First, header line staring   value decoded used date.  header line, preceded single asterisk, human-entered, reason hope uniform format can handled read.ctd.sbe().  However, NMEA header line, read.ctd.sbe() look line starting   human-entered. second choice, humans write dates bewildering variety ways, .POSIXct(), read.ctd.sbe uses parse date, handle . problem, read.ctd.sbe() issues warning stores NA date. similar error-detection procedure used human-entered location data, appear lines starting either     often take forms read.ctd.sbe() parse. important note , even warnings issued, reasonably high chance human-entered data scanned incorrectly. (operator remember indicate hemisphere? 123.456 indicate decimal degrees, 123 degrees plus 45.6 minutes? hemisphere indicated sign letter, , latter, appear?) deep-sea work, ship might steam 6 hours CTD stations, ship-time cost CTD file can several thousand dollars.  Surely unreasonable analyst take minute glance CNV file, ascertain whether read.ctd.sbe() inferred correct values. oceSetMetadata() helpful correcting problems individual files, many files systematically problematic, say whole cruise perhaps even whole institution, might sense set wrapper function correct deficiencies CNV files. example, following handles dates specified particular nonstandard way.","code":"* NMEA UTC (Time) = ** Date: ** Longitude: ** Latitude: read.ctd.sbe.wrapper <- function(cnv) {     lines <- readLines(cnv)     # Change month-day-year to year-month-day, so as.POSIXct() can parse it.     lines <- gsub(\"^\\\\*\\\\* Date: (.*)-(.*)-(.*)\", \"** Date: \\\\3-\\\\1-\\\\2\", lines)     read.ctd.sbe(textConnection(lines)) }"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":"a-note-on-sampling-times","dir":"Reference","previous_headings":"","what":"A note on sampling times","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"November 2018, possibility great confusion storage time entries within data slot, read.ctd.sbe renamed ten variants time (see reference 2 list) \"time\" data slot returned value.  CTD profiles, perhaps great problem, lead significant confusion moored data. Therefore, change read.ctd.sbe made, Seabird times, using start_time entry CNV file header (stored startTime object metadata slot), along specific time columns follows (documented, uneven clarity, SBE Seasoft data processing manual, revision 7.26.8, Appendix VI): NOTE: times tested properly, users asked report incorrect times, read.ctd.sbe can improved.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":"a-note-on-scales","dir":"Reference","previous_headings":"","what":"A note on scales","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"user might encounter data files variety scales temperature salinity. Oce keeps track scales units sets stored variables. example, CTD object, [[\"temperatureUnit\"]]$scale character string indicate scale. Modern-day data \"-90\" scale, old data may \"IPTS-68\". point saving scale way various formulas deal water properties can account scale, e.g. converting numerical values saved \"IPTS-68\" scale newer scale, using T90fromT68() calculations expressed terms \"-90\" scale. taken care retrieving temperatures accessor function, e.g. writing [[\"temperature\"]] either retrieve stored values (scale -90) converted values (scale IPTS-68). Even though procedure work, users really care details data well-advised couple tests examining first data line data file editor. Note reading file contains IPTS-68 temperatures produces warning.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"Sea-Bird SBE 19plus profiler described http://www.seabird.com/products/spec_sheets/19plusdata.htm.  information given Sea-Bird data-processing manual (next item). SBE data processing manual http://www.seabird.com/document/sbe-data-processing-manual, summer 2018, longer seems provided SeaBird. web search turn copies manual put online various research groups data-archiving agencies. 2018-07-05, latest version named SBEDataProcessing_7.26.4.pdf release date 12/08/2017, reference version used coding oce.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.sbe.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read a ctd File in Seabird Format — read.ctd.sbe","text":"","code":"f <- system.file(\"extdata\", \"ctd.cnv.gz\", package = \"oce\") d <- read.ctd(f) #> Warning: startTime (1903-10-15 11:38:38) is < 1950, suggesting a turn-of-the-century problem in this cnv file #> Warning: this CNV file has temperature in the IPTS-68 scale, and this is stored in object, but note  that [[\"temperature\"]] and the sw* functions convert the numbers to ITS-90 values"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.ssda.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a ctd File in SSDA Format — read.ctd.ssda","title":"Read a ctd File in SSDA Format — read.ctd.ssda","text":"read.ctd.ssda() reads CTD files Sea & Sun Technology's Standard Data Acquisition (SSDA) format. function somewhat preliminary, sense header information scanned fully, guesses made meanings variables units.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.ssda.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a ctd File in SSDA Format — read.ctd.ssda","text":"","code":"read.ctd.ssda(   file,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.ssda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a ctd File in SSDA Format — read.ctd.ssda","text":"file connection character string giving name file load. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer specifying whether debugging information printed processing. nonzero, information printed. processingLog ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.ssda.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a ctd File in SSDA Format — read.ctd.ssda","text":"read.ctd.ssda() returns ctd object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.ctd.ssda.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a ctd File in SSDA Format — read.ctd.ssda","text":"Dan Kelley, help Liam MacNeil","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a ctd File in WOCE-Exchange Format — read.ctd.woce","title":"Read a ctd File in WOCE-Exchange Format — read.ctd.woce","text":"reads WOCE exchange files start string \"CTD\". two variants: one first 4 characters \"CTD,\" first 3 characters \"CTD\" non-whitespace characters occur line.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a ctd File in WOCE-Exchange Format — read.ctd.woce","text":"","code":"read.ctd.woce(   file,   columns = NULL,   station = NULL,   missingValue,   deploymentType = \"unknown\",   monitor = FALSE,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a ctd File in WOCE-Exchange Format — read.ctd.woce","text":"file either connection character value naming file. read.ctd.sbe() read.ctd.woce(), may wildcard (e.g. \"*.cnv\" \"*.csv\") case return value vector containing CTD objects created reading files list.files() pattern set specified wildcard pattern. columns optional list can used convert unrecognized data names resultant variable names.  used read.ctd.sbe() read.ctd.odf(). example, data file named salinity \"SAL\", using   assign \"SAL\" column salinity entry data slot CTD object returned read.* function. station optional character string containing identifying name number station. can useful routine determine name automatically, another name preferred. missingValue optional missing-value flag; data matching value set NA upon reading. provided, overrules missing-value flag found data. Seabird (.cnv) files, usually need set missingValue, can inferred header (typically -9.990e-29). Set missingValue=NULL turn missing-value detection, even .cnv files contain missing-value codes headers. missingValue specified, attempt made infer value data, testing whether salinity /temperature minimum -8 value; catch common values files, without false positives. warning issued case, note inserted processing log return value. deploymentType character string indicating type deployment. Use \"unknown\" known, \"profile\" profile (data acquired downcast, device lowered water column, perhaps also including upcast; \"moored\" device installed fixed mooring, \"thermosalinograph\" (\"tsg\") device mounted moving vessel, record near-surface properties, \"towyo\" device repeatedly lowered raised. monitor boolean, set TRUE provide indication progress.  useful filename wildcard. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. processingLog provided, action item stored log. typically provided internal calls; default provides better normal calls user. ... additional arguments, passed called routines.","code":"d <- read.ctd(f, columns=list(     salinity=list(name=\"SAL\",                   unit=list(unit=expression(),                   scale=\"PSS-78\"))))"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a ctd File in WOCE-Exchange Format — read.ctd.woce","text":"function returns ctd object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a ctd File in WOCE-Exchange Format — read.ctd.woce","text":"WOCE-exchange format described http://woce.nodc.noaa.gov/woce_v3/wocedata_1/whp/exchange/exchange_format_desc.htm although link longer working December 2020.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a ctd File in WOCE-Exchange Format — read.ctd.woce","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.other.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a ctd File in WOCE-Exchange EXPOCODE Format — read.ctd.woce.other","title":"Read a ctd File in WOCE-Exchange EXPOCODE Format — read.ctd.woce.other","text":"reads WOCE exchange files start string \"EXPOCODE\".","code":""},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.other.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a ctd File in WOCE-Exchange EXPOCODE Format — read.ctd.woce.other","text":"","code":"read.ctd.woce.other(   file,   columns = NULL,   station = NULL,   missingValue,   deploymentType = \"unknown\",   monitor = FALSE,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog,   ... )"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.other.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a ctd File in WOCE-Exchange EXPOCODE Format — read.ctd.woce.other","text":"file either connection character value naming file. read.ctd.sbe() read.ctd.woce(), may wildcard (e.g. \"*.cnv\" \"*.csv\") case return value vector containing CTD objects created reading files list.files() pattern set specified wildcard pattern. columns optional list can used convert unrecognized data names resultant variable names.  used read.ctd.sbe() read.ctd.odf(). example, data file named salinity \"SAL\", using   assign \"SAL\" column salinity entry data slot CTD object returned read.* function. station optional character string containing identifying name number station. can useful routine determine name automatically, another name preferred. missingValue optional missing-value flag; data matching value set NA upon reading. provided, overrules missing-value flag found data. Seabird (.cnv) files, usually need set missingValue, can inferred header (typically -9.990e-29). Set missingValue=NULL turn missing-value detection, even .cnv files contain missing-value codes headers. missingValue specified, attempt made infer value data, testing whether salinity /temperature minimum -8 value; catch common values files, without false positives. warning issued case, note inserted processing log return value. deploymentType character string indicating type deployment. Use \"unknown\" known, \"profile\" profile (data acquired downcast, device lowered water column, perhaps also including upcast; \"moored\" device installed fixed mooring, \"thermosalinograph\" (\"tsg\") device mounted moving vessel, record near-surface properties, \"towyo\" device repeatedly lowered raised. monitor boolean, set TRUE provide indication progress.  useful filename wildcard. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. processingLog provided, action item stored log. typically provided internal calls; default provides better normal calls user. ... additional arguments, passed called routines.","code":"d <- read.ctd(f, columns=list(     salinity=list(name=\"SAL\",                   unit=list(unit=expression(),                   scale=\"PSS-78\"))))"},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.other.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a ctd File in WOCE-Exchange EXPOCODE Format — read.ctd.woce.other","text":"function returns ctd object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.ctd.woce.other.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a ctd File in WOCE-Exchange EXPOCODE Format — read.ctd.woce.other","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.echosounder.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an echosounder File — read.echosounder","title":"Read an echosounder File — read.echosounder","text":"Reads biosonics echosounder file.  function written tested single-beam, dual-beam, split-beam Biosonics files type V3, may work properly file formats.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.echosounder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an echosounder File — read.echosounder","text":"","code":"read.echosounder(   file,   channel = 1,   soundSpeed,   tz = getOption(\"oceTz\"),   encoding = NA,   debug = getOption(\"oceDebug\"),   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.echosounder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an echosounder File — read.echosounder","text":"file connection character string giving name file load. channel sequence number channel extract, multi-channel files. soundSpeed sound speed, m/s. provided, calculated using swSoundSpeed(35,15,30,eos=\"unesco\").  (theory, calculated using temperature salinity stored data file, just nominal values, anyway. tz character string indicating time zone assumed data. encoding ignored. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . processingLog provided, action item stored log, typically provided internal calls.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.echosounder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an echosounder File — read.echosounder","text":"echosounder object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.echosounder.html","id":"bugs","dir":"Reference","previous_headings":"","what":"Bugs","title":"Read an echosounder File — read.echosounder","text":"amplitude information (counts) determined.  future version function may provide conversion dB, etc.  handling dual-beam split-beam files limited.  dual-beam cse, wide beam signal processed (think ... narrow beam, actually, given confusing endian tricks played).  split-beam case, amplitude read, x-axis y-axis angle data ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.echosounder.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an echosounder File — read.echosounder","text":"Various echosounder instruments provided BioSonics described company website, https://www.biosonicsinc.com/.  document listed reference 1 provided author function November 2011, suggests data format changed since July 2010. Biosonics, 2010.  DT4 Data File Format Specification.  BioSonics Advanced Digital Hydroacoustics. July, 2010.  SOFTWARE ENGINEERING LIBRARY REPORT BS&E-2004-07-0009-2.0.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.echosounder.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an echosounder File — read.echosounder","text":"Dan Kelley, help Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/read.g1sst.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a g1sst File — read.g1sst","title":"Read a g1sst File — read.g1sst","text":"Read G1SST file NetCDF format provided ERDDAP server (see reference 1).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.g1sst.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a g1sst File — read.g1sst","text":"","code":"read.g1sst(file, encoding = NA)"},{"path":"https://dankelley.github.io/oce/reference/read.g1sst.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a g1sst File — read.g1sst","text":"file character value containing name NetCDF file containing G1SST data. encoding ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.g1sst.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a g1sst File — read.g1sst","text":"g1sst object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.g1sst.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a g1sst File — read.g1sst","text":"noted documentation g1sst class, one must aware incorporation model simulations g1sst product. example, code presented might lead one believe mapped field represents observations, whereas fact can verified consulting reference 2 (clicking unclicking radio button show just data) field mostly derives simulation.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.g1sst.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Read a g1sst File — read.g1sst","text":"","code":"# Construct query, making it easier to understand and modify. day <- \"2016-01-02\" lon0 <- -66.5 lon1 <- -64.0 lat0 <- 44 lat1 <- 46 source <- paste(\"https://coastwatch.pfeg.noaa.gov/erddap/griddap/\",     \"jplG1SST.nc?\",     \"SST     \"     \"     \" if (!length(list.files(pattern=\"^a.nc$\")))     download.file(source, \"a.nc\") d <- read.g1sst(\"a.nc\") plot(d, \"SST\", col=oceColorsTemperature) if (requireNamespace(\"ocedata\", quietly=TRUE)) {     data(coastlineWorldFine, package=\"ocedata\")     lines(coastlineWorldFine[[\"longitude\"]],coastlineWorldFine[[\"latitude\"]]) }"},{"path":"https://dankelley.github.io/oce/reference/read.g1sst.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a g1sst File — read.g1sst","text":"ERDDAP Portal https://coastwatch.pfeg.noaa.gov/erddap/ JPO OurOcean Portal https://ourocean.jpl.nasa.gov/SST/","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.g1sst.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a g1sst File — read.g1sst","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.gps.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a gps File — read.gps","title":"Read a gps File — read.gps","text":"Reads GPX format files simply finding longitudes latitudes; words, information separate tracks, waypoints, etc., lost.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.gps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a gps File — read.gps","text":"","code":"read.gps(   file,   type = NULL,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.gps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a gps File — read.gps","text":"file name file containing gps data. type type file, inferred examination data supplied.  present version, choice type \"gpx\". encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug set TRUE print information header, etc. processingLog ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.gps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a gps File — read.gps","text":"gps object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.gps.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a gps File — read.gps","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.index.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a NOAA Ocean Index File — read.index","title":"Read a NOAA Ocean Index File — read.index","text":"Read ocean index file, format used NOAA.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.index.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a NOAA Ocean Index File — read.index","text":"","code":"read.index(   file,   format,   missingValue,   tz = getOption(\"oceTz\"),   encoding = \"latin1\",   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/read.index.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a NOAA Ocean Index File — read.index","text":"file connection character string giving name file load.  May URL. format optional character string indicating format type. supplied, guess made, based examination first lines file. supplied, possibilities \"noaa\" \"ucar\". See “Details”. missingValue supplied, numerical value indicates invalid data. datasets, -99.9, values may used. missingValue supplied, data value equal less -99 considered invalid. Set missingValue TRUE turn processing missing values. tz character string indicating time zone assumed data. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug flag turns debugging, ignored present version function.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.index.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a NOAA Ocean Index File — read.index","text":"data frame containing t, POSIX time, index, numerical index.  times set 15th day month, guess may need changed indicated documentation (yet located).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.index.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a NOAA Ocean Index File — read.index","text":"Reads text-format index file, either two formats. format missing, first line file examined. line contains 2 (whitespace-separated) tokens, \"noaa\" format assumed. contains 13 tokens, \"ucar\" format assumed. Otherwise, error reported. \"noaa\" format, two tokens first line taken start year end year, respectively. second line must contain single token, missing value. lines must contain 12 tokens, values January, February, etc. \"ucar\" format, data lines must contain 13 tokens, first year, following 12 values January, February, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.index.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Read a NOAA Ocean Index File — read.index","text":"","code":"library(oce) par(mfrow=c(2, 1)) # 1. AO, Arctic oscillation #  Note that data used to be at https://www.esrl.noaa.gov/psd/data/correlation/ao.data ao <- read.index(\"https://psl.noaa.gov/data/correlation/ao.data\") aorecent <- subset(ao, t > as.POSIXct(\"2000-01-01\")) oce.plot.ts(aorecent$t, aorecent$index) # 2. SOI, probably more up-to-date then data(soi, package=\"ocedata\") soi <- read.index(\"https://www.cgd.ucar.edu/cas/catalog/climind/SOI.signal.ascii\") soirecent <- subset(soi, t > as.POSIXct(\"2000-01-01\")) oce.plot.ts(soirecent$t, soirecent$index)"},{"path":"https://dankelley.github.io/oce/reference/read.index.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a NOAA Ocean Index File — read.index","text":"See https://psl.noaa.gov/data/climateindices/list/ list indices.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.index.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a NOAA Ocean Index File — read.index","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.landsat.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a landsat File Directory — read.landsat","title":"Read a landsat File Directory — read.landsat","text":"Read landsat data file, producing object landsat. actual reading done tiff::readTIFF() tiff package, package must installed read.landsat work.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.landsat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a landsat File Directory — read.landsat","text":"","code":"read.landsat(   file,   band = \"all\",   emissivity = 0.984,   decimate,   encoding = \"latin1\",   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/read.landsat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a landsat File Directory — read.landsat","text":"file connection character string giving name file load.  directory name containing data. band bands read, default bands.  Use band=NULL skip reading bands, instead reading image metadata, often enough check image interest given study. See “Details” names bands, pseudo-bands, computed actual data. emissivity Value emissivity surface, stored emissivity metadata slot resultant object. used calculation surface temperature, explained discussion accessor functions landsat. default value Konda et al.  (1994). authors suggest uncertainty 0.04, wider range values can found literature.  value metadata$emissivity easy alter, either single value matrix, yielding flexibility calculation. decimate optional positive integer indicating degree data subsampled reading storage. Setting 10 can speed reading factor 3 , higher values diminishing effect.  exploratory work, useful set decimate=10, plot image determine subregion interest, use landsatTrim() trim image. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get .","code":""},{"path":"https://dankelley.github.io/oce/reference/read.landsat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a landsat File Directory — read.landsat","text":"landsat object, conventional Oce slots metadata, data processingLog.  metadata mainly intended use Oce functions, generality also contains entry named header represents full image header list (names made lower-case).  data slot holds matrices data requested bands, users may add extra matrices desired, e.g. store calculated quantities.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.landsat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a landsat File Directory — read.landsat","text":"Landsat data provided directories contain TIFF files header information, read.landsat relies strict convention names files directories.  file names found inspection data, assumption similar patterns hold datasets given satellite. brittle approach born mind read.landsat fails given dataset. Landsat 8, 11 bands, names \"aerosol\" (band 1), \"blue\" (band 2), \"green\" (band 3), \"red\" (band 4), \"nir\" (band 5), \"swir1\" (band 6), \"swir2\" (band 7), \"panchromatic\" (band 8), \"cirrus\" (band 9), \"tirs1\" (band 10), \"tirs2\" (band 11). addition , setting band=\"terralook\" may used abbreviation band=c(\"red\", \"green\", \"nir\"). Landsat 7, 8 bands, names \"blue\" (band 1), \"green\" (band 2), \"red\" (band 3), \"nir\" (band 4), \"swir1\" (band 5), \"tir1\" (band 6A), \"tir2\" (band 6B), \"swir2\" (band 7) \"panchromatic\" (band 8). Landsat 4 5, bands similar Landsat 7 without \"panchromatic\" (band 8).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.landsat.html","id":"storage-requirements","dir":"Reference","previous_headings":"","what":"Storage requirements","title":"Read a landsat File Directory — read.landsat","text":"Landsat data files (directories, really) large, accounting approximately 1 gigabyte .  storage Oce object similar (see landsat).  R, many operations involving copying data, dealing full-scale landsat images can overwhelm computers storage 8GB.  reason, typical read just bands interest.  also helpful use landsatTrim() trim data geographical range, use decimate() get coarse view domain, especially early analysis.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.landsat.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a landsat File Directory — read.landsat","text":"Konda, M. Imasato N., Nishi, K., T. Toda, 1994.  Measurement Sea Surface Emissivity.  Journal Oceanography, 50, 17:30. doi:10.1007/BF02233853","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.landsat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a landsat File Directory — read.landsat","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.lisst.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a lisst File — read.lisst","title":"Read a lisst File — read.lisst","text":"Read LISST data file. file contain 42 columns, header.  fewer 42 columns, error results.  , first 42 used.  Note read.oce() can recognize LISST files name ending \".asc\" 42 elements first line.  Even , preferred use present function, gives opportunity specify year timezone, times can calculated properly.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.lisst.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a lisst File — read.lisst","text":"","code":"read.lisst(   file,   year = 0,   tz = \"UTC\",   longitude = NA,   latitude = NA,   encoding = \"latin1\" )"},{"path":"https://dankelley.github.io/oce/reference/read.lisst.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a lisst File — read.lisst","text":"file connection character string giving name file load. year year measurement series made. tz time zone. longitude longitude observation (stored metadata) latitude latitude observation (stored metadata) encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.lisst.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a lisst File — read.lisst","text":"x lisst object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.lisst.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a lisst File — read.lisst","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.lobo.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a lobo File — read.lobo","title":"Read a lobo File — read.lobo","text":"Read data file created LOBO instrument.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.lobo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a lobo File — read.lobo","text":"","code":"read.lobo(file, cols = 7, encoding = \"latin1\", processingLog)"},{"path":"https://dankelley.github.io/oce/reference/read.lobo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a lobo File — read.lobo","text":"file connection character string giving name file load. cols number columns dataset. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.)","code":""},{"path":"https://dankelley.github.io/oce/reference/read.lobo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a lobo File — read.lobo","text":"lobo object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.lobo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a lobo File — read.lobo","text":"version read.lobo really quite crude, developed mainly “predict Spring bloom” contest Dalhousie University.  particular, function assumes data columns exactly specified Examples section; reorder columns add new ones, function unlikely work correctly. Furthermore, noted file format inferred simply downloading files; supplier makes claims format fixed time. also worth noting read.oce() equivalent read.lobo, file format recognizable header.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.lobo.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Read a lobo File — read.lobo","text":"","code":"library(oce) uri <- paste(\"http://lobo.satlantic.com/cgi-bin/nph-data.cgi?\",     \"min_date=20070220&max_date=20070305\",     \"&x=date&\",     \"y=current_across1,current_along1,nitrate,fluorescence,salinity,temperature&\",     \"data_format=text\", sep=\"\") lobo <- read.lobo(uri)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.lobo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a lobo File — read.lobo","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.met.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a met File — read.met","title":"Read a met File — read.met","text":"Reads meteorological file formats used Environment Canada (see reference 1).  Since agency publish data formats, function adjusted every years, user finds format changed. Caution: March 2022, function fails Windows machines, reasons seem related handling file encoding system encoding. Adjusting encoding parameter function might help.  , try reading data read.csv() using .met() create met object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.met.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a met File — read.met","text":"","code":"read.met(   file,   type = NULL,   skip = NULL,   encoding = \"latin1\",   tz = getOption(\"oceTz\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/read.met.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a met File — read.met","text":"file character string naming file holds met data. type NULL, default, attempt made infer type file contents. fails, necessary user provide value type argument.  permitted choices : () \"csv\" \"csv1\" old CSV format longer provided October 2019, (b) \"csv2\" CSV format noticed Environment Canada website October 2019 (note paired metadata file ignored), (c) \"csv3\" CSV format noticed Environment Canada website January 2020, (d) \"xml2\" XML format noticed Environment Canada website October 2019. skip integer giving number header lines precede data.  ignored unless type \"csv\" \"csv1\", case non-NULL value skip taken number lines preceding columnar data. Specifying skip usually needed read.met() find line starting \"Date/Time\" (similar string). encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. tz timezone assumed time data.  defaults getOption(\"oceTz\"), likely wrong.  scientific context, UTC typically used oceanographic measurement, makes sense set tz=\"UTC\".  Note data files contain timezone information, instead giving data Local Standard Time (LST).  Since LST differs city city, users must make corrections time, shown “Examples”, use data Halifax Nova Scotia, LST UTC-4. debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get .","code":""},{"path":"https://dankelley.github.io/oce/reference/read.met.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a met File — read.met","text":"met object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.met.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Read a met File — read.met","text":"","code":"# Example 1: \"csv1\" Environment Canada format (found to be obsolete as of Oct 2019) csv1 <- read.met(system.file(\"extdata\", \"test_met_vsn1.csv\", package=\"oce\")) csv1 <- oceSetData(csv1, \"time\", csv1[[\"time\"]]+4*3600,     note=\"add 4h to local time to get UTC time\")  # Example 2: \"csv2\" Environment Canada format (found to be obsolete as of Jan 2022) csv2 <- read.met(system.file(\"extdata\", \"test_met_vsn2.csv\", package=\"oce\")) csv2 <- oceSetData(csv2, \"time\", csv2[[\"time\"]]+4*3600,     note=\"add 4h to local time to get UTC time\")  # Example 3: \"csv3\" Environment Canada format. Note timezone correction csv3 <- read.met(system.file(\"extdata\", \"test_met_vsn3.csv\", package=\"oce\")) csv3 <- oceSetData(csv3, \"time\", csv3[[\"time\"]]+4*3600,     note=\"add 4h to local time to get UTC time\")  # Example 4: \"xml2\" format. (Uncertain timezone, so not corrected.) if (requireNamespace(\"XML\", quietly=TRUE))     xml2 <- read.met(system.file(\"extdata\", \"test_met_xml2.xml\", package=\"oce\"))  # Example 5: download and plot library(oce) # Recreate data(met) and plot u(t) and v(t) metFile <- download.met(id=6358, year=2003, month=9, destdir=\".\") met <- read.met(metFile) met <- oceSetData(met, \"time\", met[[\"time\"]]+4*3600,     note=\"add 4h to local time to get UTC time\") plot(met)"},{"path":"https://dankelley.github.io/oce/reference/read.met.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a met File — read.met","text":"Environment Canada website Historical Climate Data https://climate.weather.gc.ca/index_e.html","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.met.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a met File — read.met","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.netcdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a NetCDF File — read.netcdf","title":"Read a NetCDF File — read.netcdf","text":"Read contents NetCDF file, saving information basic oce object.  Since NetCDF files can hold manner data, read.netcdf() might used first step construction another object specialized class, perhaps ctd, topo, etc.  explained “Details”, renamer argument can facilitate work.  work required move flags data slot result metadata slot, illustrated Example 3.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.netcdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a NetCDF File — read.netcdf","text":"","code":"read.netcdf(   file,   ...,   encoding = NA,   renamer = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/read.netcdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a NetCDF File — read.netcdf","text":"file character value specifying name NetCDF file. ... ignored encoding ignored. renamer function used rename variables read file, NULL (default) avoid renaming.  See “Details”. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.netcdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a NetCDF File — read.netcdf","text":"oce object var elements NetCDF file stored data slot. See “Examples” hints renaming elements, moving metadata slot.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.netcdf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a NetCDF File — read.netcdf","text":"default, names data variables changed data file.  can confusing users unfamiliar naming scheme used particular file, read.netcdf() parameter named renamer user can provide translation key go names NetCDF file standard oce names (like salinity).  See “Examples” see works, particular file follows NERC/BODC convention naming variables. Unlike specialized functions read.ctd.sbe(), read.netcdf() try associate data-quality flags corresponding data items. , files examined author, clear pattern names.  example, test file referred “Examples” section (supplied package) three variables relate temperature, namely \"TEMPS901\", \"TEMPP901\", \"TEMPPR01\".  Given common naming conventions, quality flag variable normally constructed prepending letter \"Q\" name another variable.  Although names dataset, something called \"QTEMP_01\" one might guess temperature-quality flag.  Based (similar) assumptions, Example 3 shows move data-quality variables data slot returned object metadata slot, oce expects find , processing data-quality flags. example file, data fields contain strings evidently provide calibration information sensors.  Example 3 shows move things data slot metadata slot. Readers might wonder renaming moving material data slot metadata slot done read.netcdf() . answer things apply files type dealt example.  NetCDF format can hold wide variety information, basic behaviour read.netcdf() just read data items (things called var functions ncdf4 package, read.netcdf() uses read file) store data slot.  cases, simply user decide information. Finally, noted read.netcdf() tries get common metadata elements global attributes NetCDF file. include Longitude, Latitude, Ship Cruise, renamed lower-case stored metadata slot, accordance oce convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.netcdf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a NetCDF File — read.netcdf","text":"Data variable vocabulary used NERC/BODC. http://vocab.nerc.ac.uk/collection/P01/current/ CIOOS Atlantic ERDDAP server entry Bedford Institute measurements waters Maritime Canada. https://cioosatlantic.ca/erddap/files/bio_maritimes_region_ecosystem_survey_ctd/ (Link tested 2024-09-21.)","code":""},{"path":"https://dankelley.github.io/oce/reference/read.netcdf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a NetCDF File — read.netcdf","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.netcdf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read a NetCDF File — read.netcdf","text":"","code":"if (FALSE) { # \\dontrun{ # Download the file.  (This may break if the server changes.) file <- tempfile(fileext = \".nc\") url <- paste0(     \"https://cioosatlantic.ca/erddap/files/\",     \"bio_maritimes_region_ecosystem_survey_ctd/\",     \"Maritimes%20Region%20Ecosystem%20Survey%20Summer/\",     \"2023/CTD_CAR2023011_001_496780_DN.ODF.nc\" ) download.file(url, file)  # Example 1: read without translating names d <- read.netcdf(file) summary(d)  # Example 2: as Example 1, but translate (some) names d <- read.netcdf(file, renamer = bodcNames2oceNames) summary(d)  # Example 3: as Example 2, but handle some flags that were # noticed in this particular file.  See Details for more # notes on variable names.  Note that the following code # only deals with the first instance of a variable, e.g. # temperature, and not temperature2 or temperature3. # (This is of little consequence, since all 3 of the temperatures # are identical.) d <- read.netcdf(file, renamer = bodcNames2oceNames) # Looking within the NetCDF file indicates that the built-in # scheme for DFO files is appropriate here. d <- initializeFlagScheme(d, name = \"DFO\") # Move some data elements to the `metadata@flags` list, # so they can be used for flag-handling operations. Some # guesses had to be made on the name mapping (see Details). flags <- list(     QALTB_01 = \"heightAboveBottom\",     QCPHLPR01 = \"cholorophyll-a\",     QCNDC_01 = \"conductivity\",     QDOXY_01 = \"oxygen\",     QOXYV_01 = \"oxygenVoltage\",     QPOTM_01 = \"theta\",     QPRES_01 = \"pressure\",     QPSAL_01 = \"salinity\",     QPSAR_01 = \"downwellingIrradiance\",     QSIGP_01 = \"sigmaTheta\",     QTEMP_01 = \"temperature\" ) for (i in seq_along(flags)) {     varName <- flags[[i]]     flagName <- names(flags)[i]     # cat(\"fileName=\", varName, \", flagName=\", flagName, \"\\n\", sep=\"\")     d@metadata$flags[[varName]] <- d[[flagName]] # move     d@data[[flagName]] <- NULL # delete original } # For this group of files, it appears that sensor metadata are # stored with particular names, e.g. \"TemperatureSensor\". The # following moves these from the data slot to the metadata slot. dataNames <- names(d@data) for (sensorName in dataNames[grep(\"Sensor$\", dataNames)]) {     d@metadata[[sensorName]] <- d@data[[sensorName]]     d@data[[sensorName]] <- NULL } summary(d) # Display information about the temperator sensor cat(\"Temperature Sensor\\n\") if (require(\"jsonlite\")) {     str(jsonlite::fromJSON(d[[\"TemperatureSensor\"]])) }  # Finally, remove the downloaded file, according to CRAN # policy regarding downloads in documentation examples. file.remove(file) } # }"},{"path":"https://dankelley.github.io/oce/reference/read.oce.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an Oceanographic Data File — read.oce","title":"Read an Oceanographic Data File — read.oce","text":"Read oceanographic data file, auto-discovering file type first line file. function tries infer file type first line, using oceMagic().  can discovered, instrument-specific file reading function called, file additional arguments supplied.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.oce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an Oceanographic Data File — read.oce","text":"","code":"read.oce(file, ..., encoding = \"latin1\")"},{"path":"https://dankelley.github.io/oce/reference/read.oce.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an Oceanographic Data File — read.oce","text":"file connection character string giving name file load. ... arguments handed whichever instrument-specific reading function selected, based header. encoding character string giving file encoding.  defaults \"latin1\", seems work files available authors, aware different setting may required files contain unusual accents characters.  (Try \"UTF-8\" default produces errors.) Note encoding ignored binary files, also text-based files, well.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.oce.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an Oceanographic Data File — read.oce","text":"oce object specialized data type, e.g. ctd, data file contains ctd data.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.oce.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an Oceanographic Data File — read.oce","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.oce.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an Oceanographic Data File — read.oce","text":"","code":"library(oce) x <- read.oce(system.file(\"extdata\", \"ctd.cnv.gz\", package = \"oce\")) #> Warning: startTime (1903-10-15 11:38:38) is < 1950, suggesting a turn-of-the-century problem in this cnv file #> Warning: this CNV file has temperature in the IPTS-68 scale, and this is stored in object, but note  that [[\"temperature\"]] and the sw* functions convert the numbers to ITS-90 values plot(x) # summary with TS and profiles  plotTS(x) # just the TS"},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an odf File — read.odf","title":"Read an odf File — read.odf","text":"ODF (Ocean Data Format) format developed Bedford Institute Oceanography also used Canadian Department Fisheries Oceans (DFO) facilities (see references 1 2). can hold various types time-series data, includes variety instrument types. Thus, read.odf() used read.ctd.odf CTD data, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an odf File — read.odf","text":"","code":"read.odf(   file,   columns = NULL,   header = \"list\",   exclude = NULL,   encoding = \"latin1\",   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an odf File — read.odf","text":"file file containing data. columns optional list can used convert unrecognized data names resultant variable names.  example, columns=list(salinity=list(name=\"salt\", unit=list(unit=expression(), scale=\"PSS-78\")) states short-name \"salt\" represents salinity, unit indicated. passed cnvName2oceName() ODFNames2oceNames(), appropriate, takes precedence lookup table function. header indication whether, , store entire ODF file header metadata slot returned object. three choices header argument. (1) NULL, ODF header stored metadata slot (although contents ). (2) \"character\", header stored within metadata vector named header, comprising character string line header within ODF file. (3) \"list\", metadata slot returned object contain list named header lists entries. (sub-lists form key-value pairs.) naming list entries patterned ODF header, except unduplicateNames() used transform repeated names adding numerical suffices. Note: June 6, 2019, default value header changed NULL \"list\"; addition, resultant list made contain every single item ODF header, unduplicateNames() used append integers distinguish repeated names ODF format. exclude either character value holding regular expression used grep() remove lines header processing, NULL (default), meaning exclude lines.  purpose argument solve problems files, can thousands lines indicate details may little value processing.  example, files thousands lines excluded using exclude=\"PROCESS='Nulled .* value\" function call. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an odf File — read.odf","text":"oce object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an odf File — read.odf","text":"Note elements metadata particular ODF objects, e.g. depthMin, depthMax sounding, inferred ODF items named MIN_DEPTH, MAX_DEPTH SOUNDING, respectively. addition, common metadata item waterDepth, used ctd objects refer total water depth, set sounding finite, maxDepth otherwise. function ODFNames2oceNames() used translate data names ODF file standard oce names.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":"metadata-conventions","dir":"Reference","previous_headings":"","what":"Metadata conventions","title":"Read an odf File — read.odf","text":"metadata items may specific certain instruments, certain research groups. can important analysts aware conventions used datasets study. example, June 2018, adp objects created Bedford Institute Oceanography may metadata item named depthOffBottom (called DEPTH_OFF_BOTTOM ODF files), typically present ctd files. item illustrates renaming convention, CAMEL_CASE used ODF files snakeCase used oce. Bearing conversion mind, users find difficult understand meaning items read.odf() stores within metadata slot. Users bear mind whole ODF header saved list calling function header=\"list\", e.g. str(rval[[\"header\"]]) View(rval[[\"header\"]]) can used isolate information interest (bear mind suffices used disambiguate sibling items identical name ODF header).","code":""},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":"handling-of-temperature-scales","dir":"Reference","previous_headings":"","what":"Handling of temperature scales","title":"Read an odf File — read.odf","text":"read.odf() stores temperature data directly read file, might mean IPTS-68 scale.  values used calculate seawater quantities, formulae generally based ITS90 temperatures. avoid problems, accessor function converts modern scale, e.g. x[[\"temperature\"]] yields temperature ITS90 scale, whether temperatures original file reported scale older IPTS-68 scale.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Read an odf File — read.odf","text":"Lacking detailed documentation ODF file format, read.odf() read.ctd.odf() functions crafted based inspection data files, guesses made. PARAMETER_HEADER chunks describing quality-control flags case point.  contain NAME components refer PARAMETER_HEADER chunks hold measured data.  However, references always matched well data names, even match, cross-reference syntax used Bedford Institute Oceanography differs used l’Institut Maurice-Lamontagne. simplify coding, assumed quality-control sequence applies data sequence immediately preceding .  (assumption made analysis systems.) also prudent pay attention units decoding, read.odf() handles calling unitFromString(). lookout incorrect temperature scales, sometimes reported nonstandard strings ODF files. Also, note may see warnings conductivity ratios, ODF files incorrectly suggest dimensions.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an odf File — read.odf","text":"sources describe ODF format, see documentation odf class.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an odf File — read.odf","text":"Dan Kelley, help Chantelle Layton","code":""},{"path":"https://dankelley.github.io/oce/reference/read.odf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an odf File — read.odf","text":"","code":"library(oce) # # 1. Read a CTD cast made on the Scotian Shelf. Note that the file's metadata # states that conductivity is in S/m, but it is really conductivity ratio, # so we must alter the unit before converting to a CTD object. Note that # read.odf() on this data file produces a warning suggesting that the user # repair the unit, using the method outlined here. odf <- read.odf(system.file(\"extdata\", \"CTD_BCD2014666_008_1_DN.ODF.gz\", package = \"oce\")) #> Warning: \"conductivity\" (code name \"CRAT_01\") is a conductivity ratio, which has no units, but the file lists \"s/m\" as a unit. Consult ?read.odf to see how to rectify this error. ctd <- as.ctd(odf) # so we can e.g. extract potential temperature ctd[[\"conductivityUnit\"]] <- list(unit = expression(), scale = \"\") # # 2. Make a CTD, and plot (with span to show NS) plot(ctd, span = 500)  # # 3. Highlight bad data on TS diagram. (Note that the eos # is specified, because we will extract practical-salinity and # UNESCO-defined potential temperatures for the added points.) plotTS(ctd, type = \"o\", eos = \"unesco\") # use a line to show loops bad <- ctd[[\"QCFlag\"]] != 0 points(ctd[[\"salinity\"]][bad], ctd[[\"theta\"]][bad], col = \"red\", pch = 20)"},{"path":"https://dankelley.github.io/oce/reference/read.rsk.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a rsk File — read.rsk","title":"Read a rsk File — read.rsk","text":"Read RBR rsk txt file, e.g. produced RBR logger, producing object class rsk.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.rsk.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a rsk File — read.rsk","text":"","code":"read.rsk(   file,   from = 1,   to,   by = 1,   type,   encoding = NA,   tz = getOption(\"oceTz\", default = \"UTC\"),   tzOffsetLocation,   patm = FALSE,   allTables = TRUE,   processingLog,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/read.rsk.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a rsk File — read.rsk","text":"file connection character string giving name RSK file load. Note file must character string, connections used case, instead handled database calls. indication first datum read.  can positive integer indicate sequence number, POSIX time first datum, character string can converted POSIX time.  (POSIX times, careful tz argument.) indication last datum read, format .  missing, data read end file. indication stride length use walking file.  integer, -1 samples skipped pair samples read.  string representing time interval, colon-separated format (HH:MM:SS MM:SS), interval divided sampling interval, get stride length. type optional file type, presently can rsk txt (text export RBR rsk hex file). argument provided, attempt made infer type file name contents. encoding ignored. tz timezone assumed time values stored data file.  Unless user set alternative value ~/.Rprofile file, default \"UTC\"; see “Altering oce Defaults” vignette use ~/.Rprofile file. tzOffsetLocation offset, hours, CTD clock clock controlling computer/tablet/phone (one used sampling). offset required relate location information controller hydrographic information CTD, using timestamps index (see \"note location information\" “Details”). user supplies value tzOffsetLocation, used. , attempt made infer item named UTCdelta might present within table named epochs file. value can inferred either two methods, tzOffsetLocation set zero. patm controls handling atmospheric pressure, important issue RBR instruments record absolute pressure; see “Details”. allTables logical value, TRUE default, indicating whether save non-empty tables database (pruned blob columns) metadata slot returned object. may useful detailed analysis. processingLog provided, action item stored log. typically provided internal calls; default provides better normal calls user. debug flag can set TRUE turn debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.rsk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a rsk File — read.rsk","text":"rsk object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.rsk.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a rsk File — read.rsk","text":"can read files produced several RBR instruments.  moment, five styles understood: (1) text file produced export RBR hex rsk file; (2) text file columns temperature pressure (sampling times indicated header); (3) text file four columns, date time day given first two columns, followed temperature, pressure; (4) text file five columns, depth water column given pressure; (5) SQLite-based database format. first four options provided mainly historical reasons, since RBR instruments date writing commonly use SQLite format, though first option common instruments produce hex file can read using Ruskin. Options 2-4 mostly obsolete, removed future versions. note location information. possible couple RBR CTD devices smart phones tablets (see RBR-global, 2020), location data latter stored output .rsk file. format seem documented RBR, read.rsk() attempts infer location nevertheless. procedure involves comparing tstamp (time-stamp) field hydrographic part dataset (database table named data) tstamp field geographical part dataset (table named geodata). (geodata entries filtered origin field equals \"auto\". seems align times shown \"LOCATION\" data RBR-provided viewing software.) connection two fields done approx(), adding tzOffsetLocation (units converted appropriately) time inferred geodata$tstamp field, account fact phones tablets may set local time. procedure succeeds, longitude latitude inserted metadata slot return value, form vectors length pressure data slot. note conductivity. RBR devices record conductivity mS/cm, value stored object returned read.rsk. can converted conductivity ratio (many instruments report) dividing 42.914 (see Culkin Smith, 1980) necessary seawater-related function takes conductivity ratio argument (see “Examples”). note pressure. RBR devices tend record absolute pressure (.e. sea pressure plus atmospheric pressure), unlike oceanographic instruments record sea pressure (estimate thereof).  handling pressure controlled patm argument, three possibilities.  (1) patm FALSE (default), pressure read data file stored data slot return value, metadata item pressureType set string \"absolute\".  (2) patm TRUE, estimate atmospheric pressure subtracted raw data. data files SQLite format (.e.  *.rsk files), estimate value read file, “standard atmosphere” value 10.1325 dbar, file lacks information.  (3) patm numerical value (list values, one sampling time), `patm` subtracted raw data.  cases 2 3, additional column named `pressureOriginal` added `data` slot store value contained data file, `pressureType` set string starting `\"sea\"`.  See .ctd() details setup facilitates conversion rsk objects ctd objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.rsk.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a rsk File — read.rsk","text":"Culkin, F., Norman D. Smith, 1980. Determination concentration potassium chloride solution electrical conductivity, 15 C infinite frequency, standard seawater salinity 35.0000 ppt (Chlorinity 19.37394 ppt). IEEE Journal Oceanic Engineering, 5, pp 22-23. RBR-global.com, 2020. \"Ruskin User Guide.\" RBR, August 18, 2020. Revision RBR#0006105revH.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.rsk.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a rsk File — read.rsk","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/read.sealevel.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a sealevel File — read.sealevel","title":"Read a sealevel File — read.sealevel","text":"Read data file holding sea level data.  BUG: time vector assumes GMT, regardless GMT.offset value.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.sealevel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a sealevel File — read.sealevel","text":"","code":"read.sealevel(   file,   tz = getOption(\"oceTz\"),   encoding = \"latin1\",   processingLog,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/read.sealevel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a sealevel File — read.sealevel","text":"file connection character string giving name file load.  See Details types files recognized. tz time zone.  default value, oceTz, set UTC setup.  (time zone present file header, supercede value given .) encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. processingLog provided, action item stored log. (Typically provided internal calls; default provides better normal calls user.) debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.sealevel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a sealevel File — read.sealevel","text":"sealevel object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.sealevel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a sealevel File — read.sealevel","text":"function starts scanning first line file, determines whether file one two known formats: type 1, format used Hawaii archive centre, type 2, comma-separated-value format used Marine Environmental Data Service. file type inferred examination first line. contains string Station_Name file type 2. file neither formats, user might wish scan directly, use .sealevel() create sealevel object. Hawaii archive site http://ilikai.soest.hawaii.edu/uhslc/datai.html one time provided graphical interface downloading sealevel data Type 1, format described http://ilikai.soest.hawaii.edu/rqds/hourly.fmt (although link observed longer work, December 4, 2016). Examination data retrieved seems replacement Hawaii server (https://uhslc.soest.hawaii.edu/data/?rq) September 2019 indicated format changed called Type 3 read.sealevel. Web searches uncover documentation format, decoding scheme developed solely examination data files, means might correct. MEDS repository (http://www.isdm-gdsi.gc.ca/isdm-gdsi/index-eng.html) provides Type 2 data.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.sealevel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a sealevel File — read.sealevel","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.section.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a section File — read.section","title":"Read a section File — read.section","text":"Read file contains series ctd profiles make oceanographic section. exchange BOT comma-separated value format permitted time, formats may added later.  also noted parsing scheme developed inspection A03 data set (see Examples). may cause problems format universal. example, header must name salinity column \"CTDSAL\"; , salinity values read file.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.section.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a section File — read.section","text":"","code":"read.section(   file,   directory,   sectionId = \"\",   flags,   ship = \"\",   scientist = \"\",   institute = \"\",   missingValue = -999,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.section.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a section File — read.section","text":"file file containing set CTD observations.  present, exchange BOT format accepted (see “Details”). directory character string indicating name  directory contains set CTD files hold individual stations section. sectionId Optional string indicating name section.  provided, section ID determined examination file header. flags Ignored, deprecated (disallowed future version). ship Name ship carrying sampling. scientist Name chief scientist aboard ship. institute Name chief scientist's institute. missingValue Numerical value used indicate missing data. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. processingLog provided, action item stored log.  typically provided internal calls; default provides better normal calls user.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.section.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a section File — read.section","text":"section object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.section.html","id":"disambiguating-salinity","dir":"Reference","previous_headings":"","what":"Disambiguating salinity","title":"Read a section File — read.section","text":"WOCE datasets commonly column named CTDSAL salinity inferred CTD SALNTY (typo) salinity derived bottle data. one present data file, data called salinity data slot return value. However, present, CTDSAL stored salinity SALNTY stored salinityBottle.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.section.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read a section File — read.section","text":"Several repository sites provide section data. reasonably stable example https://cchdo.ucsd.edu, search \"WOCE bottle data\" turn sites, ceases exist. -called exchange BOT data format can processed read.section() time. Data names inferred column headings using woceNames2oceNames().","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.section.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a section File — read.section","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.topo.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a topo File — read.topo","title":"Read a topo File — read.topo","text":"Read file contains topographic data ETOPO dataset, provided NOAA website (see download.topo() good server files. (May, 2020, seem way download files NOAA website.)","code":""},{"path":"https://dankelley.github.io/oce/reference/read.topo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a topo File — read.topo","text":"","code":"read.topo(file, encoding = \"latin1\", debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/read.topo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a topo File — read.topo","text":"file Name file containing ETOPO-format dataset. Three types permitted; see “Details”. encoding ignored. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.topo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a topo File — read.topo","text":"topo object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.topo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read a topo File — read.topo","text":"three permitted file types follows. ascii type line 1 holds label (ignored), whitespace, number columns matrix (.e. number longitude values), line 2 similar latitude, line 3 similar westernmost longitude, line 4 similar southernmost latitude, line 5 similar cell size, lines hold grid. NetCDF format described NOAA \"GMT NetCDF\". NetCDF format described NOAA \"NetCDF\".","code":""},{"path":"https://dankelley.github.io/oce/reference/read.topo.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Read a topo File — read.topo","text":"","code":"library(oce) topoMaritimes <- read.topo(\"topoMaritimes.asc\") plot(topographyMaritimes)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.topo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read a topo File — read.topo","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.woa.html","id":null,"dir":"Reference","previous_headings":"","what":"Read a World Ocean Atlas NetCDF File — read.woa","title":"Read a World Ocean Atlas NetCDF File — read.woa","text":"Read World Ocean Atlas NetCDF File","code":""},{"path":"https://dankelley.github.io/oce/reference/read.woa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read a World Ocean Atlas NetCDF File — read.woa","text":"","code":"read.woa(file, name, positive = FALSE, encoding = NA)"},{"path":"https://dankelley.github.io/oce/reference/read.woa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read a World Ocean Atlas NetCDF File — read.woa","text":"file character string naming file name variable extract. provided, error message issued lists names data file. positive logical value indicating whether longitude converted range 0 360, name shuffled accordingly. set FALSE default, usual oce convention longitude range -180 +180. encoding ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.woa.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read a World Ocean Atlas NetCDF File — read.woa","text":"list containing vectors longitude, latitude, depth, array specified name. positive true, longitude converted range 0 360, array shuffled accordingly.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.woa.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Read a World Ocean Atlas NetCDF File — read.woa","text":"","code":"# Mean SST at 5-degree spatial resolution tmn <- read.woa(\"~/data/woa13/woa13_decav_t00_5dv2.nc\", \"t_mn\") imagep(tmn$longitude, tmn$latitude, tmn$t_mn[, , 1], zlab=\"SST\")"},{"path":"https://dankelley.github.io/oce/reference/read.xbt.edf.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an xbt File in Sippican Format — read.xbt.edf","title":"Read an xbt File in Sippican Format — read.xbt.edf","text":"function written inspection particular file, might wrong files; see “Details” note character translation.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.xbt.edf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an xbt File in Sippican Format — read.xbt.edf","text":"","code":"read.xbt.edf(   file,   longitude = NA,   latitude = NA,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.xbt.edf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an xbt File in Sippican Format — read.xbt.edf","text":"file connection character string giving name file load. longitude optional signed number indicating longitude degrees East. latitude optional signed number indicating latitude degrees North. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug flag turns debugging.  value indicates depth within call stack debugging applies. processingLog provided, action item stored log.  parameter typically provided internal calls; default provides better normal calls user.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.xbt.edf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an xbt File in Sippican Format — read.xbt.edf","text":"xbt object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.xbt.edf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read an xbt File in Sippican Format — read.xbt.edf","text":"header converted ASCII format prior storage metadata slot, e.g. degree sign original file become ? character header.  prevent problems submission oce CRAN system, produces NOTEs UTF-8 strings data (build machines, evidently depending locale machines).  character substitution odds oce philosophy leaving data intact, reverted, CRAN policy changes developers can find way otherwise silence NOTE.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.xbt.edf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an xbt File in Sippican Format — read.xbt.edf","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.xbt.edf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an xbt File in Sippican Format — read.xbt.edf","text":"","code":"library(oce) xbt <- read.oce(system.file(\"extdata\", \"xbt.edf\", package = \"oce\")) summary(xbt) #> xbt summary #> ----------- #>  #> * File source:        \"/private/var/folders/8b/l4h64m1j22v5pb7vj049ff140000gn/T/RtmpFbPNQ2/temp_libpath17ff52acea456/oce/extdata/xbt.edf\" #> * Serial Number:      0 #> * Longitude:          4.005 #> * Latitude:           -4 #> * Time:               2000-10-10 08:49:38 #> * Data Overview #>  #>                              Min.   Mean   Max.   Dim. NAs OriginalName     #>     depth [m]                5.4    7.0333 8.7    6    0   \"Depth\"          #>     temperature [°C, ITS-90] 20.9   20.905 20.91  6    0   \"Temperature\"    #>     soundSpeed [m/s]         1575.3 1575.3 1575.4 6    0   \"Sound Velocity\" #>  #> * Processing Log #>  #>     - 2024-09-24 10:30:31 UTC: `create 'xbt' object` #>     - 2024-09-24 10:30:31 UTC: `read.xbt.edf(file = file, encoding = encoding)` plot(xbt)"},{"path":"https://dankelley.github.io/oce/reference/read.xbt.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an xbt file — read.xbt","title":"Read an xbt file — read.xbt","text":"Two file types handled: (1) \"sippican\" format, used Sippican XBT files, handled read.xbt.edf(), (2) \"noaa1\" format, handled read.xbt.noaa1(). first recognized read.oce(), second must called directly read.xbt.noaa1().","code":""},{"path":"https://dankelley.github.io/oce/reference/read.xbt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an xbt file — read.xbt","text":"","code":"read.xbt(   file,   type = \"sippican\",   longitude = NA,   latitude = NA,   encoding = \"latin1\",   debug = getOption(\"oceDebug\"),   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.xbt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an xbt file — read.xbt","text":"file connection character string giving name file load. type character string indicating type file, valid choices \"sippican\" \"noaa1\". longitude, latitude optional signed numbers indicating longitude degrees East latitude degrees North. values used type=\"sippican\", ignored type=\"noaa1\", files contain location information. encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. debug flag turns debugging.  value indicates depth within call stack debugging applies. processingLog provided, action item stored log.  parameter typically provided internal calls; default provides better normal calls user.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.xbt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an xbt file — read.xbt","text":"xbt object.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.xbt.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read an xbt file — read.xbt","text":"Sippican, Inc. \"Bathythermograph Data Acquisition System: Installation, Operation Maintenance Manual (P/N 308195, Rev. ),\" 2003. https://pages.uoregon.edu/drt/MGL0910_Science_Report/attachments/MK21_ISA_Manual_Rev_A.pdf.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.xbt.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an xbt file — read.xbt","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/read.xbt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read an xbt file — read.xbt","text":"","code":"library(oce) xbt <- read.oce(system.file(\"extdata\", \"xbt.edf\", package = \"oce\")) summary(xbt) #> xbt summary #> ----------- #>  #> * File source:        \"/private/var/folders/8b/l4h64m1j22v5pb7vj049ff140000gn/T/RtmpFbPNQ2/temp_libpath17ff52acea456/oce/extdata/xbt.edf\" #> * Serial Number:      0 #> * Longitude:          4.005 #> * Latitude:           -4 #> * Time:               2000-10-10 08:49:38 #> * Data Overview #>  #>                              Min.   Mean   Max.   Dim. NAs OriginalName     #>     depth [m]                5.4    7.0333 8.7    6    0   \"Depth\"          #>     temperature [°C, ITS-90] 20.9   20.905 20.91  6    0   \"Temperature\"    #>     soundSpeed [m/s]         1575.3 1575.3 1575.4 6    0   \"Sound Velocity\" #>  #> * Processing Log #>  #>     - 2024-09-24 10:30:31 UTC: `create 'xbt' object` #>     - 2024-09-24 10:30:31 UTC: `read.xbt.edf(file = file, encoding = encoding)` plot(xbt)"},{"path":"https://dankelley.github.io/oce/reference/read.xbt.noaa1.html","id":null,"dir":"Reference","previous_headings":"","what":"Read an xbt File in NOAA Format — read.xbt.noaa1","title":"Read an xbt File in NOAA Format — read.xbt.noaa1","text":"file format, described https://www.aoml.noaa.gov/phod/dhos/axbt.php, contains header line, followed data lines.  example, particular file site first three lines follows.   items header line (1) year-day (ignored ), (2) YYYYMMDD, (3) HHMMSS, (4) longitude, (5) latitude, (6) aircraft wing number, (7) project name, (8) AXBT channel (9) AXBT ID.  lines hold vertical coordinate metres, temperature temperature error; -9.99 missing-value code.  (formatting information extracted file named readme.axbt provided data.)","code":"181.589 20100709 140820  -85.336  25.290 N42RF GL10 14    2010-190-15:49:18   -0.0 27.52 -9.99   -1.5 27.52 -9.99"},{"path":"https://dankelley.github.io/oce/reference/read.xbt.noaa1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read an xbt File in NOAA Format — read.xbt.noaa1","text":"","code":"read.xbt.noaa1(   file,   debug = getOption(\"oceDebug\"),   missingValue = -9.99,   encoding = \"latin1\",   processingLog )"},{"path":"https://dankelley.github.io/oce/reference/read.xbt.noaa1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read an xbt File in NOAA Format — read.xbt.noaa1","text":"file character value naming file, file connection, containing data. debug flag turns debugging.  value indicates depth within call stack debugging applies. missingValue numerical value interpreted NA encoding character value indicates encoding used data file, textual.  default value functions \"latin1\", seems suitable files containing text written English French. processingLog provided, action item stored log.  parameter typically provided internal calls; default provides better normal calls user.","code":""},{"path":"https://dankelley.github.io/oce/reference/read.xbt.noaa1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read an xbt File in NOAA Format — read.xbt.noaa1","text":"xbt object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/read.xbt.noaa1.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read an xbt File in NOAA Format — read.xbt.noaa1","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/rescale.html","id":null,"dir":"Reference","previous_headings":"","what":"Rescale Values to lie in a Given Range — rescale","title":"Rescale Values to lie in a Given Range — rescale","text":"helpful e.g. developing color scale image plot.  necessary rlow less rhigh, fact reversing good way get reversed color scale plot.","code":""},{"path":"https://dankelley.github.io/oce/reference/rescale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rescale Values to lie in a Given Range — rescale","text":"","code":"rescale(x, xlow, xhigh, rlow = 0, rhigh = 1, clip = TRUE)"},{"path":"https://dankelley.github.io/oce/reference/rescale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rescale Values to lie in a Given Range — rescale","text":"x numeric vector. xlow x value correspond rlow.  given, calculated minimum value x xhigh x value correspond rhigh.  given, calculated maximum value x rlow value result corresponding x equal xlow. rhigh value result corresponding x equal xhigh. clip logical, set TRUE clip result range spanned rlow rhigh.","code":""},{"path":"https://dankelley.github.io/oce/reference/rescale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rescale Values to lie in a Given Range — rescale","text":"new vector, minimum lim[1] maximum lim[2].","code":""},{"path":"https://dankelley.github.io/oce/reference/rescale.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rescale Values to lie in a Given Range — rescale","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/rescale.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rescale Values to lie in a Given Range — rescale","text":"","code":"library(oce) # Fake tow-yow data t <- seq(0, 600, 5) x <- 0.5 * t z <- 50 * (-1 + sin(2 * pi * t / 360)) T <- 5 + 10 * exp(z / 100) palette <- oce.colorsViridis(100) zlim <- range(T) drawPalette(zlim = zlim, col = palette) plot(x, z,     type = \"p\", pch = 20, cex = 3,     col = palette[rescale(T, xlow = zlim[1], xhigh = zlim[2], rlow = 1, rhigh = 100)] )"},{"path":"https://dankelley.github.io/oce/reference/resizableLabel.html","id":null,"dir":"Reference","previous_headings":"","what":"Variable Names in Adjustable Sizes — resizableLabel","title":"Variable Names in Adjustable Sizes — resizableLabel","text":"Provide axis names adjustable sizes, e.g. using T instead Temperature latter unlikely fit axis. name also include units appropriate.  function intended mainly use within package, users rely behaviour unchangeable.","code":""},{"path":"https://dankelley.github.io/oce/reference/resizableLabel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Variable Names in Adjustable Sizes — resizableLabel","text":"","code":"resizableLabel(   item,   axis = \"x\",   sep,   unit = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/resizableLabel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Variable Names in Adjustable Sizes — resizableLabel","text":"item code label. matches partially matches known value (see “Details”), value associated unit returned.  , item returned, unaltered. See “Details” list known values, note partial matching. axis string indicating axis use; must x y. sep optional character string inserted unit parentheses brackets enclose . provided, getOption(\"oceUnitSep\", \" \") called get value sep. default, units enclosed square brackets; change parentheses, use options(oceUnitBracket=\"(\"), note setting last whole session. unit optional unit use. supplied, sensible unit used, depending item. , even supplied, unit ignored many item values make sense, e.g. \"oxygen ml/l\", \"Conductivity Ratio\" \"Absolute Salinity\". oce developers consider supplying value unit. debug optional debugging flag. Setting 0 turns debugging, setting 1 causes debugging information printed.","code":""},{"path":"https://dankelley.github.io/oce/reference/resizableLabel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Variable Names in Adjustable Sizes — resizableLabel","text":"character string expression, either long shorter format, use indicated axis present plot size.  Whether unit enclosed parentheses square brackets determined value getOption(\"oceUnitBracket\"), may \"[\", default, \"(\".  Whether spaces used unit delimiters controlled sep getOption(\"oceUnitSep\").","code":""},{"path":"https://dankelley.github.io/oce/reference/resizableLabel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Variable Names in Adjustable Sizes — resizableLabel","text":"Partial matches item value handled calling pmatch(). can convenient, item=\"tem\" item=\"temperature\" effect. However, can also confusing labels similar. example, 5 variants oxygen concentration. best unabbreviated values, especially non-interactive work. list known values : \"absolute salinity\", \"along-spine distance km\", \"along-track distance km\", \"C\", \"conductivity mS/cm\", \"conductivity S/m\", \"conservative temperature\", \"CT\", \"depth\", \"direction\", \"distance\", \"distance km\", \"eastward\", \"elevation\", \"fluorescence\", \"frequency cph\", \"heading\", \"latitude\", \"longitude\", \"N\", \"N2\", \"nitrate\", \"nitrite\", \"northward\", \"oxygen\", \"oxygen mL/L\", \"oxygen saturation\", \"oxygen umol/kg\", \"oxygen umol/L\", \"p\", \"phosphate\", \"pitch\", \"roll\", \"S\", \"SA\", \"sigma0\", \"sigma1\", \"sigma2\", \"sigma3\", \"sigma4\", \"sigmaTheta\", \"silicate\", \"sound speed\", \"spectral density m2/cph\", \"speed\", \"spice\", \"spiciness0\", \"spiciness1\", \"spiciness2\", \"T\", \"theta\", \"tritium\", \"u\", \"v\", \"w\", \"z\".","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/resizableLabel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Variable Names in Adjustable Sizes — resizableLabel","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/resizableLabel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Variable Names in Adjustable Sizes — resizableLabel","text":"","code":"# 1. A matchable item name resizableLabel(\"temp\") #> \"Temperature\" * \" [ \" * degree * \"C\" * \" ]\" # 2. Not a matchable item name resizableLabel(\"tempJUNK\") #> [1] \"tempJUNK\" # 3. A silly example, since ylab=expression(...) is shorter. degC <- c(-2, 30) degF <- 9 / 5 * degC + 32 plot(degC, degF,     xlab = resizableLabel(\"temp\"),     ylab = resizableLabel(\"temp\", unit = expression(degree * \"F\")),     xaxs = \"i\", type = \"l\" ) grid()"},{"path":"https://dankelley.github.io/oce/reference/retime.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjust The Time Within an oce Object — retime","title":"Adjust The Time Within an oce Object — retime","text":"function compensates drifting instrument clocks, according \\(t'=t + + b (t-t0)\\), \\(t'\\) true time \\(t\\) time stored object.  single check time mismatch can described simple time offset, non-zero value , zero value b, arbitrary value t0.  Checking mismatch experiment yields sufficient information specify linear drift, via , b, t0.  Note t0 just convenience parameter, avoids user know \"zero time\" used R clarifies values two parameters.  makes sense t0 timezone time within x.","code":""},{"path":"https://dankelley.github.io/oce/reference/retime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjust The Time Within an oce Object — retime","text":"","code":"retime(x, a, b, t0, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/retime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjust The Time Within an oce Object — retime","text":"x oce object. intercept (seconds) linear model time drift (see “Details”). b slope (unitless) linear model time drift (unitless) (see “Details”). t0 reference time (POSIXct() format) used linear model time drift (see “Details”). debug flag , nonzero, turns debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/retime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adjust The Time Within an oce Object — retime","text":"new object, time data adjusted.","code":""},{"path":"https://dankelley.github.io/oce/reference/retime.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Adjust The Time Within an oce Object — retime","text":"returned object computed linear interpolation, using approx() rule=2, avoid NA values start end.  new time given formula . Note drift large enough, sampling rate changed.  good idea start object extended time range, , called, subset() can used trim desired time range.","code":""},{"path":"https://dankelley.github.io/oce/reference/retime.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Adjust The Time Within an oce Object — retime","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/retime.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Adjust The Time Within an oce Object — retime","text":"","code":"library(oce) data(adv) adv2 <- retime(adv, 0, 1e-4, as.POSIXct(\"2008-07-01 00:00:00\", tz = \"UTC\")) plot(adv[[\"time\"]], adv2[[\"time\"]] - adv[[\"time\"]], type = \"l\")"},{"path":"https://dankelley.github.io/oce/reference/rotateAboutZ.html","id":null,"dir":"Reference","previous_headings":"","what":"Rotate Velocity Components Within an oce Object — rotateAboutZ","title":"Rotate Velocity Components Within an oce Object — rotateAboutZ","text":"Alter horizontal components velocities adp, adv cm objects, applying rotation vertical axis.","code":""},{"path":"https://dankelley.github.io/oce/reference/rotateAboutZ.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rotate Velocity Components Within an oce Object — rotateAboutZ","text":"","code":"rotateAboutZ(x, angle)"},{"path":"https://dankelley.github.io/oce/reference/rotateAboutZ.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rotate Velocity Components Within an oce Object — rotateAboutZ","text":"x adp, adv, cm object. angle rotation angle z axis, degrees counterclockwise.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/rotateAboutZ.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rotate Velocity Components Within an oce Object — rotateAboutZ","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/rotateAboutZ.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rotate Velocity Components Within an oce Object — rotateAboutZ","text":"","code":"library(oce) par(mfcol = c(2, 3)) # adp (acoustic Doppler profiler) data(adp) plot(adp, which = \"uv\") mtext(\"adp\", side = 3, line = 0, adj = 1, cex = 0.7) adpRotated <- rotateAboutZ(adp, 30) plot(adpRotated, which = \"uv\") mtext(\"adp rotated 30 deg\", side = 3, line = 0, adj = 1, cex = 0.7) # adv (acoustic Doppler velocimeter) data(adv) plot(adv, which = \"uv\") mtext(\"adv\", side = 3, line = 0, adj = 1, cex = 0.7) advRotated <- rotateAboutZ(adv, 125) plot(advRotated, which = \"uv\") mtext(\"adv rotated 125 deg\", side = 3, line = 0, adj = 1, cex = 0.7) # cm (current meter) data(cm) plot(cm, which = \"uv\") mtext(\"cm\", side = 3, line = 0, adj = 1, cex = 0.7) cmRotated <- rotateAboutZ(cm, 30) plot(cmRotated, which = \"uv\") mtext(\"cm rotated 30 deg\", side = 3, line = 0, adj = 1, cex = 0.7)"},{"path":"https://dankelley.github.io/oce/reference/rsk-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Rsk Data — rsk-class","title":"Class to Store Rsk Data — rsk-class","text":"class stores Ruskin data, RBR (see reference 1).","code":""},{"path":"https://dankelley.github.io/oce/reference/rsk-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Class to Store Rsk Data — rsk-class","text":"rsk object may read read.rsk() created .rsk(), former method much preferred retains entirety information file. Plots can made plot,rsk-method(), summary,rsk-method() produces statistical summaries show produces overviews.   atmospheric pressure removed data, rskPatm() may provide guidance value, equal record-keeping sea.","code":""},{"path":"https://dankelley.github.io/oce/reference/rsk-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Rsk Data — rsk-class","text":"data oce objects, data slot rsk objects list containing main data object. metadata oce objects, metadata slot rsk objects list containing information data object . processingLog oce objects, processingLog slot rsk objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/rsk-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Rsk Data — rsk-class","text":"Although [[<- operator may permit modification contents rsk objects (see [[<-,rsk-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/rsk-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Rsk Data — rsk-class","text":"full contents data metadata slots rsk object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,rsk-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,rsk-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":"https://dankelley.github.io/oce/reference/rsk-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Class to Store Rsk Data — rsk-class","text":"RBR website (https://www.rbr-global.com/products)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/rsk-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Rsk Data — rsk-class","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/rsk.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample rsk Data — rsk","title":"Sample rsk Data — rsk","text":"sample rsk object derived Concerto CTD manufactured RBR Ltd.","code":""},{"path":"https://dankelley.github.io/oce/reference/rsk.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample rsk Data — rsk","text":"data obtained September 2015, west coast Greenland, Matt Rutherford Nicole Trenholm Ocean Research Project, collaboration RBR NASA Oceans Melting Greenland project. rsk object created read.rsk() allTables=FALSE, metadata added samples trimmed just downcast portion.","code":""},{"path":"https://dankelley.github.io/oce/reference/rsk.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sample rsk Data — rsk","text":"https://rbr-global.com/","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/rsk.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample rsk Data — rsk","text":"","code":"library(oce) data(rsk) # The object doesn't \"know\" it is CTD until told so plot(rsk)  plot(as.ctd(rsk))"},{"path":"https://dankelley.github.io/oce/reference/rsk2ctd.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a ctd Object from an rsk Object — rsk2ctd","title":"Create a ctd Object from an rsk Object — rsk2ctd","text":"new ctd object assembled contents rsk object. data metadata mostly unchanged, important exception: pressure item data slot may altered, rsk instruments measure total pressure, sea pressure; see “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/rsk2ctd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a ctd Object from an rsk Object — rsk2ctd","text":"","code":"rsk2ctd(   x,   pressureAtmospheric = 0,   longitude = NULL,   latitude = NULL,   ship = NULL,   cruise = NULL,   station = NULL,   deploymentType = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/rsk2ctd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a ctd Object from an rsk Object — rsk2ctd","text":"x rsk object. pressureAtmospheric numerical value (constant vector), subtracted pressure object storing return value. longitude numerical value longitude, degrees East. latitude numerical value latitude, degrees North. ship optional string containing ship observations made. cruise optional string containing cruise identifier. station optional string containing station identifier. deploymentType character string indicating type deployment (see .ctd()). debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/rsk2ctd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a ctd Object from an rsk Object — rsk2ctd","text":"pressureType element metadata rsk objects defines pressure type, controls pressure set returned object. object@metadata$pressureType \"absolute\" (NULL) resultant pressure adjusted make \"sea\" pressure. , value object@metadata$pressureAtmospheric inspected. present, subtracted pressure. missing, standard pressure (10.1325 dbar) subtracted. stage, pressure near zero ocean surface, additional adjustment might necessary, may indicated setting argument pressureAtmospheric non-zero value subtracted pressure.","code":""},{"path":"https://dankelley.github.io/oce/reference/rskPatm.html","id":null,"dir":"Reference","previous_headings":"","what":"Estimate Atmospheric Pressure in an rsk Object — rskPatm","title":"Estimate Atmospheric Pressure in an rsk Object — rskPatm","text":"Estimate atmospheric pressure rsk object.  Pressures must decibars work.  First, subset pressures created, range sap-dp sap+dp.  , sap=10.1325 dbar standard sealevel atmospheric pressure.  Within window, three measures central tendency calculated: median, mean, weighted mean weight given \\(exp(-2*((p-sap)/dp)^2)\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/rskPatm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Estimate Atmospheric Pressure in an rsk Object — rskPatm","text":"","code":"rskPatm(x, dp = 0.5)"},{"path":"https://dankelley.github.io/oce/reference/rskPatm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Estimate Atmospheric Pressure in an rsk Object — rskPatm","text":"x rsk object. dp Half-width pressure window examined (decibars).","code":""},{"path":"https://dankelley.github.io/oce/reference/rskPatm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Estimate Atmospheric Pressure in an rsk Object — rskPatm","text":"list four estimates: sap, median, mean, weighted mean.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/rskPatm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Estimate Atmospheric Pressure in an rsk Object — rskPatm","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/rskPatm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Estimate Atmospheric Pressure in an rsk Object — rskPatm","text":"","code":"library(oce) data(rsk) print(rskPatm(rsk)) #> [1] 10.1325 10.1325 10.1325 10.1325"},{"path":"https://dankelley.github.io/oce/reference/rskToc.html","id":null,"dir":"Reference","previous_headings":"","what":"Decode Table-of-Contents From an rsk File — rskToc","title":"Decode Table-of-Contents From an rsk File — rskToc","text":"Decode table--contents file rsk file, sort used researchers Dalhousie University.","code":""},{"path":"https://dankelley.github.io/oce/reference/rskToc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decode Table-of-Contents From an rsk File — rskToc","text":"","code":"rskToc(dir, from, to, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/rskToc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decode Table-of-Contents From an rsk File — rskToc","text":"dir name directory containing single table--contents file, .TBL end file name. optional POSIXct() time, indicating beginning data interval interest.  must timezone \"UTC\". optional POSIXct() time, indicating end data interval interest.  must timezone \"UTC\". debug optional integer control debugging, positive values indicating print information processing.","code":""},{"path":"https://dankelley.github.io/oce/reference/rskToc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decode Table-of-Contents From an rsk File — rskToc","text":"list two elements: filename, vector file names, startTime, vector POSIXct() times indicating (real) times first datum corresponding files.","code":""},{"path":"https://dankelley.github.io/oce/reference/rskToc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Decode Table-of-Contents From an rsk File — rskToc","text":"assumed .TBL file contains lines form \"File   \\day179\\SL08A179.023 started Fri Jun 27 22:00:00 2008\" first step parse lines get day hour information, .e.  179 023 line .  , recognizing common change names files, rest file-name information line ignored, instead new file name constructed based data files found directory.  (words, \"\\\\day179\\\\SL08A\" portion line replaced.)  file list complete, times put R format, (optionally) list trimmed time interval indicated .  important UTC time zone, time zone used decoding lines .TBL file.","code":""},{"path":"https://dankelley.github.io/oce/reference/rskToc.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Decode Table-of-Contents From an rsk File — rskToc","text":"","code":"file <- \"~/data/archive/sleiwex/2008/moorings/m05/adv/sontek_202h/raw\" table <- rskToc(file,     from=as.POSIXct(\"2008-07-01 00:00:00\", tz=\"UTC\"),     to=as.POSIXct(\"2008-07-01 12:00:00\", tz=\"UTC\")) print(table)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/rskToc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Decode Table-of-Contents From an rsk File — rskToc","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/runlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Running Linear Models — runlm","title":"Calculate Running Linear Models — runlm","text":"linear model calculated slope localized least-squares regression model y=y(x).  localization defined x difference point question, data distance exceeding L/2 ignored.  boxcar window, data within local domain treated equally, hanning window, raised-cosine weighting function used; latter produces smoother derivatives, can useful noisy data.  function based internal calculation, lm().","code":""},{"path":"https://dankelley.github.io/oce/reference/runlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Running Linear Models — runlm","text":"","code":"runlm(x, y, xout, window = c(\"hanning\", \"boxcar\"), L, deriv)"},{"path":"https://dankelley.github.io/oce/reference/runlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Running Linear Models — runlm","text":"x vector holding x values. y vector holding y values. xout optional vector x values derivative found.  provided, x used. window type weighting function used weight data within window; see “Details”. L width running window, x units.  provided, reasonable default used. deriv optional indicator desired return value; see “Examples”.","code":""},{"path":"https://dankelley.github.io/oce/reference/runlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Running Linear Models — runlm","text":"deriv specified, list containing vectors output values y y, derivative (dydx), along scalar length scale L.  deriv=0, vector values returned, deriv=1, vector derivatives returned.","code":""},{"path":"https://dankelley.github.io/oce/reference/runlm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate Running Linear Models — runlm","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/runlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate Running Linear Models — runlm","text":"","code":"library(oce)  # Case 1: smooth a noisy signal x <- 1:100 y <- 1 + x / 100 + sin(x / 5) yn <- y + rnorm(100, sd = 0.1) L <- 4 calc <- runlm(x, y, L = L) plot(x, y, type = \"l\", lwd = 7, col = \"gray\") points(x, yn, pch = 20, col = \"blue\") lines(x, calc$y, lwd = 2, col = \"red\")   # Case 2: square of buoyancy frequency data(ctd) par(mfrow = c(1, 1)) plot(ctd, which = \"N2\") rho <- swRho(ctd) z <- swZ(ctd) zz <- seq(min(z), max(z), 0.1) N2 <- -9.8 / mean(rho) * runlm(z, rho, zz, deriv = 1) lines(N2, -zz, col = \"red\") legend(\"bottomright\",     lwd = 2, bg = \"white\",     col = c(\"black\", \"red\"),     legend = c(\"swN2()\", \"using runlm()\") )"},{"path":"https://dankelley.github.io/oce/reference/satellite-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Satellite Data — satellite-class","title":"Class to Store Satellite Data — satellite-class","text":"class holds satellite data various types, including amsr g1sst.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/satellite-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Satellite Data — satellite-class","text":"Dan Kelley Chantelle Layton","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevel-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Sealevel Data — sealevel-class","title":"Class to Store Sealevel Data — sealevel-class","text":"class stores sealevel data, e.g. tide gauge.","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevel-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Sealevel Data — sealevel-class","text":"data oce objects, data slot sealevel objects list containing main data object. key items stored slot time elevation. metadata oce objects, metadata slot sealevel objects list containing information data object . example former might location sealevel measurement made, stored longitude latitude, latter might filename, name data source. processingLog oce objects, processingLog slot sealevel objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevel-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Sealevel Data — sealevel-class","text":"Although [[<- operator may permit modification contents sealevel objects (see [[<-,sealevel-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevel-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Sealevel Data — sealevel-class","text":"full contents data metadata slots sealevel object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,sealevel-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,sealevel-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sealevel-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Sealevel Data — sealevel-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevel.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample sealevel Data (Halifax Harbour) — sealevel","title":"Sample sealevel Data (Halifax Harbour) — sealevel","text":"sample sea-level dataset 2003 record Halifax Harbour Nova Scotia, Canada.  reasons mentioned data archive website, record ends 8th October.","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevel.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample sealevel Data (Halifax Harbour) — sealevel","text":"data created csv file downloaded reference 1. Note correction longitude sign, required data file indication western hemisphere.","code":"sealevel <- read.oce(\"490-01-JAN-2003_slev.csv\") sealevel <- oce.edit(sealevel, \"longitude\", -sealevel[[\"longitude\"]], reason=\"Fix longitude hemisphere\")"},{"path":"https://dankelley.github.io/oce/reference/sealevel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample sealevel Data (Halifax Harbour) — sealevel","text":"See predict.tidem() example reveals storm surge resulted Hurricane Juan, year.","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevel.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sample sealevel Data (Halifax Harbour) — sealevel","text":"Fisheries Oceans Canada http://www.meds-sdmm.dfo-mpo.gc.ca/isdm-gdsi/index-eng.html","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sealevel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sample sealevel Data (Halifax Harbour) — sealevel","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevelTuktoyaktuk.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample sealevel Data (Tuktoyaktuk) — sealevelTuktoyaktuk","title":"Sample sealevel Data (Tuktoyaktuk) — sealevelTuktoyaktuk","text":"sea-level dataset provided Appendix 7.2 Foreman (1977) also T_TIDE package (Pawlowicz et al., 2002). results measurements made 1975 Tuktoyaktuk, Northwest Territories, Canada.","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevelTuktoyaktuk.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample sealevel Data (Tuktoyaktuk) — sealevelTuktoyaktuk","text":"data based T_TIDE dataset, turn seems based Appendix 7.2 Foreman (1977).  Minor editing file format, sealevelTuktoyaktuk object created using .sealevel().","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevelTuktoyaktuk.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sample sealevel Data (Tuktoyaktuk) — sealevelTuktoyaktuk","text":"data set contains 1584 points, NA sea-level height. Although Foreman's Appendix 7.2 states times Mountain standard time, timezone set UTC present case, results similar provides Appendix 7.3.","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevelTuktoyaktuk.html","id":"historical-note","dir":"Reference","previous_headings":"","what":"Historical note","title":"Sample sealevel Data (Tuktoyaktuk) — sealevelTuktoyaktuk","text":"Jan 6, 2018, time dataset increased 7 hours. However, alteration removed date, make simpler comparison amplitude phase output results obtained Foreman (1977) Pawlowicz et al. (2002).","code":""},{"path":"https://dankelley.github.io/oce/reference/sealevelTuktoyaktuk.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sample sealevel Data (Tuktoyaktuk) — sealevelTuktoyaktuk","text":"Foreman, M. G. G., 1977.  Manual tidal heights analysis prediction.  Pacific Marine Science Report 77-10, Institute Ocean Sciences, Patricia Bay, Sidney, BC, 58pp. Pawlowicz, Rich, Bob Beardsley, Steve Lentz, 2002.  Classical tidal harmonic analysis including error estimates MATLAB using T_TIDE. Computers Geosciences, 28, 929-937.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/secondsToCtime.html","id":null,"dir":"Reference","previous_headings":"","what":"Express Time Interval as Colon-Separated String — secondsToCtime","title":"Express Time Interval as Colon-Separated String — secondsToCtime","text":"Convert time interval colon-separated string","code":""},{"path":"https://dankelley.github.io/oce/reference/secondsToCtime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Express Time Interval as Colon-Separated String — secondsToCtime","text":"","code":"secondsToCtime(sec)"},{"path":"https://dankelley.github.io/oce/reference/secondsToCtime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Express Time Interval as Colon-Separated String — secondsToCtime","text":"sec length time interval seconds.","code":""},{"path":"https://dankelley.github.io/oce/reference/secondsToCtime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Express Time Interval as Colon-Separated String — secondsToCtime","text":"string colon-separated time interval.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/secondsToCtime.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Express Time Interval as Colon-Separated String — secondsToCtime","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/secondsToCtime.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Express Time Interval as Colon-Separated String — secondsToCtime","text":"","code":"library(oce) cat(\"   10 s = \", secondsToCtime(10), \"\\n\", sep = \"\") #>    10 s = 00:00:10 cat(\"   61 s = \", secondsToCtime(61), \"\\n\", sep = \"\") #>    61 s = 00:01:01 cat(\"86400 s = \", secondsToCtime(86400), \"\\n\", sep = \"\") #> 86400 s = 24:00:00"},{"path":"https://dankelley.github.io/oce/reference/section-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Hydrographic Section Data — section-class","title":"Class to Store Hydrographic Section Data — section-class","text":"class stores data oceanographic section surveys.","code":""},{"path":"https://dankelley.github.io/oce/reference/section-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Class to Store Hydrographic Section Data — section-class","text":"Sections can read read.section() created read.section() created CTD objects using .section() adding ctd station existing section sectionAddStation(). Sections may sorted sectionSort(), subsetted subset,section-method(), smoothed sectionSmooth(), gridded sectionGrid().  \"spine\" may added section addSpine().  Sections may summarized summary,section-method() plotted plot,section-method(). sample dataset section() contains data along WOCE line A03.","code":""},{"path":"https://dankelley.github.io/oce/reference/section-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Hydrographic Section Data — section-class","text":"data oce objects, data slot section objects list containing main data object. metadata oce objects, metadata slot section objects list containing information data object . Examples common interest include stationId, longitude, latitude time. processingLog oce objects, processingLog slot section objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/section-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Hydrographic Section Data — section-class","text":"Although [[<- operator may permit modification contents section objects (see [[<-,section-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/section-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Hydrographic Section Data — section-class","text":"full contents data metadata slots section object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,section-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,section-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/section-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Hydrographic Section Data — section-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/section-class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Class to Store Hydrographic Section Data — section-class","text":"","code":"library(oce) data(section) plot(section[[\"station\", 1]])  pairs(cbind(z = -section[[\"pressure\"]], T = section[[\"temperature\"]], S = section[[\"salinity\"]]))  # T profiles for first few stations in section, at common scale par(mfrow = c(3, 3)) Tlim <- range(section[[\"temperature\"]]) ylim <- rev(range(section[[\"pressure\"]])) for (stn in section[[\"station\", 1:9]]) {     plotProfile(stn, xtype = \"potential temperature\", ylim = ylim, Tlim = Tlim) }"},{"path":"https://dankelley.github.io/oce/reference/section.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample section Data — section","title":"Sample section Data — section","text":"line A03 (ExpoCode 90CT40_1, nominal sampling date 1993-09-11). chief scientist Tereschenkov SOI, working aboard Russian ship Multanovsky, undertaking westward transect Mediterranean outflow region across North America, change heading last dozen stations run across nominal Gulf Stream axis. data flags follow \"WHP Bottle\"convention, set initializeFlagScheme,section-method() \"WHP bottle\".  convention used described link https://www.nodc.noaa.gov/woce/woce_v3/wocedata_1/whp/exchange/exchange_format_desc.htm found fail December 2020.","code":""},{"path":"https://dankelley.github.io/oce/reference/section.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample section Data — section","text":"","code":"data(section)"},{"path":"https://dankelley.github.io/oce/reference/section.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample section Data — section","text":"based WOCE file named a03_hy1.csv, downloaded https://cchdo.ucsd.edu/cruise/90CT40_1, 13 April 2015.","code":""},{"path":"https://dankelley.github.io/oce/reference/section.html","id":"speculation-on-a-timing-error","dir":"Reference","previous_headings":"","what":"Speculation on a timing error","title":"Sample section Data — section","text":"May 2022, discovered times dataset fully sequential, two spots.  might reporting error. Station 41 time listed 1993-10-03T00:06:00 leads time reversal. However, time actually day , time reversal vanish, inter-station timing 5 6 hours recovered. similar pattern seen station 45.  course, hypothesis incorrect recording difficult test, data taken thirty years ago.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/section.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample section Data — section","text":"","code":"library(oce) # Gulf Stream data(section) GS <- subset(section, 113 <= stationId & stationId <= 129) GSg <- sectionGrid(GS, p = seq(0, 5000, 100)) plot(GSg, span = 1500) # increase span to show more coastline"},{"path":"https://dankelley.github.io/oce/reference/sectionAddStation.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a ctd Profile to a section Object — sectionAddStation","title":"Add a ctd Profile to a section Object — sectionAddStation","text":"Add CTD profile existing section.","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionAddStation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a ctd Profile to a section Object — sectionAddStation","text":"","code":"sectionAddStation(section, station)"},{"path":"https://dankelley.github.io/oce/reference/sectionAddStation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a ctd Profile to a section Object — sectionAddStation","text":"section section station added. station ctd object holding data station added.","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionAddStation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add a ctd Profile to a section Object — sectionAddStation","text":"section object.","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionAddStation.html","id":"historical-note","dir":"Reference","previous_headings":"","what":"Historical note","title":"Add a ctd Profile to a section Object — sectionAddStation","text":"March 2015, operation carried + operator, time, syntax flagged development version R, changed present form.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sectionAddStation.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add a ctd Profile to a section Object — sectionAddStation","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionAddStation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a ctd Profile to a section Object — sectionAddStation","text":"","code":"library(oce) data(ctd) ctd2 <- ctd ctd2[[\"temperature\"]] <- ctd2[[\"temperature\"]] + 0.5 ctd2[[\"latitude\"]] <- ctd2[[\"latitude\"]] + 0.1 section <- as.section(c(\"ctd\", \"ctd2\")) ctd3 <- ctd ctd3[[\"temperature\"]] <- ctd[[\"temperature\"]] + 1 ctd3[[\"latitude\"]] <- ctd[[\"latitude\"]] + 0.1 ctd3[[\"station\"]] <- \"Stn 3\" sectionAddStation(section, ctd3) #> Unnamed section has 3 stations: #> Index    ID      Lon      Lat  Levels Depth #>     1 Stn 2  -63.644   44.684     181    NA #>     2 Stn 2  -63.644   44.784     181    NA #>     3 Stn 3  -63.644   44.784     181    NA"},{"path":"https://dankelley.github.io/oce/reference/sectionGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Grid a Section in Pressure Space — sectionGrid","title":"Grid a Section in Pressure Space — sectionGrid","text":"Grid section, interpolating fixed pressure levels.  \"approx\", \"boxcar\" \"lm\" methods described documentation ctdDecimate(), used processing.","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Grid a Section in Pressure Space — sectionGrid","text":"","code":"sectionGrid(   section,   p,   method = \"approx\",   trim = TRUE,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/sectionGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Grid a Section in Pressure Space — sectionGrid","text":"section section object containing section gridded. p Optional indication pressure levels interpolation done.  supplied, pressure levels calculated based typical spacing ctd profiles stored within section.  p=\"levitus\", pressures set Levitus atlas, given standardDepths(). p single numerical value, taken number subdivisions use call seq() range 0 maximum pressure section.  Finally, vector numerical values provided, perhaps constructed seq() standardDepths(5) (examples), used , trimming values exceed maximum pressure station data stored within section. method method use decimate data within stations; see ctdDecimate(), used decimation. trim Logical value indicating whether trim gridded pressures range data section. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. ... Optional arguments supplied ctdDecimate(), e.g. rule controls extrapolation beyond observed pressure range, case method equals \"approx\".","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Grid a Section in Pressure Space — sectionGrid","text":"section object contains stations pressure values match identically, flags set NA.","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionGrid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Grid a Section in Pressure Space — sectionGrid","text":"default \"approx\" method best bottle data, \"boxcar\" best ctd data, \"lm\" method probably slow recommend exploratory work, common trials variety \"p\" values. stations returned value flags names match corresponding stations original section, values flags set NA. recognizes makes sense grid flag values, merit initializing flag system, possible use later processing steps.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sectionGrid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Grid a Section in Pressure Space — sectionGrid","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Grid a Section in Pressure Space — sectionGrid","text":"","code":"# Gulf Stream library(oce) data(section) GS <- subset(section, 113 <= stationId & stationId <= 129) GSg <- sectionGrid(GS, p = seq(0, 5000, 100)) plot(GSg, which = \"temperature\")  ## Show effects of various depth schemes"},{"path":"https://dankelley.github.io/oce/reference/sectionSmooth.html","id":null,"dir":"Reference","previous_headings":"","what":"Smooth a Section — sectionSmooth","title":"Smooth a Section — sectionSmooth","text":"Smooth section, several ways, working either vertical direction vertical lateral directions.","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionSmooth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Smooth a Section — sectionSmooth","text":"","code":"sectionSmooth(   section,   method = \"spline\",   x,   xg,   yg,   xgl,   ygl,   xr,   yr,   df,   gamma = 0.5,   iterations = 2,   trim = 0,   pregrid = FALSE,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/sectionSmooth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Smooth a Section — sectionSmooth","text":"section section object containing section smoothed. method=\"spline\", pressure levels must match station section. method string function specifies method use; see “Details”. x Optional numerical vector, length number stations section, used gridding lateral direction. provided, defaults geodDist(section). xg, xgl ignored method=\"spline\" case, passed interpBarnes() method=\"barnes\", kriging functions method=\"kriging\", method , function. xg supplied, defines x component grid, default terms station distances, x, along track section. (Note grid xg trimmed range data x, otherwise impossible interpolate stations infer water depth, longitude, latitude, stored within stations returned section object.) Alternatively, xgl supplied, x grid established using seq(), span data xgl elements. neither supplied, output x grid equal input x grid. yg, ygl similar xg xgl, pressure. (Note trimming input y done, xg x.) yg given, determined deepest station section. ygl given, grid constructed span pressures deepest station ygl elements. hand, ygl given, y grid constructed pressure levels deepest station. xr, yr influence ranges x (along-section distance) y (pressure), passed interpBarnes() method=\"barnes\" method, latter function. missing, xr defaults 1.5X median inter-station distance yr defaults 0.2X pressure range. Since defaults changed evolution sectionSmooth, analysts supply xr yr function call, tailoring particular applications, making code resistant changes sectionSmooth. df Degree--freedom parameter, passed smooth.spline() method=\"spline\", ignored otherwise. df provided, defaults 1/5-th number stations containing non-NA data particular pressure level processed, sectionSmooth works way water column. gamma, iterations, trim, pregrid Values passed interpBarnes(), method=\"barnes\", ignored otherwise. gamma factor xr yr reduced succeeding iterations. iterations number iterations . trim controls whether gridded data set NA regions sparse data coverage. pregrid controls whether data pre-gridded binMean2D() passed interpBarnes(). debug flag turns debugging.  Set 1 get moderate amount debugging information, 2 get . ... Optional extra arguments, passed either smooth.spline(), method=\"spline\", ignored otherwise.","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionSmooth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Smooth a Section — sectionSmooth","text":"section object smoothed way. Every data field even single station input object inserted every station returned value, therefore units represent units stations, flag names. However, flags set NA values.","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionSmooth.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Smooth a Section — sectionSmooth","text":"function produces smoothed fields might useful simplifying graphical elements created plot,section-method(). smoothing method, careful analyst compare results raw data, e.g. using plot,section-method(). addition problem falsely widening narrow features fronts, also potential get unphysical results spars sampling near topographic features bottom slopes ridges. method argument selects three possible methods. method=\"spline\", .e. default, section smoothed laterally, using smooth.spline() individual pressure levels. (pressure levels match , sectionGrid() used first create section object can used .) df argument sets degree freedom spline, larger values indicating less smoothing. method=\"barnes\", smoothing done across horizontal vertical coordinates, using interpBarnes(). output station locations computed linear interpolation input locations, using approx() original longitudes longitudes stations, independent variable distance along track, computed geodDist(). values xg, yg, xgl ygl control smoothing. method=\"kriging\", smoothing done across horizontal vertical coordinates, using autoKrige() automap package (along support sp package format data).  Note format value returned autoKrige() changed years, method=\"kriging\" can handle two particular formats, one result version 1.1.9 automap. method function, function applied (distance, pressure) data variable grid defined xg, xgl, yg ygl. function must form function(x,y,z,xg,xr,yg,yr), must return matrix gridded result, first index indicating \"grid\" station number second index indicating \"grid\" pressure. x value supplied function set distance along section, computed geodDist(), repeated points station.  corresponding pressures provided y, value gridded z, may temperature one call function, salinity another call, etc. quantities meanings described .","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionSmooth.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Smooth a Section — sectionSmooth","text":"","code":"# I have seen problems with kriging as the automap package has # evolved, so please be aware that the following may fail. if (requireNamespace(\"automap\", quietly=TRUE)        && requireNamespace(\"sf\", quietly=TRUE)) {     gsKriging <- sectionSmooth(gs, \"kriging\", xr=50, yr=200)     plot(gsKriging, which=\"temperature\")     mtext(\"sectionSmooth(..., method=\\\"kriging\\\")\", line=0.5) }"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sectionSmooth.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Smooth a Section — sectionSmooth","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionSmooth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Smooth a Section — sectionSmooth","text":"","code":"# Unsmoothed (Gulf Stream) library(oce) data(section) gs <- subset(section, 115 <= stationId & stationId <= 125) par(mfrow = c(2, 2))  plot(gs, which = \"temperature\") mtext(\"Original data, without smoothing\", line = 0.5)  # Spline gsg <- sectionGrid(gs, p = seq(0, 5000, 100)) gsSpline <- sectionSmooth(gsg, \"spline\") plot(gsSpline, which = \"temperature\") mtext(\"sectionSmooth(..., method=\\\"spline\\\")\", line = 0.5)  # Barnes gsBarnes <- sectionSmooth(gs, \"barnes\", xr = 50, yr = 200) plot(gsBarnes, which = \"temperature\") mtext(\"sectionSmooth(..., method=\\\"barnes\\\")\", line = 0.5)"},{"path":"https://dankelley.github.io/oce/reference/sectionSort.html","id":null,"dir":"Reference","previous_headings":"","what":"Sort a Section — sectionSort","title":"Sort a Section — sectionSort","text":"Sections created .section() \"stations\" order CTD objects (filenames objects) provided.  Sometimes, desired order, e.g. file names discovered dir() order makes sense.  (example, practioner might name stations \"stn1\", \"stn2\", etc., realizing yield unhelpful ordering, file name, 9 stations.) purpose sectionSort permit reordering constituent stations sensible ways.","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionSort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sort a Section — sectionSort","text":"","code":"sectionSort(section, by, decreasing = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/sectionSort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sort a Section — sectionSort","text":"section section object containing section whose stations sorted. optional string indicating reorder.  provided, \"stationID\" assumed.  choices \"distance\", distance first station, \"longitude\", longitude, \"latitude\" latitude, \"time\", time. decreasing logical value indicating whether sort decreasing order.  default FALSE. (Thanks Martin Renner adding parameter.)","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionSort.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sort a Section — sectionSort","text":"object section object smoothed, data fields station--station variation case input section, x.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sectionSort.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sort a Section — sectionSort","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sectionSort.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sort a Section — sectionSort","text":"","code":"library(oce) data(section) sectionByLongitude <- sectionSort(section, by = \"longitude\") head(section) #> Section 'a03' has 6 stations: #> Index    ID      Lon      Lat  Levels Depth #>     1     3   -8.526   36.876       5   202 #>     2     4   -8.620   36.719      16   742 #>     3     6   -8.738   36.538      19  1567 #>     4     7   -8.791   36.425      24  2349 #>     5     8   -8.901   36.250      23  2629 #>     6     9   -9.271   36.235      24  3842 head(sectionByLongitude) #> Section 'a03' has 6 stations: #> Index    ID      Lon      Lat  Levels Depth #>     1   133  -73.673   38.237       8   154 #>     2   132  -73.605   38.205      13   843 #>     3   131  -73.491   38.158      16  1378 #>     4   130  -73.319   38.086      20  2024 #>     5   129  -73.156   38.004      22  2363 #>     6   128  -72.976   37.925      24  2574"},{"path":"https://dankelley.github.io/oce/reference/setFlags-adp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Data-Quality Flags within a adp Object — setFlags,adp-method","title":"Set Data-Quality Flags within a adp Object — setFlags,adp-method","text":"function changes specified entries data-quality flags adp object, stored within list named flags resides metadata slot. object already flag set name, specified entries altered. , flag entry first created entries set default, entries specified changed value. specification made , form determined data item question. Generally, rules follows: data item vector, must () integer vector specifying indices set value, (b) logical vector length matching data item, TRUE meaning set flag value, (c) function takes oce object single argument, returns vector either forms just described. data item array, must () data frame integers whose rows specify spots change (number columns matches number dimensions data item), (b) logical array dimension equal data item, (c) function takes oce object single input returns data frame array. See “Details” particular case adp objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-adp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Data-Quality Flags within a adp Object — setFlags,adp-method","text":"","code":"# S4 method for class 'adp' setFlags(   object,   name = NULL,   i = NULL,   value = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/setFlags-adp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Data-Quality Flags within a adp Object — setFlags,adp-method","text":"object oce object. name Character string indicating name variable flagged. variable contained object's data slot, error reported. Indication insert flags; see “Description” general rules “Details” rules adp objects. value value inserted flag. debug Integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-adp-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Data-Quality Flags within a adp Object — setFlags,adp-method","text":"object flags set indicated.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-adp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set Data-Quality Flags within a adp Object — setFlags,adp-method","text":"flag may set v, array holding velocity. See “Indexing rules”, noting adp data stored 3D arrays; Example 1 shows using data frame , Example 2 shows using array.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/setFlags-adp-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Data-Quality Flags within a adp Object — setFlags,adp-method","text":"","code":"library(oce) data(adp)  # Example 1: flag first 10 samples in a mid-depth bin of beam 1 i1 <- data.frame(1:20, 40, 1) adpQC <- initializeFlags(adp, \"v\", 2) adpQC <- setFlags(adpQC, \"v\", i1, 3) adpClean1 <- handleFlags(adpQC, flags = list(3), actions = list(\"NA\")) par(mfrow = c(2, 1)) # Top: original, bottom: altered plot(adp, which = \"u1\") plot(adpClean1, which = \"u1\")   # Example 2: percent-good and error-beam scheme v <- adp[[\"v\"]] i2 <- array(FALSE, dim = dim(v)) g <- adp[[\"g\", \"numeric\"]] # Thresholds on percent \"goodness\" and error \"velocity\" G <- 25 V4 <- 0.45 for (k in 1:3) {     i2[, , k] <- ((g[, , k] + g[, , 4]) < G) | (v[, , 4] > V4) } adpQC2 <- initializeFlags(adp, \"v\", 2) adpQC2 <- setFlags(adpQC2, \"v\", i2, 3) adpClean2 <- handleFlags(adpQC2, flags = list(3), actions = list(\"NA\")) # Top: original, bottom: altered plot(adp, which = \"u1\") plot(adpClean2, which = \"u1\") # differs at 8h and 20h"},{"path":"https://dankelley.github.io/oce/reference/setFlags-ctd-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Data-Quality Flags within a ctd Object — setFlags,ctd-method","title":"Set Data-Quality Flags within a ctd Object — setFlags,ctd-method","text":"function changes specified entries data-quality flags ctd object, stored within list named flags resides metadata slot. object already flag set name, specified entries altered. , flag entry first created entries set default, entries specified changed value. specification made , form determined data item question. Generally, rules follows: data item vector, must () integer vector specifying indices set value, (b) logical vector length matching data item, TRUE meaning set flag value, (c) function takes oce object single argument, returns vector either forms just described. data item array, must () data frame integers whose rows specify spots change (number columns matches number dimensions data item), (b) logical array dimension equal data item, (c) function takes oce object single input returns data frame array. See “Details” particular case ctd objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-ctd-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Data-Quality Flags within a ctd Object — setFlags,ctd-method","text":"","code":"# S4 method for class 'ctd' setFlags(   object,   name = NULL,   i = NULL,   value = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/setFlags-ctd-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Data-Quality Flags within a ctd Object — setFlags,ctd-method","text":"object oce object. name Character string indicating name variable flagged. variable contained object's data slot, error reported. Indication insert flags; see “Description” general rules “Details” rules ctd objects. value value inserted flag. debug Integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-ctd-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Data-Quality Flags within a ctd Object — setFlags,ctd-method","text":"object flags set indicated.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-ctd-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set Data-Quality Flags within a ctd Object — setFlags,ctd-method","text":"Since entries data slot ctd objects vectors, must vector (either logical Example 1 integer Example 2), function taking ctd object returning vector (see “Indexing rules”).","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-ctd-method.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Set Data-Quality Flags within a ctd Object — setFlags,ctd-method","text":"","code":"# Example 2: Interactive flag assignment based on TS plot, using # WHP scheme to define 'acceptable' and 'bad' codes options(eos=\"gsw\") data(ctd) qc <- ctd qc <- initializeFlagScheme(qc, \"WHP CTD\") qc <- initializeFlags(qc, \"salinity\", 2) Sspan <- diff(range(qc[[\"SA\"]])) Tspan <- diff(range(qc[[\"CT\"]])) n <- length(qc[[\"SA\"]]) par(mfrow=c(1, 1)) plotTS(qc, type=\"o\") message(\"Click on bad points; quit by clicking to right of plot\") for (i in seq_len(n)) {     xy <- locator(1)     if (xy$x > par(\"usr\")[2])         break     i <- which.min(abs(qc[[\"SA\"]] - xy$x)/Sspan + abs(qc[[\"CT\"]] - xy$y)/Tspan)     qc <- setFlags(qc, \"salinity\", i=i, value=4)     qc <- handleFlags(qc, flags=list(salinity=4))     plotTS(qc, type=\"o\") }"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/setFlags-ctd-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set Data-Quality Flags within a ctd Object — setFlags,ctd-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-ctd-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Data-Quality Flags within a ctd Object — setFlags,ctd-method","text":"","code":"library(oce) # Example 1: Range-check salinity data(ctdRaw) # Salinity and temperature range checks qc <- ctdRaw # Initialize flags to 2, meaning good data in the default # scheme for handleFlags(ctd). qc <- initializeFlags(qc, \"salinity\", 2) qc <- initializeFlags(qc, \"temperature\", 2) # Flag bad salinities as 4 oddS <- with(qc[[\"data\"]], salinity < 25 | 40 < salinity) qc <- setFlags(qc, name = \"salinity\", i = oddS, value = 4) # Flag bad temperatures as 4 oddT <- with(qc[[\"data\"]], temperature < -2 | 40 < temperature) qc <- setFlags(qc, name = \"temperature\", i = oddT, value = 4) # Compare results in TS space par(mfrow = c(2, 1)) plotTS(ctdRaw) plotTS(handleFlags(qc, flags = c(1, 3:9)))"},{"path":"https://dankelley.github.io/oce/reference/setFlags-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Data-Quality Flags within a oce Object — setFlags,oce-method","title":"Set Data-Quality Flags within a oce Object — setFlags,oce-method","text":"function changes specified entries data-quality flags oce object, stored within list named flags resides metadata slot. object already flag set name, specified entries altered. , flag entry first created entries set default, entries specified changed value. specification made , form determined data item question. Generally, rules follows: data item vector, must () integer vector specifying indices set value, (b) logical vector length matching data item, TRUE meaning set flag value, (c) function takes oce object single argument, returns vector either forms just described. data item array, must () data frame integers whose rows specify spots change (number columns matches number dimensions data item), (b) logical array dimension equal data item, (c) function takes oce object single input returns data frame array. See “Details” particular case oce objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Data-Quality Flags within a oce Object — setFlags,oce-method","text":"","code":"# S4 method for class 'oce' setFlags(   object,   name = NULL,   i = NULL,   value = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/setFlags-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Data-Quality Flags within a oce Object — setFlags,oce-method","text":"object oce object. name Character string indicating name variable flagged. variable contained object's data slot, error reported. Indication insert flags; see “Description” general rules “Details” rules oce objects. value value inserted flag. debug Integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-oce-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Data-Quality Flags within a oce Object — setFlags,oce-method","text":"object flags set indicated.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags-oce-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set Data-Quality Flags within a oce Object — setFlags,oce-method","text":"generic function overridden specialized functions object classes.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/setFlags.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Data-Quality Flags within a oce Object — setFlags","title":"Set Data-Quality Flags within a oce Object — setFlags","text":"function changes specified entries data-quality flags oce object, stored within list named flags resides metadata slot. object already flag set name, specified entries altered. , flag entry first created entries set default, entries specified changed value. specification made , form determined data item question. Generally, rules follows: data item vector, must () integer vector specifying indices set value, (b) logical vector length matching data item, TRUE meaning set flag value, (c) function takes oce object single argument, returns vector either forms just described. data item array, must () data frame integers whose rows specify spots change (number columns matches number dimensions data item), (b) logical array dimension equal data item, (c) function takes oce object single input returns data frame array. See “Details” particular case oce objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Data-Quality Flags within a oce Object — setFlags","text":"","code":"setFlags(object, name = NULL, i = NULL, value = NULL, debug = 0)"},{"path":"https://dankelley.github.io/oce/reference/setFlags.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Data-Quality Flags within a oce Object — setFlags","text":"object oce object. name Character string indicating name variable flagged. variable contained object's data slot, error reported. Indication insert flags; see “Description” general rules “Details” rules oce objects. value value inserted flag. debug Integer set 0 quiet action 1 debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Data-Quality Flags within a oce Object — setFlags","text":"object flags set indicated.","code":""},{"path":"https://dankelley.github.io/oce/reference/setFlags.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set Data-Quality Flags within a oce Object — setFlags","text":"generic function overridden specialized functions object classes.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/shiftLongitude.html","id":null,"dir":"Reference","previous_headings":"","what":"Shift Longitude to Range -180 to 180 — shiftLongitude","title":"Shift Longitude to Range -180 to 180 — shiftLongitude","text":"utility function used mapGrid(). works simply subtracting 180 longitude, longitude vector exceeds 180.","code":""},{"path":"https://dankelley.github.io/oce/reference/shiftLongitude.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shift Longitude to Range -180 to 180 — shiftLongitude","text":"","code":"shiftLongitude(longitudes)"},{"path":"https://dankelley.github.io/oce/reference/shiftLongitude.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shift Longitude to Range -180 to 180 — shiftLongitude","text":"longitudes numerical vector longitudes.","code":""},{"path":"https://dankelley.github.io/oce/reference/shiftLongitude.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shift Longitude to Range -180 to 180 — shiftLongitude","text":"vector longitudes, shifted desired range.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/shiftLongitude.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Shift Longitude to Range -180 to 180 — shiftLongitude","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/showMetadataItem.html","id":null,"dir":"Reference","previous_headings":"","what":"Show an Item in the metadata Slot of an oce Object — showMetadataItem","title":"Show an Item in the metadata Slot of an oce Object — showMetadataItem","text":"helper function various summary functions.","code":""},{"path":"https://dankelley.github.io/oce/reference/showMetadataItem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show an Item in the metadata Slot of an oce Object — showMetadataItem","text":"","code":"showMetadataItem(   object,   name,   label = \"\",   postlabel = \"\",   isdate = FALSE,   quote = FALSE )"},{"path":"https://dankelley.github.io/oce/reference/showMetadataItem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show an Item in the metadata Slot of an oce Object — showMetadataItem","text":"object oce object. name name item label label print item postlabel label print item isdate boolean indicating whether item time quote boolean indicating whether enclose item quotes","code":""},{"path":"https://dankelley.github.io/oce/reference/showMetadataItem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Show an Item in the metadata Slot of an oce Object — showMetadataItem","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/showMetadataItem.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Show an Item in the metadata Slot of an oce Object — showMetadataItem","text":"","code":"library(oce) data(ctd) showMetadataItem(ctd, \"ship\", \"ship\") #> * shipDivcom3"},{"path":"https://dankelley.github.io/oce/reference/siderealTime.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert From POSIXt Time to Sidereal Time — siderealTime","title":"Convert From POSIXt Time to Sidereal Time — siderealTime","text":"Convert POSIXt time sidereal time, using method Chapter 7 reference 1.  small correction discusses equation 7.1 applied .","code":""},{"path":"https://dankelley.github.io/oce/reference/siderealTime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert From POSIXt Time to Sidereal Time — siderealTime","text":"","code":"siderealTime(t)"},{"path":"https://dankelley.github.io/oce/reference/siderealTime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert From POSIXt Time to Sidereal Time — siderealTime","text":"t time, POSIXt format, e.g. created .POSIXct(), .POSIXlt(), numberAsPOSIXct().  provided, arguments ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/siderealTime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert From POSIXt Time to Sidereal Time — siderealTime","text":"sidereal time, hours range 0 24.","code":""},{"path":"https://dankelley.github.io/oce/reference/siderealTime.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert From POSIXt Time to Sidereal Time — siderealTime","text":"Meeus, Jean. Astronomical Formulas Calculators. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1982.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/siderealTime.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert From POSIXt Time to Sidereal Time — siderealTime","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/siderealTime.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert From POSIXt Time to Sidereal Time — siderealTime","text":"","code":"t <- ISOdatetime(1978, 11, 13, 0, 0, 0, tz = \"UTC\") print(siderealTime(t)) #> [1] 3.45037"},{"path":"https://dankelley.github.io/oce/reference/snakeToCamel.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert From Snake-Case to Camel-Case Notation — snakeToCamel","title":"Convert From Snake-Case to Camel-Case Notation — snakeToCamel","text":"snakeToCamel converts \"snake-case\" characters \"NOVA_SCOTIA\" \"camel-case\" values, \"NovaScotia\".  written use read.argo(), also may prove helpful contexts.","code":""},{"path":"https://dankelley.github.io/oce/reference/snakeToCamel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert From Snake-Case to Camel-Case Notation — snakeToCamel","text":"","code":"snakeToCamel(s, specialCases = NULL)"},{"path":"https://dankelley.github.io/oce/reference/snakeToCamel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert From Snake-Case to Camel-Case Notation — snakeToCamel","text":"s vector character values. specialCases vector character values tell special-cases apply, NULL (default) turn special cases.  permitted special case moment \"QC\" (see “Details”) idea argument cases can added later, needed.","code":""},{"path":"https://dankelley.github.io/oce/reference/snakeToCamel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert From Snake-Case to Camel-Case Notation — snakeToCamel","text":"vector character values","code":""},{"path":"https://dankelley.github.io/oce/reference/snakeToCamel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert From Snake-Case to Camel-Case Notation — snakeToCamel","text":"basic procedure chop string substrings separated underline character, upper-case first letter substrings except first, paste substrings together. However, exceptions.  First, upper-case string contains underlines converted lower case, mixed-case string underlines returned -(see second example). Second, specialCases argument contains \"QC\", QC passed directly (since acronym) first letter remaining text upper-cased (contrast see four examples).","code":""},{"path":"https://dankelley.github.io/oce/reference/snakeToCamel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert From Snake-Case to Camel-Case Notation — snakeToCamel","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/snakeToCamel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert From Snake-Case to Camel-Case Notation — snakeToCamel","text":"","code":"library(oce) snakeToCamel(\"PARAMETER_DATA_MODE\") # \"parameterDataMode\" #> [1] \"parameterDataMode\" snakeToCamel(\"PARAMETER\") # \"parameter\" #> [1] \"parameter\" snakeToCamel(\"HISTORY_QCTEST\") # \"historyQctest\" #> [1] \"historyQctest\" snakeToCamel(\"HISTORY_QCTEST\", \"QC\") # \"historyQCTest\" #> [1] \"historyQCTest\" snakeToCamel(\"PROFILE_DOXY_QC\") # \"profileDoxyQc\" #> [1] \"profileDoxyQc\" snakeToCamel(\"PROFILE_DOXY_QC\", \"QC\") # \"profileDoxyQC\" #> [1] \"profileDoxyQC\""},{"path":"https://dankelley.github.io/oce/reference/standardDepths.html","id":null,"dir":"Reference","previous_headings":"","what":"Standard Oceanographic Depths — standardDepths","title":"Standard Oceanographic Depths — standardDepths","text":"returns vector numbers build upon shorter lists provided Chapter 10 reference 1 modern World Ocean Atlases (e.g. reference 2). default call, .e. n=0, result c(0, 10, 20, 30, 40, 50, 75, 100, 125, 150, 200, 250, seq(300, 1500, =100), 1750, seq(2000, 10000, =500)). higher values n, progressively values added pair sequence. See documentation sectionGrid() standardDepths can used gridding data section plots.","code":""},{"path":"https://dankelley.github.io/oce/reference/standardDepths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standard Oceanographic Depths — standardDepths","text":"","code":"standardDepths(n = 0)"},{"path":"https://dankelley.github.io/oce/reference/standardDepths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standard Oceanographic Depths — standardDepths","text":"n Integer specifying number subdivisions insert stated levels. exmple, setting n=1 puts 5m level 0 10m levels, n=2 puts 3.33 6.66 0 10m.","code":""},{"path":"https://dankelley.github.io/oce/reference/standardDepths.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standard Oceanographic Depths — standardDepths","text":"vector depths closely spaced small values, .e. finer grid near ocean surface.","code":""},{"path":"https://dankelley.github.io/oce/reference/standardDepths.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Standard Oceanographic Depths — standardDepths","text":"Sverdrup, H U, Martin W Johnson, Richard H Fleming. Oceans, Physics, Chemistry, General Biology. New York: Prentice-Hall, 1942. https://publishing.cdlib.org/ucpressebooks/view?docId=kt167nb66r 2.Locarnini, R. ., . V. Mishonov, J. . Antonov, T. P. Boyer, H. E. Garcia, O. K. Baranova, M. M. Zweng, D. R. Johnson, S. Levitus. “World Ocean Atlas 2009 Temperature.” US Government printing Office, 2010.","code":""},{"path":"https://dankelley.github.io/oce/reference/standardDepths.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Standard Oceanographic Depths — standardDepths","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/standardDepths.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standard Oceanographic Depths — standardDepths","text":"","code":"depth <- standardDepths() depth1 <- standardDepths(1) plot(depth, depth) points(depth1, depth1, col = 2, pch = 20, cex = 1 / 2)"},{"path":"https://dankelley.github.io/oce/reference/standardizeLongitude.html","id":null,"dir":"Reference","previous_headings":"","what":"Put Longitude in the Range From -180 to 180 — standardizeLongitude","title":"Put Longitude in the Range From -180 to 180 — standardizeLongitude","text":"Put Longitude Range -180 180","code":""},{"path":"https://dankelley.github.io/oce/reference/standardizeLongitude.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Put Longitude in the Range From -180 to 180 — standardizeLongitude","text":"","code":"standardizeLongitude(longitude)"},{"path":"https://dankelley.github.io/oce/reference/standardizeLongitude.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Put Longitude in the Range From -180 to 180 — standardizeLongitude","text":"longitude degrees East, possibly exceeding 180","code":""},{"path":"https://dankelley.github.io/oce/reference/standardizeLongitude.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Put Longitude in the Range From -180 to 180 — standardizeLongitude","text":"longitude signed degrees East","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From an adp Object — [[,adp-method","title":"Extract Something From an adp Object — [[,adp-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From an adp Object — [[,adp-method","text":"","code":"# S4 method for class 'adp' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From an adp Object — [[,adp-method","text":"x adp object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From an adp Object — [[,adp-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adp-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From an adp Object — [[,adp-method","text":"Note entries within adp objects vary greatly, instrument instrument, sketched , output [[\"?\"]]. \"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items authoritative, information provided different instruments varied. \"u1\" return value v[,1]. holds 2, etc., depending number beams instrument. \"a1\" signal amplitude returned, similarly digits. results can raw() numeric form, shown examples. \"q1\" signal quality returned, similarly digits.  amplitude, result can raw() numeric form. \"coordinate\", coordinate system retrieved.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adp-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From an adp Object — [[,adp-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adp-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From an adp Object — [[,adp-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adp-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Something From an adp Object — [[,adp-method","text":"","code":"data(adp) # Tests for beam 1, distance bin 1, first 5 observation times adp[[\"v\"]][1:5, 1, 1] #> [1] -0.11955771 -0.09925398  0.10203802  0.09613003  0.24394126 adp[[\"a\"]][1:5, 1, 1] #> [1] 99 9d 9f 87 8a adp[[\"a\", \"numeric\"]][1:5, 1, 1] #> [1] 153 157 159 135 138 as.numeric(adp[[\"a\"]][1:5, 1, 1]) # same as above #> [1] 153 157 159 135 138"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adv-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something from an adv Object — [[,adv-method","title":"Extract Something from an adv Object — [[,adv-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adv-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something from an adv Object — [[,adv-method","text":"","code":"# S4 method for class 'adv' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adv-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something from an adv Object — [[,adv-method","text":"x adv object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adv-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something from an adv Object — [[,adv-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adv-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something from an adv Object — [[,adv-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively, dataDerived metadataDerived hold names related things can derived object's contents. \"u1\" return value v[,1], similarly \"u2\" \"u3\". \"a1\" signal amplitude returned, similarly \"a2\" \"a3\". results can raw() numeric form, illustrated “Examples”. \"q1\" signal quality returned, similarly \"q2\" \"q3\".  amplitude, result can raw() numeric form. \"heading\", \"pitch\" \"roll\", values extracted \"slow\" form object (e.g. headingSlow within data slot). case, accessing full name, e.g. x[[\"headingSlow\"]] retrieves item expected, x[[\"heading\"]] interpolates faster timescale, using approx(timeSlow,headingSlow,time).","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adv-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something from an adv Object — [[,adv-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adv-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something from an adv Object — [[,adv-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-adv-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Something from an adv Object — [[,adv-method","text":"","code":"data(adv) head(adv[[\"q\"]]) # in raw form #>      [,1] [,2] [,3] #> [1,]   61   63   63 #> [2,]   61   63   63 #> [3,]   63   62   63 #> [4,]   61   62   63 #> [5,]   61   62   63 #> [6,]   62   63   62 head(adv[[\"q\", \"numeric\"]]) # in numeric form #>      [,1] [,2] [,3] #> [1,]   97   99   99 #> [2,]   97   99   99 #> [3,]   99   98   99 #> [4,]   97   98   99 #> [5,]   97   98   99 #> [6,]   98   99   98"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-amsr-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From an amsr Object — [[,amsr-method","title":"Extract Something From an amsr Object — [[,amsr-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-amsr-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From an amsr Object — [[,amsr-method","text":"","code":"# S4 method for class 'amsr' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-amsr-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From an amsr Object — [[,amsr-method","text":"x amsr object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-amsr-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Something From an amsr Object — [[,amsr-method","text":"[[ returns numeric matrix data.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-amsr-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From an amsr Object — [[,amsr-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-amsr-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From an amsr Object — [[,amsr-method","text":"[[ method handles old-format new-format amsr objects. Old-format objects read read.amsr() gzipped files holding data raw format, [[ computes numeric results linear relationships provided http://www.remss.com/missions/amsre. contrast, new-format objects read NetCDF files hold data 4-byte numeric values read directly, without applying scaling transformation.  difference old-format objects contain day night values, e.g. SSTDay SSTNight, whereas new-format objects contain single values combine , e.g. SST. \"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items things [[ can compute return. Data within data slot may found directly (new-format old-format objects) indirectly (old-style objects).  example, SST works direct lookup new-format objects, computed using SSTNight SSTDay old-format objects.  Use e.g. [[\"?\"]] given object, see can retrieved.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-amsr-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From an amsr Object — [[,amsr-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-amsr-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From an amsr Object — [[,amsr-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-amsr-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Something From an amsr Object — [[,amsr-method","text":"","code":"# Histogram of SST values (for an old-format dataset) library(oce) data(amsr) hist(amsr[[\"SST\"]])"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-argo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From an argo Object — [[,argo-method","title":"Extract Something From an argo Object — [[,argo-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-argo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From an argo Object — [[,argo-method","text":"","code":"# S4 method for class 'argo' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-argo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From an argo Object — [[,argo-method","text":"x argo object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-argo-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From an argo Object — [[,argo-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-argo-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From an argo Object — [[,argo-method","text":"Note argo data may contain unadjusted data adjusted data.  default, extraction function refers former, preference latter may set preferAdjusted(), documentation explains (fairly complex) details. results argo[[]] argo[[,j]] depend nature (provided) j. details follows. \"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items hold names things can inferred object's contents, e.g. \"SA\" named dataDerived, indicating argo[[\"SA\"]] permitted (compute Absolute Salinity). \"profile\" j integer vector, argo object returned, specified j. example, argo[[\"profile\", 2:5]] equivalent subset(argo, profile %% 2:5). \"CT\", Conservative Temperature returned, computed gsw::gsw_CT_from_t(SA,t,p), first SA computed explained next item, t -situ temperature, p pressure. \"N2\", square buoyancy returned, computed swN2(). \"SA\", Absolute Salinity returned, computed gsw::gsw_SA_from_SP(). \"sigmaTheta\", potential density anomaly (referenced zero pressure) computed, swSigmaTheta(), equation state taken getOption(\"oceEOS\", default=\"gsw\"). \"sigma0\", \"sigma1\", \"sigma2\", \"sigma3\" \"sigma4\", associated function gsw package. example, \"sigma0\" uses gsw::gsw_sigma0(), returns potential density anomaly referenced 0 dbar, according gsw equation state. \"theta\", potential temperature (referenced zero pressure) computed, swTheta(), equation state taken getOption(\"oceEOS\", default=\"gsw\"). \"depth\", matrix depths returned. \"id\" \"ID\", id element within metadata slot returned. data slot x, returned, otherwise metadata slot, returned, otherwise NULL returned.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-argo-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From an argo Object — [[,argo-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-argo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From an argo Object — [[,argo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-argo-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Something From an argo Object — [[,argo-method","text":"","code":"data(argo) # 1. show that dataset has 223 profiles, each with 56 levels dim(argo[[\"temperature\"]]) #> [1]  56 223  # 2. show importance of focussing on data flagged 'good' fivenum(argo[[\"salinity\"]], na.rm = TRUE) #> [1]  0.000 34.890 34.926 35.042 47.899 fivenum(argo[[\"salinity\"]][argo[[\"salinityFlag\"]] == 1], na.rm = TRUE) #> [1] 32.850 34.890 34.926 35.042 35.842"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-bremen-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a bremen Object — [[,bremen-method","title":"Extract Something From a bremen Object — [[,bremen-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-bremen-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a bremen Object — [[,bremen-method","text":"","code":"# S4 method for class 'bremen' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-bremen-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a bremen Object — [[,bremen-method","text":"x bremen object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-bremen-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a bremen Object — [[,bremen-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-bremen-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a bremen Object — [[,bremen-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined bremen objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-bremen-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a bremen Object — [[,bremen-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-bremen-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a bremen Object — [[,bremen-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-cm-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a cm Object — [[,cm-method","title":"Extract Something From a cm Object — [[,cm-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-cm-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a cm Object — [[,cm-method","text":"","code":"# S4 method for class 'cm' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-cm-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a cm Object — [[,cm-method","text":"x cm object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-cm-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a cm Object — [[,cm-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-cm-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a cm Object — [[,cm-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined cm objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-cm-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a cm Object — [[,cm-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-cm-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a cm Object — [[,cm-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-coastline-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a coastline Object — [[,coastline-method","title":"Extract Something From a coastline Object — [[,coastline-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-coastline-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a coastline Object — [[,coastline-method","text":"","code":"# S4 method for class 'coastline' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-coastline-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a coastline Object — [[,coastline-method","text":"x coastline object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-coastline-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a coastline Object — [[,coastline-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-coastline-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a coastline Object — [[,coastline-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined coastline objects. many cases, focus coastline trace longitude-latitude space, x[[\"longitude\"]] x[[\"latitude\"]] commonly used.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-coastline-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a coastline Object — [[,coastline-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-coastline-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a coastline Object — [[,coastline-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ctd-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a ctd Object — [[,ctd-method","title":"Extract Something From a ctd Object — [[,ctd-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ctd-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a ctd Object — [[,ctd-method","text":"","code":"# S4 method for class 'ctd' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ctd-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a ctd Object — [[,ctd-method","text":"x ctd object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ctd-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a ctd Object — [[,ctd-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ctd-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a ctd Object — [[,ctd-method","text":"uses [[,ctd-method involve direct retrieval items within data slot ctd object, uses involve calculations based items data slot. example, ctd objects hold item named temperature data slot, example x[[\"temperature\"]] retrieve item. contrast, x[[\"sigmaTheta\"]] taken request compute \\(\\sigma_\\theta\\), yields call swTheta(x) even data slot x might happen contain item named theta. can confusing first, tends lead fewer surprises everyday work, otherwise user forced check contents ctd object analysis, determine whether item looked computed. Nothing lost scheme, since data within object always accessible oceGetData(). noted accessor set retrieve quantities conventional units. example, read.ctd.sbe() used .cnv file stores pressure psi, stored unit within ctd object, x[[\"pressure\"]] return value converted decibars.  (get pressure PSI, use x[[\"pressurePSI\"]].) Similarly, temperature returned -90 scale, conversion performed T90fromT68(), object holds temperature IPTS-68.  , temperature IPTS-68 scale returned x@data$temperature. preference computed stored quantities accomplished first checking computed quantities, falling back general [[ method match found. quantities optionally computed. example, data files (e.g. one upon section() dataset based) store nitrite along sum nitrite nitrate, latter name NO2+NO3. case, e.g. x[[\"nitrate\"]] detect setup, subtract nitrite sum yield nitrate. list given provides notes quantities available using e.g. ctd[[]]. \"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items hold names things can inferred object's contents, e.g. \"SA\" named dataDerived, indicating argo[[\"SA\"]] permitted (compute Absolute Salinity). \"conductivity\" without second argument (e.g. [[\"conductivity\"]]) return value seawater electrical conductivity (available computable). However, second argument given, string specifying unit, conversion made unit. permitted units : either \"\" \"ratio\" (ratio), \"uS/cm\", \"mS/cm\" \"S/m\". calculations based definition conductivity ratio ratio measured conductivity standard value 4.2914 S/m. \"CT\" \"Conservative Temperature\" Conservative Temperature, computed gsw::gsw_CT_from_t(), returned. \"density\" seawater density, computed swRho(x), returned. (Note may better call function directly, gain control choice equation state, etc.) \"depth\" depth metres surface, computed swDepth(x), returned. \"N2\" square Brunt-Vaisala frequency, computed  swN2(x), returned. \"potential temperature\" \"theta\", potential temperature UNESCO formulation, computed swTheta(x), returned. \"Rrho\" density ratio, computed swRrho(x), returned. \"SA\" \"Absolute Salinity\" Absolute Salinity, computed gsw::gsw_SA_from_SP(), returned. calculation involves location well measured water properties. object x containing information location, 30N 60W used calculation, warning generated. \"sigmaTheta\" form potential density anomaly, computed swSigmaTheta(x), returned. \"sigma0\" potential density anomaly referenced sea pressure 0dbar (surface), computed swSigma0(x), returned. \"sigma2\" potential density anomaly referenced sea pressure 1000dbar, computed swSigma1(x), returned. \"sigma2\" potential density anomaly referenced sea pressure 2000dbar, computed swSigma2(x), returned. \"sigma3\" potential density anomaly referenced sea pressure 3000dbar, computed swSigma3(x), returned. \"sigma4\" potential density anomaly referenced sea pressure 4000dbar, computed swSigma4(x), returned. \"SP\" salinity Practical Salinity Scale, salinity data slot, returned. \"spice\" swSpice() called compute quantity sense orthogonal density T-S diagram. done calling swSpice() eos argument set \"unesco\". earlier version oce, [[ provided second argument yield return value \"spiciness\", variable described next item. 2024-02-14, possibility removed lead user confusion non-reproducible code. get spiciness, use [[\"spiciness0\"]]. \"spiciness0\", \"spiciness1\" \"spiciness2\", return value comes Gibbs SeaWater formulation variable sense orthogonal density T-S diagram. numbers refer reference pressure, units 1000 dbar. results computed gsw::gsw_spiciness0(), etc. \"SR\" Reference Salinity, computed gsw::gsw_SR_from_SP(), returned. \"Sstar\" Preformed Salinity, computed gsw::gsw_SR_from_SP(), returned. See SA note longitude latitude. \"time\" either vector times single time, returned, available. vector returned time present data slot, time can inferred entries data slot (, common timeS, also employ startTime within metadata slot). single value returned dataset information start time (stored startTime within metadata slot. impossible determine sampling time, NULL returned. time variants occur, present version oce, data read read.ctd.sbe(), documentation explains times computed. \"z\" vertical coordinate metres surface, computed swZ(x), returned.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ctd-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a ctd Object — [[,ctd-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ctd-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a ctd Object — [[,ctd-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ctd-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Something From a ctd Object — [[,ctd-method","text":"","code":"data(ctd) head(ctd[[\"temperature\"]]) #> [1] 14.22109 14.22649 14.22509 14.22219 14.22669 14.23318"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-echosounder-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From an echosounder Object — [[,echosounder-method","title":"Extract Something From an echosounder Object — [[,echosounder-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-echosounder-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From an echosounder Object — [[,echosounder-method","text":"","code":"# S4 method for class 'echosounder' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-echosounder-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From an echosounder Object — [[,echosounder-method","text":"x echosounder object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-echosounder-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From an echosounder Object — [[,echosounder-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-echosounder-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From an echosounder Object — [[,echosounder-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. metadataDerived item NULL, dataDerived item holds \"Sv\" \"TS\" (see next). \"Sv\", following returned. \"TS\", following returned.","code":"20*log10(a) -   (x@metadata$sourceLevel+x@metadata$receiverSensitivity+x@metadata$transmitPower) +   20*log10(r) +   2*absorption*r -   x@metadata$correction +   10*log10(soundSpeed*x@metadata$pulseDuration/1e6*psi/2) 20*log10(a) -   (x@metadata$sourceLevel+x@metadata$receiverSensitivity+x@metadata$transmitPower) +   40*log10(r) +   2*absorption*r +   x@metadata$correction"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-echosounder-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From an echosounder Object — [[,echosounder-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-echosounder-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From an echosounder Object — [[,echosounder-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-g1sst-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a g1sst Object — [[,g1sst-method","title":"Extract Something From a g1sst Object — [[,g1sst-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-g1sst-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a g1sst Object — [[,g1sst-method","text":"","code":"# S4 method for class 'g1sst' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-g1sst-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a g1sst Object — [[,g1sst-method","text":"x g1sst object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-g1sst-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a g1sst Object — [[,g1sst-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-g1sst-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a g1sst Object — [[,g1sst-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined g1sst objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-g1sst-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a g1sst Object — [[,g1sst-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-g1sst-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a g1sst Object — [[,g1sst-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-gps-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a gps Object — [[,gps-method","title":"Extract Something From a gps Object — [[,gps-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-gps-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a gps Object — [[,gps-method","text":"","code":"# S4 method for class 'gps' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-gps-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a gps Object — [[,gps-method","text":"x gps object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-gps-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a gps Object — [[,gps-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-gps-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a gps Object — [[,gps-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined gps objects. \"longitude\" \"latitude\", corresponding vector returned. \"filename\" filename returned, known (.e. object created read.gps() .gps() filename argument specified).","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-gps-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a gps Object — [[,gps-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-gps-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a gps Object — [[,gps-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ladp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From an ladp Object — [[,ladp-method","title":"Extract Something From an ladp Object — [[,ladp-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ladp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From an ladp Object — [[,ladp-method","text":"","code":"# S4 method for class 'ladp' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ladp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From an ladp Object — [[,ladp-method","text":"x ladp object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ladp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From an ladp Object — [[,ladp-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ladp-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From an ladp Object — [[,ladp-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. metadataDerived item NULL, dataDerived item holds following synonyms: \"p\" \"pressure\", \"t\" \"temperature\" \"S\" \"salinity\".","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ladp-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From an ladp Object — [[,ladp-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-ladp-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From an ladp Object — [[,ladp-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-landsat-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a landsat Object — [[,landsat-method","title":"Extract Something From a landsat Object — [[,landsat-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-landsat-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a landsat Object — [[,landsat-method","text":"","code":"# S4 method for class 'landsat' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-landsat-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a landsat Object — [[,landsat-method","text":"x landsat object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-landsat-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a landsat Object — [[,landsat-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-landsat-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a landsat Object — [[,landsat-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. data entries difficult deal directly, users advised use dataDerived instead. Accessing band data.  data may accessed e.g. landsat[[\"panchromatic\"]], panchromatic band.  new “band” added landsatAdd(), may referred name.  cases, second argument can provided, govern decimation.  missing, relevant data returned.  present equal TRUE, data automatically decimated (subsampled) give approximately 800 elements longest side matrix.  present numerical, value governs decimation.  example, landsat[[\"panchromatic\",TRUE]] auto-decimate, typically reducing grid width height 16000 800.  Similarly, landsat[[\"panchromatic\",10]] reduce width height 1600.  machines limited RAM (e.g. 6GB), decimation good idea almost processing steps.  also makes sense plotting, fact done `decimate` argument plot,landsat-method(). Accessing derived data.  One may retrieve several derived quantities calculated data stored object: landsat[[\"longitude\"]] landsat[[\"latitude\"]] give pixel locations.  Accessing landsat[[\"temperature\"]] creates estimate ground temperature follows (see reference 4).  First, “count value” band 10, denoted \\(b_{10}\\) say, scaled coefficients stored image metadata using \\(\\lambda_L=b_{10}M_L+A_L\\) \\(M_L\\) \\(A_L\\) values stored metadata (e.g.  first landsat@metadata$header$radiance_mult_band_10) result used, coefficients metadata, compute Celcius temperature \\(T=K_2/ln(\\epsilon     K_1/\\lambda_L+1)-273.15\\). value emissivity \\(\\epsilon\\) set unity read.landsat(), although can changed easily later, assigning new value `landsat@metadata$emissivity`. default emissivity value set read.landsat() reference 11, within oceanic range suggested reference 5. Adjustment simple altering `landsat@metadata$emissivity`. value can single number meant apply whole image, matrix dimensions matching band 10.  matrix case probably useful images land, one might wish account different emissivities soil vegetation, etc.; example, Table 4 reference 9 lists 0.9668 soil 0.9863 vegetation, Table 5 reference 10 lists 0.971 0.987 quantities. Accessing metadata. Anything metadata can accessed name, e.g. landsat[[\"time\"]].  Note items simply copied source data file altered e.g. decimation.  exception lat-lon box, altered landsatTrim().","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-landsat-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a landsat Object — [[,landsat-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-landsat-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a landsat Object — [[,landsat-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lisst-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a lisst Object — [[,lisst-method","title":"Extract Something From a lisst Object — [[,lisst-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lisst-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a lisst Object — [[,lisst-method","text":"","code":"# S4 method for class 'lisst' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lisst-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a lisst Object — [[,lisst-method","text":"x lisst object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lisst-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a lisst Object — [[,lisst-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lisst-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a lisst Object — [[,lisst-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined lisst objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lisst-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a lisst Object — [[,lisst-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lisst-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a lisst Object — [[,lisst-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lobo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a lobo Object — [[,lobo-method","title":"Extract Something From a lobo Object — [[,lobo-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lobo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a lobo Object — [[,lobo-method","text":"","code":"# S4 method for class 'lobo' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lobo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a lobo Object — [[,lobo-method","text":"x lobo object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lobo-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a lobo Object — [[,lobo-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lobo-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a lobo Object — [[,lobo-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined cm objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lobo-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a lobo Object — [[,lobo-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-lobo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a lobo Object — [[,lobo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-met-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a met Object — [[,met-method","title":"Extract Something From a met Object — [[,met-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-met-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a met Object — [[,met-method","text":"","code":"# S4 method for class 'met' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-met-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a met Object — [[,met-method","text":"x met object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-met-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a met Object — [[,met-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-met-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a met Object — [[,met-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined met objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-met-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a met Object — [[,met-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-met-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a met Object — [[,met-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From an oce Object — [[,oce-method","title":"Extract Something From an oce Object — [[,oce-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From an oce Object — [[,oce-method","text":"","code":"# S4 method for class 'oce' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From an oce Object — [[,oce-method","text":"x oce object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-oce-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From an oce Object — [[,oce-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-oce-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From an oce Object — [[,oce-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-oce-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From an oce Object — [[,oce-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-odf-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From an odf Object — [[,odf-method","title":"Extract Something From an odf Object — [[,odf-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-odf-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From an odf Object — [[,odf-method","text":"","code":"# S4 method for class 'odf' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-odf-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From an odf Object — [[,odf-method","text":"x odf object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-odf-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From an odf Object — [[,odf-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-odf-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From an odf Object — [[,odf-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined odf objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-odf-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From an odf Object — [[,odf-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-rsk-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a rsk Object — [[,rsk-method","title":"Extract Something From a rsk Object — [[,rsk-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-rsk-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a rsk Object — [[,rsk-method","text":"","code":"# S4 method for class 'rsk' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-rsk-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a rsk Object — [[,rsk-method","text":"x rsk object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-rsk-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a rsk Object — [[,rsk-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-rsk-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a rsk Object — [[,rsk-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined rsk objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-rsk-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a rsk Object — [[,rsk-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-rsk-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a rsk Object — [[,rsk-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-sealevel-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a sealevel Object — [[,sealevel-method","title":"Extract Something From a sealevel Object — [[,sealevel-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-sealevel-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a sealevel Object — [[,sealevel-method","text":"","code":"# S4 method for class 'sealevel' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-sealevel-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a sealevel Object — [[,sealevel-method","text":"x sealevel object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-sealevel-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a sealevel Object — [[,sealevel-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-sealevel-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a sealevel Object — [[,sealevel-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined sealevel objects. many cases, focus variations sealevel elevation time, common use e.g. x[[\"time\"]] x[[\"elevation\"]] retrieve vectors quantities. Another common task retrieve location observations, using e.g. x[[\"longitude\"]] x[[\"latitude\"]].","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-sealevel-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a sealevel Object — [[,sealevel-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-sealevel-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a sealevel Object — [[,sealevel-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-section-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a section Object — [[,section-method","title":"Extract Something From a section Object — [[,section-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-section-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a section Object — [[,section-method","text":"","code":"# S4 method for class 'section' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-section-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a section Object — [[,section-method","text":"x section object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-section-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a section Object — [[,section-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-section-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a section Object — [[,section-method","text":"several possibilities, depending nature . \"?\", return value list containing four items, character vector holding names things can accessed [[. list compiled examining stations object, reporting entry found one . data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items hold data-like metadata-like things can derived . \"station\", [[ return list() ctd objects holding station data. j also given, specifies station (set stations) returned. j contains just single value, station returned, otherwise list returned. j integer, stations specified index, character, stations specified names stored within metadata. (Missing stations yield NULL return value.) \"station ID\", IDs stations section returned. \"dynamic height\", estimate dynamic height returned, calculated swDynamicHeight(x). \"distance\", distance along section returned, using geodDist(). \"depth\", vector containing depths stations returned. \"z\", vector containing z coordinates returned. \"theta\" \"potential temperature\", potential temperatures stations returned one vector.  Similarly, \"spice\" returns property known spice, using swSpice(). string ending \"Flag\", characters prior ending taken name variable contained within stations section. flag available first station section, flag values looked every station. j \"byStation\", list returned, one (unnamed) item per station. j \"grid:distance-pressure\" \"grid:time-pressure\", gridded representation returned, list elements: distance (km) time (POSIXct); pressure (dbar) field (whatever unit used ). See examples documentation plot,section-method().","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-section-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a section Object — [[,section-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-section-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a section Object — [[,section-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-section-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Something From a section Object — [[,section-method","text":"","code":"data(section) length(section[[\"latitude\"]]) #> [1] 2841 length(section[[\"latitude\", \"byStation\"]]) #> [1] 124 # Vector of all salinities, for all stations Sv <- section[[\"salinity\"]] # List of salinities, grouped by station Sl <- section[[\"salinity\", \"byStation\"]] # First station salinities Sl[[1]] #> [1] 36.1384 36.1103 35.9953 35.9372 35.8191"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-tidem-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a tidem Object — [[,tidem-method","title":"Extract Something From a tidem Object — [[,tidem-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-tidem-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a tidem Object — [[,tidem-method","text":"","code":"# S4 method for class 'tidem' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-tidem-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a tidem Object — [[,tidem-method","text":"x tidem object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-tidem-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a tidem Object — [[,tidem-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-tidem-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a tidem Object — [[,tidem-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. Note metadataDerived holds \"\", derived metadata values defined tidem objects. \"frequency\" \"freq\", vector constituent frequencies returned. \"amplitude\" vector constituent amplitudes returned. \"phase\" vector constituent phases returned. \"constituents\" data frame holding constituent name, frequency, amplitude phase returned. vector constituent names, return value \"constituents\", except named constituents returned.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-tidem-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a tidem Object — [[,tidem-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-topo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a topo Object — [[,topo-method","title":"Extract Something From a topo Object — [[,topo-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-topo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a topo Object — [[,topo-method","text":"","code":"# S4 method for class 'topo' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-topo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a topo Object — [[,topo-method","text":"x topo object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-topo-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a topo Object — [[,topo-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-topo-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a topo Object — [[,topo-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values available topo objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-topo-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a topo Object — [[,topo-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-topo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a topo Object — [[,topo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-topo-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Something From a topo Object — [[,topo-method","text":"","code":"data(topoWorld) dim(topoWorld[[\"z\"]]) #> [1] 720 360"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-windrose-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From a windrose Object — [[,windrose-method","title":"Extract Something From a windrose Object — [[,windrose-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-windrose-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From a windrose Object — [[,windrose-method","text":"","code":"# S4 method for class 'windrose' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-windrose-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From a windrose Object — [[,windrose-method","text":"x windrose object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-windrose-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From a windrose Object — [[,windrose-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-windrose-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From a windrose Object — [[,windrose-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. metadataDerived dataDerived items NULL.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-windrose-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From a windrose Object — [[,windrose-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-windrose-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From a windrose Object — [[,windrose-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-xbt-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Something From an xbt Object — [[,xbt-method","title":"Extract Something From an xbt Object — [[,xbt-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-xbt-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Something From an xbt Object — [[,xbt-method","text":"","code":"# S4 method for class 'xbt' x[[i, j, ...]]"},{"path":"https://dankelley.github.io/oce/reference/sub-sub-xbt-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Something From an xbt Object — [[,xbt-method","text":"x xbt object. character value indicating name item extract. j optional additional information item. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-xbt-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Something From an xbt Object — [[,xbt-method","text":"two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-xbt-method.html","id":"details-of-the-specialized-method","dir":"Reference","previous_headings":"","what":"Details of the Specialized Method","title":"Extract Something From an xbt Object — [[,xbt-method","text":"\"?\", return value list containing four items, character vector holding names things can accessed [[. data metadata items hold names entries object's data metadata slots, respectively. dataDerived metadataDerived items NULL, derived values defined cm objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-sub-xbt-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Extract Something From an xbt Object — [[,xbt-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-sub-xbt-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Something From an xbt Object — [[,xbt-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of an adp Object — [[<-,adp-method","title":"Replace Parts of an adp Object — [[<-,adp-method","text":"addition usual insertion elements name, note e.g. pitch gets stored pitchSlow. [[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of an adp Object — [[<-,adp-method","text":"","code":"# S4 method for class 'adp' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of an adp Object — [[<-,adp-method","text":"x adp object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of an adp Object — [[<-,adp-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adp-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Replace Parts of an adp Object — [[<-,adp-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adv-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of an adv Object — [[<-,adv-method","title":"Replace Parts of an adv Object — [[<-,adv-method","text":"Generally, [[ method lets users extract information oce objects, without know details internal storage.  many oce sub-classes, [[ can also return quantities computed object's contents.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adv-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of an adv Object — [[<-,adv-method","text":"","code":"# S4 method for class 'adv' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adv-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of an adv Object — [[<-,adv-method","text":"x adv object. character value indicating name item extract. j optional additional information item. ... ignored. value value inserted x.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adv-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of an adv Object — [[<-,adv-method","text":"adv object holds slow variables (.e. timeSlow data slot), assigning .e.g. heading actually assign variable name, instead assigns headingSlow. catch misapplication rule, error message issued assigned value length timeSlow. two-step process used try find requested information. First, class-specific function used (see “Details Specialized Method”).  yields nothing, general method used (see “Details General Method”).  methods fail, [[ returns NULL. understanding subclass required know can retrieved [[. dealing unfamiliar subclass, can useful first use x[[\"?\"]] get listing retrievable items. See “Details Specialized Method” information.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adv-method.html","id":"details-of-the-general-method","dir":"Reference","previous_headings":"","what":"Details of the General Method","title":"Replace Parts of an adv Object — [[<-,adv-method","text":"Note: text section identical oce subclasses, read may relevant class described help page. specialized method produces matches, following generalized method applied. specialized method, procedure hinges first values , optionally, j. work proceeds steps, testing sequence possible conditions sequence. check made whether names one standard oce slots. , [[ returns slot contents slot.  Thus, x[[\"metadata\"]] retrieve metadata slot, x[[\"data\"]] x[[\"processingLog\"]] return slots. string ending \"Unit\", characters preceding string taken name item data object, list containing unit returned (NULL unit). list consists item named unit, expression(), item named scale, string describing measurement scale. string ends \" unit\", e.g.  x[[\"temperature unit\"]] (note space), just expression returned, ends \" scale\", just scale returned. string ending \"Flag\", corresponding data-quality flag returned (NULL flag). object holds hydrographic information (pressure, salinity, temperature, longitude latitude) another set possibilities arises.  \"sigmaTheta\", value swSigmaTheta() called x sole argument, results returned. Similarly, swSigma0() used =\"sigma0\", swSpice() used =\"spice\". course, actions make sense objects contain relevant items within data slot. possibilities eliminated, action depends whether j provided.  j provided, string \"\", sought metadata slot, data slot, returning whichever found first.  words, j provided, metadata slot takes preference data slot. However, j provided, must either string \"metadata\" \"data\", directs look. none -listed conditions holds, NULL returned.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-adv-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Replace Parts of an adv Object — [[<-,adv-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-amsr-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of an amsr Object — [[<-,amsr-method","title":"Replace Parts of an amsr Object — [[<-,amsr-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-amsr-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of an amsr Object — [[<-,amsr-method","text":"","code":"# S4 method for class 'amsr' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-amsr-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of an amsr Object — [[<-,amsr-method","text":"x amsr object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-amsr-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of an amsr Object — [[<-,amsr-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-argo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of an argo Object — [[<-,argo-method","title":"Replace Parts of an argo Object — [[<-,argo-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-argo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of an argo Object — [[<-,argo-method","text":"","code":"# S4 method for class 'argo' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-argo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of an argo Object — [[<-,argo-method","text":"x argo object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-argo-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of an argo Object — [[<-,argo-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-bremen-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a bremen Object — [[<-,bremen-method","title":"Replace Parts of a bremen Object — [[<-,bremen-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-bremen-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a bremen Object — [[<-,bremen-method","text":"","code":"# S4 method for class 'bremen' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-bremen-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a bremen Object — [[<-,bremen-method","text":"x bremen object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-bremen-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a bremen Object — [[<-,bremen-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-cm-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a cm Object — [[<-,cm-method","title":"Replace Parts of a cm Object — [[<-,cm-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-cm-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a cm Object — [[<-,cm-method","text":"","code":"# S4 method for class 'cm' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-cm-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a cm Object — [[<-,cm-method","text":"x cm object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-cm-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a cm Object — [[<-,cm-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-coastline-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a coastline Object — [[<-,coastline-method","title":"Replace Parts of a coastline Object — [[<-,coastline-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-coastline-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a coastline Object — [[<-,coastline-method","text":"","code":"# S4 method for class 'coastline' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-coastline-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a coastline Object — [[<-,coastline-method","text":"x coastline object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-coastline-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a coastline Object — [[<-,coastline-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-coastline-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Replace Parts of a coastline Object — [[<-,coastline-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-ctd-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a ctd Object — [[<-,ctd-method","title":"Replace Parts of a ctd Object — [[<-,ctd-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-ctd-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a ctd Object — [[<-,ctd-method","text":"","code":"# S4 method for class 'ctd' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-ctd-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a ctd Object — [[<-,ctd-method","text":"x ctd object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-ctd-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a ctd Object — [[<-,ctd-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-ctd-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replace Parts of a ctd Object — [[<-,ctd-method","text":"","code":"data(ctd) summary(ctd) #> CTD Summary #> ----------- #>  #> * Instrument:          SBE 25 #> * Temp. serial no.:    1140 #> * Cond. serial no.:    832 #> * File:                \"/Users/kelley/git/oce/create_data/ctd/ctd.cnv\" #> * Original file:       c:\\seasoft3\\basin\\bed0302.hex #> * Start time:          2003-10-15 15:38:38 #> * Sample interval:     1 s #> * Cruise:              Halifax Harbour #> * Vessel:              Divcom3 #> * Station:             Stn 2 #> * Mean Location:       44.684N 63.644W #> * Data Overview #>  #>                               Min.   Mean   Max.   Dim. NAs OriginalName #>     scan                      130    220    310    181  0   \"scan\"       #>     timeS [s]                 129    219    309    181  0   \"timeS\"      #>     pressure [dbar]           1.48   22.885 44.141 181  0   \"pr\"         #>     depth [m]                 1.468  22.698 43.778 181  0   \"depS\"       #>     temperature [°C, IPTS-68] 2.919  7.5063 14.237 181  0   \"t068\"       #>     salinity [PSS-78]         29.916 31.219 31.498 181  0   \"sal00\"      #>     flag                      0      0      0      181  0   \"flag\"       #>  #> * Processing Log #>  #>     - 2018-11-14 20:03:47 UTC: `create 'ctd' object` #>     - 2018-11-14 20:03:47 UTC: `read.ctd.sbe(file = file, debug = 10, processingLog = processingLog)` #>     - 2018-11-14 20:03:47 UTC: `oce.edit(x = ctd, item = \"startTime\", value = as.POSIXct(gsub(\"1903\",     \"2003\", format(ctd[[\"startTime\"]])), tz = \"UTC\") + 4 * 3600,     reason = \"file had year=1903, instead of 2003\", person = \"Dan Kelley\")` # Move the CTD profile a nautical mile north. ctd[[\"latitude\"]] <- 1 / 60 + ctd[[\"latitude\"]] # acts in metadata # Increase the salinity by 0.01. ctd[[\"salinity\"]] <- 0.01 + ctd[[\"salinity\"]] # acts in data summary(ctd) #> CTD Summary #> ----------- #>  #> * Instrument:          SBE 25 #> * Temp. serial no.:    1140 #> * Cond. serial no.:    832 #> * File:                \"/Users/kelley/git/oce/create_data/ctd/ctd.cnv\" #> * Original file:       c:\\seasoft3\\basin\\bed0302.hex #> * Start time:          2003-10-15 15:38:38 #> * Sample interval:     1 s #> * Cruise:              Halifax Harbour #> * Vessel:              Divcom3 #> * Station:             Stn 2 #> * Mean Location:       44.701N 63.644W #> * Data Overview #>  #>                               Min.   Mean   Max.   Dim. NAs OriginalName #>     scan                      130    220    310    181  0   \"scan\"       #>     timeS [s]                 129    219    309    181  0   \"timeS\"      #>     pressure [dbar]           1.48   22.885 44.141 181  0   \"pr\"         #>     depth [m]                 1.468  22.698 43.778 181  0   \"depS\"       #>     temperature [°C, IPTS-68] 2.919  7.5063 14.237 181  0   \"t068\"       #>     salinity [PSS-78]         29.926 31.229 31.508 181  0   \"sal00\"      #>     flag                      0      0      0      181  0   \"flag\"       #>  #> * Processing Log #>  #>     - 2018-11-14 20:03:47 UTC: `create 'ctd' object` #>     - 2018-11-14 20:03:47 UTC: `read.ctd.sbe(file = file, debug = 10, processingLog = processingLog)` #>     - 2018-11-14 20:03:47 UTC: `oce.edit(x = ctd, item = \"startTime\", value = as.POSIXct(gsub(\"1903\",     \"2003\", format(ctd[[\"startTime\"]])), tz = \"UTC\") + 4 * 3600,     reason = \"file had year=1903, instead of 2003\", person = \"Dan Kelley\")`"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-echosounder-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of an echosounder Object — [[<-,echosounder-method","title":"Replace Parts of an echosounder Object — [[<-,echosounder-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-echosounder-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of an echosounder Object — [[<-,echosounder-method","text":"","code":"# S4 method for class 'echosounder' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-echosounder-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of an echosounder Object — [[<-,echosounder-method","text":"x echosounder object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-echosounder-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of an echosounder Object — [[<-,echosounder-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-g1sst-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a g1sst Object — [[<-,g1sst-method","title":"Replace Parts of a g1sst Object — [[<-,g1sst-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-g1sst-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a g1sst Object — [[<-,g1sst-method","text":"","code":"# S4 method for class 'g1sst' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-g1sst-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a g1sst Object — [[<-,g1sst-method","text":"x g1sst object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-g1sst-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a g1sst Object — [[<-,g1sst-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-gps-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a gps Object — [[<-,gps-method","title":"Replace Parts of a gps Object — [[<-,gps-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-gps-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a gps Object — [[<-,gps-method","text":"","code":"# S4 method for class 'gps' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-gps-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a gps Object — [[<-,gps-method","text":"x gps object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-gps-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a gps Object — [[<-,gps-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-ladp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of an ladp Object — [[<-,ladp-method","title":"Replace Parts of an ladp Object — [[<-,ladp-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-ladp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of an ladp Object — [[<-,ladp-method","text":"","code":"# S4 method for class 'ladp' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-ladp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of an ladp Object — [[<-,ladp-method","text":"x ladp object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-ladp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of an ladp Object — [[<-,ladp-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-landsat-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a landsat Object — [[<-,landsat-method","title":"Replace Parts of a landsat Object — [[<-,landsat-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-landsat-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a landsat Object — [[<-,landsat-method","text":"","code":"# S4 method for class 'landsat' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-landsat-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a landsat Object — [[<-,landsat-method","text":"x landsat object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-landsat-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a landsat Object — [[<-,landsat-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-lisst-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a lisst Object — [[<-,lisst-method","title":"Replace Parts of a lisst Object — [[<-,lisst-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-lisst-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a lisst Object — [[<-,lisst-method","text":"","code":"# S4 method for class 'lisst' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-lisst-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a lisst Object — [[<-,lisst-method","text":"x lisst object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-lisst-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a lisst Object — [[<-,lisst-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-lobo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a lobo Object — [[<-,lobo-method","title":"Replace Parts of a lobo Object — [[<-,lobo-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-lobo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a lobo Object — [[<-,lobo-method","text":"","code":"# S4 method for class 'lobo' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-lobo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a lobo Object — [[<-,lobo-method","text":"x lobo object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-lobo-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a lobo Object — [[<-,lobo-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-met-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a met Object — [[<-,met-method","title":"Replace Parts of a met Object — [[<-,met-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-met-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a met Object — [[<-,met-method","text":"","code":"# S4 method for class 'met' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-met-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a met Object — [[<-,met-method","text":"x met object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-met-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a met Object — [[<-,met-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of an oce Object — [[<-,oce-method","title":"Replace Parts of an oce Object — [[<-,oce-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of an oce Object — [[<-,oce-method","text":"","code":"# S4 method for class 'oce' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of an oce Object — [[<-,oce-method","text":"x oce object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-oce-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of an oce Object — [[<-,oce-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-oce-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Replace Parts of an oce Object — [[<-,oce-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-odf-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of an odf Object — [[<-,odf-method","title":"Replace Parts of an odf Object — [[<-,odf-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-odf-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of an odf Object — [[<-,odf-method","text":"","code":"# S4 method for class 'odf' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-odf-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of an odf Object — [[<-,odf-method","text":"x odf object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-odf-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of an odf Object — [[<-,odf-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-rsk-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of an rsk Object — [[<-,rsk-method","title":"Replace Parts of an rsk Object — [[<-,rsk-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-rsk-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of an rsk Object — [[<-,rsk-method","text":"","code":"# S4 method for class 'rsk' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-rsk-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of an rsk Object — [[<-,rsk-method","text":"x rsk object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-rsk-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of an rsk Object — [[<-,rsk-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-sealevel-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a sealevel Object — [[<-,sealevel-method","title":"Replace Parts of a sealevel Object — [[<-,sealevel-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-sealevel-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a sealevel Object — [[<-,sealevel-method","text":"","code":"# S4 method for class 'sealevel' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-sealevel-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a sealevel Object — [[<-,sealevel-method","text":"x sealevel object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-sealevel-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a sealevel Object — [[<-,sealevel-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-section-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a section Object — [[<-,section-method","title":"Replace Parts of a section Object — [[<-,section-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-section-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a section Object — [[<-,section-method","text":"","code":"# S4 method for class 'section' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-section-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a section Object — [[<-,section-method","text":"x section object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-section-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a section Object — [[<-,section-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-section-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Replace Parts of a section Object — [[<-,section-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-section-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replace Parts of a section Object — [[<-,section-method","text":"","code":"# 1. Change section ID from a03 to A03 data(section) section[[\"sectionId\"]] #> [1] \"a03\" section[[\"sectionId\"]] <- toupper(section[[\"sectionId\"]]) section[[\"sectionId\"]] #> [1] \"A03\" # 2. Add a millidegree to temperatures at station 10 section[[\"station\", 10]][[\"temperature\"]] <-     1e-3 + section[[\"station\", 10]][[\"temperature\"]]"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-tidem-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a tidem Object — [[<-,tidem-method","title":"Replace Parts of a tidem Object — [[<-,tidem-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-tidem-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a tidem Object — [[<-,tidem-method","text":"","code":"# S4 method for class 'tidem' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-tidem-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a tidem Object — [[<-,tidem-method","text":"x tidem object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-tidem-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a tidem Object — [[<-,tidem-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-topo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a topo Object — [[<-,topo-method","title":"Replace Parts of a topo Object — [[<-,topo-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-topo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a topo Object — [[<-,topo-method","text":"","code":"# S4 method for class 'topo' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-topo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a topo Object — [[<-,topo-method","text":"x topo object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-topo-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a topo Object — [[<-,topo-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-windrose-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of a windrose Object — [[<-,windrose-method","title":"Replace Parts of a windrose Object — [[<-,windrose-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-windrose-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of a windrose Object — [[<-,windrose-method","text":"","code":"# S4 method for class 'windrose' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-windrose-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of a windrose Object — [[<-,windrose-method","text":"x windrose object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-windrose-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of a windrose Object — [[<-,windrose-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sub-subset-xbt-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Parts of an xbt Object — [[<-,xbt-method","title":"Replace Parts of an xbt Object — [[<-,xbt-method","text":"[[<- method works oce objects. purpose, related extraction method, [[, insulate users internal details oce objects, looking items within various storage slots object. Items actually stored can also replaced, including units data-quality flags.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-xbt-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Parts of an xbt Object — [[<-,xbt-method","text":"","code":"# S4 method for class 'xbt' x[[i, j, ...]] <- value"},{"path":"https://dankelley.github.io/oce/reference/sub-subset-xbt-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Parts of an xbt Object — [[<-,xbt-method","text":"x xbt object. character value naming item replace. j optional additional information item. ... optional additional information (ignored). value value placed x, somewhere.","code":""},{"path":"https://dankelley.github.io/oce/reference/sub-subset-xbt-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replace Parts of an xbt Object — [[<-,xbt-method","text":"[[ method, procedure works steps. First, metadata slot x checked see whether contains something named . , named item replaced value. Otherwise, string value ends Unit, characters preceding taken name variable, metadata slot x updated store unit, e.g.   Similarly, ends Flag, quality-control flags set defined result, e.g.   Otherwise, pmatch() used partial-string match names items data slot x. first item found () updated hold value result. none conditions met, warning issued.","code":"x[[\"temperatureUnits\"]] <- list(unit=expression(degree*F),scale=\"\") o[[\"temperatureFlags\"]] <- c(2,4,2,2)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-adp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset an adp Object — subset,adp-method","title":"Subset an adp Object — subset,adp-method","text":"Subset adp (acoustic Doppler profile) object, manner function somewhat analogous subset.data.frame().","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-adp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset an adp Object — subset,adp-method","text":"","code":"# S4 method for class 'adp' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-adp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset an adp Object — subset,adp-method","text":"x adp object. subset condition applied data portion x.  See “Details”. ... Ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-adp-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset an adp Object — subset,adp-method","text":"adp object.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-adp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subset an adp Object — subset,adp-method","text":"data type, subsetting can time, ensembleNumber, distance. may combined, easy use string calls carry combined operations, e.g. subset(subset(adp,distance<d0), time<t0)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-adp-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset an adp Object — subset,adp-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-adp-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset an adp Object — subset,adp-method","text":"","code":"library(oce) data(adp) # 1. Look at first part of time series, organized by time earlyTime <- subset(adp, time < mean(range(adp[[\"time\"]]))) plot(earlyTime)   # 2. Look at first ten ensembles (AKA profiles) en <- adp[[\"ensembleNumber\"]] firstTen <- subset(adp, ensembleNumber < en[11]) plot(firstTen)"},{"path":"https://dankelley.github.io/oce/reference/subset-adv-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset an adv Object — subset,adv-method","title":"Subset an adv Object — subset,adv-method","text":"Subset adv (acoustic Doppler profile) object.  function somewhat analogous subset.data.frame(), except subsets can specified terms time.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-adv-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset an adv Object — subset,adv-method","text":"","code":"# S4 method for class 'adv' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-adv-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset an adv Object — subset,adv-method","text":"x adv object. subset condition applied data portion x. See “Details”. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-adv-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset an adv Object — subset,adv-method","text":"new adv object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-adv-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset an adv Object — subset,adv-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-adv-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset an adv Object — subset,adv-method","text":"","code":"library(oce) data(adv) plot(adv)  plot(subset(adv, time < mean(range(adv[[\"time\"]]))))"},{"path":"https://dankelley.github.io/oce/reference/subset-amsr-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset an amsr Object — subset,amsr-method","title":"Subset an amsr Object — subset,amsr-method","text":"Return subset amsr object.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-amsr-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset an amsr Object — subset,amsr-method","text":"","code":"# S4 method for class 'amsr' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-amsr-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset an amsr Object — subset,amsr-method","text":"x amsr object. subset expression indicating subset x. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-amsr-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset an amsr Object — subset,amsr-method","text":"amsr object.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-amsr-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subset an amsr Object — subset,amsr-method","text":"function used subset data within amsr object longitude latitude.  two methods combined single call, two calls required, shown Example.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-amsr-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset an amsr Object — subset,amsr-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-amsr-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset an amsr Object — subset,amsr-method","text":"","code":"library(oce) data(amsr) # see ?amsr for how to read and composite such objects sub <- subset(amsr, -75 < longitude & longitude < -45) sub <- subset(sub, 40 < latitude & latitude < 50) plot(sub) data(coastlineWorld) lines(coastlineWorld[[\"longitude\"]], coastlineWorld[[\"latitude\"]])"},{"path":"https://dankelley.github.io/oce/reference/subset-argo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset an argo Object — subset,argo-method","title":"Subset an argo Object — subset,argo-method","text":"Subset argo object, either selecting just \"adjusted\" data subsetting pressure variables.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-argo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset an argo Object — subset,argo-method","text":"","code":"# S4 method for class 'argo' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-argo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset an argo Object — subset,argo-method","text":"x argo object. subset expression indicating subset x. ... optional arguments, first examined. possibility within, polygon enclosing data retained. must either list data frame, containing items named either x y longitude latitude; see Example 4.  within given, subset ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-argo-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset an argo Object — subset,argo-method","text":"argo object.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-argo-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subset an argo Object — subset,argo-method","text":"subset string \"adjusted\", subset replaces station variables adjusted counterparts. argo notation, e.g. PSAL replaced PSAL_ADJUSTED; present notation, means salinity data slot replaced salinityAdjusted, latter deleted. Similar replacements also done flags stored metadata slot. subset expression, action somewhat similar subset functions, restriction one independent variable may used call function, repeated calls necessary subset based one independent variable.  Subsetting may done anything stored data, e.g. time, latitude, longitude, profile, dataMode, pressure profile (made-variable), id (metadata slot) ID (synonym id). Note subsetting pressure preserves matrix shape, setting discarded values NA, opposed dropping data (case time, example).","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-argo-method.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Subset an argo Object — subset,argo-method","text":"","code":"# Example 2: restrict attention to delayed-mode profiles. par(mfrow=c(1, 1)) plot(subset(argo, dataMode == \"D\"))  # Example 3: contrast adjusted and unadjusted data par(mfrow=c(1, 2)) plotTS(argo) plotTS(subset(argo, \"adjusted\"))  # Example 2. Subset by a polygon determined with locator() par(mfrow=c(1, 2)) plot(argo, which=\"map\") # Can get a boundary with e.g. locator(4) boundary <- list(x=c(-65, -40, -40, -65), y=c(65, 65, 45, 45)) argoSubset <- subset(argo, within=boundary) plot(argoSubset, which=\"map\")"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-argo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset an argo Object — subset,argo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-argo-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset an argo Object — subset,argo-method","text":"","code":"library(oce) data(argo)  # Example 1: subset by time, longitude, and pressure par(mfrow = c(2, 2)) plot(argo) plot(subset(argo, time > mean(time))) plot(subset(argo, longitude > mean(longitude))) plot(subset(argoGrid(argo), pressure > 500 & pressure < 1000), which = 5)"},{"path":"https://dankelley.github.io/oce/reference/subset-cm-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a cm Object — subset,cm-method","title":"Subset a cm Object — subset,cm-method","text":"function somewhat analogous subset.data.frame().","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-cm-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a cm Object — subset,cm-method","text":"","code":"# S4 method for class 'cm' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-cm-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a cm Object — subset,cm-method","text":"x cm object. subset condition applied data portion x. See “Details”. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-cm-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a cm Object — subset,cm-method","text":"new cm object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-cm-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a cm Object — subset,cm-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-cm-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset a cm Object — subset,cm-method","text":"","code":"library(oce) data(cm) plot(cm)  plot(subset(cm, time < mean(range(cm[[\"time\"]]))))"},{"path":"https://dankelley.github.io/oce/reference/subset-coastline-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a coastline Object — subset,coastline-method","title":"Subset a coastline Object — subset,coastline-method","text":"Subsets coastline object according limiting values longitude latitude.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-coastline-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a coastline Object — subset,coastline-method","text":"","code":"# S4 method for class 'coastline' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-coastline-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a coastline Object — subset,coastline-method","text":"x coastline object. subset expression indicating subset x. See “Details”. ... optional additional arguments, one considered one named debug, integer controls level debugging. supplied, debug assumed 0, meaning debugging. 1, steps determining bounding box shown. 2 larger, additional processing steps shown, including extraction every polygon involved final result.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-coastline-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a coastline Object — subset,coastline-method","text":"coastline object.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-coastline-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subset a coastline Object — subset,coastline-method","text":"illustrated “Examples”, subset must expression indicates limits latitude longitude. individual elements provided R notation, mathematical notation (.e. 30<latitude<60 work). Ampersands must used combine limits.  simplest way understand copy example directly, modify stated limits. Note > comparison permitted, < converted <= calculation. Similarly, && converted &. Spaces expression ignored. convenience, longitude latitude may abbreviated lon lat, “Examples”.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-coastline-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a coastline Object — subset,coastline-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-coastline-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset a coastline Object — subset,coastline-method","text":"","code":"library(oce) data(coastlineWorld) # Subset to a box centred on Nova Scotia, Canada if (requireNamespace(\"sf\")) {     cl <- subset(coastlineWorld, -80 < lon & lon <- 50 & 30 < lat & lat < 60)     # The plot demonstrates that the trimming is as requested.     plot(cl, clon = -65, clat = 45, span = 6000)     rect(-80, 30, -50, 60, bg = \"transparent\", border = \"red\") }"},{"path":"https://dankelley.github.io/oce/reference/subset-ctd-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a ctd Object — subset,ctd-method","title":"Subset a ctd Object — subset,ctd-method","text":"Return subset ctd object.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-ctd-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a ctd Object — subset,ctd-method","text":"","code":"# S4 method for class 'ctd' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-ctd-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a ctd Object — subset,ctd-method","text":"x ctd object. subset expression indicating subset x. ... optional arguments, first examined. possibility argument named indices. See “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-ctd-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a ctd Object — subset,ctd-method","text":"ctd object.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-ctd-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subset a ctd Object — subset,ctd-method","text":"function used subset data within ctd object. two ways working. subset supplied, logical expression evaluated within environment data slot object (see Example 1). Alternatively, ... list contains expression defining indices, expression used subset item within data slot (see Example 2).","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-ctd-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a ctd Object — subset,ctd-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-ctd-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset a ctd Object — subset,ctd-method","text":"","code":"library(oce) data(ctd) plot(ctd)  # Example 1 plot(subset(ctd, pressure < 10))  # Example 2 plot(subset(ctd, indices = 1:10))"},{"path":"https://dankelley.github.io/oce/reference/subset-echosounder-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset an echosounder Object — subset,echosounder-method","title":"Subset an echosounder Object — subset,echosounder-method","text":"function somewhat analogous subset.data.frame(). Subsetting can time depth, may combined; use sequence calls subset .","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-echosounder-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset an echosounder Object — subset,echosounder-method","text":"","code":"# S4 method for class 'echosounder' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-echosounder-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset an echosounder Object — subset,echosounder-method","text":"x echosounder object. subset condition applied data portion x.  See “Details”. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-echosounder-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset an echosounder Object — subset,echosounder-method","text":"echosounder object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-echosounder-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset an echosounder Object — subset,echosounder-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-echosounder-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset an echosounder Object — subset,echosounder-method","text":"","code":"library(oce) data(echosounder) plot(echosounder)  plot(subset(echosounder, depth < 10))  plot(subset(echosounder, time < mean(range(echosounder[[\"time\"]]))))"},{"path":"https://dankelley.github.io/oce/reference/subset-lobo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a lobo Object — subset,lobo-method","title":"Subset a lobo Object — subset,lobo-method","text":"Subset lobo object, way somewhat analogous subset.data.frame().","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-lobo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a lobo Object — subset,lobo-method","text":"","code":"# S4 method for class 'lobo' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-lobo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a lobo Object — subset,lobo-method","text":"x lobo object. subset condition applied data portion x.  See “Details”. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-lobo-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a lobo Object — subset,lobo-method","text":"lobo object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-lobo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a lobo Object — subset,lobo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-met-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a met Object — subset,met-method","title":"Subset a met Object — subset,met-method","text":"function somewhat analogous subset.data.frame().","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-met-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a met Object — subset,met-method","text":"","code":"# S4 method for class 'met' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-met-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a met Object — subset,met-method","text":"x met object. subset expression indicating subset x. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-met-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a met Object — subset,met-method","text":"met object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-met-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a met Object — subset,met-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-met-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset a met Object — subset,met-method","text":"","code":"library(oce) data(met) # Few days surrounding Hurricane Juan plot(subset(met, time > as.POSIXct(\"2003-09-27\", tz = \"UTC\")))"},{"path":"https://dankelley.github.io/oce/reference/subset-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset an oce Object — subset,oce-method","title":"Subset an oce Object — subset,oce-method","text":"basic class general oce objects.  specialised versions sub-classes, e.g. subset,ctd-method() ctd objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset an oce Object — subset,oce-method","text":"","code":"# S4 method for class 'oce' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset an oce Object — subset,oce-method","text":"x oce object. subset logical expression indicating take subset; form depends sub-class. ... optional arguments, used specialized methods, e.g. subset,section-method().","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-oce-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset an oce Object — subset,oce-method","text":"oce object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-oce-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset an oce Object — subset,oce-method","text":"","code":"library(oce) data(ctd) # Select just the top 10 metres (pressure less than 10 dbar) top10 <- subset(ctd, pressure < 10) par(mfrow = c(1, 2)) plotProfile(ctd) plotProfile(top10)"},{"path":"https://dankelley.github.io/oce/reference/subset-odf-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset an odf Object — subset,odf-method","title":"Subset an odf Object — subset,odf-method","text":"function somewhat analogous subset.data.frame().","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-odf-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset an odf Object — subset,odf-method","text":"","code":"# S4 method for class 'odf' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-odf-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset an odf Object — subset,odf-method","text":"x odf object. subset condition applied data portion x.  See “Details”. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-odf-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset an odf Object — subset,odf-method","text":"odf object.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-odf-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subset an odf Object — subset,odf-method","text":"seems likely users first convert odf object another class (e.g. ctd) use subset method class; note methods interpret ... argument.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-odf-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset an odf Object — subset,odf-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-rsk-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a rsk Object — subset,rsk-method","title":"Subset a rsk Object — subset,rsk-method","text":"Subset rsk object.  function somewhat analogous subset.data.frame(), subsetting permitted time.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-rsk-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a rsk Object — subset,rsk-method","text":"","code":"# S4 method for class 'rsk' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-rsk-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a rsk Object — subset,rsk-method","text":"x rsk object. subset condition applied data portion x. See “Details”. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-rsk-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a rsk Object — subset,rsk-method","text":"rsk object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-rsk-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a rsk Object — subset,rsk-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-rsk-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset a rsk Object — subset,rsk-method","text":"","code":"library(oce) data(rsk) plot(rsk)  plot(subset(rsk, time < mean(range(rsk[[\"time\"]]))))"},{"path":"https://dankelley.github.io/oce/reference/subset-sealevel-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a sealevel Object — subset,sealevel-method","title":"Subset a sealevel Object — subset,sealevel-method","text":"function somewhat analogous subset.data.frame(), subsetting permitted time.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-sealevel-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a sealevel Object — subset,sealevel-method","text":"","code":"# S4 method for class 'sealevel' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-sealevel-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a sealevel Object — subset,sealevel-method","text":"x sealevel object. subset condition applied data portion x. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-sealevel-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a sealevel Object — subset,sealevel-method","text":"new sealevel object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-sealevel-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a sealevel Object — subset,sealevel-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-sealevel-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset a sealevel Object — subset,sealevel-method","text":"","code":"library(oce) data(sealevel) plot(sealevel)  plot(subset(sealevel, time < mean(range(sealevel[[\"time\"]]))))"},{"path":"https://dankelley.github.io/oce/reference/subset-section-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a section Object — subset,section-method","title":"Subset a section Object — subset,section-method","text":"Return subset section object.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-section-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a section Object — subset,section-method","text":"","code":"# S4 method for class 'section' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-section-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a section Object — subset,section-method","text":"x section object. subset optional indication either stations kept, data kept within stations.  See “Details”. ... optional arguments, first examined. possibilities argument indices, must vector station indices (see Example 6), within, must list data frame, containing items named either x y longitude latitude (see Example 7). within given, subset ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-section-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a section Object — subset,section-method","text":"section object.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-section-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subset a section Object — subset,section-method","text":"function used subset data within stations section, choose subset stations . first case handled subset argument, second handled ... contains vector named indices. Either subset indices must provided, . \"subset\" method, subset indicates either stations kept, data kept within stations. first step processing check presence certain key words subset expression. distance present, stations selected according condition distance (km) first station given station (Example 1). either longitude latitude given, stations selected according stated condition (Example 2). stationId present, selection terms station ID (sequence number) used (Example 3). cases, stations either selected entirety dropped entirety. none keywords present, subset expression evaluated context data slot CTD stations stored within x. (Note slot normally contain keywords listed previous paragraph; , odd results may occur.) station examined turn, subset evaluated individually . evaluation produces logical vector. vector length 1 (Examples 4 5) station retained discarded, accordingly. vector longer, logical vector used sieve subsample individual CTD profile. \"indices\" method, stations selected using indices, may vector integers indicate sequence number, logical vector, indicating stations keep.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-section-method.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Subset a section Object — subset,section-method","text":"","code":"# Example 7. Subset by a polygon determined with locator() par(mfrow=c(2, 1)) plot(section, which=\"map\") bdy <- locator(4) # choose a polygon near N. America GS <- subset(section, within=bdy) plot(GS, which=\"map\")"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-section-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a section Object — subset,section-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-section-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset a section Object — subset,section-method","text":"","code":"library(oce) data(section)  # Example 1. Stations within 500 km of the first station starting <- subset(section, distance < 500)  # Example 2. Stations east of 50W east <- subset(section, longitude > (-50))  # Example 3. Gulf Stream GS <- subset(section, 113 <= stationId & stationId <= 129)  # Example 4. Only stations with more than 5 pressure levels long <- subset(section, length(pressure) > 5)  # Example 5. Only stations that have some data in top 50 dbar surfacing <- subset(section, min(pressure) < 50)  # Example 6. Similar to #4, but done in more detailed way long <- subset(section,     indices = unlist(lapply(         section[[\"station\"]],         function(s) 5 < length(s[[\"pressure\"]])     )) )"},{"path":"https://dankelley.github.io/oce/reference/subset-topo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a topo Object — subset,topo-method","title":"Subset a topo Object — subset,topo-method","text":"function somewhat analogous subset.data.frame(). Subsetting can time distance, may combined; use sequence calls subset .","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-topo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a topo Object — subset,topo-method","text":"","code":"# S4 method for class 'topo' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-topo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a topo Object — subset,topo-method","text":"x topo object. subset condition applied data portion x. See “Details”. ... Ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-topo-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a topo Object — subset,topo-method","text":"new topo object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-topo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a topo Object — subset,topo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-topo-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset a topo Object — subset,topo-method","text":"","code":"# northern hemisphere library(oce) data(topoWorld) plot(subset(topoWorld, latitude > 0))"},{"path":"https://dankelley.github.io/oce/reference/subset-xbt-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset an xbt Object — subset,xbt-method","title":"Subset an xbt Object — subset,xbt-method","text":"function somewhat analogous subset.data.frame().","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-xbt-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset an xbt Object — subset,xbt-method","text":"","code":"# S4 method for class 'xbt' subset(x, subset, ...)"},{"path":"https://dankelley.github.io/oce/reference/subset-xbt-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset an xbt Object — subset,xbt-method","text":"x xbt object. subset condition applied data portion x. See “Details”. ... ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-xbt-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset an xbt Object — subset,xbt-method","text":"new xbt object.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subset-xbt-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset an xbt Object — subset,xbt-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/subset-xbt-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset an xbt Object — subset,xbt-method","text":"","code":"library(oce) data(xbt) plot(xbt)  plot(subset(xbt, depth < mean(range(xbt[[\"depth\"]]))))"},{"path":"https://dankelley.github.io/oce/reference/subtractBottomVelocity.html","id":null,"dir":"Reference","previous_headings":"","what":"Subtract Bottom Velocity From an adp Object — subtractBottomVelocity","title":"Subtract Bottom Velocity From an adp Object — subtractBottomVelocity","text":"Subtracts bottom tracking velocities \"adp\" object. Works coordinate systems (beam, xyz, enu).","code":""},{"path":"https://dankelley.github.io/oce/reference/subtractBottomVelocity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subtract Bottom Velocity From an adp Object — subtractBottomVelocity","text":"","code":"subtractBottomVelocity(x, despike = FALSE, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/subtractBottomVelocity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subtract Bottom Velocity From an adp Object — subtractBottomVelocity","text":"x adp object contains bottom-tracking velocities. despike either logical value univariate function. controls whether bottom velocity (bv) values altered subtracted beam velocities. TRUE bv values despiked first calling despike(). function, function used instead despike(), e.g. function(x) despike(x, reference=\"smooth\") change reference function despiking default \"median\". debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/subtractBottomVelocity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subtract Bottom Velocity From an adp Object — subtractBottomVelocity","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-adp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize an adp Object — summary,adp-method","title":"Summarize an adp Object — summary,adp-method","text":"Summarize data adp object.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-adp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize an adp Object — summary,adp-method","text":"","code":"# S4 method for class 'adp' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-adp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize an adp Object — summary,adp-method","text":"object object class \"adp\", usually, result call read.oce(), read.adp.rdi(), read.adp.nortek(). ... arguments passed methods.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-adp-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize an adp Object — summary,adp-method","text":"matrix containing statistics elements data slot.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-adp-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summarize an adp Object — summary,adp-method","text":"Pertinent summary information presented.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-adp-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize an adp Object — summary,adp-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-adv-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize an adv Object — summary,adv-method","title":"Summarize an adv Object — summary,adv-method","text":"Summarize data adv object.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-adv-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize an adv Object — summary,adv-method","text":"","code":"# S4 method for class 'adv' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-adv-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize an adv Object — summary,adv-method","text":"object object class \"adv\", usually, result call read.adv(). ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-adv-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize an adv Object — summary,adv-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-adv-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize an adv Object — summary,adv-method","text":"","code":"library(oce) data(adv) summary(adv) #> ADV Summary #> ----------- #>  #> * Instrument:    vector, serial number ``(serial number redacted)`` #> * Filename:      `(file name redacted)` #> * Location:      47.87943 N ,  -69.72533 E  #> * Time: 2008-07-01 00:00:00 to 2008-07-01 00:00:59 (480 samples, mean increment 0.1250001 s) #> * Data Overview #>  #>                          Min.                Mean                Max.                Dim.    NAs #>     v [m/s]              -0.080871           0.00069514          0.057789            \"480x3\" 0   #>     a                    NA                  NA                  NA                  \"480x3\" 0   #>     q                    NA                  NA                  NA                  \"480x3\" 0   #>     time                 2008-07-01 00:00:00 2008-07-01 00:00:30 2008-07-01 00:00:59 480     0   #>     pressure [dbar]      16.85               16.866              16.879              480     0   #>     timeBurst            NA                  NA                  NA                  480     480 #>     recordsBurst         NA                  NA                  NA                  480     480 #>     voltageSlow          9.7                 9.71                9.8                 60      0   #>     timeSlow             2008-07-01 00:00:00 2008-07-01 00:00:30 2008-07-01 00:00:59 60      0   #>     headingSlow [°]      -23.39              -23.39              -23.39              60      0   #>     pitchSlow [°]        0.4                 0.5                 0.6                 60      0   #>     rollSlow [°]         -6.2                -6.145              -6.1                60      0   #>     temperatureSlow [°C] 6.47                6.4997              6.51                60      0   #>  #> * Processing Log #>  #>     - 2015-12-23 17:53:39 UTC: `read.oce(file = \"/data/archive/sleiwex/2008/moorings/m05/adv/nortek_1943/raw/adv_nortek_1943.vec\",     from = as.POSIXct(\"2008-06-25 00:00:00\", tz = \"UTC\"), to = as.POSIXct(\"2008-07-06 00:00:00\",         tz = \"UTC\"), latitude = 47.87943, longitude = -69.72533)` #>     - 2015-12-23 17:53:54 UTC: `retime(x = m05VectorBeam, a = 0.58, b = 6.3892e-07, t0 = as.POSIXct(\"2008-07-01 00:00:00\",     tz = \"UTC\"))` #>     - 2015-12-23 17:53:55 UTC: `subset(x, subset=as.POSIXct(\"2008-06-25 13:00:00\", tz = \"UTC\") <= time & time <=      as.POSIXct(\"2008-07-03 00:50:00\", tz = \"UTC\"))` #>     - 2015-12-23 17:53:55 UTC: `oceEdit(x = m05VectorBeam, item = \"transformationMatrix\", value = rbind(c(11033,     -5803, -5238), c(347, -9622, 9338), c(-1418, -1476, -1333))/4096,     reason = \"Nortek email 2011-02-14\", person = \"DEK\")` #>     - 2015-12-23 17:53:55 UTC: `use aquadoppHR heading; despike own pitch and roll` #>     - 2015-12-23 17:54:11 UTC: `beamToXyzAdv(x = x)` #>     - 2015-12-23 17:54:34 UTC: `xyzToEnu(x, declination=-18.099, horizontalCase=TRUE, sensorOrientiation=upward, debug=0)`"},{"path":"https://dankelley.github.io/oce/reference/summary-amsr-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize an amsr Object — summary,amsr-method","title":"Summarize an amsr Object — summary,amsr-method","text":"Print summary key components object.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-amsr-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize an amsr Object — summary,amsr-method","text":"","code":"# S4 method for class 'amsr' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-amsr-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize an amsr Object — summary,amsr-method","text":"object amsr object. ... ignored.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-amsr-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize an amsr Object — summary,amsr-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-argo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize an argo Object — summary,argo-method","title":"Summarize an argo Object — summary,argo-method","text":"Summarizes data argo object.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-argo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize an argo Object — summary,argo-method","text":"","code":"# S4 method for class 'argo' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-argo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize an argo Object — summary,argo-method","text":"object object class \"argo\", usually, result call read.argo(). ... arguments passed methods.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-argo-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize an argo Object — summary,argo-method","text":"matrix containing statistics elements data slot.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-argo-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summarize an argo Object — summary,argo-method","text":"Pertinent summary information presented.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-argo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize an argo Object — summary,argo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-argo-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize an argo Object — summary,argo-method","text":"","code":"library(oce) data(argo) summary(argo) #> Argo Summary #> ------------ #>  #> * Source:              \"/Users/kelley/git/oce/create_data/argo/6900388_prof.nc\" #> * ID:                  \"6900388\" #> * Feature type:        \"trajectoryProfile\" #> * Profiles:            210 delayed; 0 adjusted; 13 realtime #> * Time: 2005-10-29 13:57:42 to 2011-11-27 17:58:39 (223 samples, mean increment 10.00075 day) #> * Data Overview #>  #>                                           Min.                Mean                Max.                Dim.     NAs OriginalName          #>     time                                  2005-10-29 13:57:42 2008-11-12 16:18:05 2011-11-27 17:58:40 223      0   \"-\"                   #>     latitude [°N]                         48.743              56.715              64.335              223      0   \"LATITUDE\"            #>     longitude [°E]                        -60.52              -37.077             -21.385             223      0   \"LONGITUDE\"           #>     pressure [dbar]                       3.5                 521.31              6534.6              \"56x223\" 106 \"PRES\"                #>     pressureAdjusted [dbar]               3.6                 520.34              1778.9              \"56x223\" 874 \"PRES_ADJUSTED\"       #>     pressureAdjustedError [dbar]          2.4                 2.4                 2.4                 \"56x223\" 874 \"PRES_ADJUSTED_ERROR\" #>     salinity [PSS-78]                     0                   34.911              47.899              \"56x223\" 106 \"PSAL\"                #>     salinityAdjusted [PSS-78]             32.85               34.935              35.842              \"56x223\" 840 \"PSAL_ADJUSTED\"       #>     salinityAdjustedError [PSS-78]        0.01                0.01                0.01                \"56x223\" 840 \"PSAL_ADJUSTED_ERROR\" #>     temperature [°C, ITS-90]              -1.564              6.1216              55.997              \"56x223\" 106 \"TEMP\"                #>     temperatureAdjusted [°C, ITS-90]      -1.564              6.0916              14.914              \"56x223\" 837 \"TEMP_ADJUSTED\"       #>     temperatureAdjustedError [°C, ITS-90] 0.002               0.002               0.002               \"56x223\" 837 \"TEMP_ADJUSTED_ERROR\" #>  #> * Data-quality Flag Scheme #>  #>     name    \"argo\" #>     mapping list(not_assessed=0, passed_all_tests=1, probably_good=2, probably_bad=3, bad=4, changed=5, not_used_6=6, not_used_7=7, estimated=8, missing=9) #>     default c(0, 3, 4, 9) #>  #> * Data-quality Flags #>  #>     pressure:            \"1\" 12327, \"4\" 55 #>     pressureAdjusted:    \"2\" 11614 #>     salinity:            \"1\" 12348, \"4\" 34 #>     salinityAdjusted:    \"2\" 11648 #>     temperature:         \"1\" 12362, \"4\" 20 #>     temperatureAdjusted: \"2\" 11651 #>  #> * Processing Log #>  #>     - 2022-04-11 15:55:43 UTC: `create 'argo' object` #>     - 2022-04-11 15:55:43 UTC: `initializeFlagScheme(object, name=\"argo\", mapping=list(not_assessed=0,passed_all_tests=1,probably_good=2,probably_bad=3,bad=4,changed=5,not_used_6=6,not_used_7=7,estimated=8,missing=9)), default=c(0,3,4,9))` #>     - 2022-04-11 15:55:44 UTC: `read.argo(file=\"/Users/kelley/git/oce/create_data/argo/6900388_prof.nc\")`"},{"path":"https://dankelley.github.io/oce/reference/summary-bremen-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a bremen Object — summary,bremen-method","title":"Summarize a bremen Object — summary,bremen-method","text":"Pertinent summary information presented, including station name, sampling location, data ranges, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-bremen-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a bremen Object — summary,bremen-method","text":"","code":"# S4 method for class 'bremen' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-bremen-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a bremen Object — summary,bremen-method","text":"object bremen object. ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-bremen-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a bremen Object — summary,bremen-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-cm-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a cm Object — summary,cm-method","title":"Summarize a cm Object — summary,cm-method","text":"Summarizes data cm object, presenting information station name, sampling location, data ranges, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-cm-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a cm Object — summary,cm-method","text":"","code":"# S4 method for class 'cm' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-cm-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a cm Object — summary,cm-method","text":"object cm object. ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-cm-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a cm Object — summary,cm-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-cm-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize a cm Object — summary,cm-method","text":"","code":"library(oce) data(cm) summary(cm) #> Cm summary #> ---------- #>  #> * File source:   \"/Users/kelley/Dropbox/data/archive/sleiwex/2008/moorings/m11/cm/interocean_0811786/manufacturer/cm_interocean_0811786.s4a.tab\" #> * Instr. type:   (2Hz)S4 #> * Serial Num.:   8111786 #> * Version:       2.399 #> * North:         magnetic #> * Time: 2008-06-26 to 2008-06-26 23:59:00 (1440 samples, mean increment 1 min) #> * Data Overview #>  #>                              Min.       Mean                Max.                Dim. NAs  OriginalName #>     Sample..                 842        1561.5              2281                1440 0    \"Sample #\"   #>     Date                     NA         NA                  NA                  1440 0    \"Date\"       #>     Time                     NA         NA                  NA                  1440 0    \"Time\"       #>     dec.S                    0          0                   0                   1440 0    \"dec S\"      #>     v [m/s]                  -0.862     -0.088736           0.74                1440 0    \"Vnorth\"     #>     u [m/s]                  -0.478     0.02761             0.654               1440 0    \"Veast\"      #>     Speed                    1.44       53.569              98.29               1440 0    \"Speed\"      #>     Dir                      7          126.99              352.1               1440 0    \"Dir\"        #>     Vref                     NA         NA                  NA                  1440 1440 \"Vref\"       #>     Hx                       -210       -31.052             177                 1440 0    \"Hx\"         #>     Hy                       -212       -0.58889            211                 1440 0    \"Hy\"         #>     conductivity [mS/cm]     36.8       36.924              37.2                1440 0    \"Cond\"       #>     temperature [°C, ITS-90] 1.204      2.0773              3.065               1440 0    \"T-Temp\"     #>     Depth                    73.242     74.767              77.148              1440 0    \"Depth\"      #>     none                     NA         NA                  NA                  1440 1440 \"none\"       #>     none.1                   NA         NA                  NA                  1440 1440 \"none\"       #>     Hdg                      0          175.79              359.2               1440 0    \"Hdg\"        #>     X                        NA         NA                  NA                  1440 1440 \"-\"          #>     salinity [PSS-78]        41.307     42.71               44.205              1440 0    \"Sal\"        #>     Dens                     1033.3     1034.5              1035.8              1440 0    \"Dens\"       #>     SV                       1467.9     1469.8              1472.2              1440 0    \"SV\"         #>     X.1                      NA         NA                  NA                  1440 1440 \"-\"          #>     N.S.Dist                 -2535.2    4159.5              10349               1440 0    \"N-S Dist\"   #>     E.W.Dist                 -2033.5    893.81              4687.5              1440 0    \"E-W Dist\"   #>     X.2                      NA         NA                  NA                  1440 1440 \"-\"          #>     SRB.Date                 NA         NA                  NA                  1440 1440 \"SRB Date\"   #>     SRB.Time                 NA         NA                  NA                  1440 0    \"SRB Time\"   #>     Vref.1                   1.226      1.2263              1.23                1440 1152 \"Vref\"       #>     Hx.1                     NA         NA                  NA                  1440 1440 \"Hx\"         #>     Hy.1                     NA         NA                  NA                  1440 1440 \"Hy\"         #>     Cond.1                   NA         NA                  NA                  1440 1440 \"Cond\"       #>     T.Temp.1                 NA         NA                  NA                  1440 1440 \"T-Temp\"     #>     Depth.1                  NA         NA                  NA                  1440 1440 \"Depth\"      #>     none.2                   NA         NA                  NA                  1440 1440 \"none\"       #>     none.3                   NA         NA                  NA                  1440 1440 \"none\"       #>     Hdg.1                    NA         NA                  NA                  1440 1440 \"Hdg\"        #>     X.3                      NA         NA                  NA                  1440 1440 \"-\"          #>     Sal.1                    NA         NA                  NA                  1440 1440 \"Sal\"        #>     Dens.1                   NA         NA                  NA                  1440 1440 \"Dens\"       #>     SV.1                     NA         NA                  NA                  1440 1440 \"SV\"         #>     pressure [dbar]          73.855     75.392              77.794              1440 0    \"-\"          #>     time                     2008-06-26 2008-06-26 11:59:30 2008-06-26 23:59:00 1440 0    \"-\"          #>  #> * Processing Log #>  #>     - 2023-02-10 12:50:57 UTC: `create 'cm' object` #>     - 2023-02-10 12:50:57 UTC: `read.oce(\"~/data/archive/sleiwex/2008/moorings/m11/cm/interocean_0811786/manufacturer/cm_interocean_0811786.s4a.tab\", ...)` #>     - 2023-02-10 12:50:57 UTC: `subset.cm(x, subset=time < as.POSIXct(\"2008-06-27 00:00:00\", tz = \"UTC\"))`"},{"path":"https://dankelley.github.io/oce/reference/summary-coastline-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a coastline Object — summary,coastline-method","title":"Summarize a coastline Object — summary,coastline-method","text":"Summarizes coastline length, bounding box, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-coastline-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a coastline Object — summary,coastline-method","text":"","code":"# S4 method for class 'coastline' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-coastline-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a coastline Object — summary,coastline-method","text":"object coastline object. ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-coastline-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a coastline Object — summary,coastline-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-ctd-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a ctd Object — summary,ctd-method","title":"Summarize a ctd Object — summary,ctd-method","text":"Summarizes data ctd object, presenting information station name, sampling location, data ranges, etc. object read .cnv file .rsk file, OriginalName column data summary contain original names data within source file.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-ctd-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a ctd Object — summary,ctd-method","text":"","code":"# S4 method for class 'ctd' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-ctd-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a ctd Object — summary,ctd-method","text":"object ctd object. ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-ctd-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a ctd Object — summary,ctd-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-ctd-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize a ctd Object — summary,ctd-method","text":"","code":"library(oce) data(ctd) summary(ctd) #> CTD Summary #> ----------- #>  #> * Instrument:          SBE 25 #> * Temp. serial no.:    1140 #> * Cond. serial no.:    832 #> * File:                \"/Users/kelley/git/oce/create_data/ctd/ctd.cnv\" #> * Original file:       c:\\seasoft3\\basin\\bed0302.hex #> * Start time:          2003-10-15 15:38:38 #> * Sample interval:     1 s #> * Cruise:              Halifax Harbour #> * Vessel:              Divcom3 #> * Station:             Stn 2 #> * Mean Location:       44.684N 63.644W #> * Data Overview #>  #>                               Min.   Mean   Max.   Dim. NAs OriginalName #>     scan                      130    220    310    181  0   \"scan\"       #>     timeS [s]                 129    219    309    181  0   \"timeS\"      #>     pressure [dbar]           1.48   22.885 44.141 181  0   \"pr\"         #>     depth [m]                 1.468  22.698 43.778 181  0   \"depS\"       #>     temperature [°C, IPTS-68] 2.919  7.5063 14.237 181  0   \"t068\"       #>     salinity [PSS-78]         29.916 31.219 31.498 181  0   \"sal00\"      #>     flag                      0      0      0      181  0   \"flag\"       #>  #> * Processing Log #>  #>     - 2018-11-14 20:03:47 UTC: `create 'ctd' object` #>     - 2018-11-14 20:03:47 UTC: `read.ctd.sbe(file = file, debug = 10, processingLog = processingLog)` #>     - 2018-11-14 20:03:47 UTC: `oce.edit(x = ctd, item = \"startTime\", value = as.POSIXct(gsub(\"1903\",     \"2003\", format(ctd[[\"startTime\"]])), tz = \"UTC\") + 4 * 3600,     reason = \"file had year=1903, instead of 2003\", person = \"Dan Kelley\")`"},{"path":"https://dankelley.github.io/oce/reference/summary-echosounder-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize an echosounder Object — summary,echosounder-method","title":"Summarize an echosounder Object — summary,echosounder-method","text":"Summarizes data echosounder object.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-echosounder-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize an echosounder Object — summary,echosounder-method","text":"","code":"# S4 method for class 'echosounder' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-echosounder-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize an echosounder Object — summary,echosounder-method","text":"object object class \"echosounder\", usually, result call read.echosounder(), read.oce(), .echosounder(). ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-echosounder-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize an echosounder Object — summary,echosounder-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-gps-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a gps Object — summary,gps-method","title":"Summarize a gps Object — summary,gps-method","text":"Summarize gps object.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-gps-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a gps Object — summary,gps-method","text":"","code":"# S4 method for class 'gps' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-gps-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a gps Object — summary,gps-method","text":"object object class \"gps\" ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-gps-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a gps Object — summary,gps-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-ladp-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize an ladp Object — summary,ladp-method","title":"Summarize an ladp Object — summary,ladp-method","text":"Pertinent summary information presented, including station name, sampling location, data ranges, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-ladp-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize an ladp Object — summary,ladp-method","text":"","code":"# S4 method for class 'ladp' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-ladp-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize an ladp Object — summary,ladp-method","text":"object ladp object. ... arguments passed methods.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-ladp-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize an ladp Object — summary,ladp-method","text":"matrix containing statistics elements data slot.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-ladp-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize an ladp Object — summary,ladp-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-landsat-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a landsat Object — summary,landsat-method","title":"Summarize a landsat Object — summary,landsat-method","text":"Provides summary information landsat object.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-landsat-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a landsat Object — summary,landsat-method","text":"","code":"# S4 method for class 'landsat' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-landsat-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a landsat Object — summary,landsat-method","text":"object landsat object. ... Ignored.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-landsat-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a landsat Object — summary,landsat-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-lisst-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a lisst Object — summary,lisst-method","title":"Summarize a lisst Object — summary,lisst-method","text":"Summarizes data lisst object, presenting information station name, sampling location, data ranges, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-lisst-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a lisst Object — summary,lisst-method","text":"","code":"# S4 method for class 'lisst' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-lisst-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a lisst Object — summary,lisst-method","text":"object lisst object. ... Ignored.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-lisst-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a lisst Object — summary,lisst-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-lisst-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize a lisst Object — summary,lisst-method","text":"","code":"library(oce) data(lisst) summary(lisst) #> LISST Summary #> ------------- #>  #> * File source:        (constructed) #> * Time: 2012-01-01 to 2012-01-01 00:00:59 (91 samples, mean increment 0.6570842 s) #> * Data Overview #>  #>                      Min.       Mean                Max.                Dim. NAs #>     C1               0.0010652  0.15425             0.6978              91   0   #>     C2               0.006291   0.24195             0.88089             91   0   #>     C3               0.0021988  0.24053             0.95345             91   0   #>     C4               0.0041735  0.22599             1.0271              91   0   #>     C5               0.003596   0.27159             1.1656              91   0   #>     C6               0.0084791  0.35829             1.391               91   0   #>     C7               0.00017494 0.32218             1.4376              91   0   #>     C8               0.0011839  0.33932             1.5601              91   0   #>     C9               0.0053039  0.35563             1.6479              91   0   #>     C10              0.00027554 0.43936             1.7989              91   0   #>     C11              0.0037151  0.47023             1.8696              91   0   #>     C12              0.00081108 0.44499             2.0161              91   0   #>     C13              0.008303   0.53889             2.2436              91   0   #>     C14              0.0061296  0.63101             2.4211              91   0   #>     C15              0.0081711  0.6101              2.4778              91   0   #>     C16              0.001358   0.54999             2.4576              91   0   #>     C17              0.0040694  0.54498             2.552               91   0   #>     C18              0.0044594  0.60613             2.8146              91   0   #>     C19              0.00055307 0.63606             2.9199              91   0   #>     C20              0.001207   0.70448             3.0498              91   0   #>     C21              2.4262e-05 0.6655              3.0745              91   0   #>     C22              0.0020885  0.77344             3.3258              91   0   #>     C23              0.00037555 0.7105              3.2838              91   0   #>     C24              0.00090739 0.72498             3.2742              91   0   #>     C25              0.0065367  0.85793             3.6554              91   0   #>     C26              0.0015493  0.78833             3.6585              91   0   #>     C27              0.007094   0.85212             3.792               91   0   #>     C28              0.024247   0.95463             4.0537              91   0   #>     C29              0.00164    0.85932             4.0159              91   0   #>     C30              0.0026813  0.89955             4.1353              91   0   #>     C31              0.0006224  0.98356             4.3578              91   0   #>     C32              0.01269    1.0482              4.4591              91   0   #>     lts              0          0                   0                   91   0   #>     voltage          3.8248     3.899               3.9978              91   0   #>     aux              0.07       0.07                0.07                91   0   #>     lrs              3.9045     4.0007              4.0993              91   0   #>     pressure [dbar]  5.0068     5.6479              6.0193              91   0   #>     temperature [°C] 9.9432     14.331              16.879              91   0   #>     dayhour          0          2.5385              6                   91   0   #>     minutesecond     0          2769.2              5600                91   0   #>     transmission     0.0010149  0.20525             0.45733             91   0   #>     beam             30.853     35.895              39.98               91   0   #>     time             2012-01-01 2012-01-01 00:00:29 2012-01-01 00:00:59 91   0   #>  #> * Processing Log #>  #>     - 2018-04-07 18:46:34 UTC: `create 'lisst' object with filename=\"(constructed)\", longitude=NA, latitude=NA` #>     - 2018-04-07 18:46:34 UTC: `as.lisst(data = data, filename = \"(constructed)\", year = 2012,     tz = \"UTC\")`"},{"path":"https://dankelley.github.io/oce/reference/summary-lobo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a lobo Object — summary,lobo-method","title":"Summarize a lobo Object — summary,lobo-method","text":"Pertinent summary information presented, including sampling interval, data ranges, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-lobo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a lobo Object — summary,lobo-method","text":"","code":"# S4 method for class 'lobo' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-lobo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a lobo Object — summary,lobo-method","text":"object lobo object. ... arguments passed methods.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-lobo-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize a lobo Object — summary,lobo-method","text":"matrix containing statistics elements data slot.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-lobo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a lobo Object — summary,lobo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-lobo-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize a lobo Object — summary,lobo-method","text":"","code":"library(oce) data(lobo) summary(lobo) #> Lobo Summary #> ------------ #>  #> * source: \"/Users/kelley/src/oce/create_data/lobo/lobo.dat\" #> * Time: 2009-03-01 to 2009-04-01 23:00:00 (768 samples, mean increment 1 hour) #> * Data Overview #>  #>                                 Min.  Mean     Max. Dim. NAs #>     time                        NA    NA       NA   768  0   #>     u [m/s]                     NA    NA       NA   768  768 #>     v [m/s]                     NA    NA       NA   768  768 #>     salinity [PSS-78]           13.61 29.208   30.8 768  0   #>     temperature [°C, ITS-90]    -0.72 1.691    4.55 768  0   #>     airtemperature [°C, ITS-90] -10.4 -0.20573 11.8 768  0   #>     pressure [dbar]             NA    NA       NA   768  768 #>     nitrate [μM]                0.3   6.7108   38.5 768  0   #>     fluorescence [μg/l]         0.32  1.2463   4.83 768  0   #>  #> * Processing Log #>  #>     - 2016-01-10 15:34:18 UTC: `create 'lobo' object` #>     - 2016-01-10 15:34:18 UTC: `read.lobo(file = \"lobo.dat\")` #>     - 2016-01-10 15:34:19 UTC: `subset.lobo(x, subset=start <= time & time <= end)` #>     - 2016-01-10 15:34:19 UTC: `subset.lobo(x, subset=!is.na(temperature))`"},{"path":"https://dankelley.github.io/oce/reference/summary-met-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a met Object — summary,met-method","title":"Summarize a met Object — summary,met-method","text":"Pertinent summary information presented, including sampling location, data ranges, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-met-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a met Object — summary,met-method","text":"","code":"# S4 method for class 'met' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-met-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a met Object — summary,met-method","text":"object met object. ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-met-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a met Object — summary,met-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-oce-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize an oce Object — summary,oce-method","title":"Summarize an oce Object — summary,oce-method","text":"Provide textual summary pertinent aspects object, including selected components metadata slot, statistical dimensional information entries data slot, listing contents processingLog slot. details depend class object, especially metadata slot, can help consult specialized documentation, e.g. summary,ctd-method CTD objects (.e. objects inheriting ctd class.) important note good way learn details object contents. Instead, object named object, say, one might use str(object) learn contents, str(object[[\"metadata\"]]) learn metadata, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-oce-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize an oce Object — summary,oce-method","text":"","code":"# S4 method for class 'oce' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-oce-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize an oce Object — summary,oce-method","text":"object object summarized. ... Extra arguments (ignored)","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-oce-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize an oce Object — summary,oce-method","text":"","code":"o <- new(\"oce\") summary(o) #> * Processing Log #>  #>     - 2024-09-24 10:32:04 UTC: `Create oce object`"},{"path":"https://dankelley.github.io/oce/reference/summary-odf-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize an odf Object — summary,odf-method","title":"Summarize an odf Object — summary,odf-method","text":"Pertinent summary information presented, including station name, sampling location, data ranges, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-odf-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize an odf Object — summary,odf-method","text":"","code":"# S4 method for class 'odf' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-odf-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize an odf Object — summary,odf-method","text":"object odf object. ... arguments passed methods.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-odf-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize an odf Object — summary,odf-method","text":"matrix containing statistics elements data slot.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-odf-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize an odf Object — summary,odf-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-rsk-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a rsk Object — summary,rsk-method","title":"Summarize a rsk Object — summary,rsk-method","text":"Summarizes data rsk object, presenting information station name, sampling location, data ranges, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-rsk-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a rsk Object — summary,rsk-method","text":"","code":"# S4 method for class 'rsk' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-rsk-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a rsk Object — summary,rsk-method","text":"object rsk object. ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-rsk-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a rsk Object — summary,rsk-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-rsk-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize a rsk Object — summary,rsk-method","text":"","code":"library(oce) data(rsk) summary(rsk) #> rsk summary #> ----------- #> * Instrument:    model RBRconcerto serial number 60130 #> * Atm. press.:   10.1325 #> * Pressure type: absolute #> * Source:        `060130_20150904_1159.rsk` #> * Time: 2015-09-04 15:37:20 to 2015-09-04 15:44:39 (2639 samples, mean increment 0.1666664 s) #> * Data Overview #>  #>                               Min.                Mean                Max.                Dim. NAs OriginalName #>     time                      2015-09-04 15:37:20 2015-09-04 15:41:00 2015-09-04 15:44:39 2639 0   \"-\"          #>     conductivity [mS/cm]      26.211              30.051              30.985              2639 0   \"cond06\"     #>     temperature [°C, ITS-90]  0.92965             1.9082              4.3835              2639 0   \"temp03\"     #>     pressure [dbar, absolute] 10.146              255.76              463.39              2639 0   \"pres07\"     #>     tstamp                    7.1214e-312         7.1214e-312         7.1214e-312         2639 0   \"tstamp\"     #>  #> * Processing Log #>  #>     - 2023-03-19 11:48:48 UTC: `create 'rsk' object` #>     - 2023-03-19 11:48:48 UTC: `read.rsk(file = file, encoding = encoding, allTables = FALSE,     processingLog = processingLog)` #>     - 2023-03-19 11:48:48 UTC: `oceSetMetadata(object = rsk, name = \"longitude\", value = -(56 +     26.232/60))` #>     - 2023-03-19 11:48:48 UTC: `oceSetMetadata(object = rsk, name = \"latitude\", value = 73 +     13.727/60)` #>     - 2023-03-19 11:48:48 UTC: `oceSetMetadata(object = rsk, name = \"station\", value = \"C18\")` #>     - 2023-03-19 11:48:48 UTC: `oceSetMetadata(object = rsk, name = \"ship\", value = \"Ault\")` #>     - 2023-03-19 11:48:48 UTC: `oceSetMetadata(object = rsk, name = \"institute\", value = \"Ocean Research Project\")` #>     - 2023-03-19 11:48:48 UTC: `subset.rsk(x, subset=1441381040 < time & time < 1441381480)`"},{"path":"https://dankelley.github.io/oce/reference/summary-satellite-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a satellite Object — summary,satellite-method","title":"Summarize a satellite Object — summary,satellite-method","text":"Summarize satellite Object","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-satellite-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a satellite Object — summary,satellite-method","text":"","code":"# S4 method for class 'satellite' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-satellite-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a satellite Object — summary,satellite-method","text":"object satellite object. ... Ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-satellite-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a satellite Object — summary,satellite-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-sealevel-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a sealevel Object — summary,sealevel-method","title":"Summarize a sealevel Object — summary,sealevel-method","text":"Summarizes data sealevel object.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-sealevel-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a sealevel Object — summary,sealevel-method","text":"","code":"# S4 method for class 'sealevel' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-sealevel-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a sealevel Object — summary,sealevel-method","text":"object sealevel object. ... arguments passed methods.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-sealevel-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize a sealevel Object — summary,sealevel-method","text":"matrix containing statistics elements data slot.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-sealevel-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a sealevel Object — summary,sealevel-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-sealevel-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize a sealevel Object — summary,sealevel-method","text":"","code":"library(oce) data(sealevel) summary(sealevel) #> Sealevel Summary #> ---------------- #>  #> * number:              490 #> * name:                HALIFAX #> * sampling delta-t:    1 hour #> * Location:            44.667N 63.583W  #> * year:                2003 #> * number of observations:   6659  #> *    \"      non-missing:    6659  #> * Time: 2003-01-01 13:00:00 to 2003-10-08 11:00:00 (6659 samples, mean increment 1.009012 hour) #> * Data Overview #>  #>                   Min.                Mean                Max.                Dim. NAs #>     elevation [m] 0                   0.98622             2.84                6659 0   #>     time          2003-01-01 13:00:00 2003-05-21 08:21:11 2003-10-08 11:00:00 6659 0   #>  #> * Processing Log #>  #>     - 2016-05-05 18:33:53 UTC: `create 'sealevel' object` #>     - 2016-05-05 18:33:53 UTC: `read.sealevel(file=\"490-01-JAN-2003_slev.csv\", tz=\"UTC\")` #>     - 2016-05-05 18:33:53 UTC: `oce.edit(x = sealevel, item = \"longitude\", value = -sealevel[[\"longitude\"]],     reason = \"Fix longitude hemisphere\")`"},{"path":"https://dankelley.github.io/oce/reference/summary-section-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a section Object — summary,section-method","title":"Summarize a section Object — summary,section-method","text":"Pertinent summary information presented, including station locations, distance along trac, etc.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-section-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a section Object — summary,section-method","text":"","code":"# S4 method for class 'section' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-section-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a section Object — summary,section-method","text":"object object class \"section\", usually, result call read.section(), read.oce(), .section(). ... arguments passed methods.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-section-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize a section Object — summary,section-method","text":"NULL","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-section-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a section Object — summary,section-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-section-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize a section Object — summary,section-method","text":"","code":"library(oce) data(section) summary(section) #> Section Summary #> --------------- #>  #> * Source: \"a03_hy1.csv\" #> * ID:     \"a03\" #> * Overview of stations #> Index    ID       Lon       Lat  Levels Depth             Time #>     1     3   -8.5263   36.8758       5   202 1993-09-23 22:22 #>     2     4   -8.6197   36.7187      16   742 1993-09-24 00:13 #>     3     6   -8.7383   36.5383      19  1567 1993-09-24 04:19 #>     4     7   -8.7913   36.4247      24  2349 1993-09-24 07:10 #>     5     8   -8.9010   36.2500      23  2629 1993-09-24 10:22 #>     6     9   -9.2707   36.2353      24  3842 1993-09-24 14:50 #>     7    10   -9.8833   36.2333      24  4275 1993-09-24 20:41 #>     8    12  -11.0560   36.2550      24  4495 1993-09-25 09:51 #>     9    13  -11.6530   36.2520      23  2410 1993-09-25 14:53 #>    10    14  -12.2588   36.2562      23  3781 1993-09-25 20:11 #>    11    15  -12.8343   36.2540      23  3477 1993-09-26 01:39 #>    12    16  -13.4383   36.2530      23  4281 1993-09-26 07:22 #>    13    17  -14.0333   36.2530      23  4352 1993-09-26 12:26 #>    14    18  -14.6198   36.2548      24  1454 1993-09-26 17:13 #>    15    19  -15.2052   36.2532      24  2224 1993-09-26 21:29 #>    16    20  -15.8050   36.2560      24  3954 1993-09-27 02:48 #>    17    21  -16.4090   36.2667      24  4281 1993-09-27 08:52 #>    18    22  -16.9873   36.2560      24  4783 1993-09-27 14:15 #>    19    23  -17.5902   36.2390      24  5372 1993-09-27 20:34 #>    20    24  -18.1757   36.2393      24  5278 1993-09-28 03:13 #>    21    25  -18.7667   36.2363      23  5531 1993-09-28 09:50 #>    22    26  -19.3560   36.2343      24  5487 1993-09-28 16:39 #>    23    28  -20.5403   36.2667      24  4551 1993-09-29 06:43 #>    24    29  -21.1383   36.2530      24  4812 1993-09-29 12:00 #>    25    30  -21.7258   36.2532      24  4716 1993-09-29 21:38 #>    26    32  -22.9187   36.2520      24  4409 1993-10-01 16:08 #>    27    33  -23.5075   36.2542      24  4219 1993-10-01 22:35 #>    28    34  -24.1060   36.2580      24  3717 1993-10-02 09:08 #>    29    35  -24.7090   36.2257      24  3042 1993-10-02 14:40 #>    30    36  -25.2878   36.2500      24  3576 1993-10-02 19:20 #>    31    37  -25.8893   36.2520      24  4040 1993-10-03 01:14 #>    32    38  -26.4873   36.2403      24  3705 1993-10-03 07:27 #>    33    39  -27.0733   36.2412      24  3108 1993-10-03 14:40 #>    34    40  -27.6593   36.2412      24  3294 1993-10-03 18:35 #>    35    41  -28.2547   36.2502      24  3246 1993-10-03 00:06 #>    36    42  -28.8393   36.2363      24  3501 1993-10-04 06:08 #>    37    43  -29.4343   36.2540      24  3340 1993-10-04 12:31 #>    38    44  -30.0337   36.2417      24  3168 1993-10-04 18:10 #>    39    45  -30.6248   36.2367      24  3169 1993-10-05 23:30 #>    40    46  -31.2247   36.2373      24  2978 1993-10-05 05:00 #>    41    47  -31.8090   36.2383      24  2850 1993-10-05 09:58 #>    42    48  -32.4060   36.2500      24  2590 1993-10-05 14:20 #>    43    49  -32.9925   36.2407      24  2270 1993-10-05 18:42 #>    44    50  -33.5903   36.2430      20  1993 1993-10-05 23:02 #>    45    51  -34.1717   36.2423      22  2028 1993-10-06 03:25 #>    46    52  -34.7717   36.2383      23  2324 1993-10-06 08:08 #>    47    53  -35.3570   36.2393      23  2286 1993-10-06 12:43 #>    48    54  -35.9550   36.2377      23  2595 1993-10-06 18:50 #>    49    55  -36.5515   36.2422      24  2826 1993-10-07 01:12 #>    50    56  -37.1423   36.2560      24  3391 1993-10-07 08:25 #>    51    57  -37.7353   36.2520      24  3665 1993-10-07 13:40 #>    52    58  -38.3335   36.2507      24  3558 1993-10-07 19:40 #>    53    59  -38.9333   36.2402      24  3709 1993-10-08 01:58 #>    54    60  -39.5227   36.2510      24  3382 1993-10-08 07:34 #>    55    61  -40.1187   36.2423      24  3901 1993-10-08 11:46 #>    56    62  -40.7167   36.2500       3  4423 1993-10-08 18:31 #>    57    63  -41.3177   36.2030      24  4341 1993-10-09 02:24 #>    58    64  -41.8923   36.2403      24  4116 1993-10-09 08:56 #>    59    65  -42.4873   36.2363      24  3967 1993-10-09 15:00 #>    60    66  -43.0833   36.2342      24  4891 1993-10-09 21:20 #>    61    67  -43.6363   36.2353      24  5106 1993-10-10 04:03 #>    62    68  -44.2413   36.2500      24  4930 1993-10-10 10:42 #>    63    69  -44.8227   36.2500       8  4947 1993-10-10 17:20 #>    64    71  -46.0227   36.2257      24  4737 1993-10-11 10:25 #>    65    72  -46.6197   36.2333      24  4825 1993-10-11 16:30 #>    66    74  -47.8187   36.2333      24  5479 1993-10-12 05:00 #>    67    75  -48.3923   36.2363      24  4994 1993-10-12 11:31 #>    68    76  -48.9863   36.2393      24  5345 1993-10-12 17:37 #>    69    77  -49.5900   36.2340      24  5138 1993-10-13 00:22 #>    70    78  -50.1863   36.2393      24  5285 1993-10-13 06:42 #>    71    79  -50.7863   36.2333      24  5355 1993-10-13 12:43 #>    72    80  -51.3853   36.2403      23  2423 1993-10-13 18:10 #>    73    81  -52.0168   36.2500      24  3372 1993-10-13 23:30 #>    74    82  -52.6520   36.2560      24  5365 1993-10-14 05:35 #>    75    83  -53.2757   36.2540      24  5458 1993-10-14 12:02 #>    76    84  -53.9090   36.2423      24  5466 1993-10-14 18:25 #>    77    85  -54.5547   36.2355      24  5158 1993-10-15 01:07 #>    78    86  -55.2040   36.2530      24  5420 1993-10-15 07:50 #>    79    87  -55.8257   36.2343      24  5414 1993-10-15 13:46 #>    80    88  -56.4758   36.2713      24  5456 1993-10-15 20:27 #>    81    89  -57.0927   36.2573      24  5086 1993-10-16 02:31 #>    82    90  -57.7510   36.2510      24  5214 1993-10-16 09:34 #>    83    91  -58.3550   36.2520      24  4603 1993-10-16 15:25 #>    84    92  -59.0037   36.2508      24  4624 1993-10-16 21:44 #>    85    93  -59.5913   36.2757      24  4942 1993-10-17 04:49 #>    86    94  -60.2020   36.2677      24  5014 1993-10-17 13:01 #>    87    95  -60.8432   36.2417      24  4888 1993-10-17 21:32 #>    88    96  -61.5040   36.2333      24  4955 1993-10-18 04:19 #>    89    97  -62.1560   36.2393      24  4922 1993-10-18 12:17 #>    90    98  -62.7920   36.2505      24  5093 1993-10-18 19:10 #>    91    99  -63.4403   36.2580      23  5042 1993-10-19 03:49 #>    92   100  -64.0677   36.2510      24  5035 1993-10-19 10:36 #>    93   101  -64.7070   36.2560      24  4962 1993-10-19 18:08 #>    94   102  -65.3348   36.2342      24  4932 1993-10-20 01:15 #>    95   103  -65.9530   36.2510      24  4789 1993-10-20 08:12 #>    96   104  -66.6078   36.2350      24  5049 1993-10-20 15:02 #>    97   106  -67.8863   36.2383      24  4776 1993-10-21 09:09 #>    98   107  -68.5217   36.2363      17  4628 1993-10-21 15:42 #>    99   108  -69.1388   36.2392      24  4556 1993-10-21 21:58 #>   100   109  -69.3757   36.3227      24  4499 1993-10-22 03:10 #>   101   110  -69.5883   36.4187      24  4476 1993-10-22 07:10 #>   102   111  -69.8020   36.5070      24  4481 1993-10-22 11:09 #>   103   112  -69.9923   36.6217      24  4433 1993-10-22 14:53 #>   104   113  -70.2050   36.7197      24  4331 1993-10-22 18:36 #>   105   114  -70.4038   36.8038      24  4349 1993-10-22 22:50 #>   106   115  -70.6077   36.8930      24  4327 1993-10-23 02:59 #>   107   116  -70.8197   36.9893      24  4237 1993-10-23 06:58 #>   108   117  -71.0247   37.0843      24  4139 1993-10-23 10:55 #>   109   118  -71.2227   37.1833      24  4082 1993-10-23 14:30 #>   110   119  -71.3707   37.2697      24  3980 1993-10-23 18:10 #>   111   120  -71.5228   37.3583      24  3715 1993-10-23 23:18 #>   112   121  -71.7373   37.4080      24  3442 1993-10-24 04:17 #>   113   122  -71.9333   37.4757      24  3230 1993-10-24 07:28 #>   114   123  -72.1187   37.5530      24  3239 1993-10-24 10:15 #>   115   124  -72.2883   37.6227      24  3127 1993-10-24 12:54 #>   116   125  -72.4540   37.7000      24  2961 1993-10-24 15:30 #>   117   126  -72.6343   37.7747      24  2855 1993-10-24 18:05 #>   118   127  -72.8065   37.8537      24  2739 1993-10-24 21:14 #>   119   128  -72.9763   37.9255      24  2574 1993-10-24 23:43 #>   120   129  -73.1565   38.0043      22  2363 1993-10-25 02:14 #>   121   130  -73.3187   38.0863      20  2024 1993-10-25 04:33 #>   122   131  -73.4913   38.1580      16  1378 1993-10-25 06:46 #>   123   132  -73.6053   38.2052      13   843 1993-10-25 08:15 #>   124   133  -73.6727   38.2373       8   154 1993-10-25 09:53 #> * Data-quality flags #>     salinity:       \"2\" 2298, \"3\" 440, \"4\" 103 #>     salinityBottle: \"2\" 2721, \"3\" 57, \"4\" 50, \"5\" 13 #>     oxygen:         \"2\" 2704, \"3\" 19, \"4\" 92, \"5\" 26 #>     silicate:       \"2\" 2732, \"3\" 13, \"4\" 69, \"5\" 27 #>     nitrite:        \"2\" 792, \"3\" 1, \"4\" 19, \"5\" 2029 #>     NO2+NO3:        \"2\" 2710, \"3\" 13, \"4\" 72, \"5\" 46 #>     phosphate:      \"2\" 2637, \"3\" 108, \"4\" 72, \"5\" 23, \"6\" 1 #> * Processing Log #>  #>     - 2022-01-03 13:21:08 UTC: `create 'section' object` #>     - 2022-01-03 13:21:08 UTC: `read.section(file = \"a03_hy1.csv\", sectionId = \"a03\", ship = \"R/V Professor Multanovskiy\",     scientist = \"Vladimir Tereschenkov\", institute = \"SIO\")` #>     - 2022-01-03 13:21:08 UTC: `initializeFlagScheme(object, name=\"WHP bottle\", mapping=NULL), default=NULL)`"},{"path":"https://dankelley.github.io/oce/reference/summary-tidem-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a tidem Object — summary,tidem-method","title":"Summarize a tidem Object — summary,tidem-method","text":"default, fitted constituents plotted, quite useful set e.g. p=0.05 see just constituents significant 5 percent level. Note p values estimated average p values sine cosine components given frequency.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-tidem-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a tidem Object — summary,tidem-method","text":"","code":"# S4 method for class 'tidem' summary(object, p = 1, constituent, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-tidem-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a tidem Object — summary,tidem-method","text":"object object class tidem, created .tidem() tidem(). p optional value maximum p value display individual coefficient.  given, coefficients shown. constituent optional character vector holding names constituents focus. ... arguments passed methods.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-tidem-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize a tidem Object — summary,tidem-method","text":"NULL","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-tidem-method.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Summarize a tidem Object — summary,tidem-method","text":"","code":"library(oce) data(sealevel) tide <- tidem(sealevel) summary(tide)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-tidem-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a tidem Object — summary,tidem-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-topo-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a topo Object — summary,topo-method","title":"Summarize a topo Object — summary,topo-method","text":"Pertinent summary information presented, including longitude latitude range, range elevation.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-topo-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a topo Object — summary,topo-method","text":"","code":"# S4 method for class 'topo' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-topo-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a topo Object — summary,topo-method","text":"object topo object. ... arguments passed methods.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-topo-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize a topo Object — summary,topo-method","text":"matrix containing statistics elements data slot.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-topo-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a topo Object — summary,topo-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-topo-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize a topo Object — summary,topo-method","text":"","code":"library(oce) data(topoWorld) summary(topoWorld) #>  #> Topo dataset #> ------------ #> * Source:           ./topo_180W_180E_90S_90N_30min_netcdf.nc  #> * Data Overview #>  #>                    Min.    Mean    Max.   Dim.      NAs OriginalName #>     longitude [°N] -179.75 0       179.75 720       0   \"lon\"        #>     latitude [°E]  -89.75  0       89.75  360       0   \"lat\"        #>     z [m]          -10471  -1892.3 6147   \"720x360\" 0   \"Band1\"      #>  #> * Processing Log #>  #>     - 2019-05-21 12:55:46 UTC: `create 'topo' object` #>     - 2019-05-21 12:55:46 UTC: `as.topo(longitude = longitude, latitude = latitude, z = z, filename = file)` #>     - 2019-05-21 12:55:46 UTC: `read.topo(file = topoFile, debug = 5)`"},{"path":"https://dankelley.github.io/oce/reference/summary-windrose-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a windrose Object — summary,windrose-method","title":"Summarize a windrose Object — summary,windrose-method","text":"Summarizes data windrose object.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-windrose-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a windrose Object — summary,windrose-method","text":"","code":"# S4 method for class 'windrose' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-windrose-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a windrose Object — summary,windrose-method","text":"object windrose object. ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-windrose-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize a windrose Object — summary,windrose-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-xbt-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize an xbt Object — summary,xbt-method","title":"Summarize an xbt Object — summary,xbt-method","text":"Summarizes data xbt object.","code":""},{"path":"https://dankelley.github.io/oce/reference/summary-xbt-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize an xbt Object — summary,xbt-method","text":"","code":"# S4 method for class 'xbt' summary(object, ...)"},{"path":"https://dankelley.github.io/oce/reference/summary-xbt-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize an xbt Object — summary,xbt-method","text":"object xbt object. ... arguments passed methods.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/summary-xbt-method.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize an xbt Object — summary,xbt-method","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sunAngle.html","id":null,"dir":"Reference","previous_headings":"","what":"Solar Angle as Function of Space and Time — sunAngle","title":"Solar Angle as Function of Space and Time — sunAngle","text":"calculates solar angle, based NASA-provided Fortran program, (according comments code) turn based \"Astronomical Almanac\". Note time may single value vector values; latter case, longitude, latitude useRefraction made length time, calling rep(). addresses case finding time-series angles given spatial location. cases arguments single values, either call sunAngle() repeatedly , slow, use expand.grid() set values uniform length supplied sunAngle().","code":""},{"path":"https://dankelley.github.io/oce/reference/sunAngle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Solar Angle as Function of Space and Time — sunAngle","text":"","code":"sunAngle(t, longitude = 0, latitude = 0, useRefraction = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/sunAngle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Solar Angle as Function of Space and Time — sunAngle","text":"t time, either POSIXt object (converted timezone \"UTC\", already timezone), value (character numeric) can converted time .POSIXct(), assuming timezone \"UTC\". longitude observer longitude degrees east. latitude observer latitude degrees north. useRefraction boolean, set TRUE apply correction atmospheric refraction.","code":""},{"path":"https://dankelley.github.io/oce/reference/sunAngle.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Solar Angle as Function of Space and Time — sunAngle","text":"list containing following: time time azimuth, degrees eastward north, 0 360. altitude, degrees horizon,  ranging -90 90. diameter, solar diameter, degrees. distance sun, astronomical units. declination angle degrees, computed sunDeclinationRightAscension(). rightAscension angle degrees, computed sunDeclinationRightAscension().","code":""},{"path":"https://dankelley.github.io/oce/reference/sunAngle.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Solar Angle as Function of Space and Time — sunAngle","text":"Regarding declination rightAscension, see references documentation sunDeclinationRightAscension(). items based Fortran code retrieved file sunae.f, downloaded ftp site climate1.gsfc.nasa.gov/wiscombe/Solar_Rad/SunAngles 2009-11-1.  Comments code list references: Michalsky, J., 1988: Astronomical Almanac's algorithm approximate solar position (1950-2050), Solar Energy 40, 227-235 Astronomical Almanac, U.S. Gov't Printing Office, Washington, D.C. (published every year). code comments suggest appendix Michalsky (1988) contains errors, declares use following formulae 1995 version Almanac: p. A12: approximation sunrise/set times p. B61: solar altitude (AKA elevation) azimuth p. B62: refraction correction p. C24: mean longitude, mean anomaly, ecliptic longitude, obliquity ecliptic, right ascension, declination, Earth-Sun distance, angular diameter Sun p. L2: Greenwich mean sidereal time (ignoring T^2, T^3 terms) code lists authors Dr. Joe Michalsky Dr. Lee Harrison (State University New York), modifications Dr. Warren Wiscombe (NASA Goddard Space Flight Center).","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sunAngle.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Solar Angle as Function of Space and Time — sunAngle","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/sunAngle.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Solar Angle as Function of Space and Time — sunAngle","text":"","code":"rise <- as.POSIXct(\"2011-03-03 06:49:00\", tz = \"UTC\") + 4 * 3600 set <- as.POSIXct(\"2011-03-03 18:04:00\", tz = \"UTC\") + 4 * 3600 mismatch <- function(lonlat) {     sunAngle(rise, lonlat[1], lonlat[2])$altitude^2 + sunAngle(set, lonlat[1], lonlat[2])$altitude^2 } result <- optim(c(1, 1), mismatch) lonHfx <- (-63.55274) latHfx <- 44.65 dist <- geodDist(result$par[1], result$par[2], lonHfx, latHfx) cat(sprintf(     \"Infer Halifax latitude %.2f and longitude %.2f; distance mismatch %.0f km\",     result$par[2], result$par[1], dist )) #> Infer Halifax latitude 39.44 and longitude -63.56; distance mismatch 579 km"},{"path":"https://dankelley.github.io/oce/reference/sunDeclinationRightAscension.html","id":null,"dir":"Reference","previous_headings":"","what":"Sun Declination and Right Ascension — sunDeclinationRightAscension","title":"Sun Declination and Right Ascension — sunDeclinationRightAscension","text":"formulae Meeus (1991), chapter 24 (uses chapter 21).","code":""},{"path":"https://dankelley.github.io/oce/reference/sunDeclinationRightAscension.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sun Declination and Right Ascension — sunDeclinationRightAscension","text":"","code":"sunDeclinationRightAscension(time, apparent = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/sunDeclinationRightAscension.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sun Declination and Right Ascension — sunDeclinationRightAscension","text":"time POSIXct time. UTC timezone; , behaviour function unlikely correct. apparent logical value indicating whether return 'apparent' angles.","code":""},{"path":"https://dankelley.github.io/oce/reference/sunDeclinationRightAscension.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sun Declination and Right Ascension — sunDeclinationRightAscension","text":"list containing declination rightAscension, degrees.","code":""},{"path":"https://dankelley.github.io/oce/reference/sunDeclinationRightAscension.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sun Declination and Right Ascension — sunDeclinationRightAscension","text":"Meeus, Jean. Astronomical Algorithms. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1991.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/sunDeclinationRightAscension.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Sun Declination and Right Ascension — sunDeclinationRightAscension","text":"Dan Kelley, based formulae Meeus (1991).","code":""},{"path":"https://dankelley.github.io/oce/reference/sunDeclinationRightAscension.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sun Declination and Right Ascension — sunDeclinationRightAscension","text":"","code":"# Example 24.a in Meeus (1991) (page 158 PDF, 153 print) time <- as.POSIXct(\"1992-10-13 00:00:00\", tz = \"UTC\") a <- sunDeclinationRightAscension(time, apparent = TRUE) stopifnot(abs(a$declination - (-7.78507)) < 0.00004) stopifnot(abs(a$rightAscension - (-161.61919)) < 0.00003) b <- sunDeclinationRightAscension(time) # check against previous results, to protect aginst code-drift errors stopifnot(abs(b$declination - (-7.785464443)) < 0.000000001) stopifnot(abs(b$rightAscension - (-161.6183305)) < 0.0000001)"},{"path":"https://dankelley.github.io/oce/reference/swAbsoluteSalinity.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Absolute Salinity (GSW Formulation) — swAbsoluteSalinity","title":"Seawater Absolute Salinity (GSW Formulation) — swAbsoluteSalinity","text":"Compute seawater Absolute Salinity, according GSW/TEOS-10 formulation gsw::gsw_SA_from_SP() gsw package. Typically, fraction unit higher practical salinity defined UNESCO formulae.","code":""},{"path":"https://dankelley.github.io/oce/reference/swAbsoluteSalinity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Absolute Salinity (GSW Formulation) — swAbsoluteSalinity","text":"","code":"swAbsoluteSalinity(   salinity,   pressure = NULL,   longitude = NULL,   latitude = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/swAbsoluteSalinity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Absolute Salinity (GSW Formulation) — swAbsoluteSalinity","text":"salinity either practical salinity (case temperature pressure must provided) oce object (case salinity, etc. inferred object). pressure pressure dbar. longitude longitude observation. latitude latitude observation. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/swAbsoluteSalinity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Absolute Salinity (GSW Formulation) — swAbsoluteSalinity","text":"Absolute Salinity \\(g/kg\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/swAbsoluteSalinity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Absolute Salinity (GSW Formulation) — swAbsoluteSalinity","text":"McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swAbsoluteSalinity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Absolute Salinity (GSW Formulation) — swAbsoluteSalinity","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swAbsoluteSalinity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Absolute Salinity (GSW Formulation) — swAbsoluteSalinity","text":"","code":"swAbsoluteSalinity(35.5, 300, 260, 16) # 35.67136 #> [1] 35.67136"},{"path":"https://dankelley.github.io/oce/reference/swAlpha.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Thermal Expansion Coefficient — swAlpha","title":"Seawater Thermal Expansion Coefficient — swAlpha","text":"Compute \\(\\alpha\\), thermal expansion coefficient seawater.","code":""},{"path":"https://dankelley.github.io/oce/reference/swAlpha.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Thermal Expansion Coefficient — swAlpha","text":"","code":"swAlpha(   salinity,   temperature = NULL,   pressure = 0,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swAlpha.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Thermal Expansion Coefficient — swAlpha","text":"salinity either practical salinity (case temperature pressure must provided) oce object (case salinity, etc. inferred object). temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale; see “Temperature units” documentation swRho(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" \"gsw\".","code":""},{"path":"https://dankelley.github.io/oce/reference/swAlpha.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Thermal Expansion Coefficient — swAlpha","text":"Value 1/degC.","code":""},{"path":"https://dankelley.github.io/oce/reference/swAlpha.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Thermal Expansion Coefficient — swAlpha","text":"eos=\"unesco\" formulae based UNESCO equation state, formulated empirically Trevor J. McDougall, 1987, Neutral Surfaces, Journal Physical Oceanography, volume 17, pages 1950-1964. eos=\"gsw\" formulae come GSW; see references swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swAlpha.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Thermal Expansion Coefficient — swAlpha","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swAlphaOverBeta.html","id":null,"dir":"Reference","previous_headings":"","what":"Ratio of Seawater Thermal Expansion Coefficient to Haline Contraction Coefficient — swAlphaOverBeta","title":"Ratio of Seawater Thermal Expansion Coefficient to Haline Contraction Coefficient — swAlphaOverBeta","text":"Compute \\(\\alpha/\\beta\\) using McDougall's (1987) algorithm.","code":""},{"path":"https://dankelley.github.io/oce/reference/swAlphaOverBeta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ratio of Seawater Thermal Expansion Coefficient to Haline Contraction Coefficient — swAlphaOverBeta","text":"","code":"swAlphaOverBeta(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swAlphaOverBeta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ratio of Seawater Thermal Expansion Coefficient to Haline Contraction Coefficient — swAlphaOverBeta","text":"salinity either practical salinity (case temperature pressure must provided) oce object (case salinity, etc. inferred object). temperature -situ temperature (\\(^\\circ\\)C) pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" \"gsw\".","code":""},{"path":"https://dankelley.github.io/oce/reference/swAlphaOverBeta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ratio of Seawater Thermal Expansion Coefficient to Haline Contraction Coefficient — swAlphaOverBeta","text":"Value psu/\\(^\\circ\\)C.","code":""},{"path":"https://dankelley.github.io/oce/reference/swAlphaOverBeta.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ratio of Seawater Thermal Expansion Coefficient to Haline Contraction Coefficient — swAlphaOverBeta","text":"eos=\"unesco\" formulae based UNESCO equation state, formulated empirically Trevor J. McDougall, 1987, Neutral Surfaces, Journal Physical Oceanography, volume 17, pages 1950-1964. eos=\"gsw\" formulae come GSW; see references swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swAlphaOverBeta.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Ratio of Seawater Thermal Expansion Coefficient to Haline Contraction Coefficient — swAlphaOverBeta","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swAlphaOverBeta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ratio of Seawater Thermal Expansion Coefficient to Haline Contraction Coefficient — swAlphaOverBeta","text":"","code":"swAlphaOverBeta(40, 10, 4000, eos = \"unesco\") # 0.3476 #> [1] 0.3416053"},{"path":"https://dankelley.github.io/oce/reference/swBeta.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Haline Contraction Coefficient — swBeta","title":"Seawater Haline Contraction Coefficient — swBeta","text":"Compute \\(\\beta\\), haline contraction coefficient seawater.","code":""},{"path":"https://dankelley.github.io/oce/reference/swBeta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Haline Contraction Coefficient — swBeta","text":"","code":"swBeta(   salinity,   temperature = NULL,   pressure = 0,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swBeta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Haline Contraction Coefficient — swBeta","text":"salinity either practical salinity (case temperature pressure must provided) oce object (case salinity, etc. inferred object). temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale; see “Temperature units” documentation swRho(). pressure seawater pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" \"gsw\".","code":""},{"path":"https://dankelley.github.io/oce/reference/swBeta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Haline Contraction Coefficient — swBeta","text":"Value 1/psu.","code":""},{"path":"https://dankelley.github.io/oce/reference/swBeta.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Haline Contraction Coefficient — swBeta","text":"eos=\"unesco\" formulae based UNESCO equation state, formulated empirically Trevor J. McDougall, 1987, Neutral Surfaces, Journal Physical Oceanography, volume 17, pages 1950-1964. eos=\"gsw\" formulae come GSW; see references swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swBeta.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Haline Contraction Coefficient — swBeta","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swCSTp.html","id":null,"dir":"Reference","previous_headings":"","what":"Electrical Conductivity Ratio From Salinity, Temperature and Pressure — swCSTp","title":"Electrical Conductivity Ratio From Salinity, Temperature and Pressure — swCSTp","text":"Compute electrical conductivity ratio based salinity, temperature, pressure (relative conductivity seawater salinity=35, temperature68=15, pressure=0).","code":""},{"path":"https://dankelley.github.io/oce/reference/swCSTp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Electrical Conductivity Ratio From Salinity, Temperature and Pressure — swCSTp","text":"","code":"swCSTp(   salinity,   temperature = 15,   pressure = 0,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swCSTp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Electrical Conductivity Ratio From Salinity, Temperature and Pressure — swCSTp","text":"salinity practical salinity, CTD object (case temperature pressure used, next two arguments ignored) temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale; see examples, well “Temperature units” section documentation swRho(). pressure pressure (dbar) eos equation state, either \"unesco\" \"gsw\".","code":""},{"path":"https://dankelley.github.io/oce/reference/swCSTp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Electrical Conductivity Ratio From Salinity, Temperature and Pressure — swCSTp","text":"Conductivity ratio (unitless), .e. ratio conductivity conductivity salinity=35, temperature=15 (IPTS-68 scale) pressure=0, numerical value 42.9140 mS/cm = 4.29140 S/m (see Culkin Smith, 1980, regression result cited bottom left-hand column page 23).","code":""},{"path":"https://dankelley.github.io/oce/reference/swCSTp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Electrical Conductivity Ratio From Salinity, Temperature and Pressure — swCSTp","text":"eos=\"unesco\", calculation done bisection root search UNESCO formula relating salinity conductivity, temperature, pressure (see swSCTp()).  \"gsw\" Gibbs-SeaWater formulation used, via gsw::gsw_C_from_SP().","code":""},{"path":"https://dankelley.github.io/oce/reference/swCSTp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Electrical Conductivity Ratio From Salinity, Temperature and Pressure — swCSTp","text":"Fofonoff, P. R. C. Millard Jr, 1983. Algorithms computation fundamental properties seawater. Unesco Technical Papers Marine Science, 44, 53 pp. Culkin, F., Norman D. Smith, 1980. Determination concentration potassium chloride solution electrical conductivity, 15 C infinite frequency, standard seawater salinity 35.0000 ppt (Chlorinity 19.37394 ppt). IEEE Journal Oceanic Engineering, 5, pp 22-23.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swCSTp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Electrical Conductivity Ratio From Salinity, Temperature and Pressure — swCSTp","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swCSTp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Electrical Conductivity Ratio From Salinity, Temperature and Pressure — swCSTp","text":"","code":"stopifnot(abs(1.0 - swCSTp(35, T90fromT68(15), 0, eos = \"unesco\")) < 1e-7) stopifnot(abs(1.0 - swCSTp(34.25045, T90fromT68(15), 2000, eos = \"unesco\")) < 1e-7) stopifnot(abs(1.0 - swCSTp(34.25045, T90fromT68(15), 2000, eos = \"gsw\")) < 1e-7)"},{"path":"https://dankelley.github.io/oce/reference/swConservativeTemperature.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Conservative Temperature (GSW Formulation) — swConservativeTemperature","title":"Seawater Conservative Temperature (GSW Formulation) — swConservativeTemperature","text":"Compute seawater Conservative Temperature, according GSW/TEOS-10 formulation.","code":""},{"path":"https://dankelley.github.io/oce/reference/swConservativeTemperature.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Conservative Temperature (GSW Formulation) — swConservativeTemperature","text":"","code":"swConservativeTemperature(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/swConservativeTemperature.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Conservative Temperature (GSW Formulation) — swConservativeTemperature","text":"salinity either practical salinity (case temperature pressure must provided) oce object (case salinity, etc. inferred object). temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale; see “Temperature units” documentation swRho(). pressure pressure (dbar) longitude longitude observation. latitude latitude observation. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/swConservativeTemperature.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Conservative Temperature (GSW Formulation) — swConservativeTemperature","text":"Conservative temperature degrees Celcius.","code":""},{"path":"https://dankelley.github.io/oce/reference/swConservativeTemperature.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Conservative Temperature (GSW Formulation) — swConservativeTemperature","text":"first argument oce object, values salinity, etc., extracted , used calculation, corresponding arguments present function ignored. conservative temperature calculated using TEOS-10 function gsw::gsw_CT_from_t gsw package.","code":""},{"path":"https://dankelley.github.io/oce/reference/swConservativeTemperature.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Conservative Temperature (GSW Formulation) — swConservativeTemperature","text":"McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swConservativeTemperature.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Conservative Temperature (GSW Formulation) — swConservativeTemperature","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swConservativeTemperature.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Conservative Temperature (GSW Formulation) — swConservativeTemperature","text":"","code":"swConservativeTemperature(35, 10, 1000, 188, 4) # 9.86883 #> [1] 9.86883"},{"path":"https://dankelley.github.io/oce/reference/swDepth.html","id":null,"dir":"Reference","previous_headings":"","what":"Water Depth — swDepth","title":"Water Depth — swDepth","text":"Retrieve compute depth surface, .e. positive number within water column.  first parameter oce object element named \"depth\" data slot, return value. Otherwise, compute depth formula includes pressure latitude, explained “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/swDepth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Water Depth — swDepth","text":"","code":"swDepth(   pressure,   latitude = 45,   eos = getOption(\"oceEOS\", default = \"gsw\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/swDepth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Water Depth — swDepth","text":"pressure either pressure (dbar), case latitude must also given, ctd object, case latitude inferred object. latitude numeric value latitude degrees North. eos character value indicating formulation used, either \"unesco\" \"gsw\". debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/swDepth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Water Depth — swDepth","text":"swDepth returns depth ocean surface, metres.","code":""},{"path":"https://dankelley.github.io/oce/reference/swDepth.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Water Depth — swDepth","text":"calculated case, method depends value eos parameter. \"unesco\", depth calculated pressure using Saunders Fofonoff's method, formula refitted 1980 UNESCO equation state (reference 1).  hand, eos=\"gsw\", gsw::gsw_z_from_p() gsw package (references 2 3) used.","code":""},{"path":"https://dankelley.github.io/oce/reference/swDepth.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Water Depth — swDepth","text":"Unesco 1983. Algorithms computation fundamental properties seawater, 1983. Unesco Tech. Pap. Mar. Sci., . 44, 53 pp. IOC, SCOR, IAPSO (2010). international thermodynamic equation seawater-2010: Calculation use thermodynamic properties.  Technical Report 56, Intergovernmental Oceanographic Commission, Manuals Guide. McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swDepth.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Water Depth — swDepth","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swDepth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Water Depth — swDepth","text":"","code":"d <- swDepth(10, 45)"},{"path":"https://dankelley.github.io/oce/reference/swDynamicHeight.html","id":null,"dir":"Reference","previous_headings":"","what":"Dynamic Height of a Seawater Profile — swDynamicHeight","title":"Dynamic Height of a Seawater Profile — swDynamicHeight","text":"Compute dynamic height column seawater.","code":""},{"path":"https://dankelley.github.io/oce/reference/swDynamicHeight.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dynamic Height of a Seawater Profile — swDynamicHeight","text":"","code":"swDynamicHeight(   x,   referencePressure = 2000,   subdivisions = 500,   rel.tol = .Machine$double.eps^0.25,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swDynamicHeight.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dynamic Height of a Seawater Profile — swDynamicHeight","text":"x section object. referencePressure reference pressure (dbar). exceeds highest pressure supplied swDynamicHeight(), highest pressure used, instead supplied value referencePressure. subdivisions number subdivisions call integrate().  (default value considerably larger default integrate(), otherwise test profiles failed integrate. rel.tol absolute tolerance call integrate().  Note call made scaled coordinates, .e. pressure divided maximum value, dz/dp also divided maximum. eos equation state, either \"unesco\" \"gsw\".","code":""},{"path":"https://dankelley.github.io/oce/reference/swDynamicHeight.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dynamic Height of a Seawater Profile — swDynamicHeight","text":"first form, list containing distance, distance (km( first station section height, dynamic height (m). second form, single value, containing dynamic height (m).","code":""},{"path":"https://dankelley.github.io/oce/reference/swDynamicHeight.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Dynamic Height of a Seawater Profile — swDynamicHeight","text":"first argument section, dynamic height calculated station within section, returns list containing distance along section along dynamic height. first argument ctd, returns just single value, dynamic height. eos=\"unesco\", processing follows.  First, piecewise-linear model density variation pressure developed using stats::approxfun(). (option rule=2 used extrapolate uppermost density surface, preventing possible bias bottle data, first depth may metres surface.) second function constructed density water salinity 35PSU, temperature 0\\(^\\circ\\)C, pressure ctd. difference reciprocals densities, integrated stats::integrate() pressure limits 0 referencePressure.  (improved numerical results, variables scaled integration, making independent dependent variables order one.) eos=\"gsw\", gsw::gsw_geo_strf_dyn_height() used calculate result m^2/s^2, divided 9.7963\\(m/s^2\\). pressures order, data sorted. pressure repeated, first level used. 4 remaining distinct pressures, NA returned, warning.","code":""},{"path":"https://dankelley.github.io/oce/reference/swDynamicHeight.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Dynamic Height of a Seawater Profile — swDynamicHeight","text":"","code":"library(oce) data(section)  # Dynamic height and geostrophy par(mfcol=c(2, 2)) par(mar=c(4.5, 4.5, 2, 1))  # Left-hand column: whole section # (The smoothing lowers Gulf Stream speed greatly) westToEast <- subset(section, 1<=stationId&stationId<=123) dh <- swDynamicHeight(westToEast) plot(dh$distance, dh$height, type=\"p\", xlab=\"\", ylab=\"dyn. height [m]\") ok <- !is.na(dh$height) smu <- supsmu(dh$distance, dh$height) lines(smu, col=\"blue\") f <- coriolis(section[[\"station\", 1]][[\"latitude\"]]) g <- gravity(section[[\"station\", 1]][[\"latitude\"]]) v <- diff(smu$y)/diff(smu$x) * g / f / 1e3 # 1e3 converts to m plot(smu$x[-1], v, type=\"l\", col=\"blue\", xlab=\"distance [km]\", ylab=\"velocity (m/s)\")  # right-hand column: gulf stream region, unsmoothed gs <- subset(section, 102<=stationId&stationId<=124) dh.gs <- swDynamicHeight(gs) plot(dh.gs$distance, dh.gs$height, type=\"b\", xlab=\"\", ylab=\"dyn. height [m]\") v <- diff(dh.gs$height)/diff(dh.gs$distance) * g / f / 1e3 plot(dh.gs$distance[-1], v, type=\"l\", col=\"blue\",   xlab=\"distance [km]\", ylab=\"velocity (m/s)\")"},{"path":"https://dankelley.github.io/oce/reference/swDynamicHeight.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dynamic Height of a Seawater Profile — swDynamicHeight","text":"Gill, .E., 1982. Atmosphere-ocean Dynamics, Academic Press, New York, 662 pp.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swDynamicHeight.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dynamic Height of a Seawater Profile — swDynamicHeight","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swLapseRate.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Lapse Rate — swLapseRate","title":"Seawater Lapse Rate — swLapseRate","text":"Compute adiabatic lapse rate","code":""},{"path":"https://dankelley.github.io/oce/reference/swLapseRate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Lapse Rate — swLapseRate","text":"","code":"swLapseRate(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swLapseRate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Lapse Rate — swLapseRate","text":"salinity either salinity (PSU) (case temperature pressure must provided) ctd object (case salinity, temperature pressure determined object, must provided argument list). temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale; see “Temperature units” documentation swRho(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4).","code":""},{"path":"https://dankelley.github.io/oce/reference/swLapseRate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Lapse Rate — swLapseRate","text":"Lapse rate (\\(deg\\)C/m).","code":""},{"path":"https://dankelley.github.io/oce/reference/swLapseRate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Lapse Rate — swLapseRate","text":"eos=\"unesco\", density calculated using UNESCO equation state seawater (references 1 2), eos=\"gsw\", GSW formulation (references 3 4) used.","code":""},{"path":"https://dankelley.github.io/oce/reference/swLapseRate.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Lapse Rate — swLapseRate","text":"Fofonoff, P. R. C. Millard Jr, 1983. Algorithms computation fundamental properties seawater. Unesco Technical Papers Marine Science, 44, 53 pp.  (Section 7, pages 38-40)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swLapseRate.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Lapse Rate — swLapseRate","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swLapseRate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Lapse Rate — swLapseRate","text":"","code":"lr <- swLapseRate(40, 40, 10000) # 3.255976e-4"},{"path":"https://dankelley.github.io/oce/reference/swN2.html","id":null,"dir":"Reference","previous_headings":"","what":"Squared Buoyancy Frequency for Seawater — swN2","title":"Squared Buoyancy Frequency for Seawater — swN2","text":"Compute \\(N^2\\), square buoyancy frequency seawater profile.","code":""},{"path":"https://dankelley.github.io/oce/reference/swN2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Squared Buoyancy Frequency for Seawater — swN2","text":"","code":"swN2(   pressure,   sigmaTheta = NULL,   derivs,   df,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/swN2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Squared Buoyancy Frequency for Seawater — swN2","text":"pressure either pressure (dbar) (case sigmaTheta must provided) object class ctd object (case sigmaTheta inferred object. sigmaTheta Surface-referenced potential density minus 1000 (kg/m\\(^3\\)). derivs optional argument control derivative \\(d\\sigma_\\theta/dp\\) calculated.  may character string function two arguments.  See “Details”. df argument passed smooth.spline() function used smoothing; set NA prevent smoothing. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. ... additional argument, passed smooth.spline(), case derivs=\"smoothing\".  See “Details”.","code":""},{"path":"https://dankelley.github.io/oce/reference/swN2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Squared Buoyancy Frequency for Seawater — swN2","text":"Square buoyancy frequency (\\(radian^2/s^2\\)).","code":""},{"path":"https://dankelley.github.io/oce/reference/swN2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Squared Buoyancy Frequency for Seawater — swN2","text":"Smoothing often useful prior computing buoyancy frequency, may optionally done smooth.spline(), unless df=NA, case raw data used.  df provided, possibly reasonable value computed analysis profile, based number pressure levels. core method involves computing potential density referenced median pressure, using UNESCO-style swSigmaTheta function, differentiating respect pressure. derivs argument used control done, follows. derivs supplied, action though given string \"smoothing\" derivs equals \"simple\", derivative density respect pressure calculated ratio first-order derivatives density pressure, calculated using diff().  (zero appended top level.) derivs equals \"smoothing\", processing depends number data profile, whether df given optional argument.  number points exceeds 4, df exceeds 1, smooth.spline() used calculate smoothing spline representation variation density function pressure, derivatives extracted spline using predict.  Otherwise, density smoothed using smooth(), derivatives calculated \"simple\" method. derivs function taking two arguments (first pressure, density) function called directly calculate derivative, smoothing done call. precise work, makes sense skip swN2 entirely, choosing whether, , smooth based understanding fundamental principles well data practicalities.","code":""},{"path":"https://dankelley.github.io/oce/reference/swN2.html","id":"deprecation-notice","dir":"Reference","previous_headings":"","what":"Deprecation Notice","title":"Squared Buoyancy Frequency for Seawater — swN2","text":"2019 April 11, swN2 argument named eos. However, work stated, unless first argument ctd object. Besides, argument name inherently deceptive, UNESCO scheme specify N2 calculated. Nothing really lost making change, new default previously available eos=\"unesco\" setup, gsw-formulated estimate N2 provided gsw::gsw_Nsquared() gsw package.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swN2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Squared Buoyancy Frequency for Seawater — swN2","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swN2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Squared Buoyancy Frequency for Seawater — swN2","text":"","code":"library(oce) data(ctd) # Left panel: density p <- ctd[[\"pressure\"]] ylim <- rev(range(p)) par(mfrow = c(1, 2), mar = c(3, 3, 1, 1), mgp = c(2, 0.7, 0)) plot(ctd[[\"sigmaTheta\"]], p, ylim = ylim, type = \"l\", xlab = expression(sigma[theta])) # Right panel: N2, with default settings (black) and with df=2 (red) N2 <- swN2(ctd) plot(N2, p, ylim = ylim, xlab = \"N2 [1/s^2]\", ylab = \"p\", type = \"l\") lines(swN2(ctd, df = 3), p, col = 2)"},{"path":"https://dankelley.github.io/oce/reference/swPressure.html","id":null,"dir":"Reference","previous_headings":"","what":"Water Pressure — swPressure","title":"Water Pressure — swPressure","text":"Compute seawater pressure depth inverting swDepth() using uniroot().","code":""},{"path":"https://dankelley.github.io/oce/reference/swPressure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Water Pressure — swPressure","text":"","code":"swPressure(depth, latitude = 45, eos = getOption(\"oceEOS\", default = \"gsw\"))"},{"path":"https://dankelley.github.io/oce/reference/swPressure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Water Pressure — swPressure","text":"depth distance surface metres. latitude Latitude \\(^\\circ\\)N. eos indication formulation used, either \"unesco\" \"gsw\".","code":""},{"path":"https://dankelley.github.io/oce/reference/swPressure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Water Pressure — swPressure","text":"Pressure dbar.","code":""},{"path":"https://dankelley.github.io/oce/reference/swPressure.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Water Pressure — swPressure","text":"eos=\"unesco\" done numerical inversion swDepth() done using uniroot(). eos=\"gsw\", done using gsw::gsw_p_from_z() gsw package.","code":""},{"path":"https://dankelley.github.io/oce/reference/swPressure.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Water Pressure — swPressure","text":"Unesco 1983. Algorithms computation fundamental properties seawater, 1983. Unesco Tech. Pap. Mar. Sci., . 44, 53 pp.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swPressure.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Water Pressure — swPressure","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swPressure.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Water Pressure — swPressure","text":"","code":"swPressure(9712.653, 30, eos = \"unesco\") # 10000 #> [1] 10000 swPressure(9712.653, 30, eos = \"gsw\") #  9998.863 #> [1] 9998.863"},{"path":"https://dankelley.github.io/oce/reference/swRho.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Density — swRho","title":"Seawater Density — swRho","text":"Compute \\(\\rho\\), -situ density seawater.","code":""},{"path":"https://dankelley.github.io/oce/reference/swRho.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Density — swRho","text":"","code":"swRho(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/swRho.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Density — swRho","text":"salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4). debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/swRho.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Density — swRho","text":"-situ density (kg/m\\(^3\\)).","code":""},{"path":"https://dankelley.github.io/oce/reference/swRho.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Density — swRho","text":"eos=\"unesco\", density calculated using UNESCO equation state seawater (references 1 2), eos=\"gsw\", GSW formulation (references 3 4) used.","code":""},{"path":"https://dankelley.github.io/oce/reference/swRho.html","id":"temperature-units","dir":"Reference","previous_headings":"","what":"Temperature units","title":"Seawater Density — swRho","text":"UNESCO formulae defined terms temperature measured IPTS-68 scale, whereas replacement GSW formulae based -90 scale. Prior addition GSW capabilities, various sw* functions took temperature IPTS-68 units. GSW capabilities added early 2015, assumed unit temperature taken -90.  change means old code modified, replacing e.g. swRho(S, T, p) swRho(S, T90fromT68(T), p). typical oceanic values, difference two scales millidegrees.","code":""},{"path":"https://dankelley.github.io/oce/reference/swRho.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Density — swRho","text":"Fofonoff, P. R. C. Millard Jr, 1983. Algorithms computation fundamental properties seawater. Unesco Technical Papers Marine Science, 44, 53 pp. Gill, .E., 1982. Atmosphere-ocean Dynamics, Academic Press, New York, 662 pp. IOC, SCOR, IAPSO (2010). international thermodynamic equation seawater-2010: Calculation use thermodynamic properties.  Technical Report 56, Intergovernmental Oceanographic Commission, Manuals Guide. McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swRho.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Density — swRho","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swRho.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Density — swRho","text":"","code":"library(oce) # The numbers in the comments are the check values listed in reference 1; # note that temperature in that reference was on the T68 scale, but that # the present function works with the ITS-90 scale, so a conversion # is required. swRho(35, T90fromT68(5), 0, eos = \"unesco\") # 1027.67547 #> [1] 1027.675 swRho(35, T90fromT68(5), 10000, eos = \"unesco\") # 1069.48914 #> [1] 1069.489 swRho(35, T90fromT68(25), 0, eos = \"unesco\") # 1023.34306 #> [1] 1023.343 swRho(35, T90fromT68(25), 10000, eos = \"unesco\") # 1062.53817 #> [1] 1062.538"},{"path":"https://dankelley.github.io/oce/reference/swRrho.html","id":null,"dir":"Reference","previous_headings":"","what":"Density Ratio — swRrho","title":"Density Ratio — swRrho","text":"Compute density ratio ctd object.  error (perhaps hints) issued type object.","code":""},{"path":"https://dankelley.github.io/oce/reference/swRrho.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Density Ratio — swRrho","text":"","code":"swRrho(   ctd,   sense = c(\"diffusive\", \"finger\"),   smoothingLength = 10,   df,   eos = getOption(\"oceEOS\", default = \"gsw\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/swRrho.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Density Ratio — swRrho","text":"ctd oce object holds salinity, temperature, pressure.  eos \"gsw\", must also hold longitude latitude. sense indication sense double diffusion study therefore definition Rrho; see “Details” smoothingLength ignored df supplied, otherwise latter calculated number data points, divided number within depth interval smoothingLength metres. df given, provided smooth.spline(). eos equation state, either \"unesco\" \"gsw\". debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/swRrho.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Density Ratio — swRrho","text":"Density ratio defined either \"diffusive\" \"finger\" sense.","code":""},{"path":"https://dankelley.github.io/oce/reference/swRrho.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Density Ratio — swRrho","text":"eos=\"unesco\", work done calculating salinity potential-temperature derivatives smoothing splines whose properties governed smoothingLength df.  sense=\"diffusive\" definition \\((beta*dS/dz)/(alpha*d(theta)/dz)\\) reciprocal \"finger\". eos=\"gsw\", work done extracting absolute salinity conservative temperature, smoothing smoothing spline \"unesco\" case, calling gsw::gsw_Turner_Rsubrho() smoothed fields. Since gsw function works mid-point pressures, approx() used interpolate back original pressures. default arguments acceptable, ctd[[\"Rrho\"]] may used instead swRrho(ctd).","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swRrho.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Density Ratio — swRrho","text":"Dan Kelley Chantelle Layton","code":""},{"path":"https://dankelley.github.io/oce/reference/swRrho.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Density Ratio — swRrho","text":"","code":"library(oce) data(ctd) u <- swRrho(ctd, eos = \"unesco\") g <- swRrho(ctd, eos = \"gsw\") p <- ctd[[\"p\"]] plot(u, p, ylim = rev(range(p)), type = \"l\", xlab = expression(R[rho])) lines(g, p, lty = 2, col = \"red\") legend(\"topright\", lty = 1:2, legend = c(\"unesco\", \"gsw\"), col = c(\"black\", \"red\"))"},{"path":"https://dankelley.github.io/oce/reference/swSCTp.html","id":null,"dir":"Reference","previous_headings":"","what":"Practical Salinity From Electrical Conductivity, Temperature and Pressure — swSCTp","title":"Practical Salinity From Electrical Conductivity, Temperature and Pressure — swSCTp","text":"Calculate salinity actually measured CTD, .e. conductivity, -situ temperature pressure.  Often done CTD processing software, sometimes helpful directly, e.g. concern mismatches sensor response times.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSCTp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Practical Salinity From Electrical Conductivity, Temperature and Pressure — swSCTp","text":"","code":"swSCTp(   conductivity,   temperature = NULL,   pressure = NULL,   conductivityUnit,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSCTp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Practical Salinity From Electrical Conductivity, Temperature and Pressure — swSCTp","text":"conductivity measure conductivity (see also conductivityUnit) oce object holding hydrographic information. second case, arguments swSCTp ignored. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale; see “Temperature units” documentation swRho(). pressure pressure (dbar). conductivityUnit string indicating unit used conductivity. may \"ratio\" \"\" (meaning conductivity ratio), \"mS/cm\" \"S/m\".  Note ratio mode assumes measured conductivity divided standard conductivity 4.2914 S/m.  dealing unfamiliar data measurement unit recorded, can sensible try three possibilities conductivityUnit, see yields sensible salinities. eos equation state, either \"unesco\" \"gsw\".","code":""},{"path":"https://dankelley.github.io/oce/reference/swSCTp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Practical Salinity From Electrical Conductivity, Temperature and Pressure — swSCTp","text":"Practical Salinity.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSCTp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Practical Salinity From Electrical Conductivity, Temperature and Pressure — swSCTp","text":"Two variants provided. First, eos \"unesco\", salinity calculated using UNESCO algorithm described Fofonoff Millard (1983) reference 1. Second, eos \"gsw\", Gibbs-SeaWater formulation used, via gsw::gsw_SP_from_C() gsw package. latter starts formula former, yields Practical Salinity less 2, result instead calculated using formulae provided Hill et al. (1986; reference 2), modified match \"unesco\" value Practical salinity equal 2 (reference 3).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSCTp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Practical Salinity From Electrical Conductivity, Temperature and Pressure — swSCTp","text":"Fofonoff, P. R. C. Millard Jr, 1983. Algorithms computation fundamental properties seawater. Unesco Technical Papers Marine Science, 44, 53 pp. K. Hill, T. Dauphinee, D. Woods. “Extension Practical Salinity Scale 1978 Low Salinities.” IEEE Journal Oceanic Engineering 11, . 1 (January 1986): 109-12. doi:10.1109/JOE.1986.1145154 gsw_from_SP online documentation, available http://www.teos-10.org/pubs/gsw/html/gsw_C_from_SP.html","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSCTp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Practical Salinity From Electrical Conductivity, Temperature and Pressure — swSCTp","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSCTp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Practical Salinity From Electrical Conductivity, Temperature and Pressure — swSCTp","text":"","code":"# 1. Demonstrate agreement with test value in UNESCO documents swSCTp(1, T90fromT68(15), 0, eos = \"unesco\") # expect 35 #> [1] 35 # 2. Demonstrate agreement of gsw and unesco, S>2 case swSCTp(1, T90fromT68(15), 0, eos = \"gsw\") # again, expect 35 #> [1] 35 # 3. Demonstrate close values even in very brackish water swSCTp(0.02, 10, 100, eos = \"gsw\") # 0.6013981 #> [1] 0.6013981 swSCTp(0.02, 10, 100, eos = \"unesco\") # 0.6011721 #> [1] 0.6011721"},{"path":"https://dankelley.github.io/oce/reference/swSR.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Reference Salinity (GSW Formulation) — swSR","title":"Seawater Reference Salinity (GSW Formulation) — swSR","text":"Compute seawater Reference Salinity (SR), according GSW/TEOS-10 formulation gsw::gsw_SR_from_SP() gsw package.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Reference Salinity (GSW Formulation) — swSR","text":"","code":"swSR(salinity)"},{"path":"https://dankelley.github.io/oce/reference/swSR.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Reference Salinity (GSW Formulation) — swSR","text":"salinity either practical salinity oce object holds salinity data slot.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSR.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Reference Salinity (GSW Formulation) — swSR","text":"Reference Salinity, SR, \\(g/kg\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSR.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Reference Salinity (GSW Formulation) — swSR","text":"McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSR.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Reference Salinity (GSW Formulation) — swSR","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSR.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Reference Salinity (GSW Formulation) — swSR","text":"","code":"SR <- swSR(35.0) # 35.16504"},{"path":"https://dankelley.github.io/oce/reference/swSTrho.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Salinity From Temperature and Density — swSTrho","title":"Seawater Salinity From Temperature and Density — swSTrho","text":"Compute Practical Absolute Salinity, given -situ Conservative Temperature, density, pressure. mainly used draw isopycnal lines TS diagrams, hence dual meanings salinity temperature, depending value eos.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSTrho.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Salinity From Temperature and Density — swSTrho","text":"","code":"swSTrho(   temperature,   density,   pressure,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSTrho.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Salinity From Temperature and Density — swSTrho","text":"temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale; see “Temperature units” documentation swRho(). density -situ density sigma value (\\(kg/m^3\\)) pressure -situ pressure (dbar) eos equation state, either \"unesco\" (see references 1 2) \"gsw\" (see references 3 4).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSTrho.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Salinity From Temperature and Density — swSTrho","text":"Practical Salinity, eos=\"unesco\", Absolute Salinity, eos=\"gsw\".","code":""},{"path":"https://dankelley.github.io/oce/reference/swSTrho.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Salinity From Temperature and Density — swSTrho","text":"eos=\"unesco\", finds practical salinity yields given density, given -situ temperature pressure.  method bisection search salinity tolerance 0.001.  eos=\"gsw\", function gsw::gsw_SA_from_rho() gsw package used infer Absolute Salinity Conservative Temperature.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSTrho.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Salinity From Temperature and Density — swSTrho","text":"Fofonoff, P. R. C. Millard Jr, 1983. Algorithms computation fundamental properties seawater. Unesco Technical Papers Marine Science, 44, 53 pp Gill, .E., 1982. Atmosphere-ocean Dynamics, Academic Press, New York, 662 pp. IOC, SCOR, IAPSO (2010). international thermodynamic equation seawater-2010: Calculation use thermodynamic properties.  Technical Report 56, Intergovernmental Oceanographic Commission, Manuals Guide. McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSTrho.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Salinity From Temperature and Density — swSTrho","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSTrho.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Salinity From Temperature and Density — swSTrho","text":"","code":"swSTrho(10, 22, 0, eos = \"gsw\") # 28.76285 #> [1] 28.76249 swSTrho(10, 22, 0, eos = \"unesco\") # 28.651625 #> [1] 28.65163"},{"path":"https://dankelley.github.io/oce/reference/swSigma.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Density Anomaly — swSigma","title":"Seawater Density Anomaly — swSigma","text":"Compute \\(\\sigma_\\theta\\), density seawater, minus 1000 kg/m\\(^3\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Density Anomaly — swSigma","text":"","code":"swSigma(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSigma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Density Anomaly — swSigma","text":"salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Density Anomaly — swSigma","text":"Density anomaly (kg/m\\(^3\\)), computed swRho(), minus- 1000 kg/m\\(^3\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Density Anomaly — swSigma","text":"See citations provided swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSigma.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Density Anomaly — swSigma","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Density Anomaly — swSigma","text":"","code":"library(oce) swSigma(35, 13, 1000, longitude = 300, latitude = 30, eos = \"gsw\") # 30.82374 #> [1] 30.82374 swSigma(35, T90fromT68(13), 1000, eos = \"unesco\") # 30.8183 #> [1] 30.8183"},{"path":"https://dankelley.github.io/oce/reference/swSigma0.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Potential Density Anomaly Referenced to Surface Pressure — swSigma0","title":"Seawater Potential Density Anomaly Referenced to Surface Pressure — swSigma0","text":"Compute potential density seawater (minus 1000 kg/m\\(^3\\)), referenced surface pressure. done using gsw::gsw_sigma0() eos=\"gsw\", using swSigmaTheta() \"unesco\". (difference formulations typically 0.01 kg/m^3, corresponding millidegrees temperature.)","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma0.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Potential Density Anomaly Referenced to Surface Pressure — swSigma0","text":"","code":"swSigma0(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSigma0.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Potential Density Anomaly Referenced to Surface Pressure — swSigma0","text":"salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma0.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Potential Density Anomaly Referenced to Surface Pressure — swSigma0","text":"Potential density anomaly (kg/m\\(^3\\)).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma0.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Potential Density Anomaly Referenced to Surface Pressure — swSigma0","text":"See citations provided swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSigma0.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Potential Density Anomaly Referenced to Surface Pressure — swSigma0","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma1.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Potential Density Anomaly Referenced to 1000db Pressure — swSigma1","title":"Seawater Potential Density Anomaly Referenced to 1000db Pressure — swSigma1","text":"analogous swSigma0(), referenced 1000db pressure.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Potential Density Anomaly Referenced to 1000db Pressure — swSigma1","text":"","code":"swSigma1(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSigma1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Potential Density Anomaly Referenced to 1000db Pressure — swSigma1","text":"salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Potential Density Anomaly Referenced to 1000db Pressure — swSigma1","text":"Potential density anomaly (kg/m\\(^3\\)).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma1.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Potential Density Anomaly Referenced to 1000db Pressure — swSigma1","text":"See citations provided swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSigma1.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Potential Density Anomaly Referenced to 1000db Pressure — swSigma1","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma2.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Potential Density Anomaly Referenced to 2000db Pressure — swSigma2","title":"Seawater Potential Density Anomaly Referenced to 2000db Pressure — swSigma2","text":"analogous swSigma0(), referenced 2000db pressure.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Potential Density Anomaly Referenced to 2000db Pressure — swSigma2","text":"","code":"swSigma2(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSigma2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Potential Density Anomaly Referenced to 2000db Pressure — swSigma2","text":"salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Potential Density Anomaly Referenced to 2000db Pressure — swSigma2","text":"Potential density anomaly (kg/m\\(^3\\)).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Potential Density Anomaly Referenced to 2000db Pressure — swSigma2","text":"See citations provided swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSigma2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Potential Density Anomaly Referenced to 2000db Pressure — swSigma2","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma3.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Potential Density Anomaly Referenced to 3000db Pressure — swSigma3","title":"Seawater Potential Density Anomaly Referenced to 3000db Pressure — swSigma3","text":"analogous swSigma0(), referenced 3000db pressure.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Potential Density Anomaly Referenced to 3000db Pressure — swSigma3","text":"","code":"swSigma3(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSigma3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Potential Density Anomaly Referenced to 3000db Pressure — swSigma3","text":"salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Potential Density Anomaly Referenced to 3000db Pressure — swSigma3","text":"Potential density anomaly (kg/m\\(^3\\)).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma3.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Potential Density Anomaly Referenced to 3000db Pressure — swSigma3","text":"See citations provided swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSigma3.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Potential Density Anomaly Referenced to 3000db Pressure — swSigma3","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma4.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Potential Density Anomaly Referenced to 4000db Pressure — swSigma4","title":"Seawater Potential Density Anomaly Referenced to 4000db Pressure — swSigma4","text":"analogous swSigma0(), referenced 4000db pressure.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma4.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Potential Density Anomaly Referenced to 4000db Pressure — swSigma4","text":"","code":"swSigma4(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSigma4.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Potential Density Anomaly Referenced to 4000db Pressure — swSigma4","text":"salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma4.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Potential Density Anomaly Referenced to 4000db Pressure — swSigma4","text":"Potential density anomaly (kg/m\\(^3\\)).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigma4.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Potential Density Anomaly Referenced to 4000db Pressure — swSigma4","text":"See citations provided swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSigma4.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Potential Density Anomaly Referenced to 4000db Pressure — swSigma4","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaT.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Quasi-Potential Density Anomaly — swSigmaT","title":"Seawater Quasi-Potential Density Anomaly — swSigmaT","text":"Compute \\(\\sigma_t\\), rough estimate potential density seawater, minus 1000 kg/m\\(^3\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaT.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Quasi-Potential Density Anomaly — swSigmaT","text":"","code":"swSigmaT(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSigmaT.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Quasi-Potential Density Anomaly — swSigmaT","text":"salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaT.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Quasi-Potential Density Anomaly — swSigmaT","text":"Quasi-potential density anomaly (kg/m\\(^3\\)), defined density calculated pressure set zero.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaT.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Quasi-Potential Density Anomaly — swSigmaT","text":"first argument oce object, salinity, etc., extracted , used calculation.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaT.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Quasi-Potential Density Anomaly — swSigmaT","text":"See citations provided swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSigmaT.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Quasi-Potential Density Anomaly — swSigmaT","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaT.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Quasi-Potential Density Anomaly — swSigmaT","text":"","code":"swSigmaT(35, 13, 1000, longitude = 300, latitude = 30, eos = \"gsw\") # 26.39623 #> [1] 26.39623 swSigmaT(35, T90fromT68(13), 1000, eos = \"unesco\") # 26.39354 #> [1] 26.39354"},{"path":"https://dankelley.github.io/oce/reference/swSigmaTheta.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Potential Density Anomaly — swSigmaTheta","title":"Seawater Potential Density Anomaly — swSigmaTheta","text":"Compute potential density (minus 1000 kg/m^3) seawater raised adiabatically surface.  UNESCO system, quantity denoted \\(\\sigma_\\theta\\) (hence function name), GSW system, somewhat related quantity denoted sigma0. (deep-water CTD cast, RMS deviation sigma-theta sigma0 typically order 0.0003 kg/m^3, corresponding temperature shift 0.002C, distinction quantities large.)","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaTheta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Potential Density Anomaly — swSigmaTheta","text":"","code":"swSigmaTheta(   salinity,   temperature = NULL,   pressure = NULL,   referencePressure = 0,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/swSigmaTheta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Potential Density Anomaly — swSigmaTheta","text":"salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) referencePressure reference pressure, dbar. longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4). debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaTheta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Potential Density Anomaly — swSigmaTheta","text":"Potential density anomaly (kg/m\\(^3\\)), defined \\(\\sigma_\\theta=\\rho(S,\\theta(S,t,p),0\\) 1000 kg/m\\(^3\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaTheta.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Potential Density Anomaly — swSigmaTheta","text":"first argument oce object, salinity, etc., extracted , used calculation instead values provided arguments.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaTheta.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Potential Density Anomaly — swSigmaTheta","text":"See citations provided swRho() documentation.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSigmaTheta.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Potential Density Anomaly — swSigmaTheta","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSigmaTheta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Potential Density Anomaly — swSigmaTheta","text":"","code":"stopifnot(abs(26.4212790994 - swSigmaTheta(35, 13, 1000, eos = \"unesco\")) < 1e-7)"},{"path":"https://dankelley.github.io/oce/reference/swSoundAbsorption.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Sound Absorption — swSoundAbsorption","title":"Seawater Sound Absorption — swSoundAbsorption","text":"Compute sound absorption seawater, dB/m","code":""},{"path":"https://dankelley.github.io/oce/reference/swSoundAbsorption.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Sound Absorption — swSoundAbsorption","text":"","code":"swSoundAbsorption(   frequency,   salinity,   temperature,   pressure,   pH = 8,   formulation = c(\"fisher-simmons\", \"francois-garrison\") )"},{"path":"https://dankelley.github.io/oce/reference/swSoundAbsorption.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Sound Absorption — swSoundAbsorption","text":"frequency frequency sound, Hz. salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) pH seawater pH formulation character string indicating formulation use, either \"fischer-simmons\" \"francois-garrison\"; see “References”.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSoundAbsorption.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Sound Absorption — swSoundAbsorption","text":"Sound absorption dB/m.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSoundAbsorption.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Sound Absorption — swSoundAbsorption","text":"Salinity pH ignored formulation.  Several formulae may found literature, give results differing 10 percent, shown reference 3 example.  reason, likely formulations added function, entirely possible default may change.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSoundAbsorption.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Sound Absorption — swSoundAbsorption","text":"F. H. Fisher V. P. Simmons, 1977.  Sound absorption sea water.  Journal Acoustical Society America, 62(3), 558-564. R. E. Francois G. R. Garrison, 1982.  Sound absorption based ocean measurements.  Part II: Boric acid contribution equation total absorption.  Journal Acoustical Society America, 72(6):1879-1890. http://resource.npl.co.uk/acoustics/techguides/seaabsorption/","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSoundAbsorption.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Sound Absorption — swSoundAbsorption","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSoundAbsorption.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Sound Absorption — swSoundAbsorption","text":"","code":"# Fisher & Simmons (1977 table IV) gives 0.52 dB/km for 35 PSU, 5 degC, 500 atm # (4990 dbar of water)a and 10 kHz alpha <- swSoundAbsorption(35, 4, 4990, 10e3)  # reproduce part of Fig 8 of Francois and Garrison (1982 Fig 8) f <- 1e3 * 10^(seq(-1, 3, 0.1)) # in KHz plot(f / 1000, 1e3 * swSoundAbsorption(f, 35, 10, 0, formulation = \"fr\"),     xlab = \" Freq [kHz]\", ylab = \" dB/km\", type = \"l\", log = \"xy\" ) lines(f / 1000, 1e3 * swSoundAbsorption(f, 0, 10, 0, formulation = \"fr\"), lty = \"dashed\") legend(\"topleft\", lty = c(\"solid\", \"dashed\"), legend = c(\"S=35\", \"S=0\"))"},{"path":"https://dankelley.github.io/oce/reference/swSoundSpeed.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Sound Speed — swSoundSpeed","title":"Seawater Sound Speed — swSoundSpeed","text":"Compute seawater speed sound.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSoundSpeed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Sound Speed — swSoundSpeed","text":"","code":"swSoundSpeed(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSoundSpeed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Sound Speed — swSoundSpeed","text":"salinity either practical salinity (case temperature pressure must provided) oce object, case salinity, temperature (-90 scale; see next item), etc. inferred object, ignoring parameters, supplied. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale.  scale used GSW-style calculation (requested setting eos=\"gsw\"), value contained within ctd objects (probably objects created data acquired past decade two). Since UNESCO-style calculation based IPTS-68, temperature converted within present function, using T68fromT90(). pressure pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSoundSpeed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Sound Speed — swSoundSpeed","text":"Sound speed (m/s).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSoundSpeed.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Sound Speed — swSoundSpeed","text":"eos=\"unesco\", sound speed calculated using formulation section 9 Fofonoff Millard (1983). eos=\"gsw\", gsw::gsw_sound_speed() function gsw package used.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSoundSpeed.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Sound Speed — swSoundSpeed","text":"Fofonoff, P. R. C. Millard Jr, 1983. Algorithms computation fundamental properties seawater. Unesco Technical Papers Marine Science, 44, 53 pp.  (See section 9.)","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSoundSpeed.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Sound Speed — swSoundSpeed","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSoundSpeed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Sound Speed — swSoundSpeed","text":"","code":"swSoundSpeed(40, T90fromT68(40), 10000) # 1731.995 (p48 of Fofonoff + Millard 1983) #> [1] 1731.995"},{"path":"https://dankelley.github.io/oce/reference/swSpecificHeat.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Specific Heat — swSpecificHeat","title":"Seawater Specific Heat — swSpecificHeat","text":"Compute specific heat seawater.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpecificHeat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Specific Heat — swSpecificHeat","text":"","code":"swSpecificHeat(   salinity,   temperature = NULL,   pressure = 0,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swSpecificHeat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Specific Heat — swSpecificHeat","text":"salinity either practical salinity (case temperature pressure must provided) oce object (case salinity, etc. inferred object). temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale. pressure seawater pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" \"gsw\".","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpecificHeat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Specific Heat — swSpecificHeat","text":"Specific heat (J/kg/degC).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpecificHeat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Specific Heat — swSpecificHeat","text":"first argument ctd object, salinity, etc, extracted , used calculation.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpecificHeat.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Specific Heat — swSpecificHeat","text":"Millero et. al., J. Geophys. Res. 78 (1973), 4499-4507 Millero et. al., UNESCO report 38 (1981), 99-188.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSpecificHeat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Specific Heat — swSpecificHeat","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpecificHeat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Specific Heat — swSpecificHeat","text":"","code":"swSpecificHeat(40, T90fromT68(40), 10000, eos = \"unesco\") # 3949.499 #> [1] 3849.499"},{"path":"https://dankelley.github.io/oce/reference/swSpice.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Spiciness — swSpice","title":"Seawater Spiciness — swSpice","text":"Compute seawater \"spice\", variable sense orthogonal density TS space.  Larger spice values correspond relative warm salty water, compared smaller spice values. Two distinct variants exist. eos=\"unesco\" Flament's (2002) formulation used. eos=\"gsw\" gsw::gsw_spiciness0() used compute newer variant part Gibbs SeaWater formulation (McDougall Krzysik, 2015). See “Examples” section graphical illustration difference typical coastal case.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Spiciness — swSpice","text":"","code":"swSpice(   salinity,   temperature = NULL,   pressure = NULL,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/swSpice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Spiciness — swSpice","text":"salinity either salinity (PSU) (case temperature pressure must provided) ctd object (case salinity, temperature pressure determined object, must provided argument list). temperature -situ temperature (\\(^\\circ\\)C) -90 scale; see “Temperature units” documentation swRho(). pressure Seawater pressure (dbar) (used eos \"gsw\"); see “Details”.. longitude longitude observation (used eos \"gsw\"; see “Details”). latitude latitude observation (used eos \"gsw\"; see “Details”). eos Character value specifying equation state, either \"unesco\" (Flament formulation, although actually part UNESCO) \"gsw\" Gibbs SeaWater formulation. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Spiciness — swSpice","text":"Flament-formulated spice \\(kg/m^3\\) eos \"unesco\" surface-referenced GSW spiciness0 \\(kg/m^3\\) eos \"gsw\", latter provided gsw::gsw_spiciness0(), hence aimed application within top half-kilometre ocean.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpice.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Spiciness — swSpice","text":"first argument ctd object, salinity, temperature pressure values extracted , used calculation. eos=\"gsw\" case, longitude latitude also extracted, required gsw::gsw_spiciness0(). Roughly speaking, seawater high spiciness relatively warm salty compared less spicy water. Another interpretation spice variable measuring distance orthogonal isopycnal lines TS diagrams (diagrams scaled make isopycnals run 45 degrees). Note pressure, longitude latitude ignored Flament definition.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpice.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Spiciness — swSpice","text":"Flament, P. “State Variable Characterizing Water Masses Diffusive Stability: Spiciness.” Progress Oceanography, Observations 1997-98 El Nino along West Coast North America, 54, . 1 (July 1, 2002):493-501. doi:10.1016/S0079-6611(02)00065-4 McDougall, Trevor J., Oliver . Krzysik. “Spiciness.” Journal Marine Research 73, . 5 (September 1, 2015): 141-52.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSpice.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Spiciness — swSpice","text":"Dan Kelley coded , merely interface code described references 1 2.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Spiciness — swSpice","text":"","code":"# Compare unesco and gsw formulations library(oce) data(ctd) p <- ctd[[\"pressure\"]] U <- swSpice(ctd, eos = \"unesco\") G <- swSpice(ctd, eos = \"gsw\") xlim <- range(c(U, G), na.rm = TRUE) ylim <- rev(range(p)) plot(U, p,     xlim = xlim, ylim = ylim,     xlab = \"Measure of Spiciness\", ylab = \"Pressure (dbar)\" ) points(G, p, col = 2) legend(\"topleft\", col = 1:2, pch = 1, legend = c(\"unesco\", \"gsw\"))"},{"path":"https://dankelley.github.io/oce/reference/swSpiciness0.html","id":null,"dir":"Reference","previous_headings":"","what":"Spiciness in gsw System, Referenced to Surface Pressure — swSpiciness0","title":"Spiciness in gsw System, Referenced to Surface Pressure — swSpiciness0","text":"Computes seawater spiciness using gsw::gsw_spiciness0() surface referenced computation.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness0.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spiciness in gsw System, Referenced to Surface Pressure — swSpiciness0","text":"","code":"swSpiciness0(salinity, temperature, pressure, longitude, latitude)"},{"path":"https://dankelley.github.io/oce/reference/swSpiciness0.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Spiciness in gsw System, Referenced to Surface Pressure — swSpiciness0","text":"salinity either salinity, oce object contains salinity, temperature, pressure, longitude latitude. temperature -situ temperature (ignored salinity oce object) pressure seawater pressure dbar (ignored salinity oce object) longitude, latitude observation location (ignored salinity oce object).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness0.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Spiciness in gsw System, Referenced to Surface Pressure — swSpiciness0","text":"seawater spiciness respect reference pressure 0 dbar (, sea surface), defined gsw (TEOS-10) system (McDougall et al, 2011).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness0.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spiciness in gsw System, Referenced to Surface Pressure — swSpiciness0","text":"McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSpiciness0.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Spiciness in gsw System, Referenced to Surface Pressure — swSpiciness0","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness1.html","id":null,"dir":"Reference","previous_headings":"","what":"Spiciness in gsw System, Referenced to 1000 dbar Pressure — swSpiciness1","title":"Spiciness in gsw System, Referenced to 1000 dbar Pressure — swSpiciness1","text":"Computes seawater spiciness using gsw::gsw_spiciness1() reference pressure 1000 dbar.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spiciness in gsw System, Referenced to 1000 dbar Pressure — swSpiciness1","text":"","code":"swSpiciness1(salinity, temperature, pressure, longitude, latitude)"},{"path":"https://dankelley.github.io/oce/reference/swSpiciness1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Spiciness in gsw System, Referenced to 1000 dbar Pressure — swSpiciness1","text":"salinity either salinity, oce object contains salinity, temperature, pressure, longitude latitude. temperature -situ temperature (ignored salinity oce object) pressure seawater pressure dbar (ignored salinity oce object) longitude, latitude observation location (ignored salinity oce object).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Spiciness in gsw System, Referenced to 1000 dbar Pressure — swSpiciness1","text":"seawater spiciness respect reference pressure 1000 dbar, defined gsw (TEOS-10) system (McDougall et al, 2011) computed gsw::gsw_spiciness1().","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness1.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spiciness in gsw System, Referenced to 1000 dbar Pressure — swSpiciness1","text":"McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSpiciness1.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Spiciness in gsw System, Referenced to 1000 dbar Pressure — swSpiciness1","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness2.html","id":null,"dir":"Reference","previous_headings":"","what":"Spiciness in gsw System, Referenced to 2000 dbar Pressure — swSpiciness2","title":"Spiciness in gsw System, Referenced to 2000 dbar Pressure — swSpiciness2","text":"Computes seawater spiciness using gsw::gsw_spiciness2() reference pressure 2000 dbar.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spiciness in gsw System, Referenced to 2000 dbar Pressure — swSpiciness2","text":"","code":"swSpiciness2(salinity, temperature, pressure, longitude, latitude)"},{"path":"https://dankelley.github.io/oce/reference/swSpiciness2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Spiciness in gsw System, Referenced to 2000 dbar Pressure — swSpiciness2","text":"salinity either salinity, oce object contains salinity, temperature, pressure, longitude latitude. temperature -situ temperature (ignored salinity oce object) pressure seawater pressure dbar (ignored salinity oce object) longitude, latitude observation location (ignored salinity oce object).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Spiciness in gsw System, Referenced to 2000 dbar Pressure — swSpiciness2","text":"seawater spiciness respect reference pressure 2000 dbar, defined gsw (TEOS-10) system (McDougall et al, 2011) computed gsw::gsw_spiciness2().","code":""},{"path":"https://dankelley.github.io/oce/reference/swSpiciness2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spiciness in gsw System, Referenced to 2000 dbar Pressure — swSpiciness2","text":"McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSpiciness2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Spiciness in gsw System, Referenced to 2000 dbar Pressure — swSpiciness2","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSstar.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Preformed Salinity (GSW Formulation) — swSstar","title":"Seawater Preformed Salinity (GSW Formulation) — swSstar","text":"Compute seawater Preformed Salinity (S*), according GSW/TEOS-10 formulation gsw::gsw_Sstar_from_SA() gsw package.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSstar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Preformed Salinity (GSW Formulation) — swSstar","text":"","code":"swSstar(salinity, pressure = NULL, longitude = NULL, latitude = NULL)"},{"path":"https://dankelley.github.io/oce/reference/swSstar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Preformed Salinity (GSW Formulation) — swSstar","text":"salinity either practical salinity (case pressure must provided) oce object salinity pressure data slot, longitude latitude either , metadata slot. pressure pressure dbar. longitude longitude observation. latitude latitude observation.","code":""},{"path":"https://dankelley.github.io/oce/reference/swSstar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Preformed Salinity (GSW Formulation) — swSstar","text":"Preformed Salinity, S*, \\(g/kg\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/swSstar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Preformed Salinity (GSW Formulation) — swSstar","text":"McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swSstar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Preformed Salinity (GSW Formulation) — swSstar","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swSstar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Preformed Salinity (GSW Formulation) — swSstar","text":"","code":"swSstar(35.5, 300, 260, 16) # 35.66601 #> [1] 35.66601"},{"path":"https://dankelley.github.io/oce/reference/swTFreeze.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Freezing Temperature — swTFreeze","title":"Seawater Freezing Temperature — swTFreeze","text":"Compute -situ freezing temperature seawater, using either UNESCO formulation (computed Section 5 Fofonoff Millard, 1983) GSW formulation (computed using gsw::gsw_SA_from_SP() get Absolute Salinity, gsw::gsw_t_freezing() get freezing temperature).","code":""},{"path":"https://dankelley.github.io/oce/reference/swTFreeze.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Freezing Temperature — swTFreeze","text":"","code":"swTFreeze(   salinity,   pressure = NULL,   longitude = NULL,   latitude = NULL,   saturation_fraction = 1,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swTFreeze.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Freezing Temperature — swTFreeze","text":"salinity Either practical salinity (PSU) ctd object practical salinity pressure (plus eos=\"gsw\" case, longitude latitude) inferred. pressure Seawater pressure (dbar). longitude Longitude observation (used eos=\"gsw\"; see “Details”). latitude Latitude observation (used eos=\"gsw\"; see “Details”). saturation_fraction saturation fraction dissolved air seawater, ignored eos=\"unesco\"). eos equation state, either \"unesco\" (Fofonoff Millard, 1983; Gill 1982) \"gsw\" (IOC, SCOR IAPSO 2010; McDougall Barker 2011).","code":""},{"path":"https://dankelley.github.io/oce/reference/swTFreeze.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Freezing Temperature — swTFreeze","text":"Temperature (degC), defined -90 scale.","code":""},{"path":"https://dankelley.github.io/oce/reference/swTFreeze.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Freezing Temperature — swTFreeze","text":"first argument oce object, pressure argument NULL, pressure sought within first argument. case eos=\"gsw\", similar procedure also applies longitude latitude arguments.","code":""},{"path":"https://dankelley.github.io/oce/reference/swTFreeze.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Freezing Temperature — swTFreeze","text":"Fofonoff, N. P., R. C. Millard. Algorithms Computation Fundamental Properties Seawater. UNESCO Technical Papers Marine Research. SCOR working group Evaluation CTD data; UNESCO/ICES/SCOR/IAPSO Joint Panel Oceanographic Tables Standards, 1983. Gill, E. Atmosphere-Ocean Dynamics. New York, NY, USA: Academic Press, 1982. IOC, SCOR, IAPSO (2010). international thermodynamic equation seawater-2010: Calculation use thermodynamic properties.  Technical Report 56, Intergovernmental Oceanographic Commission, Manuals Guide, 2010. McDougall, Trevor J., Paul M. Barker. Getting Started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox. SCOR/IAPSO WG127, 2011.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swTFreeze.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Freezing Temperature — swTFreeze","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swTFreeze.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Freezing Temperature — swTFreeze","text":"","code":"# 1. Test for a check-value given in reference 1. This value, -2.588567 degC, # is in the 1968 temperature scale (IPTS-68), but swTFreeze reports # in the newer ITS-90 scale, so we must convert before checking. Tcheck <- -2.588567 # IPTS-68 T <- swTFreeze(salinity = 40, pressure = 500, eos = \"unesco\") stopifnot(abs(Tcheck - T68fromT90(T)) < 1e-6)  # 2. Compare unesco and gsw formulations. data(ctd) p <- ctd[[\"pressure\"]] par(mfrow = c(1, 2), mar = c(3, 3, 1, 2), mgp = c(2, 0.7, 0)) plot(swTFreeze(ctd, eos = \"unesco\"),     p,     xlab = \"unesco\", ylim = rev(range(p)) ) plot(swTFreeze(ctd, eos = \"unesco\") - swTFreeze(ctd, eos = \"gsw\"),     p,     xlab = \"unesco-gsw\", ylim = rev(range(p)) )"},{"path":"https://dankelley.github.io/oce/reference/swTSrho.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Temperature from Salinity and Density — swTSrho","title":"Seawater Temperature from Salinity and Density — swTSrho","text":"Compute -situ temperature, given salinity, density, pressure.","code":""},{"path":"https://dankelley.github.io/oce/reference/swTSrho.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Temperature from Salinity and Density — swTSrho","text":"","code":"swTSrho(   salinity,   density,   pressure = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\") )"},{"path":"https://dankelley.github.io/oce/reference/swTSrho.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Temperature from Salinity and Density — swTSrho","text":"salinity -situ salinity (PSU) density -situ density sigma value (kg/m\\(^3\\)) pressure -situ pressure (dbar) eos equation state used, either \"unesco\" \"gsw\" (ignored present).","code":""},{"path":"https://dankelley.github.io/oce/reference/swTSrho.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Temperature from Salinity and Density — swTSrho","text":"-situ temperature \\(^\\circ\\)C -90 scale.","code":""},{"path":"https://dankelley.github.io/oce/reference/swTSrho.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Temperature from Salinity and Density — swTSrho","text":"Finds temperature yields given density, given salinity pressure.  method bisection search temperature tolerance 0.001 \\(^\\circ\\)C.","code":""},{"path":"https://dankelley.github.io/oce/reference/swTSrho.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Temperature from Salinity and Density — swTSrho","text":"Fofonoff, P. R. C. Millard Jr, 1983. Algorithms computation fundamental properties seawater. Unesco Technical Papers Marine Science, 44, 53 pp Gill, .E., 1982. Atmosphere-ocean Dynamics, Academic Press, New York, 662 pp.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swTSrho.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Temperature from Salinity and Density — swTSrho","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swTSrho.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Temperature from Salinity and Density — swTSrho","text":"","code":"swTSrho(35, 23, 0, eos = \"unesco\") # 26.11301 #> [1] 26.10677"},{"path":"https://dankelley.github.io/oce/reference/swThermalConductivity.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Thermal Conductivity — swThermalConductivity","title":"Seawater Thermal Conductivity — swThermalConductivity","text":"Compute seawater thermal conductivity, \\(W m^{-1\\circ}C^{-1}\\)","code":""},{"path":"https://dankelley.github.io/oce/reference/swThermalConductivity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Thermal Conductivity — swThermalConductivity","text":"","code":"swThermalConductivity(salinity, temperature = NULL, pressure = NULL)"},{"path":"https://dankelley.github.io/oce/reference/swThermalConductivity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Thermal Conductivity — swThermalConductivity","text":"salinity salinity (PSU), ctd object, case temperature pressure ignored. temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale; see “Temperature units” documentation swRho(). pressure pressure (dbar)","code":""},{"path":"https://dankelley.github.io/oce/reference/swThermalConductivity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Thermal Conductivity — swThermalConductivity","text":"Conductivity seawater \\(W m^{-1} {^\\circ} C^{-1}\\). calculate thermal diffusivity \\(m^2/s^2\\), divide product density specific heat, example.","code":""},{"path":"https://dankelley.github.io/oce/reference/swThermalConductivity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Thermal Conductivity — swThermalConductivity","text":"Caldwell's (1974) detailed formulation used.  specific, equation 6 calculate K, two sentences equation used infer K(0,T,S) notation equation 7. , application equations 7 8 straightforward. states accuracy method 0.3 percent.  (See check Table 1 “Examples”.)","code":""},{"path":"https://dankelley.github.io/oce/reference/swThermalConductivity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Thermal Conductivity — swThermalConductivity","text":"Caldwell, Douglas R., 1974. Thermal conductivity seawater, Deep-sea Research, 21, 131-137.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swThermalConductivity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Thermal Conductivity — swThermalConductivity","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swThermalConductivity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Thermal Conductivity — swThermalConductivity","text":"","code":"library(oce) # Values in m^2/s, a unit that is often used instead of W/(m*degC). swThermalConductivity(35, 10, 100) / (swRho(35, 10, 100) * swSpecificHeat(35, 10, 100)) # ocean #> [1] 1.512538e-07 swThermalConductivity(0, 20, 0) / (swRho(0, 20, 0) * swSpecificHeat(0, 20, 0)) # lab #> [1] 1.526025e-07 # Caldwell Table 1 gives 1478e-6 cal/(cm*sec*degC) at 31.5 o/oo, 10degC, 1kbar joulePerCalorie <- 4.18400 cmPerM <- 100 swThermalConductivity(31.5, 10, 1000) / joulePerCalorie / cmPerM #> [1] 0.00147754"},{"path":"https://dankelley.github.io/oce/reference/swTheta.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Potential Temperature (UNESCO Version) — swTheta","title":"Seawater Potential Temperature (UNESCO Version) — swTheta","text":"Compute potential temperature seawater, denoted \\(\\theta\\) UNESCO system, pt GSW system.","code":""},{"path":"https://dankelley.github.io/oce/reference/swTheta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Potential Temperature (UNESCO Version) — swTheta","text":"","code":"swTheta(   salinity,   temperature = NULL,   pressure = NULL,   referencePressure = 0,   longitude = NULL,   latitude = NULL,   eos = getOption(\"oceEOS\", default = \"gsw\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/swTheta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Potential Temperature (UNESCO Version) — swTheta","text":"salinity either salinity (PSU) (case temperature pressure must provided) oce object (case salinity, etc. inferred object). temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale; see “Temperature units” documentation swRho(), examples . pressure pressure (dbar) referencePressure reference pressure (dbar) longitude longitude observation (used eos=\"gsw\"; see “Details”). latitude latitude observation (used eos=\"gsw\"; see “Details”). eos equation state, either \"unesco\" (references 1 2) \"gsw\" (references 3 4). debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/swTheta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Potential Temperature (UNESCO Version) — swTheta","text":"Potential temperature (\\(^\\circ\\)C) seawater, referenced pressure referencePressure.","code":""},{"path":"https://dankelley.github.io/oce/reference/swTheta.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Potential Temperature (UNESCO Version) — swTheta","text":"Different formulae used depending equation state. eos \"unesco\", method Fofonoff et al. (1983) used (see references 1 2). Otherwise, swTheta uses gsw::gsw_pt_from_t() gsw package. first argument ctd section object, values salinity, etc., extracted , used calculation, corresponding arguments present function ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/swTheta.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Potential Temperature (UNESCO Version) — swTheta","text":"Fofonoff, P. R. C. Millard Jr, 1983. Algorithms computation fundamental properties seawater. Unesco Technical Papers Marine Science, 44, 53 pp Gill, .E., 1982. Atmosphere-ocean Dynamics, Academic Press, New York, 662 pp. IOC, SCOR, IAPSO (2010). international thermodynamic equation seawater-2010: Calculation use thermodynamic properties.  Technical Report 56, Intergovernmental Oceanographic Commission, Manuals Guide. McDougall, T.J. P.M. Barker, 2011: Getting started TEOS-10 Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swTheta.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Potential Temperature (UNESCO Version) — swTheta","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swTheta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Potential Temperature (UNESCO Version) — swTheta","text":"","code":"library(oce) # Example 1: test value from Fofonoff et al., 1983 stopifnot(abs(36.8818748026 - swTheta(40, T90fromT68(40), 10000, 0, eos = \"unesco\")) < 0.0000000001)  # Example 2: a deep-water station. Note that theta and CT are # visually identical on this scale. data(section) stn <- section[[\"station\", 70]] plotProfile(stn, \"temperature\", ylim = c(6000, 1000)) lines(stn[[\"theta\"]], stn[[\"pressure\"]], col = 2) lines(stn[[\"CT\"]], stn[[\"pressure\"]], col = 4, lty = 2) legend(\"bottomright\",     lwd = 1, col = c(1, 2, 4), lty = c(1, 1, 2),     legend = c(\"in-situ\", \"theta\", \"CT\"),     title = sprintf(\"MAD(theta-CT)=%.4f\", mean(abs(stn[[\"theta\"]] - stn[[\"CT\"]]))) )"},{"path":"https://dankelley.github.io/oce/reference/swViscosity.html","id":null,"dir":"Reference","previous_headings":"","what":"Seawater Viscosity — swViscosity","title":"Seawater Viscosity — swViscosity","text":"Compute viscosity seawater, \\(Pa\\cdot s\\)","code":""},{"path":"https://dankelley.github.io/oce/reference/swViscosity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Seawater Viscosity — swViscosity","text":"","code":"swViscosity(salinity, temperature)"},{"path":"https://dankelley.github.io/oce/reference/swViscosity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Seawater Viscosity — swViscosity","text":"salinity either salinity (PSU) (case temperature pressure must provided) ctd object (case salinity, temperature pressure determined object, must provided argument list). temperature -situ temperature (\\(^\\circ\\)C), defined -90 scale; see “Temperature units” documentation swRho(), examples .","code":""},{"path":"https://dankelley.github.io/oce/reference/swViscosity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Seawater Viscosity — swViscosity","text":"Viscosity seawater \\(Pa\\cdot s\\).  Divide density get kinematic viscosity \\(m^2/s\\).","code":""},{"path":"https://dankelley.github.io/oce/reference/swViscosity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Seawater Viscosity — swViscosity","text":"first argument ctd object, salinity, temperature pressure values extracted , used calculation. result determined regression data provided Table 87 Dorsey (1940). fit matches table within 0.2 percent worst, average absolute error 0.07 percent. maximum deviation table one unit last decimal place. pressure dependence reported Dorsey (1940).","code":""},{"path":"https://dankelley.github.io/oce/reference/swViscosity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Seawater Viscosity — swViscosity","text":"N. Ernest Dorsey (1940), Properties ordinary Water-substance, American Chemical Society Monograph Series.  Reinhold Publishing.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/swViscosity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Seawater Viscosity — swViscosity","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/swViscosity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Seawater Viscosity — swViscosity","text":"","code":"swViscosity(30, 10) # 0.001383779 #> [1] 0.001383779"},{"path":"https://dankelley.github.io/oce/reference/swZ.html","id":null,"dir":"Reference","previous_headings":"","what":"Vertical Coordinate — swZ","title":"Vertical Coordinate — swZ","text":"Compute height surface. negative depth, defined simply terms swDepth().","code":""},{"path":"https://dankelley.github.io/oce/reference/swZ.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vertical Coordinate — swZ","text":"","code":"swZ(   pressure,   latitude = 45,   eos = getOption(\"oceEOS\", default = \"gsw\"),   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/swZ.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vertical Coordinate — swZ","text":"pressure either pressure (dbar), case latitude must also given, ctd object, case latitude inferred object. latitude numeric value latitude degrees North. eos character value indicating formulation used, either \"unesco\" \"gsw\". debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/tail.oce.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the End of an Oce Object — tail.oce","title":"Extract the End of an Oce Object — tail.oce","text":"Extract End Oce Object function handles following object classes directly: adp, adv, argo (selection profile), coastline, ctd, echosounder (selection ping), section (selection station) topo (selection longitude latitude). handle amsr landsat yet, instead issuing warning returning x cases. classes, calls tail() n provided, item data slot, issuing warning item vector; author quite aware may work well classes. plan handle appropriate classes July 2018. Please contact author class need handled date.","code":""},{"path":"https://dankelley.github.io/oce/reference/tail.oce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the End of an Oce Object — tail.oce","text":"","code":"# S3 method for class 'oce' tail(x, n = 6L, ...)"},{"path":"https://dankelley.github.io/oce/reference/tail.oce.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the End of an Oce Object — tail.oce","text":"x oce object. n Number elements extract, tail(). ... ignored","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/tail.oce.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract the End of an Oce Object — tail.oce","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/threenum.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Minimum, Mean, and Maximum Values — threenum","title":"Calculate Minimum, Mean, and Maximum Values — threenum","text":"simpler cousin standard fivenum() function, used summary() functions oce objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/threenum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Minimum, Mean, and Maximum Values — threenum","text":"","code":"threenum(x)"},{"path":"https://dankelley.github.io/oce/reference/threenum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Minimum, Mean, and Maximum Values — threenum","text":"x vector matrix numerical values.","code":""},{"path":"https://dankelley.github.io/oce/reference/threenum.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Minimum, Mean, and Maximum Values — threenum","text":"character vector three values: minimum, mean, maximum.","code":""},{"path":"https://dankelley.github.io/oce/reference/threenum.html","id":"historical-note","dir":"Reference","previous_headings":"","what":"Historical note","title":"Calculate Minimum, Mean, and Maximum Values — threenum","text":"Aug 5, 2019, dimension dropped fourth column, function returned original intention (revealed name).  Another change function now returns numerical results, leaving task setting number digits summary().","code":""},{"path":"https://dankelley.github.io/oce/reference/threenum.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate Minimum, Mean, and Maximum Values — threenum","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/threenum.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate Minimum, Mean, and Maximum Values — threenum","text":"","code":"library(oce) threenum(1:10) #> [1]  1.0  5.5 10.0"},{"path":"https://dankelley.github.io/oce/reference/tidalCurrent.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidal Current Dataset — tidalCurrent","title":"Tidal Current Dataset — tidalCurrent","text":"tidalCurrent dataset contains tidal velocities reported Foreman's (1978) report (reference 1) Fortran code analysis tidal currents provided associated webpage (reference 2). , tidalCurrent data frame containing time POSIXct time. u eastward component velocity m/s. v northward component velocity m/s.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidalCurrent.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Tidal Current Dataset — tidalCurrent","text":"data come tide8.dat tide9.dat files provided reference 2.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidalCurrent.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tidal Current Dataset — tidalCurrent","text":"Foreman, M. G. G. \"Manual Tidal Currents Analysis Prediction.\" Pacific Marine Science Report. British Columbia, Canada: Institute Ocean Sciences, Patricia Bay, 1978. https://www.dfo-mpo.gc.ca/science/documents/data-donnees/tidal-marees/tidpack.zip","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/tidalCurrent.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidal Current Dataset — tidalCurrent","text":"Dan Kelley (reformatting data provided Michael Foreman)","code":""},{"path":"https://dankelley.github.io/oce/reference/tidalCurrent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidal Current Dataset — tidalCurrent","text":"","code":"library(oce) data(tidalCurrent) par(mfrow = c(2, 1)) oce.plot.ts(tidalCurrent$time, tidalCurrent$u, ylab = \"u [m/s]\") abline(h = 0, col = 2) oce.plot.ts(tidalCurrent$time, tidalCurrent$v, ylab = \"v [m/s]\") abline(h = 0, col = 2)"},{"path":"https://dankelley.github.io/oce/reference/tidedata.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidal Constituent Information — tidedata","title":"Tidal Constituent Information — tidedata","text":"tidedata dataset contains Tide-constituent information use tidem() fit tidal models.  tidedata list containing const list containing vectors name (string constituent name), freq (frequency, cycles per hour), kmpr (string naming comparison constituent, blank none), ikmpr (index comparison constituent, 0 none), df (frequency difference constituent comparison, used Rayleigh criterion), d1 d6 (first sixth Doodson numbers), semi, nsat (number satellite constituents), ishallow, nshallow, doodsonamp, doodsonspecies. sat list containing vectors deldood, phcorr, amprat, ilatfac, iconst. shallow list containing vectors iconst, coef, iname. Apart use d1 d6, naming content follows T_TIDE (see Pawlowicz et al. 2002), turn builds upon analysis Foreman (1978).","code":""},{"path":"https://dankelley.github.io/oce/reference/tidedata.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Tidal Constituent Information — tidedata","text":"data come tide3.dat file T_TIDE package (Pawlowicz et al., 2002), derive Appendices provided Foreman (1978).  data scanned using tests/tide.R package, also performs tests using T_TIDE values reference.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidedata.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tidal Constituent Information — tidedata","text":"Foreman, M. G. G., 1978. Manual Tidal Currents Analysis Prediction. Pacific Marine Science Report. British Columbia, Canada: Institute Ocean Sciences, Patricia Bay. Pawlowicz, Rich, Bob Beardsley, Steve Lentz, 2002.  Classical tidal harmonic analysis including error estimates MATLAB using T_TIDE. Computers Geosciences, 28, 929-937.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/tidedata.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidal Constituent Information — tidedata","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Tidal Models — tidem-class","title":"Class to Store Tidal Models — tidem-class","text":"class stores tidal-constituent models.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Tidal Models — tidem-class","text":"data oce objects, data slot tidem objects list containing main data object. metadata oce objects, metadata slot tidem objects list containing information data object . processingLog oce objects, processingLog slot tidem objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Tidal Models — tidem-class","text":"Although [[<- operator may permit modification contents tidem objects (see [[<-,tidem-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Tidal Models — tidem-class","text":"full contents data metadata slots tidem object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,tidem-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,tidem-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/tidem-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Tidal Models — tidem-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit a Tidal Model to a Timeseries — tidem","title":"Fit a Tidal Model to a Timeseries — tidem","text":"fit done terms sine cosine components indicated tidal frequencies (possibly pruning satisfy Rayleigh criterion, explained phase 2 procedure outlined “Details”), amplitude phase calculated resultant coefficients sine cosine terms. scheme devised hourly data; sampling schemes, see “Application non-hourly data”.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit a Tidal Model to a Timeseries — tidem","text":"","code":"tidem(   t,   x,   constituents,   infer = NULL,   latitude = NULL,   rc = 1,   regress = lm,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit a Tidal Model to a Timeseries — tidem","text":"t either vector times sealevel object (created read.sealevel() .sealevel()). first case, x must provided.  second case, though, x provided ignored, sealevel objects contain time water elevation, latter used x. x optional numerical vector holding something varies time.  ignored t sealevel object, inferred automatically, using t[[\"elevation\"]]. constituents optional character vector holding names tidal constituents fit done; see “Details” “Constituent Naming Convention”. infer list constituents inferred fitted constituents according method outlined Section 2.3.4 Foreman (1978). infer NULL, default, inferences made. Otherwise, constituents computed based constituents, instead determined regression proper frequency. provided, infer must list containing four elements: name, vector strings naming constituents inferred; , vector strings naming fitted constituents used sources inferences (source constituents added regression list, already ); amp, numerical vector factors applied source amplitudes; phase, numerical vector angles, degrees, subtracted source phases. example, Following Foreman (1998), name items already computed, suggested inference ignored, already-computed values used. means amplitude P1 set 0.33093 times calculated amplitude K1, P1 phase set K1 phase, minus offset -7.07 degrees. (example used Foreman (1978) discussion Fortran analysis code also Pawlowicz et al. (2002) discussion T_TIDE Matlab code. Rounded 0.1mm resolution values reported Foreman (1978) Pawlowicz et al. (2002), tidem results root-mean-square amplitude difference Foreman's (1978) Appendix 7.3 0.06mm; comparison, results Table 1 Pawlowicz et al. (2002) agree Foreman's results RMS difference 0.04mm.) latitude provided, latitude observations.  provided, tidem try infer first argument, sealevel object. rc value coefficient Rayleigh criterion. regress function used regression, default lm(), example rlm MASS package. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":"infer=list(name=c(\"P1\",\"K2\"),            from=c(\"K1\", \"S2\"),            amp=c(0.33093, 0.27215),            phase=c(-7.07, -22.4)"},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit a Tidal Model to a Timeseries — tidem","text":"object tidem, consisting const constituent number, e.g. 1 Z0, 1 SA, etc. model regression model name vector constituent names, non-subscript format, e.g. \"M2\". frequency vector constituent frequencies, inverse hours. amplitude vector fitted constituent amplitudes, metres. phase vector fitted constituent phase.  NOTE: definition phase likely change function evolves.  now, phase respect first data sample. p vector containing sort p value constituent.  calculated average p values sine() cosine() portions used fitting; whether makes sense open question.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit a Tidal Model to a Timeseries — tidem","text":"summary constituents used tidem() may found : multi-stage procedure used establish list tidal constituents used fit. Phase 1: initial selection. initial list tidal constituents (prior pruning phase described ) used analysis specified follows; see “Constituent Naming Convention”. constituents provided, constituent list made 69 constituents designated Foreman \"standard\". include astronomical frequencies shallow-water frequencies, follows: c(\"Z0\", \"SA\", \"SSA\", \"MSM\", \"MM\", \"MSF\", \"MF\", \"ALP1\", \"2Q1\", \"SIG1\", \"Q1\", \"RHO1\", \"O1\", \"TAU1\", \"BET1\", \"NO1\", \"CHI1\", \"PI1\", \"P1\", \"S1\", \"K1\", \"PSI1\", \"PHI1\", \"THE1\", \"J1\", \"SO1\", \"OO1\", \"UPS1\", \"OQ2\", \"EPS2\", \"2N2\", \"MU2\", \"N2\", \"NU2\", \"GAM2\", \"H1\", \"M2\", \"H2\", \"MKS2\", \"LDA2\", \"L2\", \"T2\", \"S2\", \"R2\", \"K2\", \"MSN2\", \"ETA2\", \"MO3\", \"M3\", \"SO3\", \"MK3\", \"SK3\", \"MN4\", \"M4\", \"SN4\", \"MS4\", \"MK4\", \"S4\", \"SK4\", \"2MK5\", \"2SK5\", \"2MN6\", \"M6\", \"2MS6\", \"2MK6\", \"2SM6\", \"MSK6\", \"3MK7\", \"M8\"). first item constituents string \"standard\", provisional list set Case 1, (optional) rest elements constituents examined, order.  constituents based name tidal constituent Foreman (1978) notation.  (get list, execute data(tidedata) execute cat(tideData$name).)  named constituent added existing list, already . , constituent preceded minus sign, removed list (already ).  Thus, example, user might specify constituents=c(\"standard\", \"-M2\", \"ST32\") remove M2 constituent add ST32 constituent. first item \"standard\", list constituents processed Case 2, without starting standard list. example, constituents=c(\"K1\", \"M2\") fit just K1 M2 components. (strange use minus sign remove items list, function allows .) cases, list reordered frequency prior analysis, results summary,tidem-method() familiar form. Phase 2: pruning based Rayleigh's criterion. initial constituent list determined Phase 1, tidem applies Rayleigh criterion, holds constituents frequencies \\(f_1\\) \\(f_2\\) resolved unless time series spans time interval least \\(rc/(f_1-f_2)\\).  details decision constituent prune fairly complicated, involving decisions based comparison table.  details process provided Foreman (1978). Phase 3: optionally overruling Rayleigh's criterion. pruning list phase 2 can overruled user. done retaining constituents user named constituents parameter.  action added 2017-12-27, make tidem behave way Foreman (1978) code, illustrated Appendices 7.2 7.3. (aside, Appendix 7.3 errors, e.g. frequency 2SK5 constituent listed (p58) 0.20844743, listed 0.2084474129 Appendix 7.1 (p41). reason, frequency comparison relaxed tol value 1e-7 portion oce test suite (see tests/testthat/test_tidem.R source). Comments phases 2 3 specific example may help understanding removal unresolvable constituents. example, data(sealevel) dataset length 6718 hours, short resolve full list constituents, conventional (, really, necessary) limit rc=1. Table 1 Foreman (1978), timeseries short resolve SA constituent, SA resultant. Similarly, Table 2 Foreman (1978) dictates removal PI1, S1 PSI1 list. , finally, Table 3 Foreman (1978) dictates removal H1, H2, T2 R2, since document suggests GAM2 subsumed H1, H1 already deleted, GAM2 also deleted.","code":"data(tidedata) print(tidedata$const)"},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"application-to-non-hourly-data","dir":"Reference","previous_headings":"","what":"Application to non-hourly data","title":"Fit a Tidal Model to a Timeseries — tidem","text":"framework tidem() rests assumption data sampled 1-hour interval (see e.g. Foreman, 1977). Since regression (opposed spectral analysis) used infer amplitude phase tidal constituents, data gaps pose serious problem. Sampling intervals hour also problem. However, trying use tidem() time series sampled uniform intervals exceed 1 hour can lead results difficult interpret.  example, drifter data sampled 6-hour interval.  makes impossible fit S4 component (exactly 6 cycles per day), method works constructing sine cosine series tidal frequencies using basis regression.  series constant value constructed time, regression handle (addition constant-value constructed series used fit Z0 constituent).  tidem() tries handle problems examining range constructed sine cosine time-series, omitting constituents yield near-constant values either . Messages issued problem encountered.  prevents failure regression, predictions regression seem represent data reasonably well, inferred constituent amplitudes physically reasonable. Cautious use tidem() infer individual constituents might warranted, users must aware results difficult interpret. tool simply designed use.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"bugs","dir":"Reference","previous_headings":"","what":"Bugs","title":"Fit a Tidal Model to a Timeseries — tidem","text":"function fully developed yet, form call results calculation may change. reported p value may make sense , might removed future version function. Perhaps significance level presented, software developed Foreman Pawlowicz.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"constituent-naming-convention","dir":"Reference","previous_headings":"","what":"Constituent Naming Convention","title":"Fit a Tidal Model to a Timeseries — tidem","text":"tidem uses constituent names follow convention set Foreman (1978). convention slightly different used T-TIDE package Pawlowicz et al. (2002), Foreman's UPS1 M8 becoming UPSI MS T-TIDE. permit use either notation, tidem() uses tidemConstituentNameFix() convert T-TIDE names Foreman names, issuing warnings .","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"agreement-with-t-tide-results","dir":"Reference","previous_headings":"","what":"Agreement with T_TIDE results","title":"Fit a Tidal Model to a Timeseries — tidem","text":"tidem amplitude phase results, obtained match T_TIDE values listed Table 1 Pawlowicz et al. (2002), rounding amplitude phase 4 2 digits past decimal place, respectively, match format table.","code":"tidem(sealevelTuktoyaktuk, constituents=c(\"standard\", \"M10\"),     infer=list(name=c(\"P1\", \"K2\"),         from=c(\"K1\", \"S2\"),         amp=c(0.33093, 0.27215),         phase=c(-7.07, -22.40)))"},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fit a Tidal Model to a Timeseries — tidem","text":"Foreman, M G., 1977 (revised 1996). Manual Tidal Heights Analysis Prediction. Pacific Marine Science Report 77-10. British Columbia, Canada: Institute Ocean Sciences, Patricia Bay. Foreman, M. G. G., 1978. Manual Tidal Currents Analysis Prediction. Pacific Marine Science Report 78-6. British Columbia, Canada: Institute Ocean Sciences, Patricia Bay, Foreman, M. G. G., Neufeld, E. T., 1991. Harmonic tidal analyses long time series. International Hydrographic Review, 68 (1), 95-108. Leffler, K. E. D. . Jay, 2009.  Enhancing tidal harmonic analysis: Robust (hybrid) solutions.  Continental Shelf Research, 29(1):78-88. Pawlowicz, Rich, Bob Beardsley, Steve Lentz, 2002.  Classical tidal harmonic analysis including error estimates MATLAB using T_TIDE. Computers Geosciences, 28, 929-937.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit a Tidal Model to a Timeseries — tidem","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/tidem.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit a Tidal Model to a Timeseries — tidem","text":"","code":"library(oce) # The demonstration time series from Foreman (1978), # also used in T_TIDE (Pawlowicz, 2002). data(sealevelTuktoyaktuk) tide <- tidem(sealevelTuktoyaktuk) #> Note: the tidal record is too short to fit for constituents: SA, SSA, MSM, MF, SIG1, RHO1, TAU1, BET1, CHI1, PI1, P1, S1, PSI1, PHI1, THE1, SO1, OQ2, 2N2, NU2, GAM2, H1, H2, MKS2, LDA2, T2, R2, K2, MSN2, SO3, MK4, SK4, 2MK6, MSK6 summary(tide) #> tidem summary #> ------------- #>  #> Call: #> tidem(t = sealevelTuktoyaktuk) #> RMS misfit to data:  0.7808454  #>  #> Fitted Model: #>         Freq Amplitude  Phase       p     #> Z0   0.00000   1.98062   0.00 < 2e-16 *** #> MM   0.00151   0.21213 263.34  0.0051 **  #> MSF  0.00282   0.15606 133.80  0.0062 **  #> ALP1 0.03440   0.01523 334.96  0.7368     #> 2Q1  0.03571   0.02458  82.69  0.6516     #> Q1   0.03722   0.01579  65.74  0.7541     #> O1   0.03873   0.07641  74.23  0.1262     #> NO1  0.04027   0.02903 238.14  0.3716     #> K1   0.04178   0.13474  81.09  0.0262 *   #> J1   0.04329   0.02530   7.32  0.5977     #> OO1  0.04483   0.05310 235.75  0.2729     #> UPS1 0.04634   0.02980  91.73  0.6272     #> EPS2 0.07618   0.02115 184.60  0.6769     #> MU2  0.07769   0.04189  83.23  0.3727     #> N2   0.07900   0.08377  44.52  0.0723 .   #> M2   0.08051   0.49041  77.70  0.3465     #> L2   0.08202   0.02132  35.21  0.7301     #> S2   0.08333   0.22024 137.48 3.1e-07 *** #> ETA2 0.08507   0.00713 246.04  0.8902     #> MO3  0.11924   0.01484 234.97  0.7426     #> M3   0.12077   0.01226 261.57  0.8020     #> MK3  0.12229   0.00492 331.60  0.9172     #> SK3  0.12511   0.00234 237.67  0.9680     #> MN4  0.15951   0.00917 256.47  0.8475     #> M4   0.16102   0.01257 291.79  0.7544     #> SN4  0.16233   0.00830 270.86  0.8659     #> MS4  0.16384   0.00103 339.36  0.9842     #> S4   0.16667   0.00468 299.56  0.9135     #> 2MK5 0.20280   0.00127 310.16  0.9793     #> 2SK5 0.20845   0.00455 104.00  0.9172     #> 2MN6 0.24002   0.00353 271.22  0.9371     #> M6   0.24153   0.00173 158.87  0.9681     #> 2MS6 0.24436   0.00564 306.12  0.8938     #> 2SM6 0.24718   0.00227 298.91  0.9555     #> 3MK7 0.28331   0.00857 212.25  0.8508     #> M8   0.32205   0.00304  42.38  0.9497     #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> * Processing Log #>  #>     - 2024-09-24 10:32:28 UTC: `create 'tidem' object` #>     - 2024-09-24 10:32:28 UTC: `tidem(t = sealevelTuktoyaktuk)`  # AIC analysis extractAIC(tide[[\"model\"]]) #> [1]   71.0000 -606.0823  # Fake data at M2 library(oce) data(\"tidedata\") M2 <- with(tidedata$const, freq[name == \"M2\"]) t <- seq(0, 10 * 86400, 3600) eta <- sin(M2 * t * 2 * pi / 3600) sl <- as.sealevel(eta) m <- tidem(sl) #> Note: the tidal record is too short to fit for constituents: SA, SSA, MSM, MM, MSF, MF, ALP1, 2Q1, SIG1, Q1, RHO1, O1, TAU1, BET1, NO1, CHI1, PI1, P1, S1, PSI1, PHI1, THE1, J1, SO1, OO1, UPS1, OQ2, EPS2, 2N2, MU2, N2, NU2, GAM2, H1, H2, MKS2, LDA2, L2, T2, S2, R2, K2, MSN2, ETA2, MO3, SO3, MK3, SK3, MN4, SN4, MS4, MK4, S4, SK4, 2MN6, 2MS6, 2MK6, 2SM6, MSK6 summary(m) #> tidem summary #> ------------- #>  #> Call: #> tidem(t = sl) #> RMS misfit to data:  4.082553e-15  #>  #> Fitted Model: #>          Freq Amplitude Phase      p     #> Z0   0.00e+00  1.69e-16   0.0   0.54     #> K1   4.18e-02  5.35e-16 326.4   0.33     #> M2   8.05e-02  1.00e+00 266.4 <2e-16 *** #> M3   1.21e-01  1.45e-16  65.8   0.82     #> M4   1.61e-01  5.37e-16 310.7   0.33     #> 2MK5 2.03e-01  1.79e-16 205.9   0.76     #> 2SK5 2.08e-01  4.61e-16  74.8   0.51     #> M6   2.42e-01  5.44e-16 189.9   0.49     #> 3MK7 2.83e-01  2.13e-16 236.6   0.70     #> M8   3.22e-01  5.99e-16 139.2   0.28     #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> * Processing Log #>  #>     - 2024-09-24 10:32:28 UTC: `create 'tidem' object` #>     - 2024-09-24 10:32:28 UTC: `tidem(t = sl)`"},{"path":"https://dankelley.github.io/oce/reference/tidemAstron.html","id":null,"dir":"Reference","previous_headings":"","what":"Astronomical Calculations for tidem — tidemAstron","title":"Astronomical Calculations for tidem — tidemAstron","text":"astronomical calculations tidem().  function based directly t_astron T_TIDE Matlab package (see Pawlowicz et al. 2002), inherits Fortran code described Foreman (1978).","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemAstron.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Astronomical Calculations for tidem — tidemAstron","text":"","code":"tidemAstron(t)"},{"path":"https://dankelley.github.io/oce/reference/tidemAstron.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Astronomical Calculations for tidem — tidemAstron","text":"t Either time POSIXct format (\"UTC\" timezone, else odd behaviours may result), integer. second case, converted time numberAsPOSIXct(), using tz=\"UTC\".","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemAstron.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Astronomical Calculations for tidem — tidemAstron","text":"list containing items named astro ader (see T_TIDE documentation).","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemAstron.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Astronomical Calculations for tidem — tidemAstron","text":"Foreman, M. G. G., 1978. Manual Tidal Currents Analysis Prediction. Pacific Marine Science Report. British Columbia, Canada: Institute Ocean Sciences, Patricia Bay. Pawlowicz, Rich, Bob Beardsley, Steve Lentz, 2002.  Classical tidal harmonic analysis including error estimates MATLAB using T_TIDE. Computers Geosciences, 28, 929-937.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/tidemAstron.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Astronomical Calculations for tidem — tidemAstron","text":"Dan Kelley translated t_astron function T_TIDE Matlab package (see Pawlowicz et al. 2002).","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemAstron.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Astronomical Calculations for tidem — tidemAstron","text":"","code":"tidemAstron(as.POSIXct(\"2008-01-22 18:50:24\")) #> $astro #> [1] 1.44963597 0.34000639 0.83797569 0.14240012 0.08562115 0.78633081 #>  #> $ader #> [1] 9.661368e-01 3.660110e-02 2.737909e-03 3.094541e-04 1.470939e-04 #> [6] 1.308208e-07 #>"},{"path":"https://dankelley.github.io/oce/reference/tidemConstituentNameFix.html","id":null,"dir":"Reference","previous_headings":"","what":"Change Tidal Constituent Name from T-TIDE to Foreman Convention — tidemConstituentNameFix","title":"Change Tidal Constituent Name from T-TIDE to Foreman Convention — tidemConstituentNameFix","text":"used tidem() permit users specify constituent names either T-TIDE convention (see Pawlowicz et al. 2002) Foreman convention (see Foreman (1978). two instances: \"MS\", gets translated \"M8\", \"UPSI\", gets translated \"UPS1\".","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemConstituentNameFix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Change Tidal Constituent Name from T-TIDE to Foreman Convention — tidemConstituentNameFix","text":"","code":"tidemConstituentNameFix(names, debug = 1)"},{"path":"https://dankelley.github.io/oce/reference/tidemConstituentNameFix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Change Tidal Constituent Name from T-TIDE to Foreman Convention — tidemConstituentNameFix","text":"names vector character values, holding constituent names debug integer controlling warnings. zero, warnings issued processing; otherwise, default, warnings issued conversion required.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemConstituentNameFix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Change Tidal Constituent Name from T-TIDE to Foreman Convention — tidemConstituentNameFix","text":"vector character values tidal constituent names, Foreman naming convention.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemConstituentNameFix.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Change Tidal Constituent Name from T-TIDE to Foreman Convention — tidemConstituentNameFix","text":"Foreman, M. G. G., 1978. Manual Tidal Currents Analysis Prediction. Pacific Marine Science Report. British Columbia, Canada: Institute Ocean Sciences, Patricia Bay. Pawlowicz, Rich, Bob Beardsley, Steve Lentz, 2002.  Classical tidal harmonic analysis including error estimates MATLAB using T_TIDE. Computers Geosciences, 28, 929-937.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemVuf.html","id":null,"dir":"Reference","previous_headings":"","what":"Nodal Modulation Calculations for Tidal Analyses — tidemVuf","title":"Nodal Modulation Calculations for Tidal Analyses — tidemVuf","text":"Carry nodal modulation calculations tidem(). function based directly t_vuf T_TIDE Matlab package (Pawlowicz et al., 2002), inherits Fortran code described Foreman (1978).","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemVuf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Nodal Modulation Calculations for Tidal Analyses — tidemVuf","text":"","code":"tidemVuf(t, j, latitude = NULL)"},{"path":"https://dankelley.github.io/oce/reference/tidemVuf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Nodal Modulation Calculations for Tidal Analyses — tidemVuf","text":"t single time POSIXct() format, timezone \"UTC\". j integer vector, giving indices tidal constituents use. latitude optional numerical value containing latitude degrees North. provided, u return value vector consisting repeated 0 value, f vector repeated 1 value.","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemVuf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Nodal Modulation Calculations for Tidal Analyses — tidemVuf","text":"list containing items named v, u f described T_TIDE documentation, well Pawlowicz et al. (2002) Foreman (1978).","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemVuf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Nodal Modulation Calculations for Tidal Analyses — tidemVuf","text":"Foreman, M. G. G., 1978. Manual Tidal Currents Analysis Prediction. Pacific Marine Science Report. British Columbia, Canada: Institute Ocean Sciences, Patricia Bay. Pawlowicz, Rich, Bob Beardsley, Steve Lentz, 2002.  Classical tidal harmonic analysis including error estimates MATLAB using T_TIDE. Computers Geosciences, 28, 929-937.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/tidemVuf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Nodal Modulation Calculations for Tidal Analyses — tidemVuf","text":"Dan Kelley translated t_vuf function T_TIDE Matlab package (see Pawlowicz et al. 2002).","code":""},{"path":"https://dankelley.github.io/oce/reference/tidemVuf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Nodal Modulation Calculations for Tidal Analyses — tidemVuf","text":"","code":"# Look up values for the M2 constituent in Halifax Harbour, Canada. library(oce) data(\"tidedata\") j <- with(tidedata$const, which(name == \"M2\")) tidemVuf(t = as.POSIXct(\"2008-01-22 18:50:24\"), j = j, lat = 44.63) #> $v #> [1] 0.8992719 #>  #> $u #> [1] 0.002959181 #>  #> $f #> [1] 0.9689351 #>"},{"path":"https://dankelley.github.io/oce/reference/timeToArgoJuld.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Time to Argo Julian Day (juld) — timeToArgoJuld","title":"Convert Time to Argo Julian Day (juld) — timeToArgoJuld","text":"converts POSIXct time Argo julian day, convention juld=0 1950-01-01.","code":""},{"path":"https://dankelley.github.io/oce/reference/timeToArgoJuld.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Time to Argo Julian Day (juld) — timeToArgoJuld","text":"","code":"timeToArgoJuld(t)"},{"path":"https://dankelley.github.io/oce/reference/timeToArgoJuld.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Time to Argo Julian Day (juld) — timeToArgoJuld","text":"t POSIXct time string can converted POSIXct time","code":""},{"path":"https://dankelley.github.io/oce/reference/timeToArgoJuld.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Time to Argo Julian Day (juld) — timeToArgoJuld","text":"Jaimie Harbin Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/timeToArgoJuld.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Time to Argo Julian Day (juld) — timeToArgoJuld","text":"","code":"timeToArgoJuld(\"2020-07-01\") #> [1] 25749"},{"path":"https://dankelley.github.io/oce/reference/titleCase.html","id":null,"dir":"Reference","previous_headings":"","what":"Capitalize First Letter of Each of a Vector of Words — titleCase","title":"Capitalize First Letter of Each of a Vector of Words — titleCase","text":"used making labels data names ctd functions","code":""},{"path":"https://dankelley.github.io/oce/reference/titleCase.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Capitalize First Letter of Each of a Vector of Words — titleCase","text":"","code":"titleCase(w)"},{"path":"https://dankelley.github.io/oce/reference/titleCase.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Capitalize First Letter of Each of a Vector of Words — titleCase","text":"w vector character strings","code":""},{"path":"https://dankelley.github.io/oce/reference/titleCase.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Capitalize First Letter of Each of a Vector of Words — titleCase","text":"vector strings patterned w first letter upper case others lower case","code":""},{"path":"https://dankelley.github.io/oce/reference/toEnu.html","id":null,"dir":"Reference","previous_headings":"","what":"Rotate Acoustic-Doppler Data to the ENU Coordinate System — toEnu","title":"Rotate Acoustic-Doppler Data to the ENU Coordinate System — toEnu","text":"Rotate Acoustic-Doppler Data ENU Coordinate System","code":""},{"path":"https://dankelley.github.io/oce/reference/toEnu.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rotate Acoustic-Doppler Data to the ENU Coordinate System — toEnu","text":"","code":"toEnu(x, ...)"},{"path":"https://dankelley.github.io/oce/reference/toEnu.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rotate Acoustic-Doppler Data to the ENU Coordinate System — toEnu","text":"x adp adv object. ... extra arguments passed toEnuAdp() toEnuAdv().","code":""},{"path":"https://dankelley.github.io/oce/reference/toEnu.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rotate Acoustic-Doppler Data to the ENU Coordinate System — toEnu","text":"object class x, velocities enu coordinate system","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/toEnu.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rotate Acoustic-Doppler Data to the ENU Coordinate System — toEnu","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/toEnuAdp.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an adp Object to ENU Coordinates — toEnuAdp","title":"Convert an adp Object to ENU Coordinates — toEnuAdp","text":"Convert adp Object ENU Coordinates","code":""},{"path":"https://dankelley.github.io/oce/reference/toEnuAdp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an adp Object to ENU Coordinates — toEnuAdp","text":"","code":"toEnuAdp(x, declination = 0, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/toEnuAdp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an adp Object to ENU Coordinates — toEnuAdp","text":"x adp object. declination magnetic declination added heading, get ENU N \"true\" north. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/toEnuAdp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert an adp Object to ENU Coordinates — toEnuAdp","text":"https://nortek.zendesk.com/hc/en-us/articles/360029820971----Coordinate-transformation-done-","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/toEnuAdp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert an adp Object to ENU Coordinates — toEnuAdp","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/toEnuAdv.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an adv Object to ENU Coordinates — toEnuAdv","title":"Convert an adv Object to ENU Coordinates — toEnuAdv","text":"Convert adv Object ENU Coordinates","code":""},{"path":"https://dankelley.github.io/oce/reference/toEnuAdv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an adv Object to ENU Coordinates — toEnuAdv","text":"","code":"toEnuAdv(x, declination = 0, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/toEnuAdv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an adv Object to ENU Coordinates — toEnuAdv","text":"x adv object. declination magnetic declination added heading, get ENU N \"true\" north. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/toEnuAdv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert an adv Object to ENU Coordinates — toEnuAdv","text":"https://nortek.zendesk.com/hc/en-us/articles/360029820971----Coordinate-transformation-done-","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/toEnuAdv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert an adv Object to ENU Coordinates — toEnuAdv","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/topo-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store Topographic Data — topo-class","title":"Class to Store Topographic Data — topo-class","text":"class stores topographic data, read read.topo() assembled .topo(). Plotting handled plot,topo-method() summaries summary,topo-method().","code":""},{"path":"https://dankelley.github.io/oce/reference/topo-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store Topographic Data — topo-class","text":"data oce objects, data slot topo objects list containing main data object. key items stored slot : longititude, latitude, z. metadata oce objects, metadata slot topo objects list containing information data object . processingLog oce objects, processingLog slot topo objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/topo-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store Topographic Data — topo-class","text":"Although [[<- operator may permit modification contents topo objects (see [[<-,topo-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/topo-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store Topographic Data — topo-class","text":"full contents data metadata slots topo object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,topo-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,topo-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/topo-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store Topographic Data — topo-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/topoInterpolate.html","id":null,"dir":"Reference","previous_headings":"","what":"Interpolate Within a topo Object — topoInterpolate","title":"Interpolate Within a topo Object — topoInterpolate","text":"Bilinear interpolation used values vary smoothly within longitude-latitude grid cell. Note sign convention longitude latitude must match topo.","code":""},{"path":"https://dankelley.github.io/oce/reference/topoInterpolate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interpolate Within a topo Object — topoInterpolate","text":"","code":"topoInterpolate(longitude, latitude, topo)"},{"path":"https://dankelley.github.io/oce/reference/topoInterpolate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interpolate Within a topo Object — topoInterpolate","text":"longitude Vector longitudes (sign convention used topo). latitude Vector latitudes (sign convention used topo). topo topo object.","code":""},{"path":"https://dankelley.github.io/oce/reference/topoInterpolate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Interpolate Within a topo Object — topoInterpolate","text":"Vector heights giving elevation earth means sea level indicated location earth.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/topoInterpolate.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Interpolate Within a topo Object — topoInterpolate","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/topoInterpolate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Interpolate Within a topo Object — topoInterpolate","text":"","code":"library(oce) data(topoWorld) # \"The Gully\", approx. 400m deep, connects Gulf of St Lawrence with North Atlantic topoInterpolate(45, -57, topoWorld) #> [1] -5208.5"},{"path":"https://dankelley.github.io/oce/reference/topoWorld.html","id":null,"dir":"Reference","previous_headings":"","what":"Global Topographic Data (at Half-degree Resolution) — topoWorld","title":"Global Topographic Data (at Half-degree Resolution) — topoWorld","text":"Global topographic dataset half-degree resolution, downloaded NOAA server May 18, 2019.  Longitude, accessible topoWorld[[\"longitude\"]], ranges -179.75 129.75 degrees north. Latitude (topoWorld[[\"latitude\"]]) ranges -89.75 89.75 degrees east. Height (topoWorld[[\"z\"]]) measured metres nominal sea level. coarse resolution can problem plotting depth contours along coastlines regions steep topography. example, near southeast corner Newfoundland, 200m contour overlap coastline drawn coastlineWorldFine ocedata package. solution cases download higher-resolution topography file, perhaps using download.topo(), use read.topo() create another topo object.  (data sources, .topo() may helpful.)","code":""},{"path":"https://dankelley.github.io/oce/reference/topoWorld.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Global Topographic Data (at Half-degree Resolution) — topoWorld","text":"","code":"data(topoWorld)"},{"path":"https://dankelley.github.io/oce/reference/topoWorld.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Global Topographic Data (at Half-degree Resolution) — topoWorld","text":"created read.topo(), using file downloaded ","code":"topoFile <- download.topo(west=-180, east=180, south=-90, north=90,    resolution=30, destdir=\".\")"},{"path":"https://dankelley.github.io/oce/reference/topoWorld.html","id":"historical-note","dir":"Reference","previous_headings":"","what":"Historical note","title":"Global Topographic Data (at Half-degree Resolution) — topoWorld","text":"late 2009 May 18, 2019, topoWorld dataset created fairly complicated code read binary file downloaded NOAA (http://www.ngdc.noaa.gov/mgg/global/relief/ETOPO5/TOPO/ETOPO5), decoded, decimated 1/12th degree resolution 1/2 degree resolution, passed matrixShiftLongitude() put longitude -180 180 degrees. new scheme creating dataset, (see “Source”) much simpler, also much better model users likely deal topography files modern netCDF format. Note new version differs old one longitude latitude shifted 1/4 degree, mean  elevation difference 10m. old new versions appear identical plotted global scale recommended coarse topographic file.","code":""},{"path":"https://dankelley.github.io/oce/reference/topoWorld.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Global Topographic Data (at Half-degree Resolution) — topoWorld","text":"","code":"library(oce) data(topoWorld) par(mfrow=c(2, 1)) plot(topoWorld, location=NULL) imagep(topoWorld)"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/unabbreviateYear.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine Year From Various Abbreviations — unabbreviateYear","title":"Determine Year From Various Abbreviations — unabbreviateYear","text":"Various data files may contain various abbreviations years.  example, 99 refers 1999, 8 refers 2008.  Sometimes, even 108 refers 2008 (idea \"zero\" year 1900).  function deals three cases mentioned.  fail someone supplies 60, meaning year 2060 opposed 1960.","code":""},{"path":"https://dankelley.github.io/oce/reference/unabbreviateYear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine Year From Various Abbreviations — unabbreviateYear","text":"","code":"unabbreviateYear(year)"},{"path":"https://dankelley.github.io/oce/reference/unabbreviateYear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine Year From Various Abbreviations — unabbreviateYear","text":"year year, vector years, possibly abbreviated","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/unabbreviateYear.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Determine Year From Various Abbreviations — unabbreviateYear","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/unabbreviateYear.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Determine Year From Various Abbreviations — unabbreviateYear","text":"","code":"fullYear <- unabbreviateYear(c(99, 8, 108))"},{"path":"https://dankelley.github.io/oce/reference/undriftTime.html","id":null,"dir":"Reference","previous_headings":"","what":"Correct for Drift in an Instrument Clock — undriftTime","title":"Correct for Drift in an Instrument Clock — undriftTime","text":"assumed instrument clock matches real time start sampling, clock drifts linearly (.e. uniformly fast slow) sampling interval.  Linear interpolation used infer values variables data slot.  data length altered process, e.g. slow instrument clock (positive slowEnd) takes samples given time interval, undriftTime increase number data.","code":""},{"path":"https://dankelley.github.io/oce/reference/undriftTime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Correct for Drift in an Instrument Clock — undriftTime","text":"","code":"undriftTime(x, slowEnd = 0, tname = \"time\")"},{"path":"https://dankelley.github.io/oce/reference/undriftTime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Correct for Drift in an Instrument Clock — undriftTime","text":"x oce object. slowEnd number seconds add final instrument time, get correct time final sample.  positive number, \"slow\" instrument clock. tname Character string indicating name time column data slot x.","code":""},{"path":"https://dankelley.github.io/oce/reference/undriftTime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Correct for Drift in an Instrument Clock — undriftTime","text":"object class x, data slot adjusted appropriately.","code":""},{"path":"https://dankelley.github.io/oce/reference/undriftTime.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Correct for Drift in an Instrument Clock — undriftTime","text":"","code":"library(oce) file <- \"~/data/archive/sleiwex/2008/moorings/m08/pt/rbr_011855/raw/pt_rbr_011855.dat\" rbr011855 <- read.oce(file) d <- subset(rbr011855, time < as.POSIXct(\"2008-06-25 10:05:00\")) x <- undriftTime(d, 1)   # clock lost 1 second over whole experiment summary(d) summary(x)"},{"path":"https://dankelley.github.io/oce/reference/undriftTime.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Correct for Drift in an Instrument Clock — undriftTime","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/unduplicateNames.html","id":null,"dir":"Reference","previous_headings":"","what":"Rename Duplicated Character Strings — unduplicateNames","title":"Rename Duplicated Character Strings — unduplicateNames","text":"Append numeric suffices character strings, avoid repeats. used various data input functions, handle fact several oceanographic data formats permit reuse variable names within given file.","code":""},{"path":"https://dankelley.github.io/oce/reference/unduplicateNames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rename Duplicated Character Strings — unduplicateNames","text":"","code":"unduplicateNames(strings, style = 1)"},{"path":"https://dankelley.github.io/oce/reference/unduplicateNames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rename Duplicated Character Strings — unduplicateNames","text":"strings Vector character strings. style integer giving style. style 1, e.g. triplicate \"\" yields \"\", \"a1\", \"a2\". style 2, input yields \"a_001\", \"a_002\", \"a_003\".","code":""},{"path":"https://dankelley.github.io/oce/reference/unduplicateNames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rename Duplicated Character Strings — unduplicateNames","text":"Vector strings repeats distinguished suffix.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/unduplicateNames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rename Duplicated Character Strings — unduplicateNames","text":"","code":"unduplicateNames(c(\"a\", \"b\", \"a\", \"c\", \"b\")) #> [1] \"a\"  \"b\"  \"a2\" \"c\"  \"b2\" unduplicateNames(c(\"a\", \"b\", \"a\", \"c\", \"b\"), style = 2) #> [1] \"a_001\" \"b_001\" \"a_002\" \"c\"     \"b_002\""},{"path":"https://dankelley.github.io/oce/reference/ungrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract (x, y, z) From (x, y, grid) — ungrid","title":"Extract (x, y, z) From (x, y, grid) — ungrid","text":"Extract grid points grid, returning columns. useful e.g. gridding large datasets, first step might use binMean2D(), followed interpBarnes().","code":""},{"path":"https://dankelley.github.io/oce/reference/ungrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract (x, y, z) From (x, y, grid) — ungrid","text":"","code":"ungrid(x, y, grid)"},{"path":"https://dankelley.github.io/oce/reference/ungrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract (x, y, z) From (x, y, grid) — ungrid","text":"x vector holding x coordinates grid. y vector holding y coordinates grid. grid matrix holding grid.","code":""},{"path":"https://dankelley.github.io/oce/reference/ungrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract (x, y, z) From (x, y, grid) — ungrid","text":"list containing three vectors: x, grid x values, y, grid y values, grid, grid values.","code":""},{"path":"https://dankelley.github.io/oce/reference/ungrid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract (x, y, z) From (x, y, grid) — ungrid","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/ungrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract (x, y, z) From (x, y, grid) — ungrid","text":"","code":"library(oce) data(wind) u <- interpBarnes(wind$x, wind$y, wind$z) contour(u$xg, u$yg, u$zg) U <- ungrid(u$xg, u$yg, u$zg) points(U$x, U$y, col = oce.colorsViridis(100)[rescale(U$grid, rlow = 1, rhigh = 100)], pch = 20)"},{"path":"https://dankelley.github.io/oce/reference/unitFromString.html","id":null,"dir":"Reference","previous_headings":"","what":"Decode Units From Strings — unitFromString","title":"Decode Units From Strings — unitFromString","text":"mainly intended internal use within package, e.g. read.odf(), list string--unit mappings documented, since developers can learn simple examination code.  focus unitFromString() strings found oceanographic files available author, possible units.","code":""},{"path":"https://dankelley.github.io/oce/reference/unitFromString.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Decode Units From Strings — unitFromString","text":"","code":"unitFromString(unit, scale = NULL)"},{"path":"https://dankelley.github.io/oce/reference/unitFromString.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Decode Units From Strings — unitFromString","text":"unit character value indicating unit. matched according rules developed work actual data files, list means exhaustive. scale character value indicating scale.  default value NULL dictates scale inferred unit. non-NULL value supplied, used, even makes sense relation value unit.","code":""},{"path":"https://dankelley.github.io/oce/reference/unitFromString.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Decode Units From Strings — unitFromString","text":"list() two items: unit expression(), scale, string.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/unitFromString.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Decode Units From Strings — unitFromString","text":"","code":"unitFromString(\"dbar\") # dbar (no scale) #> $unit #> expression(dbar) #>  #> $scale #> [1] \"\" #>  unitFromString(\"deg c\") # modern temperature (ITS-90 scale) #> $unit #> expression(degree * C) #>  #> $scale #> [1] \"ITS-90\" #>"},{"path":"https://dankelley.github.io/oce/reference/unitFromStringRsk.html","id":null,"dir":"Reference","previous_headings":"","what":"Infer rsk Units From a Vector of Strings — unitFromStringRsk","title":"Infer rsk Units From a Vector of Strings — unitFromStringRsk","text":"used read.rsk() infer units data, based strings stored .rsk files. Lacking definitive guide format file, function based visual inspection data contained within sample files; unusual sensors may handled properly.","code":""},{"path":"https://dankelley.github.io/oce/reference/unitFromStringRsk.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Infer rsk Units From a Vector of Strings — unitFromStringRsk","text":"","code":"unitFromStringRsk(s)"},{"path":"https://dankelley.github.io/oce/reference/unitFromStringRsk.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Infer rsk Units From a Vector of Strings — unitFromStringRsk","text":"s Vector character strings, holding units entry channels table .rsk database.","code":""},{"path":"https://dankelley.github.io/oce/reference/unitFromStringRsk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Infer rsk Units From a Vector of Strings — unitFromStringRsk","text":"List unit lists.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/unwrapAngle.html","id":null,"dir":"Reference","previous_headings":"","what":"Unwrap an Angle That Suffers Modulo-360 Problems — unwrapAngle","title":"Unwrap an Angle That Suffers Modulo-360 Problems — unwrapAngle","text":"mostly used instrument heading angles, cases instrument aligned nearly northward, small variations heading (e.g. due mooring motion) can yield values swing small angles large angles, modulo-360 cut point. method use cosine sine angle, construct \"x\" \"y\" values unit circle, find means medians x y respectively, finally use atan2() infer angles.","code":""},{"path":"https://dankelley.github.io/oce/reference/unwrapAngle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unwrap an Angle That Suffers Modulo-360 Problems — unwrapAngle","text":"","code":"unwrapAngle(angle)"},{"path":"https://dankelley.github.io/oce/reference/unwrapAngle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unwrap an Angle That Suffers Modulo-360 Problems — unwrapAngle","text":"angle angle (degrees) thought near 360 degrees, added noise","code":""},{"path":"https://dankelley.github.io/oce/reference/unwrapAngle.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Unwrap an Angle That Suffers Modulo-360 Problems — unwrapAngle","text":"list two estimates: mean based arithmetic mean, median based median. mapped range 0 360.","code":""},{"path":"https://dankelley.github.io/oce/reference/unwrapAngle.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Unwrap an Angle That Suffers Modulo-360 Problems — unwrapAngle","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/unwrapAngle.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Unwrap an Angle That Suffers Modulo-360 Problems — unwrapAngle","text":"","code":"library(oce) true <- 355 a <- true + rnorm(100, sd = 10) a <- ifelse(a > 360, a - 360, a) a2 <- unwrapAngle(a) par(mar = c(3, 3, 5, 3)) hist(a, breaks = 360) abline(v = a2$mean, col = \"blue\", lty = \"dashed\") abline(v = true, col = \"blue\") mtext(\"true (solid)\\n estimate (dashed)\", at = true, side = 3, col = \"blue\") abline(v = mean(a), col = \"red\") mtext(\"mean\", at = mean(a), side = 3, col = \"red\")"},{"path":"https://dankelley.github.io/oce/reference/useHeading.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace the Heading for One Instrument With That of Another — useHeading","title":"Replace the Heading for One Instrument With That of Another — useHeading","text":"Replace heading angles one oce object another, possibly constant adjustment.","code":""},{"path":"https://dankelley.github.io/oce/reference/useHeading.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace the Heading for One Instrument With That of Another — useHeading","text":"","code":"useHeading(b, g, add = 0)"},{"path":"https://dankelley.github.io/oce/reference/useHeading.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace the Heading for One Instrument With That of Another — useHeading","text":"b object holding data instrument whose heading bad, whose data good. g object holding data instrument whose heading good, interpolated time base b. add angle, degrees, added heading.","code":""},{"path":"https://dankelley.github.io/oce/reference/useHeading.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replace the Heading for One Instrument With That of Another — useHeading","text":"copy b, b$data$heading replaced heading angles result linear interpolation headings g, adding angle add.","code":""},{"path":"https://dankelley.github.io/oce/reference/useHeading.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Replace the Heading for One Instrument With That of Another — useHeading","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/usrLonLat.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Geographic Coordinates of Plot Box — usrLonLat","title":"Calculate Geographic Coordinates of Plot Box — usrLonLat","text":"Trace along plot box, converting xy coordinates lonlat coordinates. results used mapGrid() mapAxis() ignore --frame grid lines axis labels.","code":""},{"path":"https://dankelley.github.io/oce/reference/usrLonLat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Geographic Coordinates of Plot Box — usrLonLat","text":"","code":"usrLonLat(n = 25, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/usrLonLat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Geographic Coordinates of Plot Box — usrLonLat","text":"n number points check along side plot box. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/usrLonLat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Geographic Coordinates of Plot Box — usrLonLat","text":"usrLonLat returns list containing numerical values lonmin, lonmax, latmin, latmax, along logical value ok. last indicates whether least one point plot box invertible. Note longitudes range -180 180 degrees.","code":""},{"path":"https://dankelley.github.io/oce/reference/usrLonLat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate Geographic Coordinates of Plot Box — usrLonLat","text":"projections, \"wintri\", trouble inverting points \"globe\".  cases, returned value lonmin, lonmax, latmin latmax set NA, ok set FALSE.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/usrLonLat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate Geographic Coordinates of Plot Box — usrLonLat","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/utm2lonlat.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert UTM to Longitude and Latitude — utm2lonlat","title":"Convert UTM to Longitude and Latitude — utm2lonlat","text":"Convert UTM Longitude Latitude","code":""},{"path":"https://dankelley.github.io/oce/reference/utm2lonlat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert UTM to Longitude and Latitude — utm2lonlat","text":"","code":"utm2lonlat(easting, northing, zone = 1, hemisphere = \"N\", km = FALSE)"},{"path":"https://dankelley.github.io/oce/reference/utm2lonlat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert UTM to Longitude and Latitude — utm2lonlat","text":"easting easting coordinate (km m, depending value km).  Alternatively, list containing items named easting, northing, zone, case taken list arguments named northing, zone ignored. northing northing coordinate (km m, depending value km). zone UTM zone hemisphere indication hemisphere; \"N\" North, anything else South. km logical value indicating whether easting northing kilometers meters.","code":""},{"path":"https://dankelley.github.io/oce/reference/utm2lonlat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert UTM to Longitude and Latitude — utm2lonlat","text":"utm2lonlat returns list containing longitude latitude.","code":""},{"path":"https://dankelley.github.io/oce/reference/utm2lonlat.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert UTM to Longitude and Latitude — utm2lonlat","text":"https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system, downloaded May 31, 2014.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/utm2lonlat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert UTM to Longitude and Latitude — utm2lonlat","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/utm2lonlat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert UTM to Longitude and Latitude — utm2lonlat","text":"","code":"library(oce) # Cape Split, in the Minas Basin of the Bay of Fundy utm2lonlat(852863, 5029997, 19) #> $longitude #> [1] -64.49657 #>  #> $latitude #> [1] 45.33462 #>"},{"path":"https://dankelley.github.io/oce/reference/vectorShow.html","id":null,"dir":"Reference","previous_headings":"","what":"Show Some Values From a List, Vector or Matrix — vectorShow","title":"Show Some Values From a List, Vector or Matrix — vectorShow","text":"similar str(), shows data first last vector, can quite helpful debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/vectorShow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show Some Values From a List, Vector or Matrix — vectorShow","text":"","code":"vectorShow(   v,   msg = \"\",   postscript = \"\",   digits = 5L,   n = 2L,   showNA = FALSE,   showNewline = TRUE )"},{"path":"https://dankelley.github.io/oce/reference/vectorShow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show Some Values From a List, Vector or Matrix — vectorShow","text":"v item summarized.  list vector named items, information provided element. Otherwise, information provided first last n values. msg optional character value indicating message show, introducing vector.  provided, message created v. msg non-empty string, string pasted together colon (unless msg already contains colon), pasting summary data values. postscript optional character value indicating optional message append end return value. digits numerical values v, number digits use, formatting numbers format(); otherwise, digits ignored. n number elements show start end. n negative, elements shown. showNA logical value indicating whether show number NA values. done output contains ellipses, meaning values skipped, values shown, perfectly obvious whether NA values. showNewline logical value indicating whether put newline character end output string.  default, TRUE, convenient printing, using FALSE makes sense result used , e.g. mtext().","code":""},{"path":"https://dankelley.github.io/oce/reference/vectorShow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Show Some Values From a List, Vector or Matrix — vectorShow","text":"string ending newline character, suitable display cat() oceDebug().","code":""},{"path":"https://dankelley.github.io/oce/reference/vectorShow.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Show Some Values From a List, Vector or Matrix — vectorShow","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/vectorShow.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Show Some Values From a List, Vector or Matrix — vectorShow","text":"","code":"# List limits <- list(low = 0, high = 1) vectorShow(limits) #> [1] \"limits: low=0, high=1\\n\"  # Vector of named items planktonCount <- c(phytoplankton = 100, zooplankton = 20) vectorShow(planktonCount) #> [1] \"planktonCount: phytoplankton=100, zooplankton=20\\n\"  # Vector vectorShow(pi) #> [1] \"pi: 3.1416\\n\"  # Matrix vectorShow(volcano) #> [1] \"volcano[1:87, 1:61]: 100, 101, ..., 94, 94\\n\"  # Other arguments knot2mps <- 0.5144444 vectorShow(knot2mps, postscript = \"knots per m/s\") #> [1] \"knot2mps: 0.51444 knots per m/s\\n\" vectorShow(\"January\", msg = \"The first month is\") #> [1] \"The first month is: January\\n\""},{"path":"https://dankelley.github.io/oce/reference/velocityStatistics.html","id":null,"dir":"Reference","previous_headings":"","what":"Report Statistics of adp or adv Velocities — velocityStatistics","title":"Report Statistics of adp or adv Velocities — velocityStatistics","text":"Report statistics ADP ADV velocities, means variance ellipses.","code":""},{"path":"https://dankelley.github.io/oce/reference/velocityStatistics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Report Statistics of adp or adv Velocities — velocityStatistics","text":"","code":"velocityStatistics(x, control, ...)"},{"path":"https://dankelley.github.io/oce/reference/velocityStatistics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Report Statistics of adp or adv Velocities — velocityStatistics","text":"x adp adv object. control optional list used specify information. presently ignored adv objects.  adp objects, control$bin integer, taken bin selected (otherwise, average across bins used). ... additional arguments used call mean().","code":""},{"path":"https://dankelley.github.io/oce/reference/velocityStatistics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Report Statistics of adp or adv Velocities — velocityStatistics","text":"list containing items major minor axes covariance ellipse (ellipseMajor ellipseMinor), angle major axis anticlockwise horizontal axis (ellipseAngle), x y components mean velocity (uMean vMean).","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/velocityStatistics.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Report Statistics of adp or adv Velocities — velocityStatistics","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/velocityStatistics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Report Statistics of adp or adv Velocities — velocityStatistics","text":"","code":"library(oce) data(adp) a <- velocityStatistics(adp) print(a) #> $ellipseMajor #> [1] 0.6442399 #>  #> $ellipseMinor #> [1] 0.04197328 #>  #> $ellipseAngle #> [1] 57.09922 #>  #> $uMean #> [1] 0.095503 #>  #> $vMean #> [1] 0.1760109 #>  t <- seq(0, 2 * pi, length.out = 100) theta <- a$ellipseAngle * pi / 180 y <- a$ellipseMajor * cos(t) * sin(theta) + a$ellipseMinor * sin(t) * cos(theta) x <- a$ellipseMajor * cos(t) * cos(theta) - a$ellipseMinor * sin(t) * sin(theta) plot(adp, which = \"uv+ellipse+arrow\") lines(x, y, col = \"blue\", lty = \"dashed\", lwd = 5) arrows(0, 0, a$uMean, a$vMean, lwd = 5, length = 1 / 10, col = \"blue\", lty = \"dashed\")"},{"path":"https://dankelley.github.io/oce/reference/webtide.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a Tidal Prediction From a WebTide Database — webtide","title":"Get a Tidal Prediction From a WebTide Database — webtide","text":"Get tidal prediction WebTide database. works standalone WebTide application installed, installed standard location. details installation within oce purview.","code":""},{"path":"https://dankelley.github.io/oce/reference/webtide.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a Tidal Prediction From a WebTide Database — webtide","text":"","code":"webtide(   action = c(\"map\", \"predict\"),   longitude,   latitude,   node,   time,   basedir = getOption(\"webtide\"),   region = \"nwatl\",   plot = TRUE,   tformat,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/webtide.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Get a Tidal Prediction From a WebTide Database — webtide","text":"WebTide software may downloaded free Department Fisheries Oceans (Canada) website http://www.bio.gc.ca/science/research-recherche/ocean/webtide/index-en.php (checked February 2016 May 2017).","code":""},{"path":"https://dankelley.github.io/oce/reference/webtide.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a Tidal Prediction From a WebTide Database — webtide","text":"action indication action, either action=\"map\" draw map action=\"predict\" get prediction; see “Details”. longitude, latitude optional location prediction required (ignored node given). node optional integer relating node database. node given, neither latitude longitude may given. node positive, specifies indicates node. negative, locator() called user can click () map, node displayed map. time vector times (UTC timezone) prediction made. supplied, week starting present time, computed presentTime(), 15 minute increment. basedir directory containing WebTide application. region database region, given directory name WebTide directory.  example, h3o Halifax Harbour, nwatl northwest Atlantic, sshelf Scotian Shelf Gulf Maine. plot boolean indicating whether plot. tformat optional argument passed oce.plot.ts(), plot types call function.  (See strptime() format used.) debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values. ... optional arguments passed plotting functions. common example set xlim ylim, focus map region.","code":""},{"path":"https://dankelley.github.io/oce/reference/webtide.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a Tidal Prediction From a WebTide Database — webtide","text":"value depends action: action=\"map\" return value list containing index nearest node, along latitude longitude node.  plot FALSE, value returned invisibly. action=\"predict\", return value list containing vector times (time), well vectors predicted elevation metres predicted horizontal components velocity, u v, along node number, basedir region supplied function. plot FALSE, value returned invisibly.","code":""},{"path":"https://dankelley.github.io/oce/reference/webtide.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get a Tidal Prediction From a WebTide Database — webtide","text":"two methods using function. Case 1: action=\"map\". case, plot FALSE, list returned, containing nodes selected database, along latitudes longitudes. value also returned (silently) plot true, case, plot drawn indicate node locations. latitude longitude given, node nearest spot indicated map; otherwise, node given, location node indicated. also special case: node negative interactive() TRUE, locator() called, node nearest spot user clicks mouse indicated plot return value. Case 2: action=\"predict\". plot FALSE, list returned, indicating time, predicted elevation, velocity components u v, node number, name basedir, region. plot TRUE, list returned silently, time-series plots drawn elevation, u, v. Naturally, webtide work unless WebTide installed computer.","code":""},{"path":"https://dankelley.github.io/oce/reference/webtide.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Get a Tidal Prediction From a WebTide Database — webtide","text":"WebTide open-source application, present function designed based little guesses WebTide file structure. Users lookout odd results.","code":""},{"path":"https://dankelley.github.io/oce/reference/webtide.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Get a Tidal Prediction From a WebTide Database — webtide","text":"","code":"# needs WebTide at the system level library(oce) # 1. prediction at Halifax NS longitude <- -63.57 latitude <- 44.65 prediction <- webtide(\"predict\", longitude=longitude, latitude=latitude) mtext(paste0(\"prediction at \", latitude, \"N and \", longitude, \"E\"), line=0.75, side=3) # 2. map webtide(lon=-63.57,lat=44.65,xlim=c(-64,-63),ylim=c(43.0,46))"},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/webtide.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get a Tidal Prediction From a WebTide Database — webtide","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/wind.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample Wind Data — wind","title":"Sample Wind Data — wind","text":"Wind data inferred Figure 5 Koch et al. (1983), provided illustrate interpBarnes() function. Columns wind$x wind$y location, wind$z wind speed, m/s.","code":""},{"path":"https://dankelley.github.io/oce/reference/wind.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sample Wind Data — wind","text":"S. E.  Koch M.  DesJardins P. J. Kocin, 1983.  “interactive Barnes objective map analysis scheme use satellite conventional data,” J.  Climate Appl.  Met., vol 22, p. 1487-1503.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/window.oce.html","id":null,"dir":"Reference","previous_headings":"","what":"Window an oce Object by Time or Distance — window.oce","title":"Window an oce Object by Time or Distance — window.oce","text":"Windows x either time distance, depending value .  case, values start end may integers, indicate portion time distance range.  \"time\", start end values may also provided POSIX times, character strings indicating times (time zone given value getOption(\"oceTz\")). Note subset() may useful function.","code":""},{"path":"https://dankelley.github.io/oce/reference/window.oce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Window an oce Object by Time or Distance — window.oce","text":"","code":"# S3 method for class 'oce' window(   x,   start = NULL,   end = NULL,   frequency = NULL,   deltat = NULL,   extend = FALSE,   which = c(\"time\", \"distance\"),   indexReturn = FALSE,   debug = getOption(\"oceDebug\"),   ... )"},{"path":"https://dankelley.github.io/oce/reference/window.oce.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Window an oce Object by Time or Distance — window.oce","text":"x oce object. start start time (distance) time (space) region interest.  may single value vector. end end time (distance) time (space) region interest.  may single value vector. frequency permitted yet. deltat permitted yet extend permitted yet string containing name quantity sampling done.  Possibilities \"time\", applies windowing time entry data slot, \"distance\", distance entry (objects, adp, entry). indexReturn boolean flag indicating whether return list \"kept\" indices time entry data slot, well timeSlow entry, one..  Either lists NULL, object lacks relevant items. debug flag turns debugging. ... ignored","code":""},{"path":"https://dankelley.github.io/oce/reference/window.oce.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Window an oce Object by Time or Distance — window.oce","text":"Normally, new oce object.  However, indexReturn=TRUE, return value two-element list containing items named index indexSlow, indices time entry data slot (timeSlow, exists).","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/window.oce.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Window an oce Object by Time or Distance — window.oce","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/window.oce.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Window an oce Object by Time or Distance — window.oce","text":"","code":"library(oce) data(adp) plot(adp)  early <- window(adp, start = \"2008-06-26 00:00:00\", end = \"2008-06-26 12:00:00\") plot(early)  bottom <- window(adp, start = 0, end = 20, which = \"distance\") plot(bottom)"},{"path":"https://dankelley.github.io/oce/reference/windrose-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store windrose Data — windrose-class","title":"Class to Store windrose Data — windrose-class","text":"class stores windrose objects, store statistical information winds, mainly plotting \"wind rose\" plots plot,windrose-method(). Unlike oce objects, reading method windrose objects, standard way store wind data files; instead, .windrose() provided construct windrose objects.","code":""},{"path":"https://dankelley.github.io/oce/reference/windrose-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store windrose Data — windrose-class","text":"data oce objects, data slot windrose objects list containing main data object. metadata oce objects, metadata slot windrose objects list containing information data object . processingLog oce objects, processingLog slot windrose objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/windrose-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store windrose Data — windrose-class","text":"Although [[<- operator may permit modification contents windrose objects (see [[<-,windrose-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/windrose-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store windrose Data — windrose-class","text":"full contents data metadata slots windrose object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,windrose-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,windrose-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/woceNames2oceNames.html","id":null,"dir":"Reference","previous_headings":"","what":"Translate WOCE Data Names to Oce Data Names — woceNames2oceNames","title":"Translate WOCE Data Names to Oce Data Names — woceNames2oceNames","text":"Translate WOCE-style names oce names, using gsub() match patterns. example, pattern \"CTDOXY.*\" taken mean oxygen.","code":""},{"path":"https://dankelley.github.io/oce/reference/woceNames2oceNames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Translate WOCE Data Names to Oce Data Names — woceNames2oceNames","text":"","code":"woceNames2oceNames(names)"},{"path":"https://dankelley.github.io/oce/reference/woceNames2oceNames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Translate WOCE Data Names to Oce Data Names — woceNames2oceNames","text":"names vector strings holding WOCE-style names.","code":""},{"path":"https://dankelley.github.io/oce/reference/woceNames2oceNames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Translate WOCE Data Names to Oce Data Names — woceNames2oceNames","text":"vector strings holding oce-style names.","code":""},{"path":"https://dankelley.github.io/oce/reference/woceNames2oceNames.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Translate WOCE Data Names to Oce Data Names — woceNames2oceNames","text":"Several online sources list WOCE names. example https://cchdo.github.io/hdo-assets/documentation/manuals/pdf/90_1/chap4.pdf","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/woceNames2oceNames.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Translate WOCE Data Names to Oce Data Names — woceNames2oceNames","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/woceUnit2oceUnit.html","id":null,"dir":"Reference","previous_headings":"","what":"Translate WOCE Units to oce Units — woceUnit2oceUnit","title":"Translate WOCE Units to oce Units — woceUnit2oceUnit","text":"Translate WOCE-style units oce units.","code":""},{"path":"https://dankelley.github.io/oce/reference/woceUnit2oceUnit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Translate WOCE Units to oce Units — woceUnit2oceUnit","text":"","code":"woceUnit2oceUnit(woceUnit)"},{"path":"https://dankelley.github.io/oce/reference/woceUnit2oceUnit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Translate WOCE Units to oce Units — woceUnit2oceUnit","text":"woceUnit string holding WOCE unit","code":""},{"path":"https://dankelley.github.io/oce/reference/woceUnit2oceUnit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Translate WOCE Units to oce Units — woceUnit2oceUnit","text":"expression oce unit form","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/woceUnit2oceUnit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Translate WOCE Units to oce Units — woceUnit2oceUnit","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/write.ctd.html","id":null,"dir":"Reference","previous_headings":"","what":"Save a ctd Object in a CSV File — write.ctd","title":"Save a ctd Object in a CSV File — write.ctd","text":"Writes comma-separated file containing data frame stored data slot first parameter.  file suitable reading spreadsheet, read.csv().  output file contain metadata x, metadata TRUE.","code":""},{"path":"https://dankelley.github.io/oce/reference/write.ctd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save a ctd Object in a CSV File — write.ctd","text":"","code":"write.ctd(object, file, metadata = TRUE, flags = TRUE, format = \"csv\")"},{"path":"https://dankelley.github.io/oce/reference/write.ctd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save a ctd Object in a CSV File — write.ctd","text":"object ctd object. file Either character string (file name) connection. provided, file defaults stdout(). metadata logical value indicating whether put selected metadata elements start output file. flags logical value indicating whether show data-quality flags well data. format string indicating format use. may \"csv\" simple CSV format, \"whp\" World Hydrographic Program format, described reference 1 exemplified reference 2.","code":""},{"path":"https://dankelley.github.io/oce/reference/write.ctd.html","id":"sample-of-usage","dir":"Reference","previous_headings":"","what":"Sample of Usage","title":"Save a ctd Object in a CSV File — write.ctd","text":"","code":"library(oce) data(ctd) write.ctd(ctd, \"ctd.csv\") d <- read.csv(\"ctd.csv\") plot(as.ctd(d$salinity, d$temperature, d$pressure))"},{"path":"https://dankelley.github.io/oce/reference/write.ctd.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Save a ctd Object in a CSV File — write.ctd","text":"following links used work, failed December 2020. https://www.nodc.noaa.gov/woce/woce_v3/wocedata_1/whp/exchange/exchange_format_desc.htm https://www.nodc.noaa.gov/woce/woce_v3/wocedata_1/whp/exchange/example_ct1.csv","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/write.ctd.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Save a ctd Object in a CSV File — write.ctd","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/xbt-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Class to Store XBT (Expendable Bathythermograph) Data — xbt-class","title":"Class to Store XBT (Expendable Bathythermograph) Data — xbt-class","text":"class stores expendable bathythermograph (XBT) data, e.g. Sippican device.  Reference 1 gives information Sippican devices, reference 2 useful introduction modern literature XBTs general.","code":""},{"path":"https://dankelley.github.io/oce/reference/xbt-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Class to Store XBT (Expendable Bathythermograph) Data — xbt-class","text":"data oce objects, data slot xbt objects list containing main data object. key items stored slot depth (z) temperature, although datasets also soundSpeed.  Note depth z inferred time water, using empirical formula instrument descent rate, soundSpeed #' calculated using fixed  practical salinity 35. Note [[ accessor compute depth, z pressure, based whatever data object.  Similarly, soundspeed compute sound speed (assuming practical salinity 35), item present data slot. metadata oce objects, metadata slot xbt objects list containing information data object . processingLog oce objects, processingLog slot xbt objects list entries describing creation evolution object. contents updated various oce functions keep record processing steps.  Object summaries processingLogShow() display log.","code":""},{"path":"https://dankelley.github.io/oce/reference/xbt-class.html","id":"modifying-slot-contents","dir":"Reference","previous_headings":"","what":"Modifying slot contents","title":"Class to Store XBT (Expendable Bathythermograph) Data — xbt-class","text":"Although [[<- operator may permit modification contents xbt objects (see [[<-,xbt-method), better use oceSetData() oceSetMetadata(), functions save entry processingLog describes change.","code":""},{"path":"https://dankelley.github.io/oce/reference/xbt-class.html","id":"retrieving-slot-contents","dir":"Reference","previous_headings":"","what":"Retrieving slot contents","title":"Class to Store XBT (Expendable Bathythermograph) Data — xbt-class","text":"full contents data metadata slots xbt object may retrieved standard R way using slot(). example slot(o,\"data\") returns data slot object named o, similarly slot(o,\"metadata\") returns metadata slot. slots may also obtained [[,xbt-method operator, e.g. o[[\"data\"]] o[[\"metadata\"]], respectively. [[,xbt-method operator can also used retrieve items within data metadata slots. example, o[[\"temperature\"]] can used retrieve temperature object containing quantity. rule named quantity sought first within object's metadata slot, data slot checked metadata contain item. [[ method can also used get certain derived quantities, object contains sufficient information calculate . example, object holds (practical) salinity, temperature pressure, along longitude latitude, sufficient information compute Absolute Salinity, o[[\"SA\"]] yield calculated Absolute Salinity. also possible find items directly, using oceGetData() oceGetMetadata(), neither functions can retrieve derived items.","code":""},{"path":"https://dankelley.github.io/oce/reference/xbt-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Class to Store XBT (Expendable Bathythermograph) Data — xbt-class","text":"Sippican, Inc. \"Bathythermograph Data Acquisition System: Installation, Operation Maintenance Manual (P/N 308195, Rev. ),\" 2003. https://pages.uoregon.edu/drt/MGL0910_Science_Report/attachments/MK21_ISA_Manual_Rev_A.pdf. Cheng, Lijing, John Abraham, Gustavo Goni, Timothy Boyer, Susan Wijffels, Rebecca Cowley, Viktor Gouretski, et al. \"XBT Science: Assessment Instrumental Biases Errors.\" Bulletin American Meteorological Society 97, . 6 (June 2016): 924-33. 10.1175/BAMS-D-15-00031.1","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/xbt-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Class to Store XBT (Expendable Bathythermograph) Data — xbt-class","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/xbt.edf.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample xbt File in .edf Format — xbt.edf","title":"Sample xbt File in .edf Format — xbt.edf","text":"Sample xbt File .edf Format","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/xbt.edf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample xbt File in .edf Format — xbt.edf","text":"","code":"xbt <- read.oce(system.file(\"extdata\", \"xbt.edf\", package=\"oce\"))"},{"path":"https://dankelley.github.io/oce/reference/xbt.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample xbt Data — xbt","title":"Sample xbt Data — xbt","text":"xbt object created using read.xbt() Sippican file created extracting near-surface fraction sample provided Section 5.5.6 reference 1.","code":""},{"path":"https://dankelley.github.io/oce/reference/xbt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample xbt Data — xbt","text":"","code":"data(xbt)"},{"path":"https://dankelley.github.io/oce/reference/xbt.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sample xbt Data — xbt","text":"Sippican, Inc. \"Bathythermograph Data Acquisition System: Installation, Operation Maintenance Manual (P/N 308195, Rev. ),\" 2003. https://pages.uoregon.edu/drt/MGL0910_Science_Report/attachments/MK21_ISA_Manual_Rev_A.pdf.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/xbt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample xbt Data — xbt","text":"","code":"library(oce) data(xbt) summary(xbt) #> xbt summary #> ----------- #>  #> * File source:        \"/Users/kelley/git/oce/create_data/xbt/xbt.edf\" #> * Serial Number:      0 #> * Longitude:          4.005 #> * Latitude:           -4 #> * Time:               2000-10-10 08:49:38 #> * Data Overview #>  #>                              Min.   Mean   Max.   Dim. NAs OriginalName     #>     depth [m]                5.4    7.0333 8.7    6    0   \"Depth\"          #>     temperature [°C, ITS-90] 20.9   20.905 20.91  6    0   \"Temperature\"    #>     soundSpeed [m/s]         1575.3 1575.3 1575.4 6    0   \"Sound Velocity\" #>  #> * Processing Log #>  #>     - 2020-02-24 15:07:55 UTC: `create 'xbt' object` #>     - 2020-02-24 15:07:55 UTC: `read.xbt.edf(file = file, debug = 10)` plot(xbt)"},{"path":"https://dankelley.github.io/oce/reference/xyzToEnu.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Acoustic-Doppler Data From XYZ to ENU Coordinates — xyzToEnu","title":"Convert Acoustic-Doppler Data From XYZ to ENU Coordinates — xyzToEnu","text":"Convert Acoustic-Doppler Data XYZ ENU Coordinates","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnu.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Acoustic-Doppler Data From XYZ to ENU Coordinates — xyzToEnu","text":"","code":"xyzToEnu(x, ...)"},{"path":"https://dankelley.github.io/oce/reference/xyzToEnu.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Acoustic-Doppler Data From XYZ to ENU Coordinates — xyzToEnu","text":"x adp adv object. ... extra arguments passed xyzToEnuAdp() xyzToEnuAdv(); see documentation functions, details.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnu.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Acoustic-Doppler Data From XYZ to ENU Coordinates — xyzToEnu","text":"object class x, velocities east-north-coordinates instead xyz coordinates.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdp.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert adp Object From XYZ to ENU Coordinates — xyzToEnuAdp","title":"Convert adp Object From XYZ to ENU Coordinates — xyzToEnuAdp","text":"Convert ADP velocity components xyz-based coordinate system enu-based coordinate system, using instrument's recording information relating heading, pitch, roll. action based stored data, depends greatly instrument type style original data format. function handles data RDI Teledyne, Sontek, Nortek instruments directly.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert adp Object From XYZ to ENU Coordinates — xyzToEnuAdp","text":"","code":"xyzToEnuAdp(x, declination = 0, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert adp Object From XYZ to ENU Coordinates — xyzToEnuAdp","text":"x adp object. declination magnetic declination added heading \"righting\" (see ), get ENU N \"true\" north.  set NULL, returned object set without adjusting compass declination.  means north metadata slot set \"magnetic\", also item named declination slot.  Note applyMagneticDeclination() can used later, set declination. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert adp Object From XYZ to ENU Coordinates — xyzToEnuAdp","text":"object data$v[,,1:3] altered appropriately, x[[\"oceCoordinate\"]] changed xyz enu.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert adp Object From XYZ to ENU Coordinates — xyzToEnuAdp","text":"first step convert (x,y,z) velocity components (stored three columns x[[\"v\"]][,,1:3]) RDI (reference 1, pages 11 12) calls \"ship\" (\"righted\") components.  example, z coordinate, may point upwards downwards depending instrument orientation, mapped onto \"mast\" coordinate points nearly upwards downward.  ship coordinates called \"starboard\" \"forward\", meanings clear mariners.  (x,y,z) velocities converted ship velocities, orientation instrument extracted heading, pitch, roll vectors stored object.  angles defined differently RDI Sontek profilers. code handles every case individually, based table given . table comes Clark Richards, former PhD student Dalhousie University (reference 2), developed based instrument documentation, discussion user groups, analysis measurements acquired RDI Sontek acoustic current profilers SLEIWEX experiment.  table, (X, Y, Z) denote instrument-coordinate velocities, (S, F, M) denote ship-coordinate velocities, (H, P, R) denote heading, pitch, roll. Finally, standardized rotation matrix used convert ship coordinates earth coordinates.  described RDI coordinate transformation manual (reference 1, pages 13 14), matrix based sines cosines heading, pitch, roll CH SH denote cosine sine heading (adjusting declination), similar terms pitch roll using second letters P R, rotation matrix matrix left-multiplied matrix three rows, top vector \"starboard\" values, middle vector \"forward\" values, bottom vector \"mast\" values.  Finally, columns data$v[,,1:3] filled result matrix multiplication.","code":"rbind(c( CH*CR + SH*SP*SR, SH*CP, CH*SR - SH*SP*CR), c(-SH*CR + CH*SP*SR, CH*CP, -SH*SR - CH*SP*CR), c( -CP*SR, SP, CP*CR))"},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert adp Object From XYZ to ENU Coordinates — xyzToEnuAdp","text":"Teledyne RD Instruments. “ADCP Coordinate Transformation: Formulas Calculations,” January 2010. P/N 951-6079-00. Clark Richards, 2012, PhD Dalhousie University Department Oceanography.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert adp Object From XYZ to ENU Coordinates — xyzToEnuAdp","text":"Dan Kelley Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdpAD2CP.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert adp Object of AD2CP type From XYZ to ENU Coordinates — xyzToEnuAdpAD2CP","title":"Convert adp Object of AD2CP type From XYZ to ENU Coordinates — xyzToEnuAdpAD2CP","text":"function active development, methodology user interface may change without notice. developers (invitees) trying use function.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdpAD2CP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert adp Object of AD2CP type From XYZ to ENU Coordinates — xyzToEnuAdpAD2CP","text":"","code":"xyzToEnuAdpAD2CP(x, declination = 0, debug = getOption(\"oceDebug\"))"},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdpAD2CP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert adp Object of AD2CP type From XYZ to ENU Coordinates — xyzToEnuAdpAD2CP","text":"x adp object created read.adp.ad2cp(). declination IGNORED present, used later time. debug integer specifying whether debugging information printed processing. general parameter used many oce functions. Generally, setting debug=0 turns printing, higher values suggest information printed. one function calls another, usually reduces value debug first, user can often obtain deeper debugging specifying higher debug values.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdpAD2CP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert adp Object of AD2CP type From XYZ to ENU Coordinates — xyzToEnuAdpAD2CP","text":"object data$v[,,1:3] altered appropriately, x[[\"oceCoordinate\"]] changed xyz enu.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdpAD2CP.html","id":"limitations","dir":"Reference","previous_headings":"","what":"Limitations","title":"Convert adp Object of AD2CP type From XYZ to ENU Coordinates — xyzToEnuAdpAD2CP","text":"works instrument orientation \"AHRS\", even tested yet. Plus, noted, declination ignored.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdpAD2CP.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert adp Object of AD2CP type From XYZ to ENU Coordinates — xyzToEnuAdpAD2CP","text":"Nortek . “Signature Integration 55|250|500|1000kHz.” Nortek , 2017. Nortek . “Signature Integration 55|250|500|1000kHz.” Nortek , 2018. https://www.nortekgroup.com/assets/software/N3015-007-Integrators-Guide-AD2CP_1018.pdf.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdpAD2CP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert adp Object of AD2CP type From XYZ to ENU Coordinates — xyzToEnuAdpAD2CP","text":"Dan Kelley","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdv.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an adv Object From XYZ to ENU Coordinates — xyzToEnuAdv","title":"Convert an adv Object From XYZ to ENU Coordinates — xyzToEnuAdv","text":"Convert ADV velocity components xyz-based coordinate system enu-based coordinate system.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an adv Object From XYZ to ENU Coordinates — xyzToEnuAdv","text":"","code":"xyzToEnuAdv(   x,   declination = 0,   cabled = FALSE,   horizontalCase,   sensorOrientation,   debug = getOption(\"oceDebug\") )"},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an adv Object From XYZ to ENU Coordinates — xyzToEnuAdv","text":"x adv object. declination magnetic declination added heading \"righting\" (see ), get ENU N \"true\" north.  set NULL, returned object set without adjusting compass declination.  means north metadata slot set \"magnetic\", also item named declination slot.  Note applyMagneticDeclination() can used later, set declination. cabled boolean value indicating whether sensor head connected pressure case cable.  cabled=FALSE, horizontalCase ignored.  See “Details”. horizontalCase optional boolean value indicating whether sensor case oriented horizontally.  Ignored unless cabled TRUE. See “Details”. sensorOrientation optional string indicating direction sensor points.  value, must \"upward\" \"downward\", -rides value orientation, metadata slot, set read.adv(), provided data file contained full header.  See “Details”. debug flag , non-zero, turns debugging.  Higher values yield extensive debugging.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert an adv Object From XYZ to ENU Coordinates — xyzToEnuAdv","text":"coordinate transformation done using heading, pitch, roll information contained within x.  algorithm similar used Teledyne/RDI ADCP units, taking account different definitions heading, pitch, roll defined velocimeters. Generally, transformation must done time--time basis, slow operation.  However, function checks whether vectors heading, pitch roll, unit length, case, calculation altered, resulting shorter execution times.  Note angles held (data$timeSlow, data$headingSlow, ...) Nortek instruments (data$time, data$heading, ...) Sontek instruments. Since documentation provided instrument manufacturers can vague coordinate transformations, method used developed indirectly.  (contrast RDI ADCP instruments, clear instructions.)  documents manufacturers provide.  results seem incorrect (e.g. currents go east instead west), users examine code detail case hand.  first step set debug 1, processing print trail processing steps.  next step consult table , see matches understanding (empirical tests) user.  difficult tailor code, needed. code handles every case individually, based table given . table comes Clark Richards, former PhD student Dalhousie University (reference 2), developed based instrument documentation, discussion user groups, analysis measurements acquired Nortek Sontek velocimeters SLEIWEX experiment. column labelled Cabled'' indicates whether sensor pressure case connected flexible cable, column labelled H.case” indicates whether pressure case oriented horizontally.  two properties discoverable headers data files, must supplied arguments cabled horizontalCase.  source code refers information table case numbers.  (Cases 5 6 handled.)  Angles abbreviated follows:: heading H,'' pitch P,” roll “R”. Entries X, Y Z refer instrument coordinates names. Entries S, F M refer -called ship coordinates starboard, forward, mast; used together rotation matrix get velocity components east, north, upward directions.","code":""},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert an adv Object From XYZ to ENU Coordinates — xyzToEnuAdv","text":"https://nortek.zendesk.com/hc/en-us/articles/360029820971----Coordinate-transformation-done- Clark Richards, 2012, PhD Dalhousie University Department Oceanography.","code":""},{"path":[]},{"path":"https://dankelley.github.io/oce/reference/xyzToEnuAdv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert an adv Object From XYZ to ENU Coordinates — xyzToEnuAdv","text":"Dan Kelley, collaboration Clark Richards","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-184","dir":"Changelog","previous_headings":"","what":"oce 1.8.4","title":"oce 1.8.4","text":"Add bodcNames2oceNames() rename NERC/BODC variables (issue #2235). Add netcdfTOC() overview NetCDF files (issue #2232). Add Tidal Analysis vignette (issue #2243). Change amsr[[ handle \"metadata\" parameter (issue #2229). Change .unit() handle units (issue #2240). Change download.amsr() handle realtime data files (issue #2231). Change mapPlot() handle las parameter (issue #1707). Change read.amsr() handle realtime data files (issue #2230). Change read.ctd.aml() handle “type 3” format (issue #2247). Change read.netcdf() docs show handle flags (issue #2236). Change read.netcdf() give way rename data (issue #2235). Change read.netcdf() handle units better. Change subset,amsr-method handle \"pass\" parameter. Change subset,ctd-method handle items unexpected length (issue #2250).","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-183-on-cran","dir":"Changelog","previous_headings":"","what":"oce 1.8.3 (ON CRAN)","title":"oce 1.8.3 (ON CRAN)","text":"Add swSpiciness0(), swSpiciness1(), swSpiciness2() (issue #2188). Change binMean2D() use previous (6-month-old) method (issue #2199). Change [[ many seawater properties handle argo data (issues #2207 #2208). Change concatenate() handle data slots data frames (issue #2213). Change ctdDecimate() add na.rm argument (issue #2192). Change mapDirectionField() allow wind barbs (issue #2191). Change mapContour() discuss longitude conventions (issue #2218). Change mapImage() handle user-provided gridding function (issue #2199). Change mapImage() add gridCoarseness parameter (issue #2199). Change oceMagic() close NetCDF files checking (issue #2209). Change plot.amsr() add zlab parameter (issue #2220). Change plot.argo() handle =\"sigma0 profile\" (issue #2184). Change plot.sealevel() add grid parameter (issue #2204). Change plot.sealevel() improve labelling (issue #2203). Change plot.section() handle bottom traces better (issue #2194). Change plot.section() show data points properly (issue #2195). Change plotProfile() handle xaxs yaxs xtype=\"spiciness0\" (issue #2215). Change plotTaylor() handle parameters. Change read.adp.rdi() handle large (> 2.147 GB) files (issue #2196). Change read.amsr() read start/end times plus metadata (issue #2219). Change read.argo() handle non-UTF characters metadata (issue #2206). Change read.ctd.sbe() name specc specificConductance (issue #2211). Change read.ctd.ssda() handle hemisphere tags location (issue #2227). Change read.met() return data slots lists (issue #2213). Change resizableLabel() document partial-match behaviour (issue #2197). Change resizableLabel() handle item=“N”` (issue #2197). Change summary() skip time threenum table (issue #2198). Change sunAngle() handle vector arguments better (issue #2178). Change sunAngle() detect non-logical values useRefraction (issue #2225). Change byte-level work C C++ improve maintainability (issue #2201).","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-182-on-cran","dir":"Changelog","previous_headings":"","what":"oce 1.8.2 (on CRAN)","title":"oce 1.8.2 (on CRAN)","text":"Add package?oce documentation (missing Roxygen2 change). Add read.ctd.saiv() read data SAIV instruments (issue #2141). Remove many dontrun examples docs (issue #2152). Remove trimString(), deprecated long time (issue #2123). Remove use deprecated sp package (issue #2154). Change amsr dataset functions handle new format (issues #2124 #2133 plus issue #2147). Change .ctd() handle multi-profile Argo better (issue #2173). Change .tidem() handle NOAA constituent names frequencies (issues #2143, #2144 #2146). Change C/C++ sprintf() calls formats match arguments (issue #2172). Change computableWaterProperties handle vector variable names. Change plot.adp() obey xlab x axis represents time (issue #2162). Change plot.cm() obey xlim, ylim, xaxs yaxs (issue #2121). Change plotTS() plotProfile() accept type=\"b\". Change plot.windrose() type=\"fivenum\" (issue #2164).","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-181-on-cran","dir":"Changelog","previous_headings":"","what":"oce 1.8.1 (on CRAN)","title":"oce 1.8.1 (on CRAN)","text":"Change .ctd() handle startTime, PRES, PSAL TEMP better. Change binCount1D() + 6 related functions adding include.lowest parameter (issue #2113). Change C++ files avoid error relating include statements (issue #2119). Change imagep() ensure z (provided) matrix (issue #2091). Change plot.section() skip kriging example (issue #2080). Change plot.section() show palette triangles necessary (issue #2083). Change plot.section() show data bottom correctly (issue #2092). Change plotTS() obey rho1000 parameter (issue #2085). Change read.argo() translate variable names. Change read.netcdf() read items. Change read.rsk() obey tz parameter (issue #2108). Change summary.adp() handle new format AD2CP data (issue #2087).","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-180-on-cran","dir":"Changelog","previous_headings":"","what":"oce 1.8.0 (on CRAN)","title":"oce 1.8.0 (on CRAN)","text":"Add advSontekAdrFileTrim() (issue #1994). Add ctdFindProfilesRBR() (issue #2027). Change applyMagneticDeclination() also handle adp adv (issue #2038). Change download.topo() handle new NOAA database (issue #2015). Change inst/extdata compressing files. Change mapPlot() remove infrequent low-level error (issue #2036). Change mapPlot() require projection string (issue #2076). Change numberAsPOSIXct(t, type=\"gps\") handle week rollover (issue #2077). Change plot.echosounder() use oceColorsViridis() default (issue #2060). Change plotProfile() create xlab vector input (issue #2047). Change plotTS() compute isopycnals accurately (issue #2046). Change plotTS() handle lobo objects directly. Change plot.tidem() obey ... parameter (issue #2035). Change read.adp.ad2cp(), structure AD2CP objects (issue #2005). Change read.rsk() read geographic information (issue #2024). Change sectionSmooth() handle method=\"kriging\" Change tidem() (summary method) handle 6-hourly data (issue #2034). Remove package dependence rgeos raster packages (issue #2028). Remove plotAD2CP(), now superseded generic plot() method (issue #2005). Remove plotting tests retain developer suite (issue #2073).","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-1710-on-cran","dir":"Changelog","previous_headings":"","what":"oce 1.7.10 (on CRAN)","title":"oce 1.7.10 (on CRAN)","text":"Fix typo swThermalConductivity() doc.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-179","dir":"Changelog","previous_headings":"","what":"oce 1.7.9","title":"oce 1.7.9","text":"Improve handling file encodings. Make argo [[ method handle spiciness. Improve read.adp.ad2cp() extensively, breaking old behaviours. Add oceFileTrim(), adpAd2cpFileTrim() adpRdiFileTrim(). Remove renameData(), flagged defunct multiple CRAN releases. Deprecate trimString().","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-178","dir":"Changelog","previous_headings":"","what":"oce 1.7.8","title":"oce 1.7.8","text":"Fix compiler warning comparing signed unsigned quantities.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-177","dir":"Changelog","previous_headings":"","what":"oce 1.7.7","title":"oce 1.7.7","text":"Add gappyIndex(). Fix encoding problems occur upcoming version R.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-176","dir":"Changelog","previous_headings":"","what":"oce 1.7.6","title":"oce 1.7.6","text":"Permit acoustic-Doppler files excess 4Gb.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-175","dir":"Changelog","previous_headings":"","what":"oce 1.7.5","title":"oce 1.7.5","text":"Remove stray file.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-174","dir":"Changelog","previous_headings":"","what":"oce 1.7.4","title":"oce 1.7.4","text":"Change mapImage() use interp instead akima, required CRAN. Improve read.ctd.sbe() interpreting Date headers. Improve .ctd() Argo data.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-173","dir":"Changelog","previous_headings":"","what":"oce 1.7.3","title":"oce 1.7.3","text":"Add read.ctd.ssda(). Add read.argo.copernicus(). Add sectionSort() parameter decreasing (thanks M. Renner). Address unused-variable warnings C++ code. Address byte-order mark problem read.met() tests. Change documentation hyperlinks plain-text. Change read.met() file encoding; remove sample data. Speed tests.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-172","dir":"Changelog","previous_headings":"","what":"oce 1.7.2","title":"oce 1.7.2","text":"Remove link https://pubs.usgs.gov/pp/1395/report.pdf, reported unreachable attempted CRAN submission version 1.7.1.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-171","dir":"Changelog","previous_headings":"","what":"oce 1.7.1","title":"oce 1.7.1","text":"Fix error comparing class() result string, reported error attempted CRAN submission version 1.7.0.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-170","dir":"Changelog","previous_headings":"","what":"oce 1.7.0","title":"oce 1.7.0","text":"Fix CRAN-check warning 2 uninitialized variables r-devel-linux-x86_64-debian-gcc test system. (thank K. Hornik, email dated 2022-03-16 notifying us problem.) Fix CRAN-check error r-devel-linux-x86_6-debian-clang, r-devel-linux-x86_6-fedora-clang r-devel-linux-x86_6-fedora-gcc test systems, relating byte-order-mark test file, evidently treated differently different systems. Remove kriging example causes CRAN-check problems r-devel-linux-* machines (, curiously, machines systems). Change mapTissot() trim shapes earth limits. Alter NEWS.md file pkgdown::build_news() notice subsections. Add read.ctd.aml(). Change read.met() handle new encoding argument. Fix drawPalette() obey labels arguments. Fix plot.ctd() recognize =13 spice.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-161","dir":"Changelog","previous_headings":"","what":"oce 1.6.1","title":"oce 1.6.1","text":"Remove journal link become unavailable. Fix “length_1” error (thanks B. Ripley heads-).","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-160","dir":"Changelog","previous_headings":"","what":"oce 1.6.0","title":"oce 1.6.0","text":"Fix image-size declarations 3 man pages (required CRAN). Improve sub-class vignette.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-150","dir":"Changelog","previous_headings":"","what":"oce 1.5.0","title":"oce 1.5.0","text":"Add [[\"?\"]] facility objects. Add showNA argument vectorShow(). Add adpConvertRawToNumeric(). Add adpFlagPastBoundary(). Add ctdRepair(). Add labelWithUnit(). Add swSR(). Add swSstar(). Change .ctd() drop parameter, deprecated 4y ago. Change read.odf() handle CODE UNIT values. Change oce.plot.ts() adding simplify argument. Change plot.section(), correcting temperature label “T” adding many plot types. Change pwelch(), improving low-frequency results. Fix [[ yield ITS90 temperature classes, just ctd. Fix .ctd() handling temperature scale first argument. Fix .section() handling list argo objects first argument. Fix colormap() handling name argument. Mark byteToBinary() defunct (slated removal 1.6.0). Mark renameData() defunct (slated removal 1.6.0).","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-140","dir":"Changelog","previous_headings":"","what":"oce 1.4.0","title":"oce 1.4.0","text":"colormap() uses oceColorsViridis default colour scheme. download.topo() uses new NOAA server. mapPlot() docs warn problems version 0.9-8 sf package. plotProfile() handles units added columns. read.argo() reads metadata.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-130","dir":"Changelog","previous_headings":"","what":"oce 1.3.0","title":"oce 1.3.0","text":"Remove broken link (OK locally failing CRAN tests). Fix error example setFlags.ctd. Add addSpine() defining section spines. Add angle2hms(). Add argoJuldToTime(). Add data(amsr) improve subset.amsr(). Add data(tidalCurrent) dataset tidal currents Foreman. Add oceAxis(). Add preferAdjusted() argo-class data. Add read.ctd.odv(). Add snakeToCamel() convert variable names e.g. Argo NetCDF files. Add timeToArgoJuld(). Change drawPalette() default colour palette oce.colorsViridis(). Change imagep() default colour palette oce.colorsViridis(). Change plot.amsr() default colour palette oce.colorsViridis(). Change plot.section() default colour palette oce.colorsViridis(). Change plotTS() trim isopycnals realistic salinities temperatures. Change read.argo() data(argo) use camelCase metadata. Change user-oriented github website generator pkgdown. Extend [[,argo-method accept \"ID\" alternative \"id\". Extend .cm() accept adp adv objects. Extend oce.plot.ts(), adding argument logStyle. Extend read.adp.rdi() handle 38kHz RDI adp files. Extend read.argo() data(argo) adding three CYCLE variables. Extend read.ctd.sbe() handle 4 new (Beckman) oxygen variables. Extend read.ctd.sbe() handle .btl files. Fix plot.coastline error box drawing. Fix plotTS error auto-scaling S T mixed NA status. Fix subset.argo() error flags, location, *QC metadata. Remove dependence rgdal package, using sf map projections.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-120","dir":"Changelog","previous_headings":"","what":"oce 1.2.0","title":"oce 1.2.0","text":"Address argument doc/code warning blocked CRAN acceptance. Accommodate new ocedata (needed meet new CRAN dependency rule). Add oceRenameData() oceRenamemetadata(). Deprecate renameData(). Improve axis control mapPlot() plot.coastline. Remove addColumn(), ctdAddColumn(), ctdUpdateHeader(), findInOrdered(), mapMeridians(), mapZones(), oce..POSIXlt(), marked “Deprecated” past two CRAN releases. Extend read.met() read new Environment Canada data format. Handle upcoming rgdal/R-devel changes. Extend sectionSmooth() handle grids beyond data range. Extend read.adp.rdi() trim time longer data. Improve geodDist() handle second location correctly alongPath=FALSE. Improve vignettes. Fix itemized-list documentation problem pointed Kurt Hornik.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-11-1","dir":"Changelog","previous_headings":"","what":"oce 1.1-1","title":"oce 1.1-1","text":"CRAN release: 2019-06-17 Address “link-time-optimization” issues CRAN submission.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-11-0","dir":"Changelog","previous_headings":"","what":"oce 1.1-0","title":"oce 1.1-0","text":"fix argument error .C() call Extend read.odf() store ODF header list metadata. Add presentTime(). Add vignette subclassing oce. Extend sectionSmooth() handle output grid better, offer 2 new methods. Extend read.ctd.sbe() handle column names. Extend mapping code support i386/windows. Extend imagep() handle combined flipy ylim arguments better.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-10-1","dir":"Changelog","previous_headings":"","what":"oce 1.0-1","title":"oce 1.0-1","text":"CRAN release: 2018-10-04 Renamed 0.9-24, released OAR book publication.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-24","dir":"Changelog","previous_headings":"","what":"oce 0.9-24","title":"oce 0.9-24","text":"Extend read.odf() store ODF header metadata. Remove makeSection(), deprecate/defunct period ended. Make defunct: addColumn(), byteToBinary(), ctdAddColumn(), ctdUpdateHeader(), findInOrdered(), mapZones(), mapMeridians(), oce..POSIXlt(), oce.magic() Add .tidem(). Extend read.odf() handle multiple NULL_VALUEs. Improve handleFlags(). Add rotateAboutZ(). Add concatenate(). Add read.woa(). Extend colormap() include colfunction return value.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-23","dir":"Changelog","previous_headings":"","what":"oce 0.9-23","title":"oce 0.9-23","text":"CRAN release: 2018-01-28 tidem() permits inferred constituents tidem() follows T_TIDE phase convention adorn argument removed plot functions (defunct 1+ year) deprecate findInOrdered()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-22","dir":"Changelog","previous_headings":"","what":"oce 0.9-22","title":"oce 0.9-22","text":"CRAN release: 2017-08-28 plot.section() can use external bathymetry lowpass() added ctdTrim() can isolate upcasts deprecate byteToBinary() address CRAN NOTE UTF-8 strings data","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-21","dir":"Changelog","previous_headings":"","what":"oce 0.9-21","title":"oce 0.9-21","text":"CRAN release: 2017-03-30 adpEnsembleAverage() added mapCoordinateSystem() added woce-exchange missing-value inference woce-exchange autodetection, plus read data types download.amsr() updated data-server change download.met() added .ctd() can specify columns within argo data read.adp.rdi() handles file types larger RDI files read.odf() handles contradictory metadata better oce..POSIXlt() deprecated oceSetData() handles units better address R_registerRoutines build-time warning fix memory-usage error coastlineCut()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-20","dir":"Changelog","previous_headings":"","what":"oce 0.9-20","title":"oce 0.9-20","text":"CRAN release: 2016-11-19 remove observatory object type (changed format, seldom-used type) remove pangaea object type (undocumented format, seldom-used type) improvements BioArgo data Spanish translation Pablo Valdés make read.gps() handle files deprecate ctdAddColumn() ctdUpdateHeader() download.topo() added read.topo() updated handle new formats download.amsr() added composite() added addColumn() marked deprecated read.cm.s4() reads data file .cm() added read.odf() handles Aanderaa current meter data mapPlot() mapAxis() get cex.axis parameter subset(amsr) added; various amsr improvements","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-19","dir":"Changelog","previous_headings":"","what":"oce 0.9-19","title":"oce 0.9-19","text":"CRAN release: 2016-07-08 deprecate adorn argument plot functions make read.ctd() obey missingValue (renamed) improve map projections add renameData() improve support SBE files remove .beam(), .xyz(), .enu() coordinate(), since x[[\"coordinate\"]] now permits simply replace several function-style accessors [[ style fix test-suite error relating rgdal change add handleFlags() generic plus specifics ctd argo classes use S4 documentation, e.g. ?\"plot.ctd\" instead ?plot.ctd add subset(argo, \"adjusted\") make read.argo() read documented data metadata fields add trimString()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-18","dir":"Changelog","previous_headings":"","what":"oce 0.9-18","title":"oce 0.9-18","text":"CRAN release: 2016-02-12 improve plot.coastline() mapPlot() add support G1SST satellite objects now metadata items units flags ctdTrim() method renamed: old B new ; old C new B support channels features rsk files .adp() added convert argo objects sections makeSection() deprecated; use .section() instead read.adp.rdi() handles Teledyne/RDI vsn 23.19 bottom-track data geodXyInverse() added; geod functions now spell longitude etc read.odf() speeded factor 30 add colour palettes cmocean Python package Kristen Thyng add .oce() rename drifter class argo recognize actually handles add oceColorsViridis() interpBarnes() new argument pregrid binMean2D() new argument flatten data(topoWorld) now longitude -179.5 180 ODF2oce() added read.odf() handles data types read.adp.rdi() reads VmDas (navigational) data -90 now default temperature unit ctd objects can vector longitude latitude logger class renamed rsk bremen class added coastlineCut() added rgdal package used instead local PROJ.4 source code mapproj-style map projections eliminated","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-17","dir":"Changelog","previous_headings":"","what":"oce 0.9-17","title":"oce 0.9-17","text":"CRAN release: 2015-05-22 remove exit() call C function","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-16","dir":"Changelog","previous_headings":"","what":"oce 0.9-16","title":"oce 0.9-16","text":"CRAN release: 2015-05-21 cite PROJ.4 contributors DESCRIPTION address package-build warnings; improve DESCRIPTION (thanks, BR)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-15","dir":"Changelog","previous_headings":"","what":"oce 0.9-15","title":"oce 0.9-15","text":"plot.echosounder() gets new argument drawPalette data(landsat) taken ocedata (shrunk) data(nao) data(soi) moved ocedata mapTissot() added read.logger() ctd-type data infers salinity necessary ctdTrim() can “method” function .topo() can convert “bathy” objects marmap package \"+.section\" renamed sectionAddStation() oceApprox() renamed oce.approx(), alias compatibility oce.grid() added \"tdr\" class renamed \"logger\" swCSTp() added swConductivity() now swThermalConductivity(); using Caldwell (1974). many sw() functions handle eos=“gsw” library(gsw) replaces teos() curl() added handle new NOAA ascii topography dataset type mapGrid() added data(soi) moved ocedata package lonlat2map() added map2lonlat() made accurate permit proj4 style map projections landsat-7 (possibly 4 5) support landsat decimation/plotting improvements drifterGrid() added mapDirectionField() added mapArrows() added read.index() added utm2lonlat() lonlat2utm() added data(met) changed time Hurricane Juan","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-14","dir":"Changelog","previous_headings":"","what":"oce 0.9-14","title":"oce 0.9-14","text":"CRAN release: 2014-05-19 fix compile-time warning colormap() added, functionality added imagep() drawPalette() imagep() drawPalette() new arg. axisPalette (suggested C. Richards) drawPalette() new args: plot, pos, levels, cex.axis ctdDecimate() permits user-supplied method function data(nao) added; data(soi) updated, names improved latter landsat support added plotProfile() plotTS() get new argument pt.bg plot.section() grids data needed rename sealevelHalifax dataset sealevel translate axis names (Spanish, French, German Mandarin) plotProfile() now ytype=\"depth\" mapImage() friends now demand map exists first runlm() added mapScalebar() added subset.topo() added read.topo() now handles GEBCO NetCDF files decimate() now handles topo objects reverse oce.colorsGebco colours water drawIsopycnals() plotTS(): improve isopycnal labels ctdDecimate() handles new method unesco coastline improvements (now 3 resolutions) webtide() improvements read.observatory() added read.ctd.itp() added mapImage() speeded (60X 1deg SST example) binApply1D() binApply2D() added binCount1D(), binMean1D(), binCount2D(), binMean2D() added numberAsHMS() added gps data type added (provisionally) various functions: reorder arguments putting longitude latitude magneticField() replaces magneticDeclination() ungrid() added mapPlot(): improve zone meridian aesthetics detrend() returns list detrend vector coefs decodeTime() improvements interpBarnes() new argument trim standardDepths() added mapLongitudeLatitudeXY() added read.ctd.woce() now accepts format used Arctic scientists swRrho() added plotProfile() now accepts type=“o” read.adv.nortek(): read salinity ctdDecimate(): fix bug NULL columns [issue 327] plot.section() now chooses best coastline file swPressure() added ctdFindProfiles() added .ctd(): new arguments filename etc remove oceBisect(), merely reproduces uniroot() move large/specialized datasets library(ocedata)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-13","dir":"Changelog","previous_headings":"","what":"oce 0.9-13","title":"oce 0.9-13","text":"CRAN release: 2014-01-29 prepare upcoming release R-devel","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-12","dir":"Changelog","previous_headings":"","what":"oce 0.9-12","title":"oce 0.9-12","text":"CRAN release: 2013-07-05 move vignette source directory","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-11","dir":"Changelog","previous_headings":"","what":"oce 0.9-11","title":"oce 0.9-11","text":"numberAsPOSIXct() now handles types “sas” “spss” data(turbulence) added plot.echosounder(): use white -threshold values plot.echosounder(): add arg beam e.g. display Sv read.echosounder(): handle dual-beam split-beam data read.echosounder(): decode bottom-pick swSoundAbsorption() read.adp() doc improved regarding variable orientation RDI files","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-10","dir":"Changelog","previous_headings":"","what":"oce 0.9-10","title":"oce 0.9-10","text":"CRAN release: 2013-05-19 improve line breaks help pages (thanks, B. Ripley)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-9","dir":"Changelog","previous_headings":"","what":"oce 0.9-9","title":"oce 0.9-9","text":"mapPlot() uses … graphical parameters (e.g. cex) labelling axes fix recent bug reading CNV files (issue 318) plotTS(...,mar=NULL) now avoids setting par(mar)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-8","dir":"Changelog","previous_headings":"","what":"oce 0.9-8","title":"oce 0.9-8","text":"CRAN release: 2013-04-25 fix memory error teos handler (thanks, B. Ripley)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-7","dir":"Changelog","previous_headings":"","what":"oce 0.9-7","title":"oce 0.9-7","text":"make ctdTrim() work R 3.0 support adp vmdas nav data (coded Clark Richards) approx3d(): added drawPalette(): new arg fullpage plot.lobo(): add arg read.coastline.openstreetmap() added data(levitus) added plot.coastline() gets new arguments projection etc use mapPlot() mapContour() permits first argument topo object mapPlot() gets new arguments axes, bg, fill, drawBox","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-6","dir":"Changelog","previous_headings":"","what":"oce 0.9-6","title":"oce 0.9-6","text":"CRAN release: 2012-12-16 address compilation error Windows-64 platform make long-running operations interruptible oceApprox(): permit equal x values [issue 279]","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-5","dir":"Changelog","previous_headings":"","what":"oce 0.9-5","title":"oce 0.9-5","text":"CRAN release: 2012-12-15 halve package check time","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-4","dir":"Changelog","previous_headings":"","what":"oce 0.9-4","title":"oce 0.9-4","text":".section() added add data(endeavour) add map projections, provisional functions mapPlot() etc plot.ctd(): add argument add add crude mapping support interpBarnes(): add args xgl ygl read.section(): add directory argument sectionSmooth(): add barnes method oce.plot.ts() oce.axis.POSIXct(): add tformat argument read.aquadopp() cousins added [issues 253 258] read.ctd() guesses waterDepth supplied [issue 253] plotTS(): extend isopycnal range [issue 252] plot.section() contouring improved data(oceans) added data(papa) added fillGap() works matrices well vectors read.lobo() flexible column names imagep(..., axes=FALSE): longer plots axis box [issue 249] oce.plot.ts(): alter time auto-ranging method oceBisect(): increase generality function whose root sought plotTS(): clean axes isopycnals drawn teos10: update test values (help PB) read.adp.nortek(): handle missing argument documented beamUnattenuateAdp() renamed beamUnspreadAdp() plotTS() plotProfile(): permit type=n plotProfile() ytype=\"z\": fix bug y label improve error message TEOS-10 missing","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-3","dir":"Changelog","previous_headings":"","what":"oce 0.9-3","title":"oce 0.9-3","text":"CRAN release: 2012-09-04 example(riley): remove error R-devel plot.ctd() =7 improvement swSCTp(): accept conductivity mS/cm S/m .ctd(): accept TEOS-10 values SA CT make TEOS routines resistant unphysical values","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-2","dir":"Changelog","previous_headings":"","what":"oce 0.9-2","title":"oce 0.9-2","text":"CRAN release: 2012-07-29 remove unwanted files build process","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-09-1","dir":"Changelog","previous_headings":"","what":"oce 0.9-1","title":"oce 0.9-1","text":"pwelch(): fix bug frequency tidem(): add argument regress rename oce.plot.sticks() plotSticks(); delete stickplot() use S4 style plot() methods data(giss) added data(topo2) added plotPolar() added oce.magic() new name magic(); renamed oceMagic() 0.9-15 errorBars() added numberAsPOSIXct() add leap second July 2012","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-08-10","dir":"Changelog","previous_headings":"","what":"oce 0.8-10","title":"oce 0.8-10","text":"CRAN release: 2012-06-12 plot.topo(): automatic cut-point shift add support Nortek aquadopp-profiler instruments oce.contour() added lisst class added plotTaylor() added oce..raw() added binmap() added","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-08-9","dir":"Changelog","previous_headings":"","what":"oce 0.8-9","title":"oce 0.8-9","text":"CRAN release: 2012-05-25 make newly-added TEOS-10 functions compile Windows","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-08-8","dir":"Changelog","previous_headings":"","what":"oce 0.8-8","title":"oce 0.8-8","text":"CRAN release: 2012-05-23 data(cm) added plot.coastline(): improve argument geographical add prettyPosition() add grad() add (preliminary) support TEOS-10, installed separately add integrateTrapezoid() plotTS(): add argument teos add teos() interface TEOS-10 library add moonAngle() plus astronomy functions, e.g. julianDay()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-08-7","dir":"Changelog","previous_headings":"","what":"oce 0.8-7","title":"oce 0.8-7","text":"CRAN release: 2012-04-05 plotInset(): remove bg fg arguments plotTS(): add bg argument rename dt object functions tdr plotTS(): add argument inset read.adp.rdi(): fix bug bottom-tracking; add soundSpeed vector data(echosounder) created formatPosition() created plot(echosounder): new arguments atTop labelsTop adp objects now also hold percent good RDI instruments plot.drifter(): improve multi-panel plots imagep(): add argument missingColor imagep() drawPalette(): add arguments labels ","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-08-6","dir":"Changelog","previous_headings":"","what":"oce 0.8-6","title":"oce 0.8-6","text":"CRAN release: 2012-03-04 imagep(): permit POSIXt type zlim","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-08-5","dir":"Changelog","previous_headings":"","what":"oce 0.8-5","title":"oce 0.8-5","text":"reconstruct data(ctd) plot focus maps better plotInset() added grid() works oce-based time axes imagep(..., filledContours): obey ylab argument subset(): permit subsetting ADP pressure oce.plot.ts(): obey arguments xaxt yaxt improve support shapefile coastlines","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-08-4","dir":"Changelog","previous_headings":"","what":"oce 0.8-4","title":"oce 0.8-4","text":"CRAN release: 2011-12-19 replace center argument plotting topography coastline clatitude clongitude add echosounder class fullFilename(): handle URLs properly ADV objects: add access slow variables (e.g. headingSlow)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-08-3","dir":"Changelog","previous_headings":"","what":"oce 0.8-3","title":"oce 0.8-3","text":"CRAN release: 2011-11-18 add met class subset.oce() handles section objects draw.section(): permit xtype=\"latitude\" \"longitude\" imagep() drawPalette=“space” option","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-08-2","dir":"Changelog","previous_headings":"","what":"oce 0.8-2","title":"oce 0.8-2","text":"CRAN release: 2011-11-03 fix bug read.coastline(), reversing lon lat (issue 162) fix bug S4 adp validity checker geodDist(): add argument alongPath remove compilation warning doc summary.ctd()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-08-1","dir":"Changelog","previous_headings":"","what":"oce 0.8-1","title":"oce 0.8-1","text":"CRAN release: 2011-10-26 switch S4 classes, add new accessors show functions. add support RBR rsk files plot.section() now uses col supplied","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-07-1","dir":"Changelog","previous_headings":"","what":"oce 0.7-1","title":"oce 0.7-1","text":"CRAN release: 2011-10-07 improve oce.colorsJet() improve plotProfile() vertical range missing data add data(drag) plotProfile() plot.ctd(): add xtype=\"spice\" add data(geosecs235) plotProfile() plot.ctd(): add argument keepNA .ctd(): add arguments missingValue read.lobo(): tolerate formats, including missing velocities add data(schmitt) add accessor spice() handle O2 nutrients CTD data sections swSCTp(): use surface pressure default plotTS(): add arguments inSitu `referencePressure. plotTS(): handle section objects fix bugs reported issues 150, 151, 153, 155, 156 imagep(): change default drawContours FALSE","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-06-1","dir":"Changelog","previous_headings":"","what":"oce 0.6-1","title":"oce 0.6-1","text":"CRAN release: 2011-09-01 add adv dataset generalize swN2() adding new arg derivs oce.plot.ts() gets new arg axes add accessor distance() rename plotTS() plotScan() avoid S3 check warnings switch makeFilter() argument asKernel default TRUE","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-05-1","dir":"Changelog","previous_headings":"","what":"oce 0.5-1","title":"oce 0.5-1","text":"CRAN release: 2011-07-26 add support ARGO drifters latitude() longitude(): new argument repeat byDepth addCtdColumn(): replace column already exists add CTD accessors lat, lon, pressure, salinity, temperature","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-04-1","dir":"Changelog","previous_headings":"","what":"oce 0.4-1","title":"oce 0.4-1","text":"CRAN release: 2011-07-23 plot.sealevel(): show 3 panels, clarity plot.ctd(): add argument type imagep(): handle x, y, z image() oce.plot.ts(): inferred ylim matches data range within provided xlim read.adv.nortek(): handle extra analog data add CTD accessors longitude(), latitude(), time(), elevation(), etc","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-03-1","dir":"Changelog","previous_headings":"","what":"oce 0.3-1","title":"oce 0.3-1","text":"CRAN release: 2011-06-22 add read.oce.odf() add findInOrdered generalize tidem() argument list read.adv.nortek(): handle burst-mode data add datasets wilson, redfieldNP, redfieldNC, redfieldPlankton, riley change data(ctd) derived data(ctdRaw) change monitor=FALSE reading functions add accessor functions heading(), latitude(), longitude(), pitch(), pressure(), processingLog(), roll(), salinity(), temperature(), time(), velocity() rename history `processingLog. flatten data objects 1 level thick (future matlab exports) add threenum() added, use summaries (speed)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-02-3","dir":"Changelog","previous_headings":"","what":"oce 0.2-3","title":"oce 0.2-3","text":"head.adp() added tail.adp() added extract() added","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-02-2","dir":"Changelog","previous_headings":"","what":"oce 0.2-2","title":"oce 0.2-2","text":"CRAN release: 2011-05-09 velocityStatistics() added new names: oceApprox() integerToAscii() rangeLimit() ctdRaw topoInterpolate() added numberAsPOSIXct(): add type argos rename beamAttenuateAdp() beamUnattenuateAdp()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-02-1","dir":"Changelog","previous_headings":"","what":"oce 0.2-1","title":"oce 0.2-1","text":"CRAN release: 2011-04-28 camel-case function argument names (NEWS file)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-01-83","dir":"Changelog","previous_headings":"","what":"oce 0.1-83","title":"oce 0.1-83","text":"add binAverage() fillGap(): add rule argument, analogous approx() add rescale() read.pt(): fix timing error; use .pt() create return value add .pt() read.adp.rdi() uses checksums number..POSIXct(type=\"gps\"): account leap seconds","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-01-82","dir":"Changelog","previous_headings":"","what":"oce 0.1-82","title":"oce 0.1-82","text":"CRAN release: 2011-03-21 remove warning occurs R 2.13.0 (alpha) number..POSIXct(): accept GPS times rename e.g. adv.2enu() .enu.adv() speed conversion ADP ADV enu factor 10 change RDI coordinate handling rename match.bytes() `matchBytes() add drawPalette() remove matlab2POSIXt(), now sub-case number..POSIXct() number..POSIXct(): added oceBiset(): added despike(): add argument action detrend(): added read.adp.sontek(): handle PCADP type read.adp.sontek.serial(): added read.section(): handle WOCE quality flags salinity retime(): added read.adv.sontek.serial(): correct error class c despike(): use string value argument method logger.toc(): fix bug discovering files ranging days .ctd(): make temperature salinity vectors, already plot.TS(): add argument use.smoothScatter oce.debug(): flush console printing message sw.theta(): rename method possibilities, lower case sw functions, rename pref reference.pressure read.ctd(): fix bug getting start.time time formats pwelch() added plot.sealevel(): make y axis obey range data subset, xlim given adp.2enu() added coastline.world: improve resolution factor 4 read.ctd.woce(): infer water depth max(pressure) header section.smooth(): handle misordered stations; handle missing values better plot.section(): allow strings ; improve contouring plot.ctd() plot.profile(): add use.smoothScatter argument coriolis(): improve omega value","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-01-81","dir":"Changelog","previous_headings":"","what":"oce 0.1-81","title":"oce 0.1-81","text":"CRAN release: 2010-10-18 add despike() add range.limit() add unabbreviate.time() add support bottom-tracking RDI ADCPs add support interocean s4 current meters add unwrap.angle() read.adv.nortek(): detect velocity range add processing.log.add(), alternative processing.log.append() plot.ctd(): add plot types; =9 salinity, density .ctd(): improve flexibilty predict.tidem(): add newdata argument adv.2enu() added adp.xyz2enu(): make correct heading.bias make.filter(): can now produce tskernel type improve (temporarily limit) fill.gap plot.adp(): add use.layout argument window.oce() added make objects remember full filename, just local filename (issue8) plot.tidem(): remove argument plot.type, using instead read.pt(): add arguments , , fix issue 57; read.adp.rdi() read heading incorrectly add “rr” method ctdDecimate() oceApprox() added topoWorld dataset added plot.ctd(): default, make coastlines extend box boundaries reformulate sun.angle R fix google-code issue 56; plot.topo() accept land.z=NULL] fix google-code issue 55; plot.topo() go past poles] fix google-code issue 54; plot.topo() resetting par() exit] fix google-code issue 53; interp.barnes() gives poor error msg mismatched x y fix google-code issue 52; plot.section() draws incorrect bottom shape","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-01-80","dir":"Changelog","previous_headings":"","what":"oce 0.1-80","title":"oce 0.1-80","text":"CRAN release: 2009-11-05 add sun.angle; tested yet; needs R reformulation fix google-code issue 51; summary.section() report water depth fix google-code issue 50; non-bug relating sun elevation fix google-code issue 49; demo(TS) broken","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-01-79","dir":"Changelog","previous_headings":"","what":"oce 0.1-79","title":"oce 0.1-79","text":"CRAN release: 2009-10-26 fix google-code issue 48; oce.plot.sticks() ignored page ratio fix google-code issue 47; read new MEDS sealevel format","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-01-78","dir":"Changelog","previous_headings":"","what":"oce 0.1-78","title":"oce 0.1-78","text":"CRAN release: 2009-10-02 add data(RRprofile) plot.TS(), add arguments lwd.rho lty.rho","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-01-77","dir":"Changelog","previous_headings":"","what":"oce 0.1-77","title":"oce 0.1-77","text":"CRAN release: 2009-09-13 refactor adp code wrt transformation matrices add matrix.smooth() improve labels oce.axis.POSIXct() set default debug argument getOption(“oceDebug”) functions plot.profile(): add argument ytype; change type xtype add `swZ() add oce.smooth() add read.adv(), etc., supporting Nortek Sontek devices add read.adp(), etc., supporting Nortek, RDI Sontek devices add oce.plot.ts() add imagep() add bcd2integer() add matlab2POSIXt() plot functions, add mgp mar arguments plot.pt(): add plim Tlim arguments. gravity(): give default latitude argument. plot.sealevel(): remove argument focus.time add argument . rename tdr functions pt, reflect common phrasing. add geod.xy(). add argument mgp plotting functions. use abbreviations axis names space tight. add argument adorn plot() functions. add oce.colorsTwo(), oce.colorsJet(), oce.colorsPalette(). add byte2binary() add “lty.grid” CTD plotting functions add “+.section”, convenient way build sections stations rework summary() existing objects .sealevel(): rename sampling.interval deltat","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-01-76","dir":"Changelog","previous_headings":"","what":"oce 0.1-76","title":"oce 0.1-76","text":"CRAN release: 2009-03-02 sw.N2(): make tolerate NAs; adjust df make result smoother add makeFilter() add decimate(), may eventually replace ctd.decimate() read.tdr(): handle 5-column data files; add tz argument plot.profile(): add types sigma+dpdt sigma+time ctdTrim(): add pmin parameter plot.ctd(): add Slim, Tlim, plim, lonlim, latlim args; add maps add coastline.sle dataset plot.TS(): fix isopycnal labels fresh water; add args Slim, Tlim read.ctd(): make understand another SBE format add parseLatlon() oce.edit(): add argument action add oce.write.table() add fillGap()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-01-75","dir":"Changelog","previous_headings":"","what":"oce 0.1-75","title":"oce 0.1-75","text":"CRAN release: 2009-01-06 add addColumn() add undriftTime() add tdrPatm() make readTdr() gather serial . info; show plot.pt() switch recommended version-number format remove section.subset(), replaced subset() improve log items functions read assemble oce objects add subset.oce() add header() add argument read.rbrdtr() make read.rbrdtr() understand headers better add arguments xtype ytype plot.section() improve accuracy bottom drawn plot.section() add section.smooth() fix bug making section.smooth() fail <4 good data level fix bug making summary.ctd() fail results section.smooth() fix bug making sw.dynamic.height() choke empty stations fix bug making plot.section() die x unordered rename rbrpt functions tdr functions, improving generality","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0174","dir":"Changelog","previous_headings":"","what":"oce 0.1.74","title":"oce 0.1.74","text":"CRAN release: 2008-11-18 add argument “src” .ctd() plot.section() RHS axis needs tics trim axis whitespace plot.profile() plot.TS() make read.oce() understand WOCE section type speed swSpice() add read.pt(), summary.pt(), plot.pt(), ptTrim() make plot.TS() isopycnal label size top right sides add lwd argument plot.profile() give plot.section() ability control contour levels labels give plot.section() tics station-location","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0173","dir":"Changelog","previous_headings":"","what":"oce 0.1.73","title":"oce 0.1.73","text":"CRAN release: 2008-09-14 plot.topo() narrows autoscale xlim-ylim region, provided add plot.ctd() arg textpanel, put profiles row fix bug plot.profile() let take Slim,…, args fix bug plot.profile() font size fix bug plot.profile(type=\"S_T\") positioning fix bug section plot (bottom missing) fix bug size salinity axis label plot.ctd() use pch=21 TS plots (data density visible)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0172","dir":"Changelog","previous_headings":"","what":"oce 0.1.72","title":"oce 0.1.72","text":"CRAN release: 2008-06-09 add interp.barnes()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0171","dir":"Changelog","previous_headings":"","what":"oce 0.1.71","title":"oce 0.1.71","text":"CRAN release: 2008-04-14 fix bug makeSection() (ignored list, list provided) add oce.edit(), later renamed oceEdit() add topoMaritimes dataset add read.topo(), plot.topo(), summary.topo() add gebcoColors() … renamed oce.colorsGebco() version 0.1.77 make plot.section() check pressures coincide","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0170","dir":"Changelog","previous_headings":"","what":"oce 0.1.70","title":"oce 0.1.70","text":"CRAN release: 2008-04-01 plot.TS(): make isopycnal list work better nearly-fresh water trimCtd(): improve equilibration-phase deletion read.ctd(): handle cases without cruise information scan column permit setting xlab ylab plot.TS() make processing log timestamps GMT add .windrose() plot.windrose() add sealevel.tuk sea-level dataset add tidem(), predict.tide(), summary.tide(), plot.tide(), data(tidedata)` establish uniform form objects created “read” “” let swRho() similar functions take ctd object single argument add swDynamicHeight() make section.grid() ctd.decimate() extrapolate surface add summary.oce() make objects inherit new class “oce” fix google-code issue 12: read.sealevel() hard-wired filename","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0169","dir":"Changelog","previous_headings":"","what":"oce 0.1.69","title":"oce 0.1.69","text":"CRAN release: 2007-12-14 modify documentation slightly start migration uniform object structures rename .CTD() .ctd(), make consistent similar functions add read.section() add sectionGrid(), grids p moment add a03 dataset (renamed section 0.9-13) fix SF bug 1833719: warnings read.ctd() fix google-code issue 8: read.coastline() producing data improve ability trimCtd() ignore spurious initial data add “connectPoints” option plot.TS() add “station” item “ctd” object change .CTD() produce sigma.theta instead sigma","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0168","dir":"Changelog","previous_headings":"","what":"oce 0.1.68","title":"oce 0.1.68","text":"add coastline.world; increase resolution coastline.maritimes plot.TS() longer rotates RH margin isopycnal labels","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0167","dir":"Changelog","previous_headings":"","what":"oce 0.1.67","title":"oce 0.1.67","text":"CRAN release: 2007-10-21 allow swRho() similar take matrices arguments S, T, etc","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0166","dir":"Changelog","previous_headings":"","what":"oce 0.1.66","title":"oce 0.1.66","text":"fix bug plot.TS() prevented showing isopycnals","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0165","dir":"Changelog","previous_headings":"","what":"oce 0.1.65","title":"oce 0.1.65","text":"switch UNESCO formulation sw potential temperature default prevent warnings C90 compiler machines","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0164","dir":"Changelog","previous_headings":"","what":"oce 0.1.64","title":"oce 0.1.64","text":"CRAN release: 2007-07-17 add read.oce(), generic function reading several oceanographic files make read.ctd() understand WOCE-exchange files make read.sealevel() understand comma-separated data MEDS make plot.sealevel() skip spectral graphs timeseries NA values improve aesthetics plot.ctd() extend plot.sealevel() adding focus.time argument add ctdDecimate() add oce..POSIXlt() add latlonFormat(), latFormat(), lonFormat() add .coastline() add make.section() add summary.section() add plot.section() add data(section)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0163","dir":"Changelog","previous_headings":"","what":"oce 0.1.63","title":"oce 0.1.63","text":"CRAN release: 2007-06-02 add swSoundSpeed()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0162","dir":"Changelog","previous_headings":"","what":"oce 0.1.62","title":"oce 0.1.62","text":"CRAN release: 2007-05-29 add historyAppend() (later named processingLogAppend()) related code improve ctdTrim()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0161","dir":"Changelog","previous_headings":"","what":"oce 0.1.61","title":"oce 0.1.61","text":"add rudimentary read/summary/plot functions lobo datasets","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0160","dir":"Changelog","previous_headings":"","what":"oce 0.1.60","title":"oce 0.1.60","text":"add vignette; address build-stage warning messages","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0159","dir":"Changelog","previous_headings":"","what":"oce 0.1.59","title":"oce 0.1.59","text":"CRAN release: 2007-05-20 set data files permit latin1 encoding content","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0158","dir":"Changelog","previous_headings":"","what":"oce 0.1.58","title":"oce 0.1.58","text":"rename seawater-related functions e.g. swTheta(), allow atmospheric analogs","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0157","dir":"Changelog","previous_headings":"","what":"oce 0.1.57","title":"oce 0.1.57","text":"make .CTD() accept length(p)=1 e.g. surface plots","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0156","dir":"Changelog","previous_headings":"","what":"oce 0.1.56","title":"oce 0.1.56","text":"make read.coastline() handle S files","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0155","dir":"Changelog","previous_headings":"","what":"oce 0.1.55","title":"oce 0.1.55","text":"keep swTheta() complaining length(p) equals 1","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0154","dir":"Changelog","previous_headings":"","what":"oce 0.1.54","title":"oce 0.1.54","text":"add swAlpha() swBeta()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0153","dir":"Changelog","previous_headings":"","what":"oce 0.1.53","title":"oce 0.1.53","text":"add swAlphaOverBeta()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0152","dir":"Changelog","previous_headings":"","what":"oce 0.1.52","title":"oce 0.1.52","text":"document use df swN2(), plot.ctd(), etc.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0151","dir":"Changelog","previous_headings":"","what":"oce 0.1.51","title":"oce 0.1.51","text":"permit swRho() (similar) take NAs args (bug B32)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0150","dir":"Changelog","previous_headings":"","what":"oce 0.1.50","title":"oce 0.1.50","text":"permit swRho() descendants take scalar pressure.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0149","dir":"Changelog","previous_headings":"","what":"oce 0.1.49","title":"oce 0.1.49","text":"add .CTD()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0148","dir":"Changelog","previous_headings":"","what":"oce 0.1.48","title":"oce 0.1.48","text":"add \"UNESCO1983\" formulation swTheta() alternative","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0147","dir":"Changelog","previous_headings":"","what":"oce 0.1.47","title":"oce 0.1.47","text":"speed swTheta() moving vector work R C","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0146","dir":"Changelog","previous_headings":"","what":"oce 0.1.46","title":"oce 0.1.46","text":"make geodDist() accept vector location 1 scalar location 2","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0145","dir":"Changelog","previous_headings":"","what":"oce 0.1.45","title":"oce 0.1.45","text":"make read.coastline() understand matlab Splus formats","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0144","dir":"Changelog","previous_headings":"","what":"oce 0.1.44","title":"oce 0.1.44","text":"make plot.coastline() scale lat lon correctly","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0143","dir":"Changelog","previous_headings":"","what":"oce 0.1.43","title":"oce 0.1.43","text":"add read.coastline(), summary.coastline(), plot.coastline()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0142","dir":"Changelog","previous_headings":"","what":"oce 0.1.42","title":"oce 0.1.42","text":"add .sealevel()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0141","dir":"Changelog","previous_headings":"","what":"oce 0.1.41","title":"oce 0.1.41","text":"add read.sealevel(), summary.sealevel(), plot.sealevel()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0140","dir":"Changelog","previous_headings":"","what":"oce 0.1.40","title":"oce 0.1.40","text":"add name option plot.ctd.scan()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0139","dir":"Changelog","previous_headings":"","what":"oce 0.1.39","title":"oce 0.1.39","text":"add lapse.rate()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0138","dir":"Changelog","previous_headings":"","what":"oce 0.1.38","title":"oce 0.1.38","text":"fix B27 (header updated columns added read.ctd)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0137","dir":"Changelog","previous_headings":"","what":"oce 0.1.37","title":"oce 0.1.37","text":"rename ctdTrim() rename ctdWrite()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0136","dir":"Changelog","previous_headings":"","what":"oce 0.1.36","title":"oce 0.1.36","text":"add write.ctd() add ctdAddColumn() add ctdUpdateHeader()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0135","dir":"Changelog","previous_headings":"","what":"oce 0.1.35","title":"oce 0.1.35","text":"add plot.ctd.scan()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0134","dir":"Changelog","previous_headings":"","what":"oce 0.1.34","title":"oce 0.1.34","text":"make read.ctd() calculate S missing C, T, p given add swSCTp()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0133","dir":"Changelog","previous_headings":"","what":"oce 0.1.33","title":"oce 0.1.33","text":"add swConductivity()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0132","dir":"Changelog","previous_headings":"","what":"oce 0.1.32","title":"oce 0.1.32","text":"rename oceRho() swRho()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0131","dir":"Changelog","previous_headings":"","what":"oce 0.1.31","title":"oce 0.1.31","text":"use namespace","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0130","dir":"Changelog","previous_headings":"","what":"oce 0.1.30","title":"oce 0.1.30","text":"add oce.viscosity()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0129","dir":"Changelog","previous_headings":"","what":"oce 0.1.29","title":"oce 0.1.29","text":"fix B23 (done yet) fix B22 (done within oce; done system level)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0128","dir":"Changelog","previous_headings":"","what":"oce 0.1.28","title":"oce 0.1.28","text":"add pressure method trimCtd()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0127","dir":"Changelog","previous_headings":"","what":"oce 0.1.27","title":"oce 0.1.27","text":"vectorize swRho() since slow large datasets","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0126","dir":"Changelog","previous_headings":"","what":"oce 0.1.26","title":"oce 0.1.26","text":"make demo(oce.ctd) print data","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0125","dir":"Changelog","previous_headings":"","what":"oce 0.1.25","title":"oce 0.1.25","text":"fix documentation errors 2.0.0 CHECK noticed","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0124","dir":"Changelog","previous_headings":"","what":"oce 0.1.24","title":"oce 0.1.24","text":"profiles correct y-axis OSX port, must first e.g. export PKG_LIBS=\"-L/sw/lib\"","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0123","dir":"Changelog","previous_headings":"","what":"oce 0.1.23","title":"oce 0.1.23","text":"OSX port (must first export PKG_LIBS=\"-L/sw/lib\")","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0122","dir":"Changelog","previous_headings":"","what":"oce 0.1.22","title":"oce 0.1.22","text":"add trim.ctd()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0121","dir":"Changelog","previous_headings":"","what":"oce 0.1.21","title":"oce 0.1.21","text":"permit lat/lon “N”-type indicator start","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0120","dir":"Changelog","previous_headings":"","what":"oce 0.1.20","title":"oce 0.1.20","text":"fix bug B16 (label isopycnals TS diagram)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0119","dir":"Changelog","previous_headings":"","what":"oce 0.1.19","title":"oce 0.1.19","text":"make read.ctd() handle file types","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0118","dir":"Changelog","previous_headings":"","what":"oce 0.1.18","title":"oce 0.1.18","text":"add oceCoriolis(), oceDepth(), oceGravity(), oceTFreeze()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0117","dir":"Changelog","previous_headings":"","what":"oce 0.1.17","title":"oce 0.1.17","text":"add oceSpecificHeat() oce.N2(); fix bug B18","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0116","dir":"Changelog","previous_headings":"","what":"oce 0.1.16","title":"oce 0.1.16","text":"get data(ctd) working","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0115","dir":"Changelog","previous_headings":"","what":"oce 0.1.15","title":"oce 0.1.15","text":"add oceSTRho()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0114","dir":"Changelog","previous_headings":"","what":"oce 0.1.14","title":"oce 0.1.14","text":"fix bug B15 (maybe)","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0113","dir":"Changelog","previous_headings":"","what":"oce 0.1.13","title":"oce 0.1.13","text":"add oceTSRho","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0112","dir":"Changelog","previous_headings":"","what":"oce 0.1.12","title":"oce 0.1.12","text":"fix bugs B10, B11, B13","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0111","dir":"Changelog","previous_headings":"","what":"oce 0.1.11","title":"oce 0.1.11","text":"fix bugs B6, B7, B12","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-0110","dir":"Changelog","previous_headings":"","what":"oce 0.1.10","title":"oce 0.1.10","text":"add geodDist(). add plot.ctd(), rudimentary now. fix bug B8.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-019","dir":"Changelog","previous_headings":"","what":"oce 0.1.9","title":"oce 0.1.9","text":"add spice() function","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-018","dir":"Changelog","previous_headings":"","what":"oce 0.1.8","title":"oce 0.1.8","text":"permit eos functions handle missing values fix bug B4","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-017","dir":"Changelog","previous_headings":"","what":"oce 0.1.7","title":"oce 0.1.7","text":"add summary.ctd() method. make read.ctd() return object type ctd. get tests/ working.","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-016","dir":"Changelog","previous_headings":"","what":"oce 0.1.6","title":"oce 0.1.6","text":"create tests/oce.test1.R","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-015","dir":"Changelog","previous_headings":"","what":"oce 0.1.5","title":"oce 0.1.5","text":"add oceSigma(), oceSigmaT(), oceSigmaTheta()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-014","dir":"Changelog","previous_headings":"","what":"oce 0.1.4","title":"oce 0.1.4","text":"permit various EOS functions handle lists fix bug B3","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-013","dir":"Changelog","previous_headings":"","what":"oce 0.1.3","title":"oce 0.1.3","text":"add ocerho()","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-012","dir":"Changelog","previous_headings":"","what":"oce 0.1.2","title":"oce 0.1.2","text":"fix file-path bug fix bug B2","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-011","dir":"Changelog","previous_headings":"","what":"oce 0.1.1","title":"oce 0.1.1","text":"add theta() fix bug B1","code":""},{"path":"https://dankelley.github.io/oce/news/index.html","id":"oce-010","dir":"Changelog","previous_headings":"","what":"oce 0.1.0","title":"oce 0.1.0","text":"add read.ctd()","code":""}]
