Changeset 181


Ignore:
Timestamp:
10/01/09 10:53:03 (15 years ago)
Author:
mmaipsl
Message:

MM: Add adaptable monitoring for each experience/component in new POST directory in SUBMIT_DIR.

POST directory is optionnal.
If there is a monitoring_${compname}.cfg file (with no RESOL postfix) inside, it will be choosed
by default.
If POST is not found, monitoring for component is searched in standard "atlas" directory (with
RESOL parameter).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_monitoring

    r178 r181  
    136136    IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp} 
    137137    eval compname=\${config_ListOfComponents_${comp}[0]}                > /dev/null 2>&1 
     138 
     139    PATH_monitoring_file="" 
    138140    eval monitoring_file=monitoring01_${compname}_\${RESOL_${comp}}.cfg > /dev/null 2>&1 
     141    if [ -d ${CARD_DIR}/POST ] ; then 
     142        if [ -f  ${CARD_DIR}/POST/monitoring01_${compname}.cfg ] ; then 
     143            eval monitoring_file=monitoring01_${compname}.cfg > /dev/null 2>&1 
     144            PATH_monitoring_file=${CARD_DIR}/POST/${monitoring_file} 
     145        elif [ -f ${FER_ATLAS}/${monitoring_file} ] ; then 
     146            PATH_monitoring_file=${FER_ATLAS}/${monitoring_file} 
     147        fi 
     148    elif [ -f ${FER_ATLAS}/${monitoring_file} ] ; then 
     149        PATH_monitoring_file=${FER_ATLAS}/${monitoring_file} 
     150    else 
     151        IGCM_debug_Print 1 "WARNING. No MONITORING file found for component ${compname}." 
     152    fi 
    139153    # 
    140     if [ -f ${FER_ATLAS}/${monitoring_file} ] ; then 
     154    if [ X${PATH_monitoring_file} != X"" ] ; then 
    141155        IGCM_debug_Print 1 "Determine which files we need." 
    142         . monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive ls' ${FER_ATLAS}/${monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO 
    143         liste_file_monitoring=$( . monitoring01 -q -l2 --listcommand 'IGCM_sys_RshArchive ls' ${FER_ATLAS}/${monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO ) 
    144     else 
    145         IGCM_debug_Print 1 "WARNING. This file does not exist : ${FER_ATLAS}/${monitoring_file}" 
     156        . monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO 
     157        liste_file_monitoring=$( . monitoring01 -q -l2 --listcommand 'IGCM_sys_RshArchive ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO ) 
    146158    fi 
    147159    # 
    148160    if [ ! "X${liste_file_monitoring}" = X ] ; then 
    149161        IGCM_sys_Get /l liste_file_monitoring ${RUN_DIR} 
    150         monitoring01 -c ${CARD_DIR} -p ${comp} --time -t "${config_UserChoices_JobName} monitoring" -o ${RUN_DIR}/MONITORING ${FER_ATLAS}/${monitoring_file} . 
     162        monitoring01 -c ${CARD_DIR} -p ${comp} --time -t "${config_UserChoices_JobName} monitoring" -o ${RUN_DIR}/MONITORING ${PATH_monitoring_file} . 
    151163    else 
    152164        IGCM_debug_Print 1 "No time series detected by this command :" 
    153         IGCM_debug_Print 1 "monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive ls' ${FER_ATLAS}/${monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO" 
    154         . monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive ls' ${FER_ATLAS}/${monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO 
     165        IGCM_debug_Print 1 "monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO" 
     166        . monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO 
    155167    fi 
    156168    # 
Note: See TracChangeset for help on using the changeset viewer.