Commits (6)
Package: easyNCDF
Title: Tools to Easily Read/Write NetCDF Files into/from Multidimensional R
Arrays
Version: 0.1.0
Version: 0.1.1
Authors@R: c(
person("BSC-CNS", role = c("aut", "cph")),
person("Nicolau", "Manubens", , "nicolau.manubens@bsc.es", role = c("aut")),
person("Nuria", "Perez-Zanon", , "nuria.perez@bsc.es", role = c("ctb", "cre"), comment = c(ORCID = "0000-0001-8568-3071")))
person("Nuria", "Perez-Zanon", , "nuria.perez@bsc.es", role = c("ctb"), comment = c(ORCID = "0000-0001-8568-3071")),
person("An-Chi", "Ho", , "an.ho@bsc.es", role = c("cre")))
Description: Set of wrappers for the 'ncdf4' package to simplify and extend its
reading/writing capabilities into/from multidimensional R arrays.
Depends:
......@@ -14,9 +15,8 @@ Imports:
ncdf4,
ClimProjDiags,
abind
License: LGPL-3
URL: https://earth.bsc.es/gitlab/es/easyNCDF/wikis/home
BugReports: https://earth.bsc.es/gitlab/es/easyNCDF/issues
LazyData: true
License: Apache License 2.0
URL: https://earth.bsc.es/gitlab/es/easyNCDF/-/wikis/home
BugReports: https://earth.bsc.es/gitlab/es/easyNCDF/-/issues
SystemRequirements: netcdf development libraries
RoxygenNote: 5.0.0
RoxygenNote: 7.0.1
#'Save multidimensional R arrays into NetCDF files
#'
#'@author N. Manubens \email{nicolau.manubens at bsc.es}
#'@author N. Manubens \email{nicolau.manubens@bsc.es}
#'@description This function takes as input one or a list of multidimensional R arrays and stores them in a NetCDF file, using the \code{ncdf4} package. The full path and name of the resulting file must be specified. Metadata can be attached to the arrays and propagated into the NetCDF file in 3 possible ways:\cr
#' \itemize{
#' \item{Via the list names if a list of arrays is provided:}{Each name in the input list, corresponding to one multidimensional array, will be interpreted as the name of the variable it contains.\cr
......
#'Close a NEtCDF File
#'
#'@author N. Manubens \email{nicolau.manubens at bsc.es}
#'@author N. Manubens \email{nicolau.manubens@bsc.es}
#'
#'@description Close a \code{ncdf4} open connection to a file.
#'
......
#'Open a NetCDF File
#'
#'@author N. Manubens \email{nicolau.manubens at bsc.es}
#'@author N. Manubens \email{nicolau.manubens@bsc.es}
#'
#'@description Silently opens a NetCDF file with \code{ncdf4::nc_open}. Returns NULL on failure.
#'
......
#'Read Dimensions of a NetCDF File
#'
#'@author N. Manubens \email{nicolau.manubens at bsc.es}
#'@author N. Manubens \email{nicolau.manubens@bsc.es}
#'@description Reads the dimension names and sizes of a set of variables in a NetCDF file, using the package \code{ncdf4}. The different variables in the file are considered to be stored along a dimension called 'var', so reading the dimensions of a variable 'foo' with dimensions 'lat' and 'lon' would result in a vector with the format c('var' = 1, 'lat' = n_lats, 'lon' = n_lons).
#'
#'@param file_to_read Path to the file to be read or a NetCDF object as returned by \code{easyNCDF::NcOpen} or \code{ncdf4::nc_open}.
......
#'Read Names of Variables in a NetCDF File
#'
#'@author N. Manubens \email{nicolau.manubens at bsc.es}
#'@author N. Manubens \email{nicolau.manubens@bsc.es}
#'
#'@description Reads the names of the variables in a NetCDF file and returns them as a vector of character strings.
#'
......
#'Read Names of Variables in a NetCDF File
#'
#'@author N. Manubens, \email{nicolau.manubens at bsc.es}
#'@author N. Manubens, \email{nicolau.manubens@bsc.es}
#'
#'@description Reads the names of the variables in a NetCDF file and returns them as a vector of character strings.
#'
......
......@@ -197,6 +197,5 @@ ArrayToNc(list(tos, lon, lat), 'tmp.nc')
}
\author{
N. Manubens \email{nicolau.manubens at bsc.es}
N. Manubens \email{nicolau.manubens@bsc.es}
}
......@@ -33,6 +33,5 @@ print(a)
print(a_from_file[1, , ])
}
\author{
N. Manubens \email{nicolau.manubens at bsc.es}
N. Manubens \email{nicolau.manubens@bsc.es}
}
......@@ -34,6 +34,5 @@ print(a_from_file[1, , ])
}
\author{
N. Manubens \email{nicolau.manubens at bsc.es}
N. Manubens \email{nicolau.manubens@bsc.es}
}
......@@ -33,6 +33,5 @@ print(a_from_file[1, , ])
}
\author{
N. Manubens \email{nicolau.manubens at bsc.es}
N. Manubens \email{nicolau.manubens@bsc.es}
}
......@@ -34,6 +34,5 @@ print(a_from_file[1, , ])
}
\author{
N. Manubens \email{nicolau.manubens at bsc.es}
N. Manubens \email{nicolau.manubens@bsc.es}
}
......@@ -4,9 +4,15 @@
\alias{NcToArray}
\title{Read Names of Variables in a NetCDF File}
\usage{
NcToArray(file_to_read, dim_indices = NULL, vars_to_read = NULL,
drop_var_dim = FALSE, unlist = TRUE, expect_all_indices = FALSE,
allow_out_of_range = TRUE)
NcToArray(
file_to_read,
dim_indices = NULL,
vars_to_read = NULL,
drop_var_dim = FALSE,
unlist = TRUE,
expect_all_indices = FALSE,
allow_out_of_range = TRUE
)
}
\arguments{
\item{file_to_read}{Path to the file to be read or a NetCDF object as returned by \code{easyNCDF::NcOpen} or \code{ncdf4::nc_open}.}
......@@ -55,6 +61,5 @@ print(a_from_file[1, , ])
}
\author{
N. Manubens, \email{nicolau.manubens at bsc.es}
N. Manubens, \email{nicolau.manubens@bsc.es}
}