Changeset 2341 for CONFIG/UNIFORM


Ignore:
Timestamp:
09/25/14 15:01:47 (10 years ago)
Author:
jgipsl
Message:

Changed to use IGCM_comp_modifyXmlFile.

Location:
CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER
Files:
4 edited

Legend:

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

    r2336 r2341  
    11#!/bin/ksh 
    22#----------------------------------------------------------------- 
    3 function LMDZ_sed_xml 
    4 { 
    5 # Usage : LMDZ_sed_xml xml_file output_file attribute value  
    6 #         In file xml_file modify at the line containing id="output_file" the attribute "attribute=xxx" into "attribute=value" 
    7  
    8     IGCM_debug_PushStack "LMDZ_sed_xml" 
    9     # Test if the fichier exist 
    10     if [ ! -f ${1} ] ; then 
    11       echo "WARNING : ${1} file does not exist. Following will not be done : LMDZ_sed_xml : ${1} ${2} ${3} ${4}" 
    12       IGCM_debug_PopStack "LMDZ_sed_xml" 
    13       return 
    14     fi 
    15     sed -e "/id=\"${2}\"/s/\(${3}=\"\)[^\"]*\(\"\)/\1${4}\2/" ${1} > ${1}.tmp 
    16     RET=$? 
    17     echo "LMDZ_sed_xml : ${1} ${2} ${3} ${4}" 
    18     \mv ${1}.tmp ${1} 
    19     IGCM_debug_PopStack "LMDZ_sed_xml" 
    20     return $RET 
    21 } 
    22  
    233function ATM_Initialize 
    244{ 
     
    359339    # XIOS XML definition 
    360340    # Default init : files are desactivated 
    361         LMDZ_sed_xml file_def_histmth_lmdz.xml histmth enabled .FALSE.  
    362         LMDZ_sed_xml file_def_histday_lmdz.xml histday enabled .FALSE.  
    363         LMDZ_sed_xml file_def_histhf_lmdz.xml histhf enabled .FALSE. 
    364         LMDZ_sed_xml file_def_histfh3h_lmdz.xml histfh3h enabled .FALSE. 
    365         LMDZ_sed_xml file_def_histhf3hm_lmdz.xml histfh3hm enabled .FALSE. 
    366         LMDZ_sed_xml file_def_histstn_lmdz.xml histstn enabled .FALSE. 
    367         LMDZ_sed_xml file_def_histmthNMC_lmdz.xml histmthNMC enabled .FALSE. 
    368         LMDZ_sed_xml file_def_histdayNMC_lmdz.xml histdayNMC enabled .FALSE. 
    369         LMDZ_sed_xml file_def_histhfNMC_lmdz.xml histhfNMC enabled .FALSE. 
     341        IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth enabled .FALSE.  
     342        IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday enabled .FALSE.  
     343        IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf enabled .FALSE. 
     344        IGCM_comp_modifyXmlFile force file_def_histfh3h_lmdz.xml histfh3h enabled .FALSE. 
     345        IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histfh3hm enabled .FALSE. 
     346        IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn enabled .FALSE. 
     347        IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC enabled .FALSE. 
     348        IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC enabled .FALSE. 
     349        IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC enabled .FALSE. 
    370350        if [ X${lmdz_UserChoices_XIOS}  = Xy ] ; then 
    371351    # Default output level : 5 
    372             LMDZ_sed_xml file_def_histmth_lmdz.xml histmth output_level 5  
    373             LMDZ_sed_xml file_def_histday_lmdz.xml histday output_level 5  
    374             LMDZ_sed_xml file_def_histhf_lmdz.xml histhf output_level 5 
    375             LMDZ_sed_xml file_def_histfh3h_lmdz.xml histfh3h output_level 5 
    376             LMDZ_sed_xml file_def_histhf3hm_lmdz.xml histfh3hm output_level 5 
    377             LMDZ_sed_xml file_def_histstn_lmdz.xml histstn output_level 5 
    378             LMDZ_sed_xml file_def_histmthNMC_lmdz.xml histmthNMC output_level 5 
    379             LMDZ_sed_xml file_def_histdayNMC_lmdz.xml histdayNMC output_level 5 
    380             LMDZ_sed_xml file_def_histhfNMC_lmdz.xml histhfNMC output_level 5 
     352            IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth output_level 5  
     353            IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_level 5  
     354            IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_level 5 
     355            IGCM_comp_modifyXmlFile force file_def_histfh3h_lmdz.xml histfh3h output_level 5 
     356            IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histfh3hm output_level 5 
     357            IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn output_level 5 
     358            IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC output_level 5 
     359            IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC output_level 5 
     360            IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC output_level 5 
    381361     # Filling of XML files  
    382362        if [ X${ok_mensuel} = Xy ] ; then 
    383             LMDZ_sed_xml file_def_histmth_lmdz.xml histmth enabled .TRUE.  
    384             LMDZ_sed_xml file_def_histmth_lmdz.xml histmth output_freq 1mo 
    385             LMDZ_sed_xml file_def_histmth_lmdz.xml histmth name histmth 
     363            IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth enabled .TRUE.  
     364            IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth output_freq 1mo 
     365            IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth name histmth 
    386366        fi 
    387367        if [ X${ok_journe} = Xy ] ; then         
    388             LMDZ_sed_xml file_def_histday_lmdz.xml histday enabled .TRUE.  
    389             LMDZ_sed_xml file_def_histday_lmdz.xml histday output_freq 1d 
    390             LMDZ_sed_xml file_def_histday_lmdz.xml histday name histday 
     368            IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday enabled .TRUE.  
     369            IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_freq 1d 
     370            IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday name histday 
    391371            if [ X${OutLevel} = Xlow ] || [ X${OutLevel} = Xmedium ] ; then 
    392                 LMDZ_sed_xml file_def_histday_lmdz.xml histday output_level 2 
     372                IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_level 2 
    393373            fi 
    394374        fi 
    395375        if [ X${ok_hf} = Xy ] ; then 
    396             LMDZ_sed_xml file_def_histhf_lmdz.xml histhf enabled .TRUE.  
    397             LMDZ_sed_xml file_def_histhf_lmdz.xml histhf output_freq 6h 
    398             LMDZ_sed_xml file_def_histhf_lmdz.xml histhf name histhf 
     376            IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf enabled .TRUE.  
     377            IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_freq 6h 
     378            IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf name histhf 
    399379            if [ X${OutLevel} = Xlow ] ; then 
    400                 LMDZ_sed_xml file_def_histhf_lmdz.xml histhf output_level 2 
     380                IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_level 2 
    401381            fi 
    402382        fi       
    403383        if [ X${ok_hf3h} = Xy ] ; then 
    404             LMDZ_sed_xml file_def_histhf3h_lmdz.xml histhf3h enabled .TRUE.  
    405             LMDZ_sed_xml file_def_histhf3h_lmdz.xml histhf3h output_freq 3h 
    406             LMDZ_sed_xml file_def_histhf3h_lmdz.xml histhf3h name histhf3h 
     384            IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h enabled .TRUE.  
     385            IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h output_freq 3h 
     386            IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h name histhf3h 
    407387        fi       
    408388        if [ X${ok_hf3hm} = Xy ] ; then 
    409             LMDZ_sed_xml file_def_histhf3hm_lmdz.xml histhf3hm enabled .TRUE.  
    410             LMDZ_sed_xml file_def_histhf3hm_lmdz.xml histhf3hm output_freq 3h 
    411             LMDZ_sed_xml file_def_histhf3hm_lmdz.xml histhf3hm name histhf3hm 
     389            IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm enabled .TRUE.  
     390            IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm output_freq 3h 
     391            IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm name histhf3hm 
    412392        fi 
    413393        if [ X${ok_stn} = Xy ] ; then 
    414             LMDZ_sed_xml file_def_histstn_lmdz.xml histstn enabled .TRUE.  
    415             LMDZ_sed_xml file_def_histstn_lmdz.xml histstn output_freq 1800s 
    416             LMDZ_sed_xml file_def_histstn_lmdz.xml histstn name histstn 
     394            IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn enabled .TRUE.  
     395            IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn output_freq 1800s 
     396            IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn name histstn 
    417397        fi 
    418398        if [ X${LMDZ_NMC_monthly} = Xy ] ; then 
    419             LMDZ_sed_xml file_def_histmthNMC_lmdz.xml histmthNMC enabled .TRUE.  
    420             LMDZ_sed_xml file_def_histmthNMC_lmdz.xml histmthNMC output_freq 1mo 
    421             LMDZ_sed_xml file_def_histmthNMC_lmdz.xml histmthNMC name histmthNMC 
     399            IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC enabled .TRUE.  
     400            IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC output_freq 1mo 
     401            IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC name histmthNMC 
    422402        fi 
    423403        if [ X${LMDZ_NMC_daily} = Xy ] ; then 
    424             LMDZ_sed_xml file_def_histdayNMC_lmdz.xml histdayNMC enabled .TRUE.  
    425             LMDZ_sed_xml file_def_histdayNMC_lmdz.xml histdayNMC output_freq 1d 
    426             LMDZ_sed_xml file_def_histdayNMC_lmdz.xml histdayNMC name histdayNMC 
     404            IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC enabled .TRUE.  
     405            IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC output_freq 1d 
     406            IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC name histdayNMC 
    427407        fi 
    428408        if [ X${LMDZ_NMC_hf} = Xy ] ; then 
    429             LMDZ_sed_xml file_def_histhfNMC_lmdz.xml histhfNMC enabled .TRUE.  
    430             LMDZ_sed_xml file_def_histhfNMC_lmdz.xml histhfNMC output_freq 6h 
    431             LMDZ_sed_xml file_def_histhfNMC_lmdz.xml histhfNMC name histhfNMC 
     409            IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC enabled .TRUE.  
     410            IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC output_freq 6h 
     411            IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC name histhfNMC 
    432412        fi 
    433413    fi 
  • CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/orchidee.driver

    r2338 r2341  
    11#!/bin/ksh 
    2  
    32#D- Driver du script pour ORCHIDEE 
    4  
    5 function ORCHIDEE_sed 
    6 { 
    7     IGCM_debug_PushStack "ORCHIDEE_sed" 
    8      
    9     sed -e "s/^${1}\ *=.*/${1}= ${2}/" \ 
    10         orchidee.def > orchidee.def.tmp 
    11     RET=$? 
    12     echo "ORCHIDEE_sed : ${1} ${2}" 
    13     \mv orchidee.def.tmp orchidee.def 
    14      
    15     IGCM_debug_PopStack "ORCHIDEE_sed" 
    16     return $RET 
    17 } 
    18  
    19 function ORCHIDEE_sed_xml 
    20 { 
    21 # Usage : ORCHIDEE_sed_xml xml_file output_file attribute value  
    22 #         In file xml_file modify at the line containing id="output_file" the attribute "attribute=xxx" into "attribute=value" 
    23      
    24     # Test if the fichier exist 
    25     if [ ! -f ${1} ] ; then 
    26         echo "WARNING : ${1} file does not exist. Following will not be done : ORCHIDEE_sed : ${1} ${2} ${3} ${4}" 
    27         IGCM_debug_PopStack "ORCHIDEE_sed_xml" 
    28         return 
    29     fi 
    30     sed -e "/id=\"${2}\"/s/\(${3}=\"\)[^\"]*\(\"\)/\1${4}\2/" ${1} > ${1}.tmp 
    31     RET=$? 
    32     echo "ORCHIDEE_sed : ${1} ${2} ${3} ${4}" 
    33     \mv ${1}.tmp ${1} 
    34  
    35     return $RET 
    36 } 
    37  
    383#----------------------------------------------------------------- 
    394function SRF_Initialize 
     
    7641 
    7742    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    78         ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .FALSE.  
    79         ORCHIDEE_sed_xml file_def_orchidee.xml sechiba2 enabled .FALSE.  
     43        IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .FALSE.  
     44        IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .FALSE.  
    8045        IGCM_comp_modifyDefFile nonblocker orchidee.def XIOS_ORCHIDEE_OK y 
    8146    else 
     
    9055            (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 ))  
    9156            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    92                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE.  
    93                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq ${WriteInYears}y 
    94                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history  
     57                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
     58                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInYears}y 
     59                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    9560            fi 
    9661            ;; 
    9762        1M) 
    9863            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    99                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE.  
    100                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq 1mo 
    101                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history  
     64                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
     65                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1mo 
     66                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    10267            fi 
    10368            case ${config_UserChoices_PeriodLength} in 
     
    11681            WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 
    11782            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    118                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE.  
    119                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq ${WriteInMonths}mo 
    120                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history  
     83                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
     84                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInMonths}mo 
     85                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    12186            fi 
    12287            case ${config_UserChoices_PeriodLength} in 
     
    13297                (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 
    13398                if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    134                     ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE.  
    135                     ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq ${SECHIBA_WRITE_STEP}s 
    136                     ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history 
     99                    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
     100                    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${SECHIBA_WRITE_STEP}s 
     101                    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
    137102                fi 
    138103                ;; 
     
    141106        5D|5d)  
    142107            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    143                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE.  
    144                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq 5d 
    145                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history  
     108                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
     109                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 5d 
     110                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    146111            fi 
    147112            (( SECHIBA_WRITE_STEP = 5 * 86400 ))  
     
    149114        1D|1d)  
    150115            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    151                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE.  
    152                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq 1d 
    153                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history  
     116                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
     117                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1d 
     118                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    154119            fi 
    155120            (( SECHIBA_WRITE_STEP = 86400 ))  
     
    158123            WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' ) 
    159124            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    160                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE.  
    161                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 
    162                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history  
     125                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
     126                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 
     127                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    163128            fi 
    164129            (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;; 
     
    180145        IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTFILE2 y 
    181146        if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    182             ORCHIDEE_sed_xml file_def_orchidee.xml sechiba2 enabled .TRUE.  
    183             ORCHIDEE_sed_xml file_def_orchidee.xml sechiba2 output_freq 10800s 
    184             ORCHIDEE_sed_xml file_def_orchidee.xml sechiba2 name sechiba_out_2 
     147            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .TRUE.  
     148            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 output_freq 10800s 
     149            IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 name sechiba_out_2 
    185150        fi 
    186151    else 
  • CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/stomate.driver

    r2333 r2341  
    2121 
    2222    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    23         ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .FALSE.  
    24         ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .FALSE.  
     23        IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .FALSE.  
     24        IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .FALSE.  
    2525    fi    
    2626    case ${config_SBG_WriteFrequency} in 
     
    3030            (( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears ))  
    3131            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    32                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE.  
    33                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq ${WriteInYears}y 
    34                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history  
    35                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE.  
    36                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq ${WriteInYears}y 
    37                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history  
     32                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
     33                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${WriteInYears}y 
     34                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history  
     35                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
     36                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInYears}y 
     37                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    3838 
    3939            fi 
     
    4141        1M|1m)  
    4242            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    43                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE.  
    44                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq 1mo 
    45                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history  
    46                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE.  
    47                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq 1mo 
    48                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history  
     43                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
     44                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 1mo 
     45                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history  
     46                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
     47                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 1mo 
     48                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    4949            fi 
    5050            case ${config_UserChoices_PeriodLength} in 
     
    6262            WriteInMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 
    6363            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    64                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE.  
    65                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq ${WriteInMonths}mo 
    66                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history  
    67                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE.  
    68                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq ${WriteInMonths}mo 
    69                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history  
     64                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
     65                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${WriteInMonths}mo 
     66                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history  
     67                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
     68                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInMonths}mo 
     69                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    7070            fi 
    7171            case ${config_UserChoices_PeriodLength} in 
     
    8181                (( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) ))  
    8282                if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    83                     ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE.  
    84                     ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq ${STOMATE_WRITE_STEP}s 
    85                     ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history 
    86                     ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE.  
    87                     ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq ${STOMATE_WRITE_STEP}s 
    88                     ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history 
     83                    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
     84                    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${STOMATE_WRITE_STEP}s 
     85                    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
     86                    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
     87                    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${STOMATE_WRITE_STEP}s 
     88                    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
    8989                fi 
    9090                ;; 
     
    9494            (( STOMATE_WRITE_STEP = 5 )) 
    9595            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    96                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE.  
    97                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq 5d 
    98                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history  
    99                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE.  
    100                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq 5d 
    101                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history  
     96                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
     97                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 5d 
     98                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history  
     99                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
     100                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 5d 
     101                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    102102            fi 
    103103            ;; 
     
    105105            (( STOMATE_WRITE_STEP = 1 ))  
    106106            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    107                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE.  
    108                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq 1d 
    109                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history  
    110                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE.  
    111                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq 1d 
    112                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history  
     107                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
     108                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 1d 
     109                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history  
     110                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
     111                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 1d 
     112                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    113113            fi 
    114114            ;; 
     
    116116            WriteInSeconds=$( echo ${config_SBG_WriteFrequency} | awk -F '[s]' '{print $1}' ) 
    117117            if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    118                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE.  
    119                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 
    120                 ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history  
    121                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE.  
    122                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq ${WriteInSeconds}s 
    123                 ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history  
     118                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
     119                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 
     120                IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
     121                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
     122                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInSeconds}s 
     123                IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    124124            fi 
    125125            (( STOMATE_WRITE_STEP = 1 )) ;; 
  • CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/xios.driver

    r2335 r2341  
    11#!/bin/ksh 
    2  
    3 function 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 } 
    21  
    222#----------------------------------- 
    233function IOS_Initialize 
     
    3717    echo UPDATE IOS !!! 
    3818# Activate server mode 
    39     XIOS_sed_xml iodef.xml using_server true 
     19    IGCM_comp_modifyXmlfile force iodef.xml using_server NONE true 
    4020# If lmdz_UserChoices_XIOS=y add LMDZ as component id : 
    4121    if [ X${lmdz_UserChoices_XIOS}  = Xy ] ; then 
    42         XIOS_sed_xml iodef.xml oasis_codes_id LMDZ,oceanx 
     22        IGCM_comp_modifyXmlFile force iodef.xml oasis_codes_id NONE LMDZ,oceanx 
    4323    fi  
    4424    if [ -f namcouple ] ; then 
Note: See TracChangeset for help on using the changeset viewer.