readice: Read from NSIDC 25km polar sea ice.

readiceR Documentation

Read from NSIDC 25km polar sea ice.

Description

Sea ice at 25km for either hemisphere.

Usage

readice_daily(
  date,
  time.resolution = "daily",
  product = "nsidc",
  hemisphere = c("south", "north", "both"),
  xylim = NULL,
  setNA = TRUE,
  rescale = FALSE,
  latest = TRUE,
  returnfiles = FALSE,
  ...,
  inputfiles = NULL,
  resample = "bilinear"
)

readice(
  date,
  time.resolution = "daily",
  product = "nsidc",
  hemisphere = c("south", "north", "both"),
  xylim = NULL,
  setNA = TRUE,
  rescale = FALSE,
  latest = TRUE,
  returnfiles = FALSE,
  ...,
  inputfiles = NULL,
  resample = "bilinear"
)

readice_monthly(
  date,
  time.resolution = "monthly",
  product = "nsidc",
  hemisphere = c("south", "north"),
  xylim = NULL,
  setNA = TRUE,
  rescale = TRUE,
  latest = TRUE,
  returnfiles = FALSE,
  ...,
  inputfiles = NULL
)

Arguments

date

date or dates of data to read, see Details

time.resolution

time resoution data to read, daily or monthly

product

choice of sea ice product, see Details

hemisphere

north or south (or both, if 'both' xylim should be an actual raster or terra grid)

xylim

spatial extents to crop from source data, can be anything accepted by extent

setNA

mask zero and values greater than 100 as NA

rescale

rescale values from integer range?

latest

if TRUE and date input is missing, return the latest time available otherwise the earliest

returnfiles

ignore options and just return the file names and dates

...

passed to brick, primarily for filename

inputfiles

input the files data base to speed up initialization

resample

warper resampling method used when 'xylim' is a full grid

extension

default for product "amsr" is "hdf" but can be "tif" , extension = "hdf"

Details

This function relies on the file-listing of icfiles().

Currently available products are

'nsidc'

daily or monthly NSIDC concentration data, processed by the SMMR/SSMI NASA Team

Dates are matched to file names by finding the nearest match in time within a short duration. If date is greater than length 1 then the sorted set of unique matches is returned.

For NSIDC data a ratifyied raster is returned if setNA and rescale are both set to FALSE. Use levels(x) to return the data.frame of values and levels (there's no straight-through rule, all numeric values are explicit along with special values like "Unused"). The values used are documented here http://nsidc.org/data/docs/daac/nsidc0051_gsfc_seaice.gd.html

If 'both' is specified for hemisphere or if 'xylim' is a full raster grid, the warper is applied to VRT versions of the NSIDC files, which allows them to be combined in one reprojection step. In this case 'xylim' can be specified, to give a projected grid of any form. ' If not supplied (when hemisphere = 'both') then longlat raster at 0.25 degrees is assumed. ('xylim' can be specified as ' a target grid and with only north or south hemisphere applied). When the warper is used, 'setNA' and 'resample' behave the same ' way, though exact results will be different depending on the value of 'resample'.

Value

raster object

See Also

icefiles for details on the repository of data files, raster for the return value

Examples

library(raadtools)
 
ice <- readice(latest = TRUE)

## can read one or other hemisphere in native projection
readice(hemisphere = "south")
readice(hemisphere = "north")
## or we can read both, and get longlat by default
readice(hemisphere = "both")
## or set our own grid and read to that
## spex::buffer_extent(extent(c(-.5, .5, -1, 1)* rad * pi), 25000)
tm_ex <- c(-.5, .5, -1, 1) * 20025000 
tm_template <- raster(extent(tm_ex), res = 25000, crs = "+proj=tmerc")
readice(hemisphere = "both", xylim = tm_template)

## this means we can run extract on global ice, and get 0 in the middle
## extract(readice, data.frame(176, c(-72, 84), as.Date("2020-04-03") + c(0, 100)))
## [1]  80 NA
## extract(readice, data.frame(176, c(-72, 84), as.Date("2020-04-03") + c(0, 100)), hemisphere = "both")
 ## [1]  78.0 94.4  ## it's interpolated from the original data

AustralianAntarcticDivision/raadtools documentation built on Nov. 14, 2024, 4:27 p.m.