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.
Fadd_keys.sh in trunk/NEMOGCM/TOOLS/COMPILE – NEMO

source: trunk/NEMOGCM/TOOLS/COMPILE/Fadd_keys.sh @ 7646

Last change on this file since 7646 was 7646, checked in by timgraham, 7 years ago

Merge of dev_merge_2016 into trunk. UPDATE TO ARCHFILES NEEDED for XIOS2.
LIM_SRC_s/limrhg.F90 to follow in next commit due to change of kind (I'm unable to do it in this commit).
Merged using the following steps:

1) svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk .
2) Resolve minor conflicts in sette.sh and namelist_cfg for ORCA2LIM3 (due to a change in trunk after branch was created)
3) svn commit
4) svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
5) svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2016/dev_merge_2016 .
6) At this stage I checked out a clean copy of the branch to compare against what is about to be committed to the trunk.
6) svn commit #Commit code to the trunk

In this commit I have also reverted a change to Fcheck_archfile.sh which was causing problems on the Paris machine.

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2######################################################
3# Author : Simona Flavoni for NEMO
4# Contact : sflod@locean-ipsl.upmc.fr
5#
6# Some functions called from makenemo
7# Fadd_keys   : add keys in cpp.fcm file 
8######################################################
9#set -x
10set -o posix
11#set -u
12#set -e
13#+
14#
15# ============
16# Fadd_keys.sh
17# ============
18#
19# --------------------
20# Add compilation keys
21# --------------------
22#
23# SYNOPSIS
24# ========
25#
26# ::
27#
28#  $ Fadd_keys.sh CONFIG_NAME add_key "LIST_KEYS"
29#
30#
31# DESCRIPTION
32# ===========
33#
34#
35# Script to add a set of key when compiling a configuration.
36# The list of key to be added has to be enclosed with " ".
37# A 'sed' is performed to modify the CONFIG_NAME/cpp.fcm file to   
38# add the new key(s).
39#
40#
41# EXAMPLES
42# ========
43#
44# ::
45#
46#  $ ./Fadd_keys.sh ORCA2_LIM add_key "key_mpp_rep"
47#
48#
49# TODO
50# ====
51#
52# option debug
53#
54#
55# EVOLUTIONS
56# ==========
57#
58# $Id: Fadd_keys.sh 2158 2010-10-20 17:30:03Z sflod $
59#
60#
61#
62#   * creation
63#
64#-
65 echo "Adding keys in : ${NEW_CONF}" 
66 for i in ${list_add_key} ; do
67   if [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ] ; then
68      echo "key $i already present in cpp_${NEW_CONF}.fcm" 
69   else
70      sed -e "s/$/ ${i}/"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp
71      mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm
72      echo "added key $i in ${NEW_CONF}" 
73   fi
74 done
75 
76 unset -v list_add_key
77
Note: See TracBrowser for help on using the repository browser.