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.
BIO_sx8brodie.ksh in trunk/NVTK/INSTALL/JOBS – NEMO

source: trunk/NVTK/INSTALL/JOBS/BIO_sx8brodie.ksh @ 1155

Last change on this file since 1155 was 1155, checked in by ctlod, 16 years ago

add svn Id

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1#!/bin/ksh
2# $Id$
3##############################################################
4# Original : C. Talandier for ESOPA
5# Contact  : opatlod@locean-ipsl.upmc.fr
6#
7# It is called by the assessment.ksh script for a
8# given configuration
9#
10# INPUT ARGS: 2
11#     - zfile1 : first tracer statistic file to output
12#     - zfile2 : second tracer statistic file to output
13#
14# WORK: It aims to :
15#
16#      - Extract tracers statistics from ocean.output
17#        for mon, mpi & omp runs
18#
19##############################################################
20#set -xv
21##############################################################
22
23# Initialization
24zfile1=
25zfile2=
26
27# Get arguments
28while getopts a:b:c: opt
29do
30  case "$opt" in
31    a) zfile1="$OPTARG";;
32    b) zfile2="$OPTARG";;
33    c) zfile3="$OPTARG";;
34  esac
35done
36
37zfile[0]=${zfile1}
38zfile[1]=${zfile2}
39zfilein=${zfile3}
40
41ind=0
42
43while [ ${ind} -le 1 ] ; do
44
45       zpath=$( ( dirname ${zfile[${ind}]} ) )
46
47       awk '/----TRACER STAT----/ { print $0 }' ${zpath}/${zfilein} > ${zfile[${ind}]}
48       awk '/MEAN NO   1  DET/ { print $3, $4, $7, $8, $9, $10, $11, $12 }' ${zpath}/${zfilein} >> ${zfile[${ind}]}
49       awk '/MEAN NO   2  ZOO/ { print $3, $4, $7, $8, $9, $10, $11, $12 }' ${zpath}/${zfilein} >> ${zfile[${ind}]}
50       awk '/MEAN NO   3  PHY/ { print $3, $4, $7, $8, $9, $10, $11, $12 }' ${zpath}/${zfilein} >> ${zfile[${ind}]}
51       awk '/MEAN NO   4  NO3/ { print $3, $4, $7, $8, $9, $10, $11, $12 }' ${zpath}/${zfilein} >> ${zfile[${ind}]}
52       awk '/MEAN NO   5  NH4/ { print $3, $4, $7, $8, $9, $10, $11, $12 }' ${zpath}/${zfilein} >> ${zfile[${ind}]}
53       awk '/MEAN NO   6  DOM/ { print $3, $4, $7, $8, $9, $10, $11, $12 }' ${zpath}/${zfilein} >> ${zfile[${ind}]}
54
55       let ind=${ind}+1
56done
Note: See TracBrowser for help on using the repository browser.