Description Usage Arguments Value Examples
Collect Psi or Theta in a netCDF file
1 2 3 4 5 6 | buildnetCDF(psi, filename = "/home/ecor/psi.nc",
CRSdefault = "+ellps=WGS84 +proj=tmerc +lat_0=46.0 +lon_0=11 +k=1 +x_0=0 +y_0=0 +units=m +no_defs",
time = 1:length(psi), depth = 1:nlayers(psi[[1]]), overwrite = TRUE,
dimTime = "Time", dimDepth = "Depth", units_Time = "hour",
units_Depth = "meter", units = "meter", name = "psi", longname = name,
...)
|
psi |
variable, a list of |
filename |
string containing full name of the netCDF file |
overwrite |
logical value. Default is |
dimTime, dimDepth |
string containing the name for time or (vartical) depth netCDF dimension respectively. |
units_Time, units_Depth |
string containing the units for time or (vartical) depth netCDF dimension respectively. |
name, longname |
string containing the name or the long name of |
... |
further arguments. |
CRSDefaul |
string with CRS default (used if it is missing in |
Function returns a netCF object containg the psi
variable information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | data(PsiTheta)
filename="/home/ecor/psi.nc"
nc <- buildnetCDF(psi,filename=filename)
nc_close(nc)
psiz <- lapply(X=psi,FUN=function(x) {is.na(x)*0+1:nlayers(x)})
psit <- psiz
for (i in 1:length(psit)) {
psit[[i]] <- psit[[i]]*0+i
}
ft="/home/ecor/psi_ft.nc"
fz="/home/ecor/psi_fz.nc"
ncz <- buildnetCDF(psiz,filename=fz)
nct <- buildnetCDF(psit,filename=ft)
nc_close(ncz)
nc_close(nct)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.