Ignore:
Timestamp:
03/16/12 17:05:42 (12 years ago)
Author:
jgipsl
Message:
  • Removed IGCM_card_DefineVariableFromOption : not necessary for UserChoices? section
  • Add test if Bands_file_name exist in lmdz.card and copy it only if it exists
File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/u1/IPSLCM5REPR_u1/GENERAL/DRIVER/lmdz.driver

    r1670 r1688  
    4646 
    4747    ##- Create_etat0_limit version 
    48     IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices CREATE 
    4948    CREATE=${lmdz_UserChoices_CREATE} 
    5049    echo create_etat0_limit version : ${CREATE} 
     
    9897 
    9998    ## Read LMDZ_NbPeriod_adjust option in lmdz.card  
    100     IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices LMDZ_NbPeriod_adjust 
    101     LMDZ_NbPeriod_adjust=${lmdz_UserChoices_LMDZ_NbPeriod_adjust} 
     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 
    102105 
    103106    if [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then 
    104         IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices LMDZ_Bands_file_name 
    105         LMDZ_Bands_file_name=${lmdz_UserChoices_LMDZ_Bands_file_name} 
     107        LMDZ_Bands_file_name=${lmdz_UserChoices_LMDZ_Bands_file_name} 
    106108    fi 
    107109 
     
    160162    if [ ${CumulPeriod} -eq 1 ] ; then 
    161163        if [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then 
    162             IGCM_sys_Get ${LMDZ_Bands_file_name} Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat  
    163             IGCM_sys_Put_Out Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${R_OUT_ATM_D}/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0 
    164             IGCM_sys_Chmod u+w Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat 
    165             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" 
     164            if [ ! X${LMDZ_Bands_file_name} = X] ; then 
     165                IGCM_sys_Get ${LMDZ_Bands_file_name} Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat  
     166                IGCM_sys_Put_Out Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${R_OUT_ATM_D}/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0 
     167                IGCM_sys_Chmod u+w Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat 
     168                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" 
     169            fi 
    166170        fi 
    167171    fi 
     
    367371 
    368372    ## Read ByPass_hgardfou_teta option in lmdz.card --> divide teta* by 2 if [ $ByPass_hgardfou_teta = 1 ] 
    369     IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices ByPass_hgardfou_teta 
    370373    ByPass_hgardfou_teta=${lmdz_UserChoices_ByPass_hgardfou_teta} 
    371     if [ ${ByPass_hgardfou_teta} = y ] ; then 
     374    if [ X"${ByPass_hgardfou_teta}" = X"y" ] ; then 
    372375        awk '{ if ($0 ~ /^teta.*=/) {split($0,a,"=") ; print a[1]"="a[2]/2"."} else print $0}' gcm.def > gcm.def.tmp 
    373376        IGCM_sys_Mv gcm.def.tmp gcm.def 
     
    381384 
    382385    ## Read ByPass_hgardfou_mats option in lmdz.card --> purmats=y 2 if [ $ByPass_hgardfou_mats = 1 ] 
    383     IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices ByPass_hgardfou_mats 
    384386    ByPass_hgardfou_mats=${lmdz_UserChoices_ByPass_hgardfou_mats} 
    385     if [ ${ByPass_hgardfou_mats} = y ] ; then 
     387    if [ X"${ByPass_hgardfou_mats}" = X"y" ] ; then 
    386388        sed -e "s/^purmats=.*/purmats=y/" gcm.def > gcm.def.tmp 
    387389        IGCM_sys_Mv gcm.def.tmp gcm.def 
Note: See TracChangeset for help on using the changeset viewer.