source: CONFIG/UNIFORM/v6/LMDZOR_v6/GENERAL/DRIVER/stomate.driver @ 2599

Last change on this file since 2599 was 2595, checked in by jgipsl, 9 years ago

Modifications to be used with ORCHIDEE trunk rev 2724 or later.

  • Remove reftemp.nc : not needed anymore for ORCHIDEE trunk rev 2724 or later
  • Coping PFTmap file for current year : since ORCHIDEE trunk rev 2724
  • Moved file_def_orchidee.xml into PARAM directory : add AUTO and revision number for correspondance to ORCHIDEE trunk.
  • orchidee.driver/ stomate.driver :
    • modify to use nonblocker option with IGCM_comp_modifyXmlFile.
    • some homogenization between offline ORCHIDEE_OL and LMDZOR_v6
File size: 2.4 KB
Line 
1#!/bin/ksh
2
3#D- Driver pour ORCHIDEE stomate component
4
5#-----------------------------------------------------------------
6function SBG_Initialize
7{
8    IGCM_debug_PushStack "SBG_Initialize"
9
10    IGCM_debug_PopStack "SBG_Initialize"
11}
12
13#-----------------------------------------------------------------
14function SBG_Update
15{
16    IGCM_debug_PushStack "SBG_Update"
17   
18    # Output management
19
20    # Set default values for stomate output files.
21    stomate_enabled=.FALSE.
22    stomate_freq=0s
23
24    # Read WriteFrequency set in config.card section SBG.
25    # Only one choice can be set as WriteFrequency. The same choice will be used for
26    # both stomate_history and stomate_ipcc_history files.
27    case ${config_SBG_WriteFrequency} in
28        *Y|*y) 
29            NbYears=$( echo ${config_SBG_WriteFrequency} | awk -F '[yY]' '{print $1}' )
30            NbDaysYear=$( IGCM_date_DaysInYear ${year} )
31            stomate_enabled=.TRUE.
32            stomate_freq=${NbYears}y ;;
33        *M|*m) 
34            NbMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' )
35            stomate_enabled=.TRUE.
36            stomate_freq=${NbMonths}mo ;;
37        *D|*d)
38            NbDays=$( echo ${frequency} | awk -F '[dD]' '{print $1}' )
39            stomate_enabled=.TRUE.
40            stomate_freq=${NbDays}d ;;
41        *) 
42            IGCM_debug_Exit "SBG_Update " ${config_SBG_WriteFrequency} " invalid WriteFrequency : choose between xY, xM, xD" 
43            IGCM_debug_Verif_Exit ;;
44    esac
45
46    # Modify file_def_orchidee.xml
47    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled ${stomate_enabled}
48    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq ${stomate_freq}
49    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled ${stomate_enabled}
50    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq ${stomate_freq}
51   
52
53    # Define in orchidee.def if restart file should be used
54    if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SBG_Restart}" = "n" ] ) ; then
55        echo "STOMATE : without restart"
56        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN NONE
57    else
58        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN stomate_rest_in.nc
59    fi
60
61    IGCM_debug_PopStack "SBG_Update"
62}
63
64#-----------------------------------------------------------------
65function SBG_Finalize
66{
67    IGCM_debug_PushStack "SBG_Finalize"
68   
69    IGCM_debug_PopStack "SBG_Finalize"
70}
Note: See TracBrowser for help on using the repository browser.