#!/bin/ksh
##-----------------------------------------------------------------
function CHM_Initialize
{
    IGCM_debug_PushStack "CHM_Initialize"

    IGCM_debug_PopStack "CHM_Initialize"
}

##-----------------------------------------------------------------
function CHM_Update
{
    IGCM_debug_PushStack "CHM_Update"

    # Add include of REPROBUS context in iodef.xml
    # In iodef.xml add on next line after "COMPONENT CONTEXT"
    #  <context id="reprobus" src="./context_reprobus.xml"/>
    echo '<context id="reprobus" src="./context_reprobus.xml"/>' > add.tmp
    cp iodef.xml iodef.xml.tmp
    sed -e "/COMPONENT CONTEXT/r add.tmp" \
        iodef.xml.tmp > iodef.xml
    rm iodef.xml.tmp add.tmp

    IGCM_debug_PopStack "CHM_Update"
}

#-----------------------------------
function CHM_Finalize
{
    IGCM_debug_PushStack "CHM_Finalize"

    IGCM_debug_PopStack "CHM_Finalize"
}
