Ignore:
Timestamp:
03/23/18 15:32:55 (6 years ago)
Author:
acosce
Message:

remove these configuration not use anymore

File:
1 edited

Legend:

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

    r2841 r3688  
    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. 
     55 
    7156 
    7257    case ${config_UserChoices_PeriodLength} in 
    73         1Y|1y|1M|1m) ok_mensuel=y ;; 
    74         5D|5d|1D|1d) ok_journe=y ;; 
     58        1Y|1y|1M|1m) ok_mensuel=.TRUE. ;; 
     59        5D|5d|1D|1d) ok_journe=.TRUE. ;; 
    7560    esac 
    7661 
    7762    for frequency in ${config_ATM_WriteFrequency} ; do 
    7863        case ${frequency} in 
    79             1M|1m) ok_mensuel=y ;; 
     64            1M|1m) ok_mensuel=.TRUE. ;; 
    8065        esac 
    8166        case ${frequency} in 
    82             5D|5d|1D|1d) ok_journe=y ;; 
     67            5D|5d|1D|1d) ok_journe=.TRUE. ;; 
    8368        esac 
    8469        case ${frequency} in 
    85             HF|hf) ok_hf=y ;; 
     70            HF|hf) ok_hf=.TRUE. ;; 
    8671        esac 
    8772        case ${frequency} in  
    88             HF3h|hf3h) ok_hf3h=y ;; 
     73            HF3h|hf3h) ok_hf3h=.TRUE. ;; 
    8974        esac 
    9075        case ${frequency} in  
    91             HF3hm|hf3hm) ok_hf3hm=y ;; 
     76            HF3hm|hf3hm) ok_hf3hm=.TRUE. ;; 
    9277        esac 
    9378        case ${frequency} in 
    94             STN|stn) ok_stn=y ;; 
     79            STN|stn) ok_stn=.TRUE. ;; 
    9580        esac 
    9681    done 
    9782 
    98     ## Read LMDZ_NbPeriod_adjust option in lmdz.card  
    99     if [ X"${lmdz_UserChoices_LMDZ_NbPeriod_adjust}" = X"" ] ; then 
    100         # The variable is not in lmdz.card, set default value 
    101         LMDZ_NbPeriod_adjust=0 
    102     else         
    103         LMDZ_NbPeriod_adjust=${lmdz_UserChoices_LMDZ_NbPeriod_adjust} 
    104     fi 
    105  
    106     if [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then 
    107         LMDZ_Bands_file_name=${lmdz_UserChoices_LMDZ_Bands_file_name} 
    108     fi 
    109  
    110  
    111     ##  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 
     83    if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 
     84        ok_mensuel=.FALSE. 
     85        ok_journe=.FALSE. 
     86        ok_hf=.FALSE. 
     87        ok_hf3h=.FALSE. 
     88        ok_hf3hm=.FALSE. 
     89        ok_stn=.FALSE. 
     90    fi 
     91 
     92##  Read LMDZ_COSP_OK in lmdz.card 
     93    if [ X${lmdz_UserChoices_LMDZ_COSP_OK} = Xy ] ; then 
     94        ##  LMDZ_COSP_OK=y, now read all other COSP variables 
     95        ##  Read LMDZ_COSP_monthly in lmdz.card 
     96        if [ X${lmdz_UserChoices_LMDZ_COSP_monthly} = Xy ] ; then 
     97            LMDZ_COSP_monthly=.TRUE. 
     98        else 
     99            LMDZ_COSP_monthly=.FALSE. 
     100        fi 
     101        ##  Read LMDZ_COSP_daily in lmdz.card 
     102        if [ X${lmdz_UserChoices_LMDZ_COSP_daily} = Xy ] ; then 
     103            LMDZ_COSP_daily=.TRUE. 
     104        else 
     105            LMDZ_COSP_daily=.FALSE. 
     106        fi 
     107        ##  Read LMDZ_COSP_hf in lmdz.card 
     108        if [ X${lmdz_UserChoices_LMDZ_COSP_hf} = Xy ] ; then 
     109            LMDZ_COSP_hf=.TRUE. 
     110        else 
     111            LMDZ_COSP_hf=.FALSE. 
     112        fi 
     113    else 
     114        # LMDZ_COSP_OK=n : All cosp output are deactivated 
     115        LMDZ_COSP_monthly=.FALSE. 
     116        LMDZ_COSP_daily=.FALSE. 
     117        LMDZ_COSP_hf=.FALSE. 
     118    fi   
    135119 
    136120    ##  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  
     121    if [ X${lmdz_UserChoices_LMDZ_NMC_monthly} = Xy ] ; then 
     122        LMDZ_NMC_monthly=.TRUE. 
     123    else 
     124        LMDZ_NMC_monthly=.FALSE. 
     125    fi 
     126     
    143127    ## 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 
     128    if [ X${lmdz_UserChoices_LMDZ_NMC_daily} = Xy ] ; then 
     129        LMDZ_NMC_daily=.TRUE. 
     130    else 
     131        LMDZ_NMC_daily=.FALSE. 
    148132    fi 
    149133     
    150134    ## 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  
     135    if [ X${lmdz_UserChoices_LMDZ_NMC_hf} = Xy ] ; then 
     136        LMDZ_NMC_hf=.TRUE. 
     137    else 
     138        LMDZ_NMC_hf=.FALSE. 
     139    fi 
     140     
    157141 
    158142    IGCM_debug_PopStack "ATM_Initialize" 
     
    164148    IGCM_debug_PushStack "ATM_Update" 
    165149 
    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 
    188  
    189     ## Algorithme for special treatment for Bands_xxx file 
    190     ## For CumulPeriod=1 ;  
    191     ##        IF NbPeriod_Adjust = 0 ; set LMDZ_adjust=n 
    192     ##                                IF LMDZ_Bands_file_name was given in lmdz.card THEN Get Bands file directly from server. Store it later with _0 suffix. 
    193     ##                                IF no LMDZ_Bands_file_name was given, start without Bands file. Store it later with _0 suffix. 
    194     ##        ELSE set LMDZ_adjust=y ; start without Bands file ; Store it later in PARAM/ directory in submit directory with suffix _1 ; 
    195     ## 
    196     ## For CumulPeriod=2 to LMDZ_NbPeriod_adjust ;  
    197     ##       Get Bands file from PARAM/ in submit directory (CumulPeriod-1) ; set LMDZ_adjust=y ; Store Bands file in PARAM/ ; 
    198     ## 
    199     ## For CumulPeriod > LMDZ_NbPeriod_adjust ; LMDZ_adjust=n ; Get Bands file from PARAM/ ; Do not store ; 
    200  
    201     if [ ${CumulPeriod} -eq 1 ] ; then 
    202         if [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then 
    203             if [ ! X${LMDZ_Bands_file_name} = X ] ; then 
    204                 IGCM_sys_Get ${LMDZ_Bands_file_name} Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat  
    205                 IGCM_sys_Chmod u+w Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat 
    206                 IGCM_debug_Print 1 "Bands file forced to ${LMDZ_Bands_file_name} and stored in ${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0" 
    207             fi 
    208         fi 
    209     fi 
    210  
    211     LMDZ_adjust=n 
    212     [ ${CumulPeriod} -le ${LMDZ_NbPeriod_adjust} ] && LMDZ_adjust=y 
    213  
    214     RefPeriod=${LMDZ_NbPeriod_adjust} #0 to use a Bands file from Restart 
    215     [ ${CumulPeriod} -le ${LMDZ_NbPeriod_adjust} ] && (( RefPeriod = ${CumulPeriod} - 1 ))  
    216  
    217     # Get Bands file from PARAM directory if file exist 
    218     if ( [ ${CumulPeriod} -gt 1 ] && [ -f ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${RefPeriod} ] ) ; then 
    219         IGCM_sys_Cp ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${RefPeriod} Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat 
    220         IGCM_sys_Chmod u+w Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat 
    221     fi 
    222  
    223150    ##-- GHG forcing : 
    224151    ##   If forcing file exist in run directory, read values for the current year  
     
    226153 
    227154    # Read value for solaire from file SOLARANDVOLCANOES.txt. If file not existing, take DEFAULT value from file.  
     155    IGCM_debug_Print 1 "Note that the solaire parameter is here below changed but it is only used by LMDZ for old physics(AP and NPv3.2)" 
     156    IGCM_debug_Print 1 "For newer physics with iflag_rrtm=1 and ok_suntime_rrtm=y, the solar constant is instead taken from solarforcing.nc file" 
    228157    if [ -f SOLARANDVOLCANOES.txt ] ; then 
    229158        value=`grep Annee_${year} SOLARANDVOLCANOES.txt | awk -F= '{print $2}'` 
     
    240169 
    241170    # Read value for co2_ppm from file CO2.txt. If file not existing, take DEFAULT value from file.  
     171    # Calculate co2_ppm_per as co2_ppm*4. 
    242172    if [ -f CO2.txt ] ; then 
    243173        value=`grep Annee_${year} CO2.txt | awk -F= '{print $2}'` 
     
    247177            IGCM_debug_Verif_Exit 
    248178        fi 
     179        value4=`grep Annee_${year} CO2.txt | awk -F= '{print $2 * 4}'` 
    249180    else 
    250181        value=DEFAULT 
     182        value4=DEFAULT 
    251183    fi 
    252184    IGCM_comp_modifyDefFile nonblocker config.def co2_ppm $value 
     185    IGCM_comp_modifyDefFile nonblocker config.def co2_ppm_per $value4 
    253186 
    254187 
     
    322255    ##   COSP daily output for years 1979 and later (mandatory for historical CMIP5 run). 
    323256    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 
    440  
    441     ## gcm.def parameters :  
    442     # Modification of variable iphysiq depending on the physics 
    443     if [ X${LMDZ_Physics} = X"AP" ] ; then 
    444         if [ ${RESOL_ATM_3D} = 96x95x39 ]; then 
    445             value=10 
    446         elif [ ${RESOL_ATM_3D} = 144x142x39 ]; then 
    447             value=15 
    448         else 
    449             IGCM_debug_Print 1 "LMDZ_Physics=${LMDZ_Physics} has not been tested for the current resolution RESOL_ATM_3D=${RESOL_ATM_3D}. " 
    450             IGCM_debug_Print 1 "iphysiq must be defined for the current combination of resolution and phyiscs package" 
    451             IGCM_debug_Exit "You need to add a special case in lmdz.driver to handle the above combination." 
    452         fi 
    453     elif [ X${LMDZ_Physics} = X"NPv3.1" ] ; then 
    454         if  [ ${RESOL_ATM_3D} = 96x95x39 ] ; then 
    455             value=5 
    456         elif [ ${RESOL_ATM_3D} = 144x142x39 ] ; then 
    457             value=5 
    458         else 
    459             IGCM_debug_Print 1 "LMDZ_Physics=${LMDZ_Physics} has not been tested for the current resolution RESOL_ATM_3D=${RESOL_ATM_3D}. " 
    460             IGCM_debug_Print 1 "iphysiq must be defined for the current combination of resolution and phyiscs package" 
    461             IGCM_debug_Exit "You need to add a special case in lmdz.driver to handle the above combination." 
    462         fi 
    463     elif [ X${LMDZ_Physics} = X"NPv3.2" ] ; then 
    464         if [ ${RESOL_ATM_3D} = 96x95x39 ] ; then 
    465             value=5 
    466         elif [ ${RESOL_ATM_3D} = 144x142x39 ] ; then 
    467             value=5 
    468         elif [ ${RESOL_ATM_3D} = 128x118x39 ] ; then 
    469             value=15 
    470         else 
    471             IGCM_debug_Print 1 "LMDZ_Physics=${LMDZ_Physics} has not been tested for the current resolution RESOL_ATM_3D=${RESOL_ATM_3D}. " 
    472             IGCM_debug_Print 1 "iphysiq must be defined for the current combination of resolution and phyiscs package" 
    473             IGCM_debug_Exit "You need to add a special case in lmdz.driver to handle the above combination." 
    474         fi 
    475     else 
    476         # Take default value set in gcm.def 
    477         value=DEFAULT 
    478     fi 
    479     IGCM_comp_modifyDefFile nonblocker gcm.def iphysiq $value 
    480      
     257        LMDZ_COSP_daily=.TRUE. 
     258    fi 
     259 
     260    ## Modifiy  
     261    IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled ${ok_mensuel} 
     262     
     263    IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled ${ok_journe} 
     264     
     265    if [ X${OutLevel} = Xlow ] || [ X${OutLevel} = Xmedium ] ; then 
     266        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 2 
     267    else 
     268        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 5 
     269    fi 
     270     
     271    IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled ${ok_hf} 
     272     
     273    if [ X${OutLevel} = Xlow ] ; then 
     274        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 5 
     275    elif [ X${OutLevel} = Xmedium ] ; then 
     276        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 6 
     277    elif [ X${OutLevel} = Xhigh ] ; then 
     278        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 7 
     279    fi 
     280         
     281    IGCM_comp_modifyXmlFile nonblocker file_def_histhf3h_lmdz.xml histhf3h enabled ${ok_hf3h} 
     282    IGCM_comp_modifyXmlFile nonblocker file_def_histhf3hm_lmdz.xml histhf3hm enabled ${ok_hf3hm} 
     283 
     284    IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled ${ok_stn} 
     285 
     286    IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled ${LMDZ_NMC_monthly} 
     287    IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled ${LMDZ_NMC_daily} 
     288    IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled ${LMDZ_NMC_hf} 
     289     
     290    IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP enabled ${LMDZ_COSP_monthly} 
     291    IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP enabled ${LMDZ_COSP_daily} 
     292    IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP enabled ${LMDZ_COSP_hf} 
     293 
     294    # Activate the histstrataer output file only for configuration with interactive stratospheric aersols  
     295    # done by setting the key word LMDZ_strataero=y in lmdz.card 
     296    if [ X${lmdz_UserChoices_LMDZ_strataero} = Xy ] ; then 
     297        IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled .TRUE. 
     298    else 
     299        IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled .FALSE. 
     300    fi 
     301 
    481302 
    482303    ## 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} 
     304 
     305 
     306    ##-- Remise ou non a zero de la date initiale de LMDZ pour le fichier run.def 
     307    if [ ${CumulPeriod} -eq 1 ] ; then 
     308        IGCM_comp_modifyDefFile blocker run.def raz_date  1 
     309    else 
     310        IGCM_comp_modifyDefFile blocker run.def raz_date  0 
     311    fi 
     312 
     313    ##-- Calendar type for LMDZ and create_etat0_limit 
     314    case ${config_UserChoices_CalendarType} in 
     315        leap|gregorian) 
     316            IGCM_comp_modifyDefFile blocker run.def calend  gregorian ;; 
     317        noleap) 
     318            IGCM_comp_modifyDefFile blocker run.def calend  earth_365d ;; 
     319        360d) 
     320            IGCM_comp_modifyDefFile blocker run.def calend  earth_360d ;; 
     321        *) 
     322            IGCM_comp_modifyDefFile blocker run.def calend  earth_360d ;; 
     323    esac 
     324 
     325    IGCM_comp_modifyDefFile blocker run.def dayref    ${InitDay} 
     326    IGCM_comp_modifyDefFile blocker run.def nday      ${PeriodLengthInDays} 
    488327 
    489328    # Set anneeref different for gcm and ce0l 
    490     # Variable calend is different for a run with create_etat0_limit and the gcm 
    491329    # Test if executable create_etat0_limit is present and lmdz.x is not present 
    492330    if [ -f create_etat0_limit* ] || [ -f ce0l* ] && [ ! -f lmdz.x ] ; then 
    493331        # for case ce0l : always take current year 
    494332        IGCM_comp_modifyDefFile blocker run.def anneeref ${year} 
    495         IGCM_comp_modifyDefFile blocker run.def calend   ${CalendarTypeForCreate} 
    496333 
    497334        # Temporary, set use_filtre_fft=n because we now use dyn3d for ce0l version where fft is not implemented.  
     
    501338        # for case gcm : take first year of simulation 
    502339        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 
    511340    fi 
    512341 
     
    587416    else 
    588417        IGCM_comp_modifyDefFile nonblocker config.def ok_cdnc n  
     418    fi  
     419 
     420    # config.def : Activate COSP 
     421    if [ ! X${lmdz_UserChoices_LMDZ_COSP_OK} = X ]; then  
     422        IGCM_comp_modifyDefFile nonblocker config.def ok_cosp ${lmdz_UserChoices_LMDZ_COSP_OK} 
     423    else 
     424        IGCM_comp_modifyDefFile nonblocker config.def ok_cosp n  
     425    fi  
     426 
     427    # config.def : Modify parameter pmagic if it is set in lmdz.card 
     428    if [ ! X${lmdz_UserChoices_pmagic} = X ]; then  
     429        IGCM_comp_modifyDefFile nonblocker config.def pmagic ${lmdz_UserChoices_pmagic} 
     430    else 
     431        # Take default value set in config.def 
     432        IGCM_comp_modifyDefFile nonblocker config.def pmagic DEFAULT 
    589433    fi  
    590434 
     
    622466    fi 
    623467 
    624     if [ X${lmdz_UserChoices_XIOS}  = Xy ] ; then 
    625468    # Add include of LMDZ context in iodef.xml 
    626469    # In iodef.xml add on next line after "COMPONENT CONTEXT" 
    627470    #  <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 
    633  
    634         # 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 
    639     fi 
    640      
     471    echo '<context id="LMDZ" src="./context_lmdz.xml"/>' > add.tmp 
     472    if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 
     473        echo '<context id="LMDZ" src="./ping_lmdz.xml"/>' >> add.tmp 
     474        echo '<context id="LMDZ" src="./dr2xml_lmdz.xml"/>' >> add.tmp 
     475    fi 
     476    cp iodef.xml iodef.xml.tmp 
     477    sed -e "/COMPONENT CONTEXT/r add.tmp" iodef.xml.tmp > iodef.xml 
     478    rm iodef.xml.tmp add.tmp 
     479 
     480    #Long Name as global attribute (if LongName is not empty) 
     481    if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 
     482        listfile=$(ls file_def*lmdz.xml) 
     483        echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp 
     484        for file in ${listfile} 
     485        do 
     486            cp ${file} ${file}.tmp 
     487            sed -e "/<file id/r add.tmp" \ 
     488                ${file}.tmp > ${file} 
     489            rm ${file}.tmp  
     490        done 
     491        rm add.tmp 
     492    fi 
     493             
    641494    IGCM_debug_PopStack "ATM_Update" 
    642495} 
     
    646499{ 
    647500    IGCM_debug_PushStack "ATM_Finalize" 
    648  
    649     # If the file exist, copy Bands_ file to PARAM/ in submit directory. This file will be used for the simulation. 
    650     # Copy also the same file into ATM/Restart at ARCHIVE directory for backup. 
    651     if [ -f Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ] ; then  
    652       if [ ${CumulPeriod} -le ${LMDZ_NbPeriod_adjust} ] ; then 
    653         IGCM_sys_Cp Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${CumulPeriod} 
    654         IGCM_sys_Put_Out Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${R_OUT_ATM_R}/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${CumulPeriod} 
    655       elif [ ${CumulPeriod} -eq 1 ] && [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then 
    656         # Special case : first period and no adjust => Save bands file with suffix _0 
    657         IGCM_sys_Cp Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0 
    658         IGCM_sys_Put_Out Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${R_OUT_ATM_R}/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0 
    659       fi 
    660     fi 
    661501 
    662502    # Add special treatement for CARBON CYCLE 
Note: See TracChangeset for help on using the changeset viewer.