Last change
on this file since 216 was
190,
checked in by lfita, 11 years ago
|
Adding shell script to compute the 2D coordinates of a LMDZ point
|
-
Property svn:executable set to
*
|
File size:
508 bytes
|
Rev | Line | |
---|
[190] | 1 | #!/bin/bash -x |
---|
| 2 | ## g.e. # lmdz_point.bash 99 32 32 |
---|
| 3 | if 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]" |
---|
| 10 | else |
---|
| 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 | |
---|
| 19 | fi |
---|
| 20 | |
---|
Note: See
TracBrowser
for help on using the repository browser.