#!/bin/csh -x
#PBS -N pp_archm
#PBS -j oe
#PBS -o XXX.log
#PBS -W umask=027
#PBS -l application=home-grown
#PBS -l select=1:ncpus=24
#PBS -l walltime=0:05:00
#PBS -A NRLSS03755018
#PBS -q debug
#
set echo
set time = 1
C
#setenv OS `uname`
setenv OS 'HPE'
switch ($OS)
case 'SunOS':
case 'Linux':
    which aprun
    if (! $status) then
C --- XT4, XT5 or XC30
      setenv OS XT4
      setenv SRC ~/HYCOM-tools/mom6/src
      set APRUN='aprun -n 1'
    endif
    breaksw
default:
    setenv SRC ~/HYCOM-tools/mom6/src
    set APRUN=''
endsw
#
# --- convert a partial HYCOM blkdat.input to a mom6_vgrid.nc
# depthi : profile from climatology GDEM4 30W,15S
#
# --- R is region name.
# --- E is expt number.
#
setenv R GLBb0.08
setenv E 010
#
cd $HOME/HYCOM3-examples/${R}/topo
#
/bin/rm -f mom6_vgrid.nc
${APRUN} ${SRC}/hycom2vgrid <<E-o-D
  64      'kdm   ' = number of layers
  64      'nhybrd' = number of hybrid levels (0=all isopycnal)
   0      'nsigma' = number of sigma  levels (nhybrd-nsigma z-levels)
1.437967  'dp00  ' = deep    z-level spacing minimum thickness (m)
 225.0    'dp00x ' = deep    z-level spacing maximum thickness (m)
1.086278  'dp00f ' = deep    z-level spacing stretching factor (1.0=const.space)
1.437967  'ds00  ' = shallow z-level spacing minimum thickness (m)
 225.0    'ds00x ' = shallow z-level spacing maximum thickness (m)
