sl.grid.writeZAXIS | R Documentation |
Write a z-axis description file that can be used to set the z-axis of a 3D data file with the Climate Data Operators (CDO).
sl.grid.writeZAXIS(grid = NULL, levels = NULL, bounds = NULL, zaxistype = "depth_below_sea", ofile = "~/sl.grid.zaxis.txt", overwrite = FALSE, verbose = TRUE)
grid |
a spheRlab grid list as returned by |
levels |
|
bounds |
|
zaxistype |
a character specifying the z-axis type. Default is |
ofile |
a character specifying the path and file name of the output file. |
overwrite |
a logical value indicating whether or not to overwrite an already existing file. |
verbose |
a logical value indicating whether or not print statements shall report on the function progess. |
See the CDO operator 'setzaxis' to set the z-axis of a corresponding FESOM file.
Helge Goessling
sl.grid.readFESOM
, sl.grid.writeCDO
## Not run:
# In this example a 'backward rotation' is performed, assuming that the original mesh coordinates are rotated;
# if that's not the case (which is now default), set 'rot=FALSE' or leave it unspecified (default is FALSE).
grid = sl.grid.readFESOM(griddir="PATH-TO-YOUR-FESOM-GRID",rot=TRUE,rot.invert=TRUE,rot.abg=c(50,15,-90))
# Write a corresponding z-axis description file that can be used with CDO to set the z-axis of a FESOM file ('cdo setzaxis,~/zaxis.txt ifile.nc ofile.nc')
res = sl.grid.writeZAXIS(grid,ofile="~/zaxis.txt")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.