#!/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
  96      'kdm   ' = number of layers
  96      'nhybrd' = number of hybrid levels (0=all isopycnal)
   0      'nsigma' = number of sigma  levels (nhybrd-nsigma z-levels)
0.9453634 'dp00  ' = deep    z-level spacing minimum thickness (m)
 150.0    'dp00x ' = deep    z-level spacing maximum thickness (m)
1.056722  'dp00f ' = deep    z-level spacing stretching factor (1.0=const.space)
0.9453634 'ds00  ' = shallow z-level spacing minimum thickness (m)
 150.0    'ds00x ' = shallow z-level spacing maximum thickness (m)
1.056722  '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)
  01.800  'sigma ' = layer 05 isopycnal target density (sigma units)
  28.900  'sigma ' = layer 06 isopycnal target density (sigma units)
  29.1667 'sigma ' = layer 07 isopycnal target density (sigma units)
  29.4333 'sigma ' = layer 08 isopycnal target density (sigma units)
  29.7000 'sigma ' = layer 09 isopycnal target density (sigma units)
  29.9667 'sigma ' = layer 10 isopycnal target density (sigma units)
  30.2333 'sigma ' = layer 11 isopycnal target density (sigma units)
  30.5000 'sigma ' = layer 12 isopycnal target density (sigma units)
  30.6500 'sigma ' = layer 13 isopycnal target density (sigma units)
  30.8000 'sigma ' = layer 14 isopycnal target density (sigma units)
  30.9500 'sigma ' = layer 15 isopycnal target density (sigma units)
  31.1333 'sigma ' = layer 16 isopycnal target density (sigma units)
  31.3167 'sigma ' = layer 17 isopycnal target density (sigma units)
  31.5000 'sigma ' = layer 18 isopycnal target density (sigma units)
  31.6833 'sigma ' = layer 19 isopycnal target density (sigma units)
  31.8667 'sigma ' = layer 20 isopycnal target density (sigma units)
  32.0500 'sigma ' = layer 21 isopycnal target density (sigma units)
  32.2333 'sigma ' = layer 22 isopycnal target density (sigma units)
  32.4167 'sigma ' = layer 23 isopycnal target density (sigma units)
  32.6000 'sigma ' = layer 24 isopycnal target density (sigma units)
  32.7833 'sigma ' = layer 25 isopycnal target density (sigma units)
  32.9667 'sigma ' = layer 26 isopycnal target density (sigma units)
  33.1500 'sigma ' = layer 27 isopycnal target density (sigma units)
  33.3333 'sigma ' = layer 28 isopycnal target density (sigma units)
  33.5167 'sigma ' = layer 29 isopycnal target density (sigma units)
  33.7000 'sigma ' = layer 30 isopycnal target density (sigma units)
  33.8833 'sigma ' = layer 31 isopycnal target density (sigma units)
  34.0667 'sigma ' = layer 32 isopycnal target density (sigma units)
  34.2500 'sigma ' = layer 33 isopycnal target density (sigma units)
  34.4167 'sigma ' = layer 34 isopycnal target density (sigma units)
  34.5833 'sigma ' = layer 35 isopycnal target density (sigma units)
  34.7500 'sigma ' = layer 36 isopycnal target density (sigma units)
  34.8833 'sigma ' = layer 37 isopycnal target density (sigma units)
  35.0167 'sigma ' = layer 38 isopycnal target density (sigma units)
  35.1500 'sigma ' = layer 39 isopycnal target density (sigma units)
  35.2667 'sigma ' = layer 40 isopycnal target density (sigma units)
  35.3833 'sigma ' = layer 41 isopycnal target density (sigma units)
  35.5000 'sigma ' = layer 42 isopycnal target density (sigma units)
  35.6000 'sigma ' = layer 43 isopycnal target density (sigma units)
  35.7000 'sigma ' = layer 44 isopycnal target density (sigma units)
  35.8000 'sigma ' = layer 45 isopycnal target density (sigma units)
  35.8800 'sigma ' = layer 46 isopycnal target density (sigma units)
  35.9600 'sigma ' = layer 47 isopycnal target density (sigma units)
  36.0400 'sigma ' = layer 48 isopycnal target density (sigma units)
  36.0933 'sigma ' = layer 49 isopycnal target density (sigma units)
  36.1467 'sigma ' = layer 50 isopycnal target density (sigma units)
  36.2000 'sigma ' = layer 51 isopycnal target density (sigma units)
  36.2600 'sigma ' = layer 52 isopycnal target density (sigma units)
  36.3200 'sigma ' = layer 53 isopycnal target density (sigma units)
  36.3800 'sigma ' = layer 54 isopycnal target density (sigma units)
  36.4267 'sigma ' = layer 55 isopycnal target density (sigma units)
  36.4733 'sigma ' = layer 56 isopycnal target density (sigma units)
  36.5200 'sigma ' = layer 57 isopycnal target density (sigma units)
  36.5533 'sigma ' = layer 58 isopycnal target density (sigma units)
  36.5867 'sigma ' = layer 59 isopycnal target density (sigma units)
  36.6200 'sigma ' = layer 60 isopycnal target density (sigma units)
  36.6467 'sigma ' = layer 61 isopycnal target density (sigma units)
  36.6733 'sigma ' = layer 62 isopycnal target density (sigma units)
  36.7000 'sigma ' = layer 63 isopycnal target density (sigma units)
  36.7233 'sigma ' = layer 64 isopycnal target density (sigma units)
  36.7467 'sigma ' = layer 65 isopycnal target density (sigma units)
  36.7700 'sigma ' = layer 66 isopycnal target density (sigma units)
  36.7900 'sigma ' = layer 67 isopycnal target density (sigma units)
  36.8100 'sigma ' = layer 68 isopycnal target density (sigma units)
  36.8300 'sigma ' = layer 69 isopycnal target density (sigma units)
  36.8500 'sigma ' = layer 70 isopycnal target density (sigma units)
  36.8700 'sigma ' = layer 71 isopycnal target density (sigma units)
  36.8900 'sigma ' = layer 72 isopycnal target density (sigma units)
  36.9167 'sigma ' = layer 73 isopycnal target density (sigma units)
  36.9433 'sigma ' = layer 74 isopycnal target density (sigma units)
  36.9700 'sigma ' = layer 75 isopycnal target density (sigma units)
  36.9867 'sigma ' = layer 76 isopycnal target density (sigma units)
  37.0033 'sigma ' = layer 77 isopycnal target density (sigma units)
  37.0200 'sigma ' = layer 78 isopycnal target density (sigma units)
  37.0333 'sigma ' = layer 79 isopycnal target density (sigma units)
  37.0467 'sigma ' = layer 80 isopycnal target density (sigma units)
  37.0600 'sigma ' = layer 81 isopycnal target density (sigma units)
  37.0700 'sigma ' = layer 82 isopycnal target density (sigma units)
  37.0800 'sigma ' = layer 83 isopycnal target density (sigma units)
  37.0900 'sigma ' = layer 84 isopycnal target density (sigma units)
  37.0967 'sigma ' = layer 85 isopycnal target density (sigma units)
  37.1033 'sigma ' = layer 86 isopycnal target density (sigma units)
  37.1100 'sigma ' = layer 87 isopycnal target density (sigma units)
  37.1167 'sigma ' = layer 88 isopycnal target density (sigma units)
  37.1233 'sigma ' = layer 89 isopycnal target density (sigma units)
  37.1300 'sigma ' = layer 90 isopycnal target density (sigma units)
  37.1367 'sigma ' = layer 91 isopycnal target density (sigma units)
  37.1433 'sigma ' = layer 92 isopycnal target density (sigma units)
  37.1500 'sigma ' = layer 93 isopycnal target density (sigma units)
  37.1667 'sigma ' = layer 94 isopycnal target density (sigma units)
  37.1833 'sigma ' = layer 95 isopycnal target density (sigma units)
  37.2000 'sigma ' = layer 96 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)
    0.945 'depthi' = interface  1  target depth for compressibility (m)
    1.944 'depthi' = interface  2  target depth for compressibility (m)
    3.000 'depthi' = interface  3  target depth for compressibility (m)
    4.116 'depthi' = interface  4  target depth for compressibility (m)
    5.294 'depthi' = interface  5  target depth for compressibility (m)
    6.540 'depthi' = interface  6  target depth for compressibility (m)
    7.856 'depthi' = interface  7  target depth for compressibility (m)
    9.247 'depthi' = interface  8  target depth for compressibility (m)
   10.717 'depthi' = interface  9  target depth for compressibility (m)
   12.270 'depthi' = interface  10  target depth for compressibility (m)
   13.912 'depthi' = interface  11  target depth for compressibility (m)
   15.646 'depthi' = interface  12  target depth for compressibility (m)
   17.479 'depthi' = interface  13  target depth for compressibility (m)
   19.416 'depthi' = interface  14  target depth for compressibility (m)
   21.463 'depthi' = interface  15  target depth for compressibility (m)
   23.625 'depthi' = interface  16  target depth for compressibility (m)
   25.911 'depthi' = interface  17  target depth for compressibility (m)
   28.326 'depthi' = interface  18  target depth for compressibility (m)
   30.878 'depthi' = interface  19  target depth for compressibility (m)
   33.575 'depthi' = interface  20  target depth for compressibility (m)
   36.425 'depthi' = interface  21  target depth for compressibility (m)
   39.436 'depthi' = interface  22  target depth for compressibility (m)
   42.618 'depthi' = interface  23  target depth for compressibility (m)
   45.981 'depthi' = interface  24  target depth for compressibility (m)
   58.793 'depthi' = interface  25  target depth for compressibility (m)
   71.819 'depthi' = interface  26  target depth for compressibility (m)
   81.892 'depthi' = interface  27  target depth for compressibility (m)
   97.874 'depthi' = interface  28  target depth for compressibility (m)
  130.035 'depthi' = interface  29  target depth for compressibility (m)
  150.478 'depthi' = interface  30  target depth for compressibility (m)
  163.261 'depthi' = interface  31  target depth for compressibility (m)
  174.525 'depthi' = interface  32  target depth for compressibility (m)
  186.502 'depthi' = interface  33  target depth for compressibility (m)
  198.546 'depthi' = interface  34  target depth for compressibility (m)
  212.974 'depthi' = interface  35  target depth for compressibility (m)
  227.806 'depthi' = interface  36  target depth for compressibility (m)
  243.249 'depthi' = interface  37  target depth for compressibility (m)
  262.195 'depthi' = interface  38  target depth for compressibility (m)
  281.938 'depthi' = interface  39  target depth for compressibility (m)
  302.091 'depthi' = interface  40  target depth for compressibility (m)
  325.920 'depthi' = interface  41  target depth for compressibility (m)
  348.053 'depthi' = interface  42  target depth for compressibility (m)
  375.533 'depthi' = interface  43  target depth for compressibility (m)
  404.565 'depthi' = interface  44  target depth for compressibility (m)
  435.440 'depthi' = interface  45  target depth for compressibility (m)
  462.885 'depthi' = interface  46  target depth for compressibility (m)
  490.330 'depthi' = interface  47  target depth for compressibility (m)
  521.514 'depthi' = interface  48  target depth for compressibility (m)
  551.356 'depthi' = interface  49  target depth for compressibility (m)
  581.196 'depthi' = interface  50  target depth for compressibility (m)
  620.144 'depthi' = interface  51  target depth for compressibility (m)
  672.628 'depthi' = interface  52  target depth for compressibility (m)
  732.051 'depthi' = interface  53  target depth for compressibility (m)
  791.622 'depthi' = interface  54  target depth for compressibility (m)
  854.594 'depthi' = interface  55  target depth for compressibility (m)
  922.052 'depthi' = interface  56  target depth for compressibility (m)
  984.652 'depthi' = interface  57  target depth for compressibility (m)
 1036.545 'depthi' = interface  58  target depth for compressibility (m)
 1088.316 'depthi' = interface  59  target depth for compressibility (m)
 1138.230 'depthi' = interface  60  target depth for compressibility (m)
 1183.565 'depthi' = interface  61  target depth for compressibility (m)
 1228.857 'depthi' = interface  62  target depth for compressibility (m)
 1271.324 'depthi' = interface  63  target depth for compressibility (m)
 1312.487 'depthi' = interface  64  target depth for compressibility (m)
 1357.554 'depthi' = interface  65  target depth for compressibility (m)
 1399.337 'depthi' = interface  66  target depth for compressibility (m)
 1442.729 'depthi' = interface  67  target depth for compressibility (m)
 1486.188 'depthi' = interface  68  target depth for compressibility (m)
 1532.934 'depthi' = interface  69  target depth for compressibility (m)
 1581.208 'depthi' = interface  70  target depth for compressibility (m)
 1641.477 'depthi' = interface  71  target depth for compressibility (m)
 1720.803 'depthi' = interface  72  target depth for compressibility (m)
 1818.243 'depthi' = interface  73  target depth for compressibility (m)
 1964.058 'depthi' = interface  74  target depth for compressibility (m)
 2116.870 'depthi' = interface  75  target depth for compressibility (m)
 2272.951 'depthi' = interface  76  target depth for compressibility (m)
 2506.616 'depthi' = interface  77  target depth for compressibility (m)
 2792.575 'depthi' = interface  78  target depth for compressibility (m)
 3056.737 'depthi' = interface  79  target depth for compressibility (m)
 3303.054 'depthi' = interface  80  target depth for compressibility (m)
 3481.364 'depthi' = interface  81  target depth for compressibility (m)
 3622.156 'depthi' = interface  82  target depth for compressibility (m)
 3742.634 'depthi' = interface  83  target depth for compressibility (m)
 3841.907 'depthi' = interface  84  target depth for compressibility (m)
 3919.528 'depthi' = interface  85  target depth for compressibility (m)
 3997.194 'depthi' = interface  86  target depth for compressibility (m)
 4081.102 'depthi' = interface  87  target depth for compressibility (m)
 4164.598 'depthi' = interface  88  target depth for compressibility (m)
 4259.007 'depthi' = interface  89  target depth for compressibility (m)
 4362.268 'depthi' = interface  90  target depth for compressibility (m)
 4466.748 'depthi' = interface  91  target depth for compressibility (m)
 4572.476 'depthi' = interface  92  target depth for compressibility (m)
 4792.483 'depthi' = interface  93  target depth for compressibility (m)
 4930.000 'depthi' = interface  94  target depth for compressibility (m)
 5030.000 'depthi' = interface  95  target depth for compressibility (m)
 5130.000 'depthi' = interface  96  target depth for compressibility (m)
E-o-D
/bin/mv mom6_vgrid.nc mom6_vgrid_96l.nc