1.086278  'ds00f ' = shallow z-level spacing stretching factor (1.0=const.space)
   2      'thflag' = reference pressure flag (0=Sigma-0, 2=Sigma-2)
   0      'vsigma' = spacially varying isopycnal target densities (0=F,1=T)
  01.00   'sigma ' = layer  1 isopycnal target density (sigma units)
  01.2000 'sigma ' = layer 02 isopycnal target density (sigma units)
  01.4000 'sigma ' = layer 03 isopycnal target density (sigma units)
  01.6000 'sigma ' = layer 04 isopycnal target density (sigma units)
  29.300  'sigma ' = layer 05 isopycnal target density (sigma units)
  29.700  'sigma ' = layer 06 isopycnal target density (sigma units)
  30.100  'sigma ' = layer 07
  30.500  'sigma ' = layer 08 isopycnal target density (sigma units)
  30.725  'sigma ' = layer 09
  30.950  'sigma ' = layer 10 isopycnal target density (sigma units)
  31.225  'sigma ' = layer
  31.500  'sigma ' = layer
  31.775  'sigma ' = layer
  32.050  'sigma ' = layer
  32.325  'sigma ' = layer
  32.600  'sigma ' = layer
  32.875  'sigma ' = layer
  33.150  'sigma ' = layer
  33.425  'sigma ' = layer
  33.700  'sigma ' = layer
  33.975  'sigma ' = layer 21
  34.250  'sigma ' = layer 22 isopycnal target density (sigma units)
  34.500  'sigma ' = layer 23
  34.750  'sigma ' = layer 24 isopycnal target density (sigma units)
  34.950  'sigma ' = layer 25
  35.150  'sigma ' = layer 26 isopycnal target density (sigma units)
  35.325  'sigma ' = layer 27
  35.500  'sigma ' = layer 28 isopycnal target density (sigma units)
  35.650  'sigma ' = layer 29
  35.800  'sigma ' = layer 30 isopycnal target density (sigma units)
  35.920  'sigma ' = layer
  36.040  'sigma ' = layer
  36.120  'sigma ' = layer
  36.200  'sigma ' = layer
  36.290  'sigma ' = layer
  36.380  'sigma ' = layer
  36.450  'sigma ' = layer
  36.520  'sigma ' = layer
  36.570  'sigma ' = layer
  36.620  'sigma ' = layer
  36.660  'sigma ' = layer 41
  36.700  'sigma ' = layer 42 isopycnal target density (sigma units)
  36.735  'sigma ' = layer 43
  36.770  'sigma ' = layer 44 isopycnal target density (sigma units)
  36.800  'sigma ' = layer 45
  36.830  'sigma ' = layer 46 isopycnal target density (sigma units)
  36.860  'sigma ' = layer 47
  36.890  'sigma ' = layer 48 isopycnal target density (sigma units)
  36.930  'sigma ' = layer 49
  36.970  'sigma ' = layer 50 isopycnal target density (sigma units)
  36.995  'sigma ' = layer 51
  37.020  'sigma ' = layer 52
  37.040  'sigma ' = layer 53
  37.060  'sigma ' = layer 54
  37.075  'sigma ' = layer 55
  37.090  'sigma ' = layer 56
  37.100  'sigma ' = layer 57
  37.110  'sigma ' = layer 58
  37.120  'sigma ' = layer 59
  37.130  'sigma ' = layer 60
  37.140  'sigma ' = layer 61
  37.150  'sigma ' = layer 62 isopycnal target density (sigma units)
  37.175  'sigma ' = layer 63
  37.200  'sigma ' = layer 64 isopycnal target density (sigma units)
   0.01   'frcomp' = fraction of compressibility to apply   (0.0 to 1.0)
  34.7    'salref' = reference salinity for compressibility (psu)
    0.000 'depthi' = interface  0  target depth for compressibility (m)
    1.438 'depthi' = interface  1  target depth for compressibility (m)
    3.000 'depthi' = interface  2  target depth for compressibility (m)
    4.697 'depthi' = interface  3  target depth for compressibility (m)
    6.540 'depthi' = interface  4  target depth for compressibility (m)
    8.542 'depthi' = interface  5  target depth for compressibility (m)
   10.717 'depthi' = interface  6  target depth for compressibility (m)
   13.080 'depthi' = interface  7  target depth for compressibility (m)
   15.646 'depthi' = interface  8  target depth for compressibility (m)
   18.434 'depthi' = interface  9  target depth for compressibility (m)
   21.463 'depthi' = interface  10  target depth for compressibility (m)
   24.752 'depthi' = interface  11  target depth for compressibility (m)
   28.326 'depthi' = interface  12  target depth for compressibility (m)
   32.208 'depthi' = interface  13  target depth for compressibility (m)
   36.425 'depthi' = interface  14  target depth for compressibility (m)
   41.005 'depthi' = interface  15  target depth for compressibility (m)
   45.981 'depthi' = interface  16  target depth for compressibility (m)
   69.067 'depthi' = interface  17  target depth for compressibility (m)
   84.859 'depthi' = interface  18  target depth for compressibility (m)
  118.457 'depthi' = interface  19  target depth for compressibility (m)
  153.836 'depthi' = interface  20  target depth for compressibility (m)
  171.443 'depthi' = interface  21  target depth for compressibility (m)
  189.389 'depthi' = interface  22  target depth for compressibility (m)
  209.230 'depthi' = interface  23  target depth for compressibility (m)
  231.489 'depthi' = interface  24  target depth for compressibility (m)
  257.295 'depthi' = interface  25  target depth for compressibility (m)
  286.870 'depthi' = interface  26  target depth for compressibility (m)
  319.934 'depthi' = interface  27  target depth for compressibility (m)
  354.309 'depthi' = interface  28  target depth for compressibility (m)
  396.555 'depthi' = interface  29  target depth for compressibility (m)
  442.268 'depthi' = interface  30  target depth for compressibility (m)
  483.582 'depthi' = interface  31  target depth for compressibility (m)
  529.266 'depthi' = interface  32  target depth for compressibility (m)
  574.020 'depthi' = interface  33  target depth for compressibility (m)
  633.493 'depthi' = interface  34  target depth for compressibility (m)
  715.024 'depthi' = interface  35  target depth for compressibility (m)
  805.619 'depthi' = interface  36  target depth for compressibility (m)
  903.548 'depthi' = interface  37  target depth for compressibility (m)
  997.034 'depthi' = interface  38  target depth for compressibility (m)
 1074.214 'depthi' = interface  39  target depth for compressibility (m)
 1148.416 'depthi' = interface  40  target depth for compressibility (m)
 1216.743 'depthi' = interface  41  target depth for compressibility (m)
 1280.389 'depthi' = interface  42  target depth for compressibility (m)
 1345.322 'depthi' = interface  43  target depth for compressibility (m)
 1409.160 'depthi' = interface  44  target depth for compressibility (m)
 1474.411 'depthi' = interface  45  target depth for compressibility (m)
 1543.994 'depthi' = interface  46  target depth for compressibility (m)
 1623.093 'depthi' = interface  47  target depth for compressibility (m)
 1742.195 'depthi' = interface  48  target depth for compressibility (m)
 1924.855 'depthi' = interface  49  target depth for compressibility (m)
 2145.940 'depthi' = interface  50  target depth for compressibility (m)
 2443.511 'depthi' = interface  51  target depth for compressibility (m)
 2863.667 'depthi' = interface  52  target depth for compressibility (m)
 3250.325 'depthi' = interface  53  target depth for compressibility (m)
 3521.510 'depthi' = interface  54  target depth for compressibility (m)
 3716.948 'depthi' = interface  55  target depth for compressibility (m)
 3864.899 'depthi' = interface  56  target depth for compressibility (m)
 3979.754 'depthi' = interface  57  target depth for compressibility (m)
 4103.424 'depthi' = interface  58  target depth for compressibility (m)
 4235.238 'depthi' = interface  59  target depth for compressibility (m)
 4388.214 'depthi' = interface  60  target depth for compressibility (m)
 4548.450 'depthi' = interface  61  target depth for compressibility (m)
 4905.561 'depthi' = interface  62  target depth for compressibility (m)
 5030.000 'depthi' = interface  63  target depth for compressibility (m)
 5130.000 'depthi' = interface  64  target depth for compressibility (m)
E-o-D
/bin/mv mom6_vgrid.nc mom6_vgrid_64l.nc

