source: lmdz_wrf/trunk/tools/lmdz_point.bash @ 222

Last change on this file since 222 was 190, checked in by lfita, 10 years ago

Adding shell script to compute the 2D coordinates of a LMDZ point

  • Property svn:executable set to *
File size: 508 bytes
Line 
1#!/bin/bash -x
2## g.e. # lmdz_point.bash 99 32 32
3if test $1 = '-h'; then
4  echo "*********************************"
5  echo "*** Shell to know to which 2D ***"
6  echo "*** coordinates corresponds a ***"
7  echo "***      LMDZ grid point      ***"
8  echo "*********************************"
9  echo "lmdz_point.bash [LMDZpoint] [dimx] [dimy]"
10else
11  rootsh=`pwd`
12  LMDZpoint=$1
13  dimx=$2
14  dimy=$3
15  y=`expr ${LMDZpoint} / ${dimx}`
16  x=`expr ${LMDZpoint} - ${y} '*' ${dimx}`
17  echo "2D point: "${x}","${y}
18
19fi
20
Note: See TracBrowser for help on using the repository browser.