Description Usage Arguments Value Examples
This function allows you to remap a netcdf horizontally and vertically to any set of latlon coordinates.
1 2 3 |
ff |
This is the file to regrid. |
vars |
Select the variables you want to regrid. If this is not given, all variables will be regridded. |
coords |
A 2 column matrix or data frame of the form (longitude, latitude) with coordinates for regridding. This can be regular or irregular. The function will calculate which it is. |
out_file |
The name of the file output. If this is not stated, a data frame will be the output. |
zip_file |
Do you want any output file to be zipped to save space. Default is FALSE. |
cdo_output |
set to TRUE if you want to see the cdo output |
remapping |
The type of remapping. bil = bilinear. nn = nearest neighbour. dis = distance weighted. |
na_value |
This is a value in the raw netcdf file that needs to be treated as an na.#' |
overwrite |
Do you want to overwrite out_file if it exists? Defaults to FALSE |
... |
optional arguments to be sent to nc_clip if you need to clip prior to remapping.#' |
data frame or netcdf file.
1 2 3 4 5 6 7 8 | # Remapping NOAA world ocean atlas data to the region around the UK
ff <- system.file("extdata", "woa18_decav_t01_01.nc", package = "rcdo")
# remapping to 1 degree resolution across all depth layers
uk_coords <- expand.grid(Longitude = seq(-20, 10, 1), Latitude = seq(48, 62, 1))
nc_remap(ff, vars = "t_an", coords = uk_coords)
# remapping to 1 degree resolution for 5, 50 and 100 metres in the region around the uk
nc_remap(ff, vars = "t_an", coords = uk_coords, vert_depths = c(5, 50, 100))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.