source: CONFIG/trunk/LMDZ4OR_v2/LMDZOR/COMP/orchidee.driver @ 326

Last change on this file since 326 was 326, checked in by jgipsl, 14 years ago
  • Updated parameter files, *.card and *.driver as done for configuration IPSLCM4_v2.

Important differences, in orchidee.def : sechiba_qsint, rveg_pft

in gcm.def : cvl_corr, day_step, iphysiq

  • Updated variable list for timeseries
  • Removed config.card.OldName? : not useful for this config
File size: 2.7 KB
Line 
1# $Id$
2#
3#!/bin/ksh
4
5#D- Driver du script pour ORCHIDEE_OL (off-line)
6
7#-----------------------------------------------------------------
8function SRF_Initialize
9{
10    IGCM_debug_PushStack "SRF_Initialize"
11
12    IGCM_debug_PopStack "SRF_Initialize"
13}
14
15#-----------------------------------------------------------------
16function SRF_Update
17{
18    IGCM_debug_PushStack "SRF_Update"
19
20    case ${config_SRF_WriteFrequency} in
21        1Y|1y) 
22            (( STOMATE_WRITE_STEP = PeriodLengthInDays ))
23            (( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 )) ;;
24        1M|1m) 
25            if [ ${config_UserChoices_PeriodLength} = 1Y ] ; then
26                (( STOMATE_WRITE_STEP = PeriodLengthInDays / 12 ))
27                (( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / 12  ))
28            else
29                (( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) ))
30                (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 ))
31            fi ;;
32        5D|5d) 
33            (( STOMATE_WRITE_STEP = 5 ))
34            (( SECHIBA_WRITE_STEP = 5 * 86400 )) ;;
35        1D|1d) 
36            (( STOMATE_WRITE_STEP = 1 ))
37            (( SECHIBA_WRITE_STEP = 86400 )) ;;
38        *) 
39            IGCM_debug_Exit "SRF_Update " ${config_SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
40            IGCM_debug_Verif_Exit ;;
41    esac
42
43
44    if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then
45        sed -e "s/_start_sech_/default/" \
46            -e "s/_write_step_/${SECHIBA_WRITE_STEP}/" \
47            orchidee.def > orchidee.def.tmp
48## For STOMATE
49#           -e "s/STOMATE_HIST_DT= 10./STOMATE_HIST_DT = ${STOMATE_WRITE_STEP}/" \
50
51## For ORCHIDEE_WATCHOUT_FILE :
52#            -e "s/ORCHIDEE_WATCHOUT= n/ORCHIDEE_WATCHOUT= y/" \
53#            -e "s/DT_WATCHOUT= 1800/DT_WATCHOUT= 3600/" \
54    else
55        sed -e "s/_start_sech_/start_sech.nc/" \
56            -e "s/_write_step_/${SECHIBA_WRITE_STEP}/" \
57            orchidee.def > orchidee.def.tmp
58## For STOMATE
59#            -e "s/STOMATE_RESTART_FILEIN= NONE/STOMATE_RESTART_FILEIN = stomate_rest_in.nc/" \
60#            -e "s/STOMATE_HIST_DT= 10./STOMATE_HIST_DT = ${STOMATE_WRITE_STEP}/" \
61
62## For ORCHIDEE_WATCHOUT_FILE :
63#            -e "s/ORCHIDEE_WATCHOUT= n/ORCHIDEE_WATCHOUT= y/" \
64#            -e "s/DT_WATCHOUT= 1800/DT_WATCHOUT= 3600/" \
65    fi
66    IGCM_sys_Mv orchidee.def.tmp orchidee.def
67
68    IGCM_debug_PopStack "SRF_Update"
69}
70
71#-----------------------------------------------------------------
72function SRF_Finalize
73{
74    IGCM_debug_PushStack "SRF_Finalize"
75
76# For STOMATE :
77#     if [ $( IGCM_date_DaysBetweenGregorianDate ${PeriodDateEnd} ${year}1230 ) -ge 0 ] ; then
78#       IGCM_sys_Put_Out stomate_Cforcing.nc ${R_OUT_SRF_O_M}/${PREFIX}_stomate_Cforcing.nc
79#       IGCM_sys_Put_Out stomate_forcing.nc  ${R_OUT_SRF_O_M}/${PREFIX}_stomate_forcing.nc
80#     fi
81
82    echo FINALIZE SRF !!!
83
84    IGCM_debug_PopStack "SRF_Finalize"
85}
Note: See TracBrowser for help on using the repository browser.