compass.ocean.vertical.zlevel.init_z_level_vertical_coord¶
- compass.ocean.vertical.zlevel.init_z_level_vertical_coord(config, ds)[source]¶
Create a z-level vertical coordinate based on the config options in the
vertical_grid
section and thebottomDepth
andssh
variables of the mesh data set.The following new variables will be added to the data set:
minLevelCell
- the index of the top valid layermaxLevelCell
- the index of the bottom valid layercellMask
- a mask of where cells are validlayerThickness
- the thickness of each layerrestingThickness
- the thickness of each layer stretched as ifssh = 0
zMid
- the elevation of the midpoint of each layer
So far, all supported coordinates make use of a 1D reference vertical grid. The following variables associated with that field are also added to the mesh:
refTopDepth
- the positive-down depth of the top of each ref. levelrefZMid
- the positive-down depth of the middle of each ref. levelrefBottomDepth
- the positive-down depth of the bottom of each ref. levelrefInterfaces
- the positive-down depth of the interfaces between ref. levels (withnVertLevels
+ 1 elements).vertCoordMovementWeights
- the weights (all ones) for coordinate movement
There is considerable redundancy between these variables but each is sometimes convenient.
- Parameters:
config (compass.config.CompassConfigParser) – Configuration options with parameters used to construct the vertical grid
ds (xarray.Dataset) – A data set containing
bottomDepth
andssh
variables used to construct the vertical coordinate