sl.grid.addinfo | R Documentation |
Add additional variables from a spheRlab grid list to a corresponding CDO grid file (NetCDF). SHOULD BE DEPRECATED NOW THAT sl.grid.writeCDO CAN WRITE TO NetCDF DIRECTLY.
sl.grid.addinfo(grid, ncdf.file.in, ncdf.file.out = paste0(ncdf.file.in,"_addinfo.nc"), add.cell_area = TRUE, add.node_node_links = TRUE, add.triag_nodes = TRUE, add.coast = TRUE)
grid |
a spheRlab grid list as returned by |
ncdf.file.in |
a character specifying the path and file name of the file to which additional grid variables shall be added. |
ncdf.file.out |
a character specifying the path and file name of the output file. |
add.cell_area |
a logical value indicating whether or not to add cell (stamp polygon) areas. |
add.node_node_links |
a logical value indicating whether or not to add node-node links. |
add.triag_nodes |
a logical value indicating whether or not to add triangular element triplets. |
add.coast |
a logical value indicating whether or not to add coast information. |
This is a special function that is typically used when converting FESOM grid information to a CDO-readable format, see the example below.
Helge Goessling
sl.grid.readFESOM
, sl.grid.writeCDO
## Not run:
grid = sl.grid.readFESOM(griddir="PATH-TO-YOUR-FESOM-GRID",rot=TRUE,rot.invert=TRUE,rot.abg=c(50,15,-90))
ofile = "~/sl.grid.CDO"
sl.grid.writeCDO(grid,ofile=ofile)
system(paste0("cdo -f nc const,0,",ofile," ",ofile,".nc"))
sl.grid.addinfo(grid,ncdf.file.in=paste0(ofile,".nc"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.