Changeset 2335


Ignore:
Timestamp:
09/25/14 09:25:37 (10 years ago)
Author:
jgipsl
Message:

Updated comme IPSLCM6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/xios.driver

    r2229 r2335  
    11#!/bin/ksh 
     2 
     3function XIOS_sed_xml 
     4{ 
     5# Usage : XIOS_sed_xml xml_file attribute value  
     6#         In file xml_file modify at the line containing id="attribute" the attribute value ">value<"  
     7    IGCM_debug_PushStack "XIOS_sed_xml" 
     8    # Test if the fichier exist 
     9    if [ ! -f ${1} ] ; then 
     10        echo "WARNING : ${1} file does not exist. Following will not be done : XIOS_sed_xml : ${1} ${2} ${3}" 
     11        IGCM_debug_PopStack "XIOS_sed_xml" 
     12        return 
     13    fi 
     14    sed -e "s/\(<[^\"]*\"${2}\".*>\)\([^<]*\)\(<[^>]*\)/\1${3}\3/" ${1} > ${1}.tmp 
     15    RET=$? 
     16    echo "XIOS_sed_xml" : ${1} ${2} ${3} 
     17    \mv ${1}.tmp ${1} 
     18    IGCM_debug_PopStack "XIOS_sed_xml" 
     19    return $RET 
     20} 
    221 
    322#----------------------------------- 
     
    1736 
    1837    echo UPDATE IOS !!! 
    19  
    20     sed -e 's/<variable id="using_server"              type="boolean">false/<variable id="using_server" type="boolean">true/' iodef.xml > iodef.xml.tmp 
    21     IGCM_sys_Mv iodef.xml.tmp iodef.xml 
     38# Activate server mode 
     39    XIOS_sed_xml iodef.xml using_server true 
     40# If lmdz_UserChoices_XIOS=y add LMDZ as component id : 
     41    if [ X${lmdz_UserChoices_XIOS}  = Xy ] ; then 
     42        XIOS_sed_xml iodef.xml oasis_codes_id LMDZ,oceanx 
     43    fi  
    2244    if [ -f namcouple ] ; then 
    23         sed -e "s/2  lmdz.x oceanx/3 lmdz.x oceanx ${config_Executable_IOS[1]}/" namcouple > namcouple.tmp  
     45        sed -e "s/2  LMDZ oceanx/3 LMDZ oceanx ${config_Executable_IOS[1]}/" namcouple > namcouple.tmp  
    2446        IGCM_sys_Mv namcouple.tmp namcouple 
    2547    fi 
Note: See TracChangeset for help on using the changeset viewer.