source: CONFIG/IPSLCM/IPSLCM5/branches/IPSLCM5_WORK/EXP00/COMP/orchidee.driver @ 700

Last change on this file since 700 was 700, checked in by mafoipsl, 13 years ago

Delete the blank to have a working sed for WRITE_STEP

File size: 1.5 KB
Line 
1#!/bin/ksh
2
3#D- Driver du script pour ORCHIDEE_OL (off-line)
4
5#-----------------------------------------------------------------
6function SRF_Initialize
7{
8    IGCM_debug_PushStack "SRF_Initialize"
9
10    RESOL_SRF=$( echo $RESOL | awk "-Fx" '{print $2}' | awk "-F-" '{print $1}' )
11
12    ##--Variables used by ORCHIDEE --
13    PAT_WRI_STEP=$(     grep 'WRITE_STEP='   ${SUBMIT_DIR}/PARAM/orchidee.def )
14
15    IGCM_debug_PopStack "SRF_Initialize"
16}
17
18#-----------------------------------------------------------------
19function SRF_Update
20{
21    IGCM_debug_PushStack "SRF_Update"
22
23    (( SECH_WRI_STEP=PeriodLengthInDays * 86400 ))
24
25    if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then
26        sed -e "s/_start_sech_/default/" \
27            -e "s/${PAT_WRI_STEP}/WRITE_STEP=${SECH_WRI_STEP}/" \
28            orchidee.def > orchidee.def.tmp
29    else
30        sed -e "s/_start_sech_/start_sech.nc/" \
31            -e "s/${PAT_WRI_STEP}/WRITE_STEP=${SECH_WRI_STEP}/" \
32            orchidee.def > orchidee.def.tmp
33    fi
34
35    IGCM_sys_Mv orchidee.def.tmp orchidee.def
36
37    #IGCM_sys_Cp ${RUN_DIR}/orchidee.def ${RUN_DIR}/run.def
38    #IGCM_sys_Put_Out ${RUN_DIR}/run.def ${R_SAVE}/${PREFIX}_run.def
39
40    IGCM_debug_PopStack "SRF_Update"
41}
42
43#-----------------------------------------------------------------
44function SRF_Finalize
45{
46    IGCM_debug_PushStack "SRF_Finalize"
47
48    #IGCM_sys_Put_Out ${RUN_DIR}/used_run.def ${R_SAVE}/${PREFIX}_used_run.def
49
50    echo FINALIZE SRF !!!
51
52    IGCM_debug_PopStack "SRF_Finalize"
53}
Note: See TracBrowser for help on using the repository browser.