#!/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
#
# --- 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
  41      'kdm   ' = number of layers
  41      'nhybrd' = number of hybrid levels (0=all isopycnal)
   0      'nsigma' = number of sigma  levels (nhybrd-nsigma z-levels)
   1.00   'dp0k  ' = layer   1 deep    z-level spacing minimum thickness (m)
   1.80   'dp0k  ' = layer   2 deep    z-level spacing minimum thickness (m)
   3.24   'dp0k  ' = layer   3 deep    z-level spacing minimum thickness (m)
   4.68   'dp0k  ' = layer   4 deep    z-level spacing minimum thickness (m)
   4.93   'dp0k  ' = layer   5 deep    z-level spacing minimum thickness (m)
   5.81   'dp0k  ' = layer   6 deep    z-level spacing minimum thickness (m)
   6.87   'dp0k  ' = layer   7 deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   8 deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   9 deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer  10 deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer  11 deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer  12 deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer  13 deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer  14 deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   A deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   B deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   C deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   D deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   E deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   F deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   G deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   H deep    z-level spacing minimum thickness (m)
   8.00   'dp0k  ' = layer   I deep    z-level spacing minimum thickness (m)
  10.00   'dp0k  ' = layer  15 deep    z-level spacing minimum thickness (m)
  16.40   'dp0k  ' = layer  16 deep    z-level spacing minimum thickness (m)
  35.92   'dp0k  ' = layer  17 deep    z-level spacing minimum thickness (m)
  42.38   'dp0k  ' = layer  18 deep    z-level spacing minimum thickness (m)
  50.02   'dp0k  ' = layer  19 deep    z-level spacing minimum thickness (m)
  59.02   'dp0k  ' = layer  20 deep    z-level spacing minimum thickness (m)
  69.64   'dp0k  ' = layer  21 deep    z-level spacing minimum thickness (m)
  82.18   'dp0k  ' = layer  22 deep    z-level spacing minimum thickness (m)
  96.97   'dp0k  ' = layer  23 deep    z-level spacing minimum thickness (m)
 114.43   'dp0k  ' = layer  24 deep    z-level spacing minimum thickness (m)
 135.02   'dp0k  ' = layer  25 deep    z-level spacing minimum thickness (m)
 159.33   'dp0k  ' = layer  26 deep    z-level spacing minimum thickness (m)
 188.01   'dp0k  ' = layer  27 deep    z-level spacing minimum thickness (m)
 221.84   'dp0k  ' = layer  28 deep    z-level spacing minimum thickness (m)
 261.78   'dp0k  ' = layer  29 deep    z-level spacing minimum thickness (m)
 400.00   'dp0k  ' = layer  30 deep    z-level spacing minimum thickness (m)
 600.00   'dp0k  ' = layer  31 deep    z-level spacing minimum thickness (m)
 600.00   'dp0k  ' = layer  32 deep    z-level spacing minimum thickness (m)
   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.10   'sigma ' = layer  2 isopycnal target density (sigma units)
  01.20   'sigma ' = layer  3 isopycnal target density (sigma units)
  01.30   'sigma ' = layer  4 isopycnal target density (sigma units)
  01.40   'sigma ' = layer  5 isopycnal target density (sigma units)
  01.50   'sigma ' = layer  6 isopycnal target density (sigma units)
  01.60   'sigma ' = layer  7 isopycnal target density (sigma units)
  01.70   'sigma ' = layer  8 isopycnal target density (sigma units)
  01.80   'sigma ' = layer  9 isopycnal target density (sigma units)
  01.90   'sigma ' = layer 10 isopycnal target density (sigma units)
  02.00   'sigma ' = layer 11 isopycnal target density (sigma units)
  02.10   'sigma ' = layer 12 isopycnal target density (sigma units)
  02.20   'sigma ' = layer 13 isopycnal target density (sigma units)
  02.30   'sigma ' = layer 14 isopycnal target density (sigma units)
  30.65   'sigma ' = layer  A isopycnal target density (sigma units)
  31.35   'sigma ' = layer  B isopycnal target density (sigma units)
  31.95   'sigma ' = layer  C isopycnal target density (sigma units)
  32.55   'sigma ' = layer  D isopycnal target density (sigma units)
  33.15   'sigma ' = layer  E isopycnal target density (sigma units)
  33.75   'sigma ' = layer  F isopycnal target density (sigma units)
  34.30   'sigma ' = layer  G isopycnal target density (sigma units)
  34.80   'sigma ' = layer  H isopycnal target density (sigma units)
  35.20   'sigma ' = layer  I isopycnal target density (sigma units)
  35.50   'sigma ' = layer 15 isopycnal target density (sigma units)
  35.80   'sigma ' = layer 16 isopycnal target density (sigma units)
  36.04   'sigma ' = layer 17 isopycnal target density (sigma units)
  36.20   'sigma ' = layer 18 isopycnal target density (sigma units)
  36.38   'sigma ' = layer 19 isopycnal target density (sigma units)
  36.52   'sigma ' = layer 20 isopycnal target density (sigma units)
  36.62   'sigma ' = layer 21 isopycnal target density (sigma units)
  36.70   'sigma ' = layer 22 isopycnal target density (sigma units)
  36.77   'sigma ' = layer 23 isopycnal target density (sigma units)
  36.83   'sigma ' = layer 24 isopycnal target density (sigma units)
  36.89   'sigma ' = layer 25 isopycnal target density (sigma units)
  36.97   'sigma ' = layer 26 isopycnal target density (sigma units)
  37.02   'sigma ' = layer 27 isopycnal target density (sigma units)
  37.06   'sigma ' = layer 28 isopycnal target density (sigma units)
  37.10   'sigma ' = layer 29 isopycnal target density (sigma units)
  37.17   'sigma ' = layer 30 isopycnal target density (sigma units)
  37.30   'sigma ' = layer 31 isopycnal target density (sigma units)
  37.42   'sigma ' = layer 32 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.00000 'depthi' = interface 00 target depth for compressibility (m)
  1.00000 'depthi' = interface 01 target depth for compressibility (m)
  2.80000 'depthi' = interface 02 target depth for compressibility (m)
  6.04000 'depthi' = interface 03 target depth for compressibility (m)
  10.7200 'depthi' = interface 04 target depth for compressibility (m)
  15.6500 'depthi' = interface 05 target depth for compressibility (m)
  21.4600 'depthi' = interface 06 target depth for compressibility (m)
  28.3300 'depthi' = interface 07 target depth for compressibility (m)
  36.3300 'depthi' = interface 08 target depth for compressibility (m)
  44.3300 'depthi' = interface 09 target depth for compressibility (m)
  52.3300 'depthi' = interface 10 target depth for compressibility (m)
  60.3300 'depthi' = interface 11 target depth for compressibility (m)
  68.3300 'depthi' = interface 12 target depth for compressibility (m)
  76.3300 'depthi' = interface 13 target depth for compressibility (m)
  84.3300 'depthi' = interface 14 target depth for compressibility (m)
  98.0773 'depthi' = interface 15 target depth for compressibility (m)
  114.332 'depthi' = interface 16 target depth for compressibility (m)
  124.854 'depthi' = interface 17 target depth for compressibility (m)
  138.856 'depthi' = interface 18 target depth for compressibility (m)
  159.095 'depthi' = interface 19 target depth for compressibility (m)
  187.743 'depthi' = interface 20 target depth for compressibility (m)
  218.471 'depthi' = interface 21 target depth for compressibility (m)
  255.754 'depthi' = interface 22 target depth for compressibility (m)
  324.379 'depthi' = interface 23 target depth for compressibility (m)
  421.107 'depthi' = interface 24 target depth for compressibility (m)
  549.182 'depthi' = interface 25 target depth for compressibility (m)
  686.579 'depthi' = interface 26 target depth for compressibility (m)
  823.209 'depthi' = interface 27 target depth for compressibility (m)
  986.578 'depthi' = interface 28 target depth for compressibility (m)
  1140.64 'depthi' = interface 29 target depth for compressibility (m)
  1287.08 'depthi' = interface 30 target depth for compressibility (m)
  1436.74 'depthi' = interface 31 target depth for compressibility (m)
  1593.15 'depthi' = interface 32 target depth for compressibility (m)
  1789.24 'depthi' = interface 33 target depth for compressibility (m)
  2129.08 'depthi' = interface 34 target depth for compressibility (m)
  2715.89 'depthi' = interface 35 target depth for compressibility (m)
  3339.52 'depthi' = interface 36 target depth for compressibility (m)
  3850.36 'depthi' = interface 37 target depth for compressibility (m)
  4156.46 'depthi' = interface 38 target depth for compressibility (m)
  4445.45 'depthi' = interface 39 target depth for compressibility (m)
  5015.96 'depthi' = interface 40 target depth for compressibility (m)
  5020.00 'depthi' = interface 41 target depth for compressibility (m)
E-o-D
/bin/mv mom6_vgrid.nc mom6_vgrid_41l.nc

