Description Usage Arguments Value Examples
This function allows you to remap a netcdf horizontally and vertically to a specific latlon box. It outputs a data frame with the mean value and the maximum depth used for the calculation.
1 2 3 |
ff |
This is the file to analyze. |
vars |
Select the variables you want to regrid. If this is not given, all variables will be regridded. |
vert_scale |
This is the vertical scale you want. c(min_depth, max_depth, vertical_resolution). |
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. |
expr |
This is a cdo expression to apply to the data before a vertical mean is calculated. |
na_value |
This is a value in the raw netcdf file that needs to be treated as an na. |
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 |
overwrite |
Do you want to overwrite out_file if it exists? Defaults to FALSE |
... |
Additional terms to be sent to nc_remap2 |
data frame or netcdf file.
1 2 3 4 | # Calculating vertical mean NOAA world ocean atlas data to the region around the UK
ff <- system.file("extdata", "woa18_decav_t01_01.nc", package = "rcdo")
# calculate vertical mean of temperature between 5 and 30 m, using a resolution of 5 for vertical interpolation
nc_vertmean(ff, vars = "t_an", vert_scale = c(5, 30, 5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.