R/make360.R

Defines functions make360

# Convert Longitudes to (0,360)
# 'make360()' is an internal function that converts a vector of longitudes
# from (-180,180) to (0,360)
#
# lon  - A vector of longitudes
# return - A vector of longitudes all mapped to (0,360)
#

make360 <- function(lon) {

    ind <- which(lon < 0)
    lon[ind] <- lon[ind] + 360

  return(lon)
}

Try the rerddapXtracto package in your browser

Any scripts or data that you put into this service are public.

rerddapXtracto documentation built on Oct. 19, 2023, 1:06 a.m.