dimlength {ncdfCF} | R Documentation |
With this method the lengths of all dimensions of a dataset or a variable are returned. Note that a dataset may have more dimensions than a variable from the same dataset: other variables may use different dimensions.
## S4 method for signature 'ncdfVariable'
dim(x)
## S4 method for signature 'ncdfDataset'
dim(x)
x |
An instance of |
Named integer vector of dimension sizes of dimensions in x
.
fn <- system.file("extdata",
"pr_day_EC-Earth3-CC_ssp245_r1i1p1f1_gr_20240101-20241231_vncdfCF.nc",
package = "ncdfCF")
ds <- open_ncdf(fn)
# ncdfDataset
dim(ds)
# ncdfVariable
dim(ds[["pr"]])