#!/bin/sh

#  Defines a geometrical-progression vertical layering
#  For the CHIMERE model. It actually produces sets of
#  Hybrid sigma-p coefficients Ak and Bk such that the
#  pressure at top of layer k is Pk = Ak*1e5 + Bk*Ps in Pa
#  where Ps is Surface pressure

#  Define the parameters below and run the script by just typing "define_geom"

ptop=700    # Pressure at model top
nlay=8      # Number of layers
pre1=995    # Pressure (hPa) of the first layer top when Ps = 1000 hPa
fout=../data/vgrid/VCOORD.8GEOM700

echo ${nlay} ${pre1} ${ptop} | gawk -f geom.awk > ${fout}
