1 | #!/bin/ksh |
---|
2 | |
---|
3 | #D- Driver du script pour ORCHIDEE_OL (off-line) |
---|
4 | |
---|
5 | #----------------------------------------------------------------- |
---|
6 | function SRF_Initialize |
---|
7 | { |
---|
8 | IGCM_debug_PushStack "SRF_Initialize" |
---|
9 | |
---|
10 | ##--Variables used by ORCHIDEE -- |
---|
11 | PAT_WRI_STEP=$( grep 'WRITE_STEP' ${SUBMIT_DIR}/PARAM/orchidee.def ) |
---|
12 | |
---|
13 | IGCM_debug_PopStack "SRF_Initialize" |
---|
14 | } |
---|
15 | |
---|
16 | #----------------------------------------------------------------- |
---|
17 | function SRF_Update |
---|
18 | { |
---|
19 | IGCM_debug_PushStack "SRF_Update" |
---|
20 | |
---|
21 | (( SECH_WRI_STEP=PeriodLengthInDays * 86400 )) |
---|
22 | |
---|
23 | if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then |
---|
24 | |
---|
25 | # sed -e "s/SECHIBA_restart_in=_start_sech_/SECHIBA_restart_in=NONE/" \ |
---|
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/SECHIBA_restart_in=_start_sech_/SECHIBA_restart_in=start_sech.nc/" \ |
---|
31 | sed -e "s/_start_sech_/start_sech.nc/" \ |
---|
32 | -e "s/${PAT_WRI_STEP}/WRITE_STEP=${SECH_WRI_STEP}/" \ |
---|
33 | orchidee.def > orchidee.def.tmp |
---|
34 | fi |
---|
35 | |
---|
36 | IGCM_sys_Mv orchidee.def.tmp orchidee.def |
---|
37 | |
---|
38 | # IGCM_sys_Cp ${RUN_DIR}/orchidee.def ${RUN_DIR}/run.def |
---|
39 | # IGCM_sys_Put_Out ${RUN_DIR}/run.def ${R_SAVE}/${PREFIX}_run.def |
---|
40 | |
---|
41 | IGCM_debug_PopStack "SRF_Update" |
---|
42 | } |
---|
43 | |
---|
44 | #----------------------------------------------------------------- |
---|
45 | function SRF_Finalize |
---|
46 | { |
---|
47 | IGCM_debug_PushStack "SRF_Finalize" |
---|
48 | |
---|
49 | # IGCM_sys_Put_Out ${RUN_DIR}/used_run.def ${R_SAVE}/${PREFIX}_used_run.def |
---|
50 | |
---|
51 | echo FINALIZE SRF !!! |
---|
52 | |
---|
53 | IGCM_debug_PopStack "SRF_Finalize" |
---|
54 | } |
---|