Changeset 1600


Ignore:
Timestamp:
09/26/23 16:10:55 (8 months ago)
Author:
jgipsl
Message:

Encapsulate new section which was introduced in [1598] into an if conf_card=yes. This is a correction needed to be abel to run ins_job directly in libIGCM folder (only to create post-processing jobs).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/ins_job

    r1598 r1600  
    463463    echo "No config.card available in current directory" 
    464464    echo "" 
     465    conf_card=no 
    465466    continue  
    466467  fi  
     468  conf_card=yes 
    467469 
    468470 
     
    702704   
    703705fi 
     706 
    704707# 
    705708# Install a light copy of C-ESM-EP in SUBMIT_DIR/Cesmep and create a 
    706709# C-ESM-EP launch script there. 
    707710# 
    708 [ ${new_struct?} == yes ] && prefix="$JobName/"   
    709 IGCM_card_DefineVariableFromOption ${prefix}config.card Post Cesmep 
    710 if ( [ X${config_Post_Cesmep} = X${NULL_STR} ] || [ X${config_Post_Cesmep} = XNONE ] || \ 
    711          [ X${config_Post_Cesmep} = X ] ) ; then 
    712     config_Post_Cesmep=FALSE 
     711# Only do this if we are in a folder containing a config.card (conf_card=yes) 
     712if [ ${conf_card} == yes ] ; then 
     713 
     714    [[ ${new_struct} == yes ]] && prefix="$JobName/"   
     715 
     716    IGCM_card_DefineVariableFromOption ${prefix}config.card Post Cesmep 
     717     
     718    if ( [ X${config_Post_Cesmep} = X${NULL_STR} ] || [ X${config_Post_Cesmep} = XNONE ] || \ 
     719        [ X${config_Post_Cesmep} = X ] ) ; then 
     720        config_Post_Cesmep=FALSE 
     721    fi 
     722    if [ ${config_Post_Cesmep} != FALSE ]; then 
     723        IGCM_config_CommonConfiguration ${prefix}config.card 
     724        if [ x"${config_Post_CesmepMail}" == x"TRUE" ] || [ x"${config_Post_CesmepMail}" == x"True" ] ; then 
     725            # Compute mail adress - inspired by libIGCM_post.ksh - should be turned in a function  
     726            if [ ! -z ${config_UserChoices_MailName} ] ; then 
     727                MailAdress=${config_UserChoices_MailName} 
     728            elif [ -f ~/.forward ] ; then 
     729                MailAdress=$( cat ~/.forward ) 
     730            else 
     731                MailAdress=${USER} 
     732            fi 
     733        else 
     734            MailAdress=None 
     735        fi 
     736        # 
     737        components="," 
     738        for comp in ${config_ListOfComponents[*]} ; do 
     739            components=${components}${comp}, ; 
     740        done 
     741        if ( [ X"${SYSTEM}" == X"irene" ]    || [ X"${SYSTEM}" == X"irene-amd" ] || \ 
     742            [ X"${SYSTEM}" == X"mesoipsl" ] || [ X"${SYSTEM}" == X"jeanzay" ] ) ; then 
     743            IGCM_card_DefineVariableFromOption ${prefix}config.card UserChoices DateBegin 
     744            ${config_Post_CesmepCode}/libIGCM_install.sh $(pwd)/${prefix} \ 
     745                ${config_Post_CesmepComparison} $JobName ${R_SAVE} "${ProjectID}" \ 
     746                ${MailAdress} ${config_UserChoices_DateBegin//-/} \ 
     747                ${config_Post_Cesmep} ${CesmepPeriod} ${config_Post_CesmepSlices} \ 
     748                $components $CENTER 
     749            [ $? -ne 0 ] && echo -e "\nERROR : cannot configure C-ESM-EP run" && exit 5 
     750        else 
     751            echo -e "\nERROR Cannot (yet) handle CESMEP atlas on this computer system (${SYSTEM})" 
     752            echo "=> Variable Cesmep in config.card's section Post must be set to FALSE (rather than $config_Post_Cesmep)" 
     753            exit 6 
     754        fi 
     755    fi 
     756     
    713757fi 
    714 if [ ${config_Post_Cesmep} != FALSE ]; then 
    715     IGCM_config_CommonConfiguration ${prefix}config.card 
    716     if [ x"${config_Post_CesmepMail}" == x"TRUE" ] || [ x"${config_Post_CesmepMail}" == x"True" ] ; then 
    717         # Compute mail adress - inspired by libIGCM_post.ksh - should be turned in a function  
    718         if [ ! -z ${config_UserChoices_MailName} ] ; then 
    719             MailAdress=${config_UserChoices_MailName} 
    720         elif [ -f ~/.forward ] ; then 
    721             MailAdress=$( cat ~/.forward ) 
    722         else 
    723             MailAdress=${USER} 
    724         fi 
    725     else 
    726         MailAdress=None 
    727     fi 
    728     # 
    729     components="," 
    730     for comp in ${config_ListOfComponents[*]} ; do 
    731         components=${components}${comp}, ; 
    732     done 
    733     if ( [ X"${SYSTEM}" == X"irene" ]    || [ X"${SYSTEM}" == X"irene-amd" ] || \ 
    734          [ X"${SYSTEM}" == X"mesoipsl" ] || [ X"${SYSTEM}" == X"jeanzay" ] ) ; then 
    735         IGCM_card_DefineVariableFromOption ${prefix}config.card UserChoices DateBegin 
    736         ${config_Post_CesmepCode}/libIGCM_install.sh $(pwd)/${prefix} \ 
    737                    ${config_Post_CesmepComparison} $JobName ${R_SAVE} "${ProjectID}" \ 
    738                    ${MailAdress} ${config_UserChoices_DateBegin//-/} \ 
    739                    ${config_Post_Cesmep} ${CesmepPeriod} ${config_Post_CesmepSlices} \ 
    740                    $components $CENTER 
    741         [ $? -ne 0 ] && echo -e "\nERROR : cannot configure C-ESM-EP run" && exit 5 
    742     else 
    743         echo -e "\nERROR Cannot (yet) handle CESMEP atlas on this computer system (${SYSTEM})" 
    744         echo "=> Variable Cesmep in config.card's section Post must be set to FALSE (rather than $config_Post_Cesmep)" 
    745         exit 6 
    746     fi 
    747 fi 
     758 
     759# 
    748760#- 
    749761[[ ${x_v} = 'verbose' ]] && print - ""; 
Note: See TracChangeset for help on using the changeset viewer.