Ignore:
Timestamp:
01/07/16 16:13:28 (8 years ago)
Author:
acosce
Message:

update lmdzorinca configuration to fit with last versions of lmdz and orchidee

Location:
CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER/lmdz.driver

    r2512 r2694  
    1313    RESOL_ATM_Y=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $2}' ) 
    1414    RESOL_ATM_XY="${RESOL_ATM_X}x${RESOL_ATM_Y}" 
    15  
    16     ##-- Calendar type for LMDZ and create_etat0_limit 
    17     case ${config_UserChoices_CalendarType} in 
    18         leap|gregorian) 
    19             CalendarTypeForLmdz=earth_366d 
    20             CalendarTypeForCreate=gregorian;; 
    21         noleap) 
    22             CalendarTypeForLmdz=earth_365d 
    23             CalendarTypeForCreate=${CalendarTypeForLmdz};; 
    24         360d) 
    25             CalendarTypeForLmdz=earth_360d 
    26             CalendarTypeForCreate=${CalendarTypeForLmdz};; 
    27         *) 
    28             CalendarTypeForLmdz=earth_360d 
    29             CalendarTypeForCreate=${CalendarTypeForLmdz} 
    30     esac 
    3115 
    3216    ##- LMDZ physics version 
     
    6347    ##-- Output frequency purpose .... 
    6448    ##--  Initialisation  .... 
    65     ok_mensuel=n 
    66     ok_journe=n 
    67     ok_hf=n 
    68     ok_hf3h=n 
    69     ok_hf3hm=n 
    70     ok_stn=n 
     49    ok_mensuel=.FALSE. 
     50    ok_journe=.FALSE. 
     51    ok_hf=.FALSE. 
     52    ok_hf3h=.FALSE. 
     53    ok_hf3hm=.FALSE. 
     54    ok_stn=.FALSE. 
    7155 
    7256    case ${config_UserChoices_PeriodLength} in 
    73         1Y|1y|1M|1m) ok_mensuel=y ;; 
    74         5D|5d|1D|1d) ok_journe=y ;; 
     57        1Y|1y|1M|1m) ok_mensuel=.TRUE. ;; 
     58        5D|5d|1D|1d) ok_journe=.TRUE. ;; 
    7559    esac 
    7660 
    7761    for frequency in ${config_ATM_WriteFrequency} ; do 
    7862        case ${frequency} in 
    79             1M|1m) ok_mensuel=y ;; 
     63            1M|1m) ok_mensuel=.TRUE. ;; 
    8064        esac 
    8165        case ${frequency} in 
    82             5D|5d|1D|1d) ok_journe=y ;; 
     66            5D|5d|1D|1d) ok_journe=.TRUE. ;; 
    8367        esac 
    8468        case ${frequency} in 
    85             HF|hf) ok_hf=y ;; 
     69            HF|hf) ok_hf=.TRUE. ;; 
    8670        esac 
    8771        case ${frequency} in  
    88             HF3h|hf3h) ok_hf3h=y ;; 
     72            HF3h|hf3h) ok_hf3h=.TRUE. ;; 
    8973        esac 
    9074        case ${frequency} in  
    91             HF3hm|hf3hm) ok_hf3hm=y ;; 
     75            HF3hm|hf3hm) ok_hf3hm=.TRUE. ;; 
    9276        esac 
    9377        case ${frequency} in 
    94             STN|stn) ok_stn=y ;; 
     78            STN|stn) ok_stn=.TRUE. ;; 
    9579        esac 
    9680    done 
     
    11094 
    11195    ##  Read LMDZ_COSP_OK in lmdz.card 
    112     if [ ! X${lmdz_UserChoices_LMDZ_COSP_OK} = X ] ; then 
    113         LMDZ_COSP_OK=${lmdz_UserChoices_LMDZ_COSP_OK} 
    114     else 
    115         LMDZ_COSP_OK=n 
    116     fi 
    117     ##  Read LMDZ_COSP_monthly in lmdz.card 
    118     if [ ! X${lmdz_UserChoices_LMDZ_COSP_monthly} = X ] ; then 
    119         LMDZ_COSP_monthly=${lmdz_UserChoices_LMDZ_COSP_monthly} 
    120     else 
    121         LMDZ_COSP_monthly=n 
    122     fi 
    123     ##  Read LMDZ_COSP_daily in lmdz.card 
    124     if [ ! X${lmdz_UserChoices_LMDZ_COSP_daily} = X ] ; then 
    125         LMDZ_COSP_daily=${lmdz_UserChoices_LMDZ_COSP_daily} 
    126     else 
    127         LMDZ_COSP_daily=n 
    128     fi 
    129     ##  Read LMDZ_COSP_hf in lmdz.card 
    130     if [ ! X${lmdz_UserChoices_LMDZ_COSP_hf} = X ] ; then 
    131         LMDZ_COSP_hf=${lmdz_UserChoices_LMDZ_COSP_hf} 
    132     else 
    133         LMDZ_COSP_hf=n 
    134     fi 
     96    if [ X${lmdz_UserChoices_LMDZ_COSP_OK} = Xy ] ; then 
     97        ##  LMDZ_COSP_OK=y, now read all other COSP variables 
     98        ##  Read LMDZ_COSP_monthly in lmdz.card 
     99        if [ X${lmdz_UserChoices_LMDZ_COSP_monthly} = Xy ] ; then 
     100            LMDZ_COSP_monthly=.TRUE. 
     101        else 
     102            LMDZ_COSP_monthly=.FALSE. 
     103        fi 
     104        ##  Read LMDZ_COSP_daily in lmdz.card 
     105        if [ X${lmdz_UserChoices_LMDZ_COSP_daily} = Xy ] ; then 
     106            LMDZ_COSP_daily=.TRUE. 
     107        else 
     108            LMDZ_COSP_daily=.FALSE. 
     109        fi 
     110        ##  Read LMDZ_COSP_hf in lmdz.card 
     111        if [ X${lmdz_UserChoices_LMDZ_COSP_hf} = Xy ] ; then 
     112            LMDZ_COSP_hf=.TRUE. 
     113        else 
     114            LMDZ_COSP_hf=.FALSE. 
     115        fi 
     116    else 
     117        # LMDZ_COSP_OK=n : All cosp output are deactivated 
     118        LMDZ_COSP_monthly=.FALSE. 
     119        LMDZ_COSP_daily=.FALSE. 
     120        LMDZ_COSP_hf=.FALSE. 
     121    fi   
    135122 
    136123    ##  Read LMDZ_NMC_monthly in lmdz.card 
    137     if [ ! X${lmdz_UserChoices_LMDZ_NMC_monthly} = X ] ; then 
    138         LMDZ_NMC_monthly=${lmdz_UserChoices_LMDZ_NMC_monthly} 
    139     else 
    140         LMDZ_NMC_monthly=n 
    141     fi 
    142  
     124    if [ X${lmdz_UserChoices_LMDZ_NMC_monthly} = Xy ] ; then 
     125        LMDZ_NMC_monthly=.TRUE. 
     126    else 
     127        LMDZ_NMC_monthly=.FALSE. 
     128    fi 
     129     
    143130    ## Read LMDZ_NMC_daily in lmdz.card 
    144     if [ ! X${lmdz_UserChoices_LMDZ_NMC_daily} = X ] ; then 
    145         LMDZ_NMC_daily=${lmdz_UserChoices_LMDZ_NMC_daily} 
    146     else 
    147         LMDZ_NMC_daily=n 
     131    if [ X${lmdz_UserChoices_LMDZ_NMC_daily} = Xy ] ; then 
     132        LMDZ_NMC_daily=.TRUE. 
     133    else 
     134        LMDZ_NMC_daily=.FALSE. 
    148135    fi 
    149136     
    150137    ## Read LMDZ_NMC_hf in lmdz.card 
    151     if [ ! X${lmdz_UserChoices_LMDZ_NMC_hf} = X ] ; then 
    152         LMDZ_NMC_hf=${lmdz_UserChoices_LMDZ_NMC_hf} 
    153     else 
    154         LMDZ_NMC_hf=n 
    155     fi 
    156  
     138    if [ X${lmdz_UserChoices_LMDZ_NMC_hf} = Xy ] ; then 
     139        LMDZ_NMC_hf=.TRUE. 
     140    else 
     141        LMDZ_NMC_hf=.FALSE. 
     142    fi 
     143     
    157144 
    158145    IGCM_debug_PopStack "ATM_Initialize" 
     
    164151    IGCM_debug_PushStack "ATM_Update" 
    165152 
    166  
    167     case ${config_UserChoices_PeriodLength} in 
    168         *Y|*y)  
    169                LMDZ_ecrit_ISCCP=30. 
    170                LMDZ_periodav=30. 
    171                if [ "${config_UserChoices_CalendarType}" != "360d" ] ; then 
    172                   echo Do not consider following warning if your running create_etat0_limit : 
    173                   echo WARNING !!! For lmdz : calendartype in config.card. PeriodLength=1Y allowed only for CalendarType=360d  
    174                fi 
    175                ;; 
    176         *) 
    177                LMDZ_ecrit_ISCCP=${PeriodLengthInDays}. 
    178                LMDZ_periodav=${PeriodLengthInDays}. 
    179                ;; 
    180     esac 
    181    
    182     ##-- Remise ou non a zero de la date initiale de LMDZ pour le fichier run.def 
    183     if [ ${CumulPeriod} -eq 1 ] ; then 
    184         RAZ_DATE=1 
    185     else 
    186         RAZ_DATE=0 
    187     fi 
    188153 
    189154    ## Algorithme for special treatment for Bands_xxx file 
     
    322287    ##   COSP daily output for years 1979 and later (mandatory for historical CMIP5 run). 
    323288    if ([ X"${lmdz_UserChoices_LMDZ_COSP_daily1979}" = X"y" ] &&  [ ${year} -ge 1979 ]) ; then 
    324         LMDZ_COSP_daily=y 
    325     fi 
    326  
    327  
    328     ## output.def parameters 
    329     #  columns in phys_output_filekeys refer to the filenames given in phys_out_filenames in output.def :   
    330     #                                            histmth       histday        histhf    histhf3h   histhf3hm   histstn 
    331     IGCM_comp_modifyDefFile nonblocker output.def phys_out_filekeys "${ok_mensuel} ${ok_journe}   ${ok_hf}  ${ok_hf3h} ${ok_hf3hm} ${ok_stn}" 
    332     IGCM_comp_modifyDefFile nonblocker output.def ecrit_ISCCP ${LMDZ_ecrit_ISCCP} 
    333     IGCM_comp_modifyDefFile nonblocker output.def ok_cosp     ${LMDZ_COSP_OK} 
    334     IGCM_comp_modifyDefFile nonblocker output.def ok_mensuelCOSP  ${LMDZ_COSP_monthly} 
    335     IGCM_comp_modifyDefFile nonblocker output.def ok_journeCOSP   ${LMDZ_COSP_daily} 
    336     IGCM_comp_modifyDefFile nonblocker output.def ok_hfCOSP   ${LMDZ_COSP_hf} 
    337     IGCM_comp_modifyDefFile nonblocker output.def ok_histNMC  "${LMDZ_NMC_monthly} ${LMDZ_NMC_daily} ${LMDZ_NMC_hf}" 
    338  
    339     # XIOS XML definition 
    340     if [ X${lmdz_UserChoices_XIOS}  = Xy ] ; then 
    341     # Default init : files are desactivated 
    342         IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth enabled .FALSE.  
    343         IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday enabled .FALSE.  
    344         IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf enabled .FALSE. 
    345 #       IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h enabled .FALSE. 
    346 #       IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm enabled .FALSE. 
    347         IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn enabled .FALSE. 
    348         IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC enabled .FALSE. 
    349         IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC enabled .FALSE. 
    350         IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC enabled .FALSE. 
    351         IGCM_comp_modifyXmlFile force file_def_histmthCOSP_lmdz.xml histmthCOSP enabled .FALSE. 
    352         IGCM_comp_modifyXmlFile force file_def_histdayCOSP_lmdz.xml histdayCOSP enabled .FALSE. 
    353         IGCM_comp_modifyXmlFile force file_def_histhfCOSP_lmdz.xml histhfCOSP enabled .FALSE. 
    354  
    355     # Default output level : 5 
    356         IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth output_level 5  
    357         IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_level 5  
    358         IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_level 5 
    359 #       IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h output_level 5 
    360 #       IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm output_level 5 
    361         IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn output_level 5 
    362         IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC output_level 5 
    363         IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC output_level 5 
    364         IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC output_level 5 
    365         IGCM_comp_modifyXmlFile force file_def_histmthCOSP_lmdz.xml histmthCOSP output_level 5 
    366         IGCM_comp_modifyXmlFile force file_def_histdayCOSP_lmdz.xml histdayCOSP output_level 5 
    367         IGCM_comp_modifyXmlFile force file_def_histhfCOSP_lmdz.xml histhfCOSP output_level 5 
    368      # Filling of XML files  
    369         if [ X${ok_mensuel} = Xy ] ; then 
    370             IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth enabled .TRUE.  
    371             IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth output_freq 1mo 
    372             IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth name histmth 
    373         fi 
    374         if [ X${ok_journe} = Xy ] ; then         
    375             IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday enabled .TRUE.  
    376             IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_freq 1d 
    377             IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday name histday 
    378             if [ X${OutLevel} = Xlow ] || [ X${OutLevel} = Xmedium ] ; then 
    379                 IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_level 2 
    380             fi 
    381         fi 
    382         if [ X${ok_hf} = Xy ] ; then 
    383             IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf enabled .TRUE.  
    384             IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_freq 6h 
    385             IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf name histhf 
    386             if [ X${OutLevel} = Xlow ] ; then 
    387                 IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_level 2 
    388             fi 
    389         fi       
    390 #       if [ X${ok_hf3h} = Xy ] ; then 
    391 #           IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h enabled .TRUE.  
    392 #           IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h output_freq 3h 
    393 #           IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h name histhf3h 
    394 #       fi       
    395 #       if [ X${ok_hf3hm} = Xy ] ; then 
    396 #           IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm enabled .TRUE.  
    397 #           IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm output_freq 3h 
    398 #           IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm name histhf3hm 
    399 #       fi 
    400         if [ X${ok_stn} = Xy ] ; then 
    401             IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn enabled .TRUE.  
    402             IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn output_freq 1800s 
    403             IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn name histstn 
    404         fi 
    405         if [ X${LMDZ_NMC_monthly} = Xy ] ; then 
    406             IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC enabled .TRUE.  
    407             IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC output_freq 1mo 
    408             IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC name histmthNMC 
    409         fi 
    410         if [ X${LMDZ_NMC_daily} = Xy ] ; then 
    411             IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC enabled .TRUE.  
    412             IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC output_freq 1d 
    413             IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC name histdayNMC 
    414         fi 
    415         if [ X${LMDZ_NMC_hf} = Xy ] ; then 
    416             IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC enabled .TRUE.  
    417             IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC output_freq 6h 
    418             IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC name histhfNMC 
    419         fi 
    420  
    421         if [  X${LMDZ_COSP_OK} = Xy ] ; then 
    422             if [ X${LMDZ_COSP_monthly} = Xy ] ; then 
    423                 IGCM_comp_modifyXmlFile force file_def_histmthCOSP_lmdz.xml histmthCOSP enabled .TRUE.  
    424                 IGCM_comp_modifyXmlFile force file_def_histmthCOSP_lmdz.xml histmthCOSP output_freq 1mo 
    425                 IGCM_comp_modifyXmlFile force file_def_histmthCOSP_lmdz.xml histmthCOSP name histmthCOSP 
    426             fi 
    427             if [ X${LMDZ_COSP_daily} = Xy ] ; then 
    428                 IGCM_comp_modifyXmlFile force file_def_histdayCOSP_lmdz.xml histdayCOSP enabled .TRUE.  
    429                 IGCM_comp_modifyXmlFile force file_def_histdayCOSP_lmdz.xml histdayCOSP output_freq 1d 
    430                 IGCM_comp_modifyXmlFile force file_def_histdayCOSP_lmdz.xml histdayCOSP name histdayCOSP 
    431             fi 
    432             if [ X${LMDZ_COSP_hf} = Xy ] ; then 
    433                 IGCM_comp_modifyXmlFile force file_def_histhfCOSP_lmdz.xml histhfCOSP enabled .TRUE.  
    434                 IGCM_comp_modifyXmlFile force file_def_histhfCOSP_lmdz.xml histhfCOSP output_freq 6h 
    435                 IGCM_comp_modifyXmlFile force file_def_histhfCOSP_lmdz.xml histhfCOSP name histhfCOSP 
    436             fi 
    437         fi 
    438  
    439     fi 
     289        LMDZ_COSP_daily=.TRUE. 
     290    fi 
     291 
     292    ## Modifiy  
     293    IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled ${ok_mensuel} 
     294     
     295    IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled ${ok_journe} 
     296     
     297    if [ X${OutLevel} = Xlow ] || [ X${OutLevel} = Xmedium ] ; then 
     298        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 2 
     299    else 
     300        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 5 
     301    fi 
     302     
     303    IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled ${ok_hf} 
     304     
     305    if [ X${OutLevel} = Xlow ] ; then 
     306        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 5 
     307    elif [ X${OutLevel} = Xmedium ] ; then 
     308        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 6 
     309    elif [ X${OutLevel} = Xhigh ] ; then 
     310        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 7 
     311    fi 
     312         
     313#       IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h enabled ${ok_hf3h} 
     314#       IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h output_freq 3h 
     315#       IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h name histhf3h 
     316 
     317#       IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm enabled ${ok_hf3hm} 
     318#       IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm output_freq 3h 
     319#       IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm name histhf3hm 
     320 
     321    IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled ${ok_stn} 
     322 
     323    IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled ${LMDZ_NMC_monthly} 
     324    IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled ${LMDZ_NMC_daily} 
     325    IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled ${LMDZ_NMC_hf} 
     326     
     327    IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP enabled ${LMDZ_COSP_monthly} 
     328    IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP enabled ${LMDZ_COSP_daily} 
     329    IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP enabled ${LMDZ_COSP_hf} 
     330         
    440331 
    441332    ## gcm.def parameters :  
     
    481372 
    482373    ## run.def parameters 
    483     IGCM_comp_modifyDefFile blocker run.def dayref   ${InitDay} 
    484     IGCM_comp_modifyDefFile blocker run.def nday     ${PeriodLengthInDays} 
    485     IGCM_comp_modifyDefFile blocker run.def raz_date ${RAZ_DATE} 
    486     IGCM_comp_modifyDefFile blocker run.def periodav ${LMDZ_periodav} 
    487     IGCM_comp_modifyDefFile nonblocker run.def adjust   ${LMDZ_adjust} 
     374 
     375 
     376    ##-- Remise ou non a zero de la date initiale de LMDZ pour le fichier run.def 
     377    if [ ${CumulPeriod} -eq 1 ] ; then 
     378        IGCM_comp_modifyDefFile blocker run.def raz_date  1 
     379    else 
     380        IGCM_comp_modifyDefFile blocker run.def raz_date  0 
     381    fi 
     382 
     383    ##-- Calendar type for LMDZ and create_etat0_limit 
     384    case ${config_UserChoices_CalendarType} in 
     385        leap|gregorian) 
     386            IGCM_comp_modifyDefFile blocker run.def calend  gregorian ;; 
     387        noleap) 
     388            IGCM_comp_modifyDefFile blocker run.def calend  earth_365d ;; 
     389        360d) 
     390            IGCM_comp_modifyDefFile blocker run.def calend  earth_360d ;; 
     391        *) 
     392            IGCM_comp_modifyDefFile blocker run.def calend  earth_360d ;; 
     393    esac 
     394 
     395    IGCM_comp_modifyDefFile blocker run.def dayref    ${InitDay} 
     396    IGCM_comp_modifyDefFile blocker run.def nday      ${PeriodLengthInDays} 
     397    IGCM_comp_modifyDefFile nonblocker run.def adjust ${LMDZ_adjust} 
    488398 
    489399    # Set anneeref different for gcm and ce0l 
    490     # Variable calend is different for a run with create_etat0_limit and the gcm 
    491400    # Test if executable create_etat0_limit is present and lmdz.x is not present 
    492401    if [ -f create_etat0_limit* ] || [ -f ce0l* ] && [ ! -f lmdz.x ] ; then 
    493402        # for case ce0l : always take current year 
    494403        IGCM_comp_modifyDefFile blocker run.def anneeref ${year} 
    495         IGCM_comp_modifyDefFile blocker run.def calend   ${CalendarTypeForCreate} 
    496404 
    497405        # Temporary, set use_filtre_fft=n because we now use dyn3d for ce0l version where fft is not implemented.  
     
    501409        # for case gcm : take first year of simulation 
    502410        IGCM_comp_modifyDefFile blocker run.def anneeref ${InitYear} 
    503         IGCM_comp_modifyDefFile blocker run.def calend   ${CalendarTypeForLmdz} 
    504     fi 
    505  
    506     # Activate creation of file grilles_gcm.nc only at first period 
    507     if [ ${CumulPeriod} -eq 1 ] ; then 
    508         IGCM_comp_modifyDefFile nonblocker run.def grilles_gcm_netcdf y 
    509     else 
    510         IGCM_comp_modifyDefFile nonblocker run.def grilles_gcm_netcdf n 
    511411    fi 
    512412 
     
    623523 
    624524    if [ X${lmdz_UserChoices_XIOS}  = Xy ] ; then 
    625     # Add include of LMDZ context in iodef.xml 
    626     # In iodef.xml add on next line after "COMPONENT CONTEXT" 
    627     #  <context id="LMDZ" src="./context_lmdz.xml"/> 
    628         echo '<context id="LMDZ" src="./context_lmdz.xml"/>' > add.tmp 
    629         cp iodef.xml iodef.xml.tmp 
    630         sed -e "/COMPONENT CONTEXT/r add.tmp" \ 
    631             iodef.xml.tmp > iodef.xml 
    632         rm iodef.xml.tmp add.tmp 
     525        # Add include of LMDZ context in iodef.xml 
     526        # In iodef.xml add on next line after "COMPONENT CONTEXT" 
     527        #  <context id="LMDZ" src="./context_lmdz.xml"/> 
     528        echo '<context id="LMDZ" src="./context_lmdz.xml"/>' > add.tmp 
     529        cp iodef.xml iodef.xml.tmp 
     530        sed -e "/COMPONENT CONTEXT/r add.tmp" iodef.xml.tmp > iodef.xml 
     531        rm iodef.xml.tmp add.tmp 
    633532 
    634533        # Set ok_all_xml=y in run.def 
    635         IGCM_comp_modifyDefFile nonblocker run.def ok_all_xml y 
    636     else 
    637         # Deactivate ok_all_xml in run.def 
    638         IGCM_comp_modifyDefFile nonblocker run.def ok_all_xml n 
     534        IGCM_comp_modifyDefFile nonblocker run.def ok_all_xml y 
     535    else 
     536        # Deactivate ok_all_xml in run.def 
     537        IGCM_comp_modifyDefFile nonblocker run.def ok_all_xml n 
    639538    fi 
    640539     
  • CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER/orchidee.driver

    r2410 r2694  
    66    IGCM_debug_PushStack "SRF_Initialize" 
    77 
    8     RESOL_SRF=ALL 
    9  
    10     for frequency in ${config_SRF_WriteFrequency} ; do 
    11         case ${frequency} in 
    12             HF|hf) SRF_ok_hf=y ;; 
    13         esac 
    14     done 
    15  
    168    ##- Define variable DefSuffix set in orchidee.card 
    17     ##  This variable is used in orchidee.card to choose  
    18     ##  parameter file(orchidee.def_DefSuffix).  
     9    ##  This variable is used in orchidee.card to choose 
     10    ##  parameter file(orchidee.def_DefSuffix). 
    1911    if [ ! X${orchidee_UserChoices_DefSuffix} = X ] ; then 
    20         DefSuffix=${orchidee_UserChoices_DefSuffix} 
     12        DefSuffix=${orchidee_UserChoices_DefSuffix} 
    2113    else 
    22         DefSuffix=Choi 
     14        DefSuffix=Choi 
    2315    fi 
    2416 
     
    3123    IGCM_debug_PushStack "SRF_Update" 
    3224 
     25    ## 1. Modifications in orchidee.def parameter file 
     26 
    3327    # Activate STOMATE if the compontent SBG=stomate is set in config.card 
    3428    if [ X${config_ListOfComponents_SBG} = Xstomate ] ; then 
    35         IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE y 
     29        # Activate stomate in orchidee.def 
     30        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE y 
    3631    else 
    37         IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE n 
     32        # Deactivate stomate in orchidee.def 
     33        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE n 
     34        # Deactivate output files for stomate 
     35        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled .FALSE. 
     36        IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled .FALSE. 
    3837    fi 
    3938 
    40     typeset SECHIBA_WRITE_STEP 
    41  
    42     if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    43         IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .FALSE.  
    44         IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .FALSE.  
    45         IGCM_comp_modifyDefFile nonblocker orchidee.def XIOS_ORCHIDEE_OK y 
     39    # Define in orchidee.def if restart file should be used 
     40    if ( [ ${CumulPeriod} -ne 1 ] || [ "${config_SRF_Restart}" != "n" ] ) ; then 
     41        IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in sechiba_rest_in.nc 
    4642    else 
    47         IGCM_comp_modifyDefFile nonblocker orchidee.def XIOS_ORCHIDEE_OK n 
    48     fi     
    49  
    50     SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' )  
    51     case ${SRF_WriteFrequency} in 
    52         *Y|*y)  
    53             WriteInYears=$( echo ${SRF_WriteFrequency} | awk -F '[yY]' '{print $1}' ) 
    54             PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    55             (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 ))  
    56             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    57                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    58                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInYears}y 
    59                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    60             fi 
    61             ;; 
    62         1M) 
    63             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    64                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    65                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1mo 
    66                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    67             fi 
    68             case ${config_UserChoices_PeriodLength} in 
    69             *Y|*y) 
    70                 SECHIBA_WRITE_STEP=-1. 
    71                 ;; 
    72             *M|*m) 
    73                 SECHIBA_WRITE_STEP=-1. 
    74                 ;; 
    75             *) 
    76                 (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 
    77                 ;; 
    78             esac 
    79             ;; 
    80         *M|*m)  
    81             WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 
    82             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    83                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    84                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInMonths}mo 
    85                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    86             fi 
    87             case ${config_UserChoices_PeriodLength} in 
    88             *Y|*y) 
    89                 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    90                 (( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / PeriodLengthInYears / 12  )) 
    91                 ;; 
    92             *M|*m) 
    93                 PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' ) 
    94                 (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInMonths  * 86400 / PeriodLengthInMonths  )) 
    95                 ;; 
    96             *) 
    97                 (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 
    98                 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    99                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    100                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${SECHIBA_WRITE_STEP}s 
    101                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
    102                 fi 
    103                 ;; 
    104             esac 
    105             ;; 
    106         5D|5d)  
    107             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    108                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    109                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 5d 
    110                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    111             fi 
    112             (( SECHIBA_WRITE_STEP = 5 * 86400 ))  
    113             ;; 
    114         1D|1d)  
    115             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    116                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    117                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1d 
    118                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    119             fi 
    120             (( SECHIBA_WRITE_STEP = 86400 ))  
    121             ;; 
    122         *s) 
    123             WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' ) 
    124             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    125                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    126                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 
    127                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    128             fi 
    129             (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;; 
    130         *)  
    131             IGCM_debug_Exit "SRF_Update " ${SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D."  
    132             IGCM_debug_Verif_Exit ;; 
    133     esac 
    134  
    135 #Use of XIOS ouputs only 
    136  
    137     if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    138         (( SECHIBA_WRITE_STEP = 0 )) 
    139     fi 
    140     IGCM_comp_modifyDefFile nonblocker orchidee.def WRITE_STEP ${SECHIBA_WRITE_STEP} 
    141     IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTLEVEL ${orchidee_UserChoices_sechiba_LEVEL} 
    142  
    143     # Outputs HF in HISTFILE2 if required 
    144     if [ X${SRF_ok_hf} = Xy ] ; then 
    145         IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTFILE2 y 
    146         if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    147             IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .TRUE.  
    148             IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 output_freq 10800s 
    149             IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 name sechiba_out_2 
    150         fi 
    151     else 
    152         IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTFILE2 n 
    153     fi 
    154     IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTLEVEL2 1 
    155     IGCM_comp_modifyDefFile nonblocker orchidee.def WRITE_STEP2 10800.0 
    156  
    157     if ( [ ${CumulPeriod} -ne 1 ] || [ "${config_SRF_Restart}" != "n" ] ) ; then 
    158         IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in sechiba_rest_in.nc 
    159     else 
    160         IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in NONE 
     43        IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in NONE 
    16144    fi 
    16245 
    163 # Modify in orchidee.def VEGET_UPDATE and LAND_COVER_CHANGE if they are set in orchidee.card section UserChoices 
     46    # Modify in orchidee.def VEGET_UPDATE and LAND_COVER_CHANGE if they are set in orchidee.card section UserChoices 
    16447    if [ ! X${orchidee_UserChoices_VEGET_UPDATE} = X ] ; then 
    165         IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE   ${orchidee_UserChoices_VEGET_UPDATE} 
     48        IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE   ${orchidee_UserChoices_VEGET_UPDATE} 
    16649    else 
    167         IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE 0Y 
     50        IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE 0Y 
    16851    fi 
    16952    if [ ! X${orchidee_UserChoices_LAND_COVER_CHANGE} = X ] ; then 
    170         IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE ${orchidee_UserChoices_LAND_COVER_CHANGE} 
     53        IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE ${orchidee_UserChoices_LAND_COVER_CHANGE} 
    17154    else 
    172         IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE n 
     55        IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE n 
    17356    fi 
    17457 
    175     #IGCM_sys_Cp ${RUN_DIR}/orchidee.def ${RUN_DIR}/run.def 
    176     #IGCM_sys_Put_Out ${RUN_DIR}/run.def ${R_SAVE}/${PREFIX}_run.def 
     58    # Activate creation of river description file only for the first period 
     59    if [ ${CumulPeriod} -eq 1 ] ; then 
     60        IGCM_comp_modifyDefFile nonblocker orchidee.def RIVER_DESC y 
     61    else 
     62        IGCM_comp_modifyDefFile nonblocker orchidee.def RIVER_DESC n 
     63    fi 
    17764 
    178 #Temporary way to fix bug on cimean variable 
    179     IGCM_comp_modifyXmlFile force field_def_orchidee.xml cimean enabled .FALSE.  
    18065 
    181     if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
     66    ## 2. Mangement of output and modifications of related xml files 
     67 
     68    # Set default values for sechiba1_enabled, sechiba1_freq and sechiba2_enabled. 
     69    sechiba1_enabled=.FALSE. 
     70    sechiba2_enabled=.FALSE. 
     71    sechiba1_freq=0s 
     72 
     73    # Get WriteFrenquecies from config.card for SECHIBA 
     74    # Note that it is only possible to have one HF and one other option.  
     75    # If more options are set in config.card only the latest will be used. 
     76    for frequency in ${config_SRF_WriteFrequency} ; do 
     77        case ${frequency} in 
     78            *Y|*y)  
     79                NbYears=$( echo ${frequency} | awk -F '[yY]' '{print $1}' ) 
     80                NbDaysYear=$( IGCM_date_DaysInYear ${year} ) 
     81                sechiba1_enabled=.TRUE. 
     82                sechiba1_freq=${NbYears}y ;; 
     83            *M|*m) 
     84                NbMonths=$( echo ${frequency} | awk -F '[mM]' '{print $1}' ) 
     85                sechiba1_enabled=.TRUE. 
     86                sechiba1_freq=${NbMonths}mo ;; 
     87            *D|*d) 
     88                NbDays=$( echo ${frequency} | awk -F '[dD]' '{print $1}' ) 
     89                sechiba1_enabled=.TRUE. 
     90                sechiba1_freq=${NbDays}d ;; 
     91            *s) 
     92                WriteInSeconds=$( echo ${frequency} | awk -F '[s]' '{print $1}' ) 
     93                sechiba1_enabled=.TRUE. 
     94                sechiba1_freq=${WriteInSeconds}s ;; 
     95            HF|hf)  
     96                sechiba2_enabled=.TRUE. ;; 
     97            *)  
     98                IGCM_debug_Exit "SRF WriteFrequency=${frequency} is invalid. Choose between xY, xM, xD, xs and HF for Sechiba." ;; 
     99        esac 
     100    done 
     101 
     102    # Do the modifications in file_def_orchidee.xml 
     103    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 enabled ${sechiba1_enabled} 
     104    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_freq ${sechiba1_freq} 
     105    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 enabled ${sechiba2_enabled} 
     106 
    182107    # Add include of orchidee context in iodef.xml 
    183108    # In iodef.xml add on next line after "COMPONENT CONTEXT" 
    184109    #  <context id="orchidee" src="./context_orchidee.xml"/> 
    185         echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp 
    186         cp iodef.xml iodef.xml.tmp 
    187         sed -e "/COMPONENT CONTEXT/r add.tmp" \ 
    188             iodef.xml.tmp > iodef.xml 
    189         rm iodef.xml.tmp add.tmp 
    190     fi 
     110    echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp 
     111    cp iodef.xml iodef.xml.tmp 
     112    sed -e "/COMPONENT CONTEXT/r add.tmp" iodef.xml.tmp > iodef.xml 
     113    rm iodef.xml.tmp add.tmp 
    191114 
    192115    IGCM_debug_PopStack "SRF_Update" 
     
    198121    IGCM_debug_PushStack "SRF_Finalize" 
    199122 
    200     #IGCM_sys_Put_Out ${RUN_DIR}/used_run.def ${R_SAVE}/${PREFIX}_used_run.def 
    201  
    202     echo FINALIZE SRF !!! 
    203  
    204123    IGCM_debug_PopStack "SRF_Finalize" 
    205124} 
  • CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER/stomate.driver

    r2346 r2694  
    11#!/bin/ksh 
    22 
    3 #D- Driver du script pour ORCHIDEE 
     3#D- Driver pour ORCHIDEE stomate component 
    44 
    55#----------------------------------------------------------------- 
     
    88    IGCM_debug_PushStack "SBG_Initialize" 
    99 
    10     RESOL_SBG=ALL 
    11      
    1210    IGCM_debug_PopStack "SBG_Initialize" 
    1311} 
     
    1715{ 
    1816    IGCM_debug_PushStack "SBG_Update" 
     17     
     18    # Output management 
    1919 
    20     typeset STOMATE_WRITE_STEP 
     20    # Set default values for stomate output files. 
     21    stomate_enabled=.FALSE. 
     22    stomate_freq=0s 
    2123 
    22     if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    23         IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .FALSE.  
    24         IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .FALSE.  
    25     fi    
    26     case ${config_SBG_WriteFrequency} in 
    27         *Y|*y)  
    28             WriteInYears=$( echo ${config_SBG_WriteFrequency} | awk -F '[yY]' '{print $1}' ) 
    29             PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    30             (( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears ))  
    31             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    32                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
    33                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${WriteInYears}y 
    34                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history  
    35                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
    36                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInYears}y 
    37                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
     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    for frequency in ${config_SBG_WriteFrequency} ; do 
     28        case ${frequency} in 
     29            *Y|*y)  
     30                NbYears=$( echo ${frequency} | awk -F '[yY]' '{print $1}' ) 
     31                NbDaysYear=$( IGCM_date_DaysInYear ${year} ) 
     32                stomate_enabled=.TRUE. 
     33                stomate_freq=${NbYears}y ;; 
     34            *M|*m)  
     35                NbMonths=$( echo ${frequency} | awk -F '[mM]' '{print $1}' ) 
     36                stomate_enabled=.TRUE. 
     37                stomate_freq=${NbMonths}mo ;; 
     38            *D|*d) 
     39                NbDays=$( echo ${frequency} | awk -F '[dD]' '{print $1}' ) 
     40                stomate_enabled=.TRUE. 
     41                stomate_freq=${NbDays}d ;; 
     42            *)  
     43                IGCM_debug_Exit "SBG WriteFrequency=${frequency} is invalid. Choose between xY, xM and xD for Stomate." ;; 
     44        esac 
     45    done 
    3846 
    39             fi 
    40             ;; 
    41         1M|1m)  
    42             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    43                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
    44                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 1mo 
    45                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history  
    46                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
    47                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 1mo 
    48                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    49             fi 
    50             case ${config_UserChoices_PeriodLength} in 
    51             *Y|*y) 
    52                 STOMATE_WRITE_STEP=-1. 
    53                 ;; 
    54             *M|*m) 
    55                 STOMATE_WRITE_STEP=-1. 
    56                 ;; 
    57             *) 
    58                 (( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) ;; 
    59             esac 
    60             ;; 
    61         *M|*m)  
    62             WriteInMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 
    63             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    64                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
    65                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${WriteInMonths}mo 
    66                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history  
    67                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
    68                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInMonths}mo 
    69                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    70             fi 
    71             case ${config_UserChoices_PeriodLength} in 
    72             *Y|*y) 
    73                 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    74                 (( STOMATE_WRITE_STEP = 30 )) 
    75                 ;; 
    76             *M|*m) 
    77                 PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' ) 
    78                 (( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInMonths / PeriodLengthInMonths )) 
    79                 ;; 
    80             *) 
    81                 (( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) ))  
    82                 if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    83                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
    84                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${STOMATE_WRITE_STEP}s 
    85                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
    86                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
    87                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${STOMATE_WRITE_STEP}s 
    88                     IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
    89                 fi 
    90                 ;; 
    91             esac 
    92             ;; 
    93         5D|5d)  
    94             (( STOMATE_WRITE_STEP = 5 )) 
    95             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    96                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
    97                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 5d 
    98                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history  
    99                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
    100                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 5d 
    101                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    102             fi 
    103             ;; 
    104         1D|1d)  
    105             (( STOMATE_WRITE_STEP = 1 ))  
    106             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    107                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE.  
    108                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 1d 
    109                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history  
    110                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
    111                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 1d 
    112                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    113             fi 
    114             ;; 
    115         *s) 
    116             WriteInSeconds=$( echo ${config_SBG_WriteFrequency} | awk -F '[s]' '{print $1}' ) 
    117             if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    118                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE.  
    119                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s 
    120                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history  
    121                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE.  
    122                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInSeconds}s 
    123                 IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history  
    124             fi 
    125             (( STOMATE_WRITE_STEP = 1 )) ;; 
    126         *)  
    127             IGCM_debug_Exit "SBG_Update " ${config_SBG_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D."  
    128             IGCM_debug_Verif_Exit ;; 
    129     esac 
     47    # Modify file_def_orchidee.xml 
     48    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 enabled ${stomate_enabled} 
     49    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate1 output_freq ${stomate_freq} 
     50    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 enabled ${stomate_enabled} 
     51    IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml stomate2 output_freq ${stomate_freq} 
     52     
    13053 
    131  
    132 #Use of XIOS library only 
    133  
    134     if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then 
    135         (( STOMATE_WRITE_STEP = 0 )) 
    136     fi 
    137  
    138     IGCM_comp_modifyDefFile nonblocker orchidee.def STOMATE_HIST_DT ${STOMATE_WRITE_STEP} 
    139     IGCM_comp_modifyDefFile nonblocker orchidee.def STOMATE_HISTLEVEL ${stomate_UserChoices_stomate_LEVEL} 
    140  
     54    # Define in orchidee.def if restart file should be used 
    14155    if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SBG_Restart}" = "n" ] ) ; then 
    142         echo "STOMATE : without restart" 
    143         IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN NONE 
     56        echo "STOMATE : without restart" 
     57        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN NONE 
    14458    else 
    145         IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN stomate_rest_in.nc 
     59        IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN stomate_rest_in.nc 
    14660    fi 
    14761 
     
    15266function SBG_Finalize 
    15367{ 
    154 #set -vx 
    15568    IGCM_debug_PushStack "SBG_Finalize" 
    156  
    157     if [ $( IGCM_date_DaysBetweenGregorianDate ${PeriodDateEnd} ${year}1230 ) -ge 0 ] ; then 
    158         IGCM_sys_Put_Out stomate_Cforcing.nc ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_Cforcing.nc 
    159         IGCM_sys_Put_Out stomate_forcing.nc  ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_forcing.nc 
    160 #       rm -f stomate_Cforcing.nc 
    161 #       rm -f stomate_forcing.nc 
    162     fi 
    163  
     69     
    16470    IGCM_debug_PopStack "SBG_Finalize" 
    16571} 
  • CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER/xios.driver

    r2352 r2694  
    1818# Activate server mode 
    1919    IGCM_comp_modifyXmlFile force iodef.xml using_server NONE true 
    20 # If lmdz_UserChoices_XIOS=y add LMDZ as component id : 
    21     if [ X${lmdz_UserChoices_XIOS}  = Xy ] ; then 
    22         IGCM_comp_modifyXmlFile force iodef.xml oasis_codes_id NONE LMDZ,oceanx 
    23     fi  
     20 
    2421    if [ -f namcouple ] ; then 
    2522        sed -e "s/2  LMDZ oceanx/3 LMDZ oceanx ${config_Executable_IOS[1]}/" namcouple > namcouple.tmp  
Note: See TracChangeset for help on using the changeset viewer.