New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
bdy_reorder in branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/TOOLS/BDY_TOOLS – NEMO

source: branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/TOOLS/BDY_TOOLS/bdy_reorder @ 5985

Last change on this file since 5985 was 5985, checked in by timgraham, 8 years ago

Reinstate keywords before upgrading to head of trunk

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 896 bytes
Line 
1#!/bin/ksh
2
3# CALLS: bdy_reorder.exe
4
5#set -ax
6usage ()
7{
8   echo
9   echo "  bdy_reorder"
10   echo "  ************"
11   echo
12   echo "  usage: ${0##*/} [-c] file_in file_out"
13   echo
14   echo "  flags:    -c          target file is a coordinates.bdy.nc file"
15   echo "            -t          template file"
16   echo
17   exit 1
18}
19
20ln_coordinates=".false."
21file_template=""
22
23while getopts ct: opt
24do
25  case ${opt} in
26      c) 
27         ln_coordinates=".true." 
28      ;;
29      t) 
30         file_template=${OPTARG}
31      ;;
32      [?]) usage
33      ;;
34  esac
35done
36shift $(expr ${OPTIND} - 1)
37
38if [[ $# < 2 ]] ; then
39   usage
40fi
41
42script_dir=$(dirname $0)
43
44file_in=$1
45file_out=$2
46
47cat > nam_bdy_reorder << EOC
48&nam_bdy_reorder
49file_in='${file_in}'
50file_out='${file_out}'
51file_template='${file_template}'
52ln_coordinates=${ln_coordinates}
53EOC
54echo "/" >> nam_bdy_reorder
55
56${script_dir}/bdy_reorder.exe
57
58exit 0
Note: See TracBrowser for help on using the repository browser.