NOTE/TODO: gvc2zax is not (yet) part of the getm-utils repository. It should be added ASAP. Bjarne.
gvc2zax converts data from GETM netcdf output in general vertical coordinates into data on an equidistant z-grid.
TODO: Need edit - present version is simple copy from previous location at http://getm.eu/
It is assumed that the input netCDF file has GETM output style:
h(time,level,y,x)Usage
gvc2zax [ -x xstart,xsteps -y ystart,ysteps -t timestart,timesteps ]
-z [max_z(N),delta_z(N),num_z(N):max_z(N-1),delta_z(N-1),num_z(N-1):...] or [z(N):z(N-1):...] -Z [inverse of -z] [-p -i -s -b -e -f] -v var1,var2,..
[ -gmt {xy,xz,yz,bo} ] input-ncfile [ output-ncfile ]
Options
-help prints help-string
-x sets start index and steps for x-range
-y sets start index and steps for y-range
-t sets start index and steps for time-range
-z sets z-grid. This grid needs its maximum_depth in m,
its z-layer height in m and the number of z-layers.
-gmt sets the slicetype to create 2d-GMT-gridfiles
possible slicetypes are:
bo: bottom value
xy: xy-slice at a certain depth
xz: xz-slice at a certain y-value
yz: yz-slice at a certain x-value
gvc2zax creates a gridfile for every timestep and every fixed 3rd dimension.
These files are named: Variable_TimeIndex_3rdDimIndex.grd
Additional to these files, gvc2zax creates a bath.xy file
with xy-data to create a bottom-polygon in GMT.
-v gives the list of 4D-variables to interpolate
-i The first index of z-values is at the surface (default is at max_depth
-p Waterdepth is given with positive values (default is negative values)
-s Fill surface value from surface to max_height=max_depth+n_zax*delta_z
-b Fill bottom value from max_depth to bottom
-e Z-grid is elevation above sea-floor instead of below surface
-f Forces GETM flexible ouput detection if e.g 'level' variable does not exist
Examples
1. You want to convert variable temp and salt from file sylt.20lay-
ers.nc onto a 40 layer z-grid with maximum depth of 50m with a z-layer
every 1.2m for the whole timerange and y-range, but only for x-
index=20. The outputfile should be sylt.z.nc
gvc2zax -x 20,1 -z 50.0,1.2,40 -v temp,salt sylt.20layers.nc sylt.z.nc
2. You want to create a xz slice of variable uu and vv out of result.nc for
timeindex 20-25 and y-index 86 in a depth of 12m-15m in 10 vertical steps:
gvc2zax -t 20,6 -y 86,1 -z 15.0,0.3,10 -v uu,vv -gmt xz result.nc
creates uu_20_86.grd, uu_21_86.grd ... uu_25_86.grd and vv_20_86.grd,
vv_21_86.grd ... vv_25_86.grd and bath_86.xy
Author: Richard Hofmeister
Compilation:
In order to compile the program, you need to set two environment variables:
NETCDFLIBDIR - path to netcdf lib directory
NETCDFINC - path to netcdf include directory
See [BuildInstructions].
Both variables are needed to compile GETM itself, so
it may not be necessary to re-set the two variables
in your system.
You can build the program by:
sh/bash style shell:
:::bash
cd src
export NETCDFLIBDIR=/path/to/netcdf/lib
export NETCDFINC=/path/to/netcdf/include
make
csh/tcsh style shell:
:::tcsh
cd src
set NETCDFLIBDIR /path/to/netcdf/lib
set NETCDFINC /path/to/netcdf/include
make
This should generate a bin/ directory and put the executable for gvc2zax in it. It is called "gvc2zax"
The following targets are allowed:
A usage string is implemented within the binary.
Run the program with option '-help', e,g, as
./bin/gvc2zax -help
For more help on usage see the manpage, located under this directory's man folder. To be able to use man gvc2zax, you have to add the path to man-directory to your system's MANPATH.
Additional environment variables:
BINDIR: Install gvc2zax binary in this directory
Wiki: BuildInstructions
Wiki: GETM Utils
Anonymous