Sea surface analysis based on a tif file from


I am trying to plot the Sea Surface Temperature (SST). For that I downloaded a tif file from As you may find on the code (comments) I found that the values for the SST from this tiff file that I extract using the raster function are not the same they provide. Am I doing something wrong? Can I make an analysis based on a tiff file?

libs <-
  c("tidyverse" # Collection of packages (visualization, manipulation): ggplot2, dplyr, purrr, etc)

# install missing libraries
installed_libs <- libs %in% rownames(installed.packages())
if (any(installed_libs == F)) {

# load libraries
invisible(lapply(libs, library, character.only = T))

lat <- 51 # 30
lon <- .5 # 30
ortho <- paste0(
  '+proj=ortho +lat_0=',
  ' +lon_0=',
  ' +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs'

# first download zip file from:
sst_raw <- raster::raster("Ocean--Daily--Sea-Surface-Temperature--Global--2023-06-24--fullres/oisst-daily-cdr--4096x2051--2023-06-24.tif")
class(sst_raw) # "RasterLayer"



# raster to terra

sst_raw <- terra::rast(sst_raw)

terra::global(sst_raw, fun = "mean", na.rm=T)
terra::global(sst_raw, fun = "min", na.rm=T) # min 20 , should be around 28F
terra::global(sst_raw, fun = "max", na.rm=T) # max: 252, should be around 90F

# Why does the max and min values differ from that of the original tiff file. Information present
# in the zip file shows that the temperature should be between 28F and 90F?

Information present on the zip file downloaded from site:

Thank you very much,

Luis Barqueira

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.