Description Usage Arguments Value Examples
Clip a netcdf file to a specific latlon box
1 2 3 4 |
ff |
This is the file to clip. |
vars |
Select the variables you want. If this is not given, all variables will be regridded. |
lon_range |
longitude range. c(min_longituse, max_longitude). |
lat_range |
latitude range. c(min_latitude, max_latitude). |
vert_range |
This is the range of depths for vertical clipping, if wanted. c(min_depth, max_depth) |
date_range |
This is the range of dates you want. c(date_min, date_max). "day/month/year" character string format. |
months |
Months you want. c(month_1, month_2,...). Coerced to integer if numeric. |
years |
Months you want. c(year_1, year_2,...). Coerced to integer if numeric. |
out_file |
The name of the file output. If this is not stated, a data frame will be the output. |
cdo_output |
set to TRUE if you want to see the cdo output |
zip_file |
Do you want any output file to be zipped to save space. Default is FALSE. |
overwrite |
Do you want to overwrite out_file if it exists? Defaults to FALSE |
data frame or netcdf file.
1 2 3 4 5 6 7 8 9 10 11 | # Clipping data from the NOAA World Ocean Atlas sample file.
ff <- system.file("extdata", "woa18_decav_t01_01.nc", package = "rcdo")
# clip to a specific depth range using vert_range
nc_clip(ff, vert_range = c(1, 5))
# clip to a specific longitude and latitude box
# Clipping to the region around the UK
uk_sst <- nc_clip(ff, lon_range = c(-12, 10), lat_range = c(48, 62))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.