Changeset 34


Ignore:
Timestamp:
11/28/08 18:12:33 (16 years ago)
Author:
sdipsl
Message:

SD : - 2 options for asynchronous rebuild

  • from SCRATCHDIR (very good for platine, the same for mercure)
  • from Archive (good for platine, good for mercure)
Location:
trunk/libIGCM
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_additionnal

    r18 r34  
    5555R_OUT_OCE=${R_SAVE}/OCE 
    5656 
    57 cd ${RUN_DIR_PATH} 
     57RUN_DIR=${RUN_DIR_PATH}/ATLAS_ADD_${YEARS} 
     58IGCM_sys_MkdirWork ${RUN_DIR} 
     59IGCM_sys_Cd ${RUN_DIR} 
    5860 
    5961# -------------------------------------------- 
     
    6567IGCM_sys_Get ${R_IN}/BC/OCE/${config_UserChoices_TagName}/${RESOL_OCE}/LEVITUS_1m_Salinity_Ice_nomask.nc . 
    6668 
    67 IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc ${RUN_DIR_PATH}/SE_grid_T.nc 
    68 IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_U.nc ${RUN_DIR_PATH}/SE_grid_U.nc 
    69 IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_V.nc ${RUN_DIR_PATH}/SE_grid_V.nc 
    70 IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_W.nc ${RUN_DIR_PATH}/SE_grid_W.nc 
     69IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc ${RUN_DIR}/SE_grid_T.nc 
     70IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_U.nc ${RUN_DIR}/SE_grid_U.nc 
     71IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_V.nc ${RUN_DIR}/SE_grid_V.nc 
     72IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_W.nc ${RUN_DIR}/SE_grid_W.nc 
    7173 
    72 #ferret -gif -script news2.jnl "${YEARS}" "${config_UserChoices_JobName}" "${RESOL_OCE}" 
    73 atlas -o ${RUN_DIR_PATH}/${R_ATLAS}/ADD -p landscape=true,angle=-90,nup=1x1 ${FER_ATLAS}/atlas_p_ORCA2_add_*.cfg ${config_UserChoices_JobName} 
     74atlas -o ${RUN_DIR}/${R_ATLAS}/ADD -p landscape=true,angle=-90,nup=1x1 ${FER_ATLAS}/atlas_p_ORCA2_add_*.cfg ${config_UserChoices_JobName} 
    7475 
    7576# IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 
  • trunk/libIGCM/AA_atlas_LMDZ

    r18 r34  
    5555R_OUT_ATM=${R_SAVE}/ATM 
    5656 
    57 cd ${RUN_DIR_PATH} 
     57RUN_DIR=${RUN_DIR_PATH}/ATLAS_LMDZ_${YEARS} 
     58IGCM_sys_MkdirWork ${RUN_DIR} 
     59IGCM_sys_Cd ${RUN_DIR} 
    5860 
    5961# -------------------------------------------- 
     
    6264# IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 
    6365 
    64 IGCM_sys_Get ${R_OUT_ATM}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc         ${RUN_DIR_PATH} 
     66IGCM_sys_Get ${R_OUT_ATM}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc ${RUN_DIR} 
    6567 
    66 atlas -o ${RUN_DIR_PATH}/${R_ATLAS}/ATM -l ${FER_ATLAS}/atlas_p_LMDZ3.3_diag1_*.cfg    ${RUN_DIR_PATH}/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc 
     68atlas -o ${RUN_DIR}/${R_ATLAS}/ATM -l ${FER_ATLAS}/atlas_p_LMDZ3.3_diag1_*.cfg          ${RUN_DIR}/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc 
    6769 
    6870# IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 
     
    7981# Save files 
    8082IGCM_sys_Put_Dir ATLAS ${R_SAVE} 
    81  
    8283IGCM_sys_Rm -Rf ATLAS 
    8384IGCM_sys_Rm ${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc 
  • trunk/libIGCM/AA_atlas_LMDZOR

    r18 r34  
    5656R_OUT_SRF=${R_SAVE}/SRF 
    5757 
    58 cd ${RUN_DIR_PATH} 
     58RUN_DIR=${RUN_DIR_PATH}/ATLAS_LMDZOR_${YEARS} 
     59IGCM_sys_MkdirWork ${RUN_DIR} 
     60IGCM_sys_Cd ${RUN_DIR} 
    5961 
    6062# -------------------------------------------- 
     
    6365# IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 
    6466 
    65 IGCM_sys_Get ${R_OUT_ATM}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc         ${RUN_DIR_PATH} 
    66 IGCM_sys_Get ${R_OUT_SRF}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_sechiba_history.nc ${RUN_DIR_PATH} 
     67IGCM_sys_Get ${R_OUT_ATM}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc         ${RUN_DIR} 
     68IGCM_sys_Get ${R_OUT_SRF}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_sechiba_history.nc ${RUN_DIR} 
    6769 
    68 atlas -o ${RUN_DIR_PATH}/${R_ATLAS}/ATM -l ${FER_ATLAS}/atlas_p_LMDZ3.3_diag1_*.cfg    ${RUN_DIR_PATH}/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc 
    69 atlas -o ${RUN_DIR_PATH}/${R_ATLAS}/SRF -l ${FER_ATLAS}/atlas_p_ORCHIDEE_diag1_*.cfg \ 
    70                                            ${FER_ATLAS}/atlas_p_SECHIBA_diag1_*.cfg  \ 
    71                                            ${FER_ATLAS}/atlas_p_ORCHIDEE_diag2_a.cfg   ${RUN_DIR_PATH}/${config_UserChoices_JobName}_SE_${YEARS}_1M_sechiba_history.nc 
     70atlas -o ${RUN_DIR}/${R_ATLAS}/ATM -l ${FER_ATLAS}/atlas_p_LMDZ3.3_diag1_*.cfg    ${RUN_DIR}/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc 
     71atlas -o ${RUN_DIR}/${R_ATLAS}/SRF -l ${FER_ATLAS}/atlas_p_ORCHIDEE_diag1_*.cfg \ 
     72                                      ${FER_ATLAS}/atlas_p_SECHIBA_diag1_*.cfg  \ 
     73                                      ${FER_ATLAS}/atlas_p_ORCHIDEE_diag2_a.cfg   ${RUN_DIR}/${config_UserChoices_JobName}_SE_${YEARS}_1M_sechiba_history.nc 
    7274 
    7375# IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 
  • trunk/libIGCM/AA_atlas_ORCA_LIM

    r18 r34  
    5858R_OUT_ICE=${R_SAVE}/ICE 
    5959 
    60 cd ${RUN_DIR_PATH} 
     60RUN_DIR=${RUN_DIR_PATH}/ATLAS_ORCALIM_${YEARS} 
     61IGCM_sys_MkdirWork ${RUN_DIR} 
     62IGCM_sys_Cd ${RUN_DIR} 
    6163 
    6264# -------------------------------------------- 
     
    6567# IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 
    6668 
    67 IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc ${RUN_DIR_PATH} 
    68 IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_U.nc ${RUN_DIR_PATH} 
    69 IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_V.nc ${RUN_DIR_PATH} 
    70 IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_W.nc ${RUN_DIR_PATH} 
    71 IGCM_sys_Get ${R_OUT_ICE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_icemod.nc      ${RUN_DIR_PATH} 
     69IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc  ${RUN_DIR} 
     70IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_U.nc  ${RUN_DIR} 
     71IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_V.nc  ${RUN_DIR} 
     72IGCM_sys_Get ${R_OUT_OCE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_W.nc  ${RUN_DIR} 
     73IGCM_sys_Get ${R_OUT_ICE}/Analyse/SE/${config_UserChoices_JobName}_SE_${YEARS}_1M_icemod.nc  ${RUN_DIR} 
    7274 
    73 atlas -o ${RUN_DIR_PATH}/${R_ATLAS}/OCE_T -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}_diag1_[ab].cfg     ${RUN_DIR_PATH}/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc 
    74 atlas -o ${RUN_DIR_PATH}/${R_ATLAS}/OCE_U -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}_diag0_U.cfg        ${RUN_DIR_PATH}/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_U.nc 
    75 atlas -o ${RUN_DIR_PATH}/${R_ATLAS}/OCE_V -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}_diag0_V.cfg        ${RUN_DIR_PATH}/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_V.nc 
    76 #atlas -o ${RUN_DIR_PATH}/${R_ATLAS}/OCE_W -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}_diag0_W.cfg        ${RUN_DIR_PATH}/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_W.nc 
    77 atlas -o ${RUN_DIR_PATH}/${R_ATLAS}/OCE   -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}_diag0_[de].cfg     ${RUN_DIR_PATH}/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc 
    78 atlas -o ${RUN_DIR_PATH}/${R_ATLAS}/ICE   -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}LIM_diag0_[abc].cfg ${RUN_DIR_PATH}/${config_UserChoices_JobName}_SE_${YEARS}_1M_icemod.nc 
     75atlas -o ${RUN_DIR}/${R_ATLAS}/OCE_T -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}_diag1_[ab].cfg     ${RUN_DIR}/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc 
     76atlas -o ${RUN_DIR}/${R_ATLAS}/OCE_U -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}_diag0_U.cfg        ${RUN_DIR}/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_U.nc 
     77atlas -o ${RUN_DIR}/${R_ATLAS}/OCE_V -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}_diag0_V.cfg        ${RUN_DIR}/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_V.nc 
     78#atlas -o ${RUN_DIR}/${R_ATLAS}/OCE_W -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}_diag0_W.cfg        ${RUN_DIR}/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_W.nc 
     79atlas -o ${RUN_DIR}/${R_ATLAS}/OCE   -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}_diag0_[de].cfg     ${RUN_DIR}/${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc 
     80atlas -o ${RUN_DIR}/${R_ATLAS}/ICE   -l ${FER_ATLAS}/atlas_p_${RESOL_OCE}LIM_diag0_[abc].cfg ${RUN_DIR}/${config_UserChoices_JobName}_SE_${YEARS}_1M_icemod.nc 
    7981 
    8082# IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 
     
    113115 
    114116IGCM_sys_Rm -Rf ATLAS 
    115  
    116117IGCM_sys_Rm ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_[TUVW].nc  
    117118IGCM_sys_Rm ${config_UserChoices_JobName}_SE_${YEARS}_1M_icemod.nc       
    118  
    119 # IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 
    120 # Additionnal post-processing 
    121  
    122 #IGCM_sys_Get /u/rech/ces/rces599/CPL/ORCA2xLMD9671/Oce/LEVITUS_1m_Temperature_Pot_Ice_nomask.nc . 
    123 #IGCM_sys_Get /u/rech/ces/rces599/CPL/ORCA2xLMD9671/Oce/LEVITUS_1m_Salinity_Ice_nomask.nc . 
    124 #IGCM_sys_Get /u/rech/psl/rpsl655/database/climato/ORCA2.0_Levitus.nc . 
    125  
    126 #ferret -gif -script news2.jnl "${YEARS}" "${EXP}" 
    127  
    128 # IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 
    129  
    130 # Put ferret journal files together 
    131 #for file in $( ls */*jnl ) ; do   
    132 #    echo -e "\n\n################################" ;  
    133 #    echo -e "$file\n" ; cat $file ;  
    134 #done  > allferretscript.txt 
    135  
    136 # Clear some files 
    137 #find . \( -name "*.stdout" -o -name "*.jnl" \) -print -exec rm -f {} \; 
    138  
    139 # Save files 
    140 #IGCM_sys_Put_Dir Images ${R_SAVE}/ATLAS 
    141  
    142 # IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 
    143119 
    144120# DODS copy 
  • trunk/libIGCM/AA_atlas_ORCHIDEE

    r18 r34  
    9595# Save files 
    9696IGCM_sys_Put_Dir ATLAS ${R_SAVE} 
    97  
    9897IGCM_sys_Rm -Rf ATLAS 
    9998IGCM_sys_Rm ${config_UserChoices_JobName}_SE_${YEARS}_1M_sechiba_history.nc 
  • trunk/libIGCM/AA_create_se

    r25 r34  
    446446    IGCM_sys_QsubPost atlas_ORCHIDEE     ; 
    447447    # 
     448elif [ ${config_UserChoices_TagName} = "LMDZ" ]  || \ 
     449    # 
     450    IGCM_sys_QsubPost atlas_LMDZ         ; 
     451    # 
    448452elif [ ${config_UserChoices_TagName} = "OL" ]      || \ 
    449453     [ ${config_UserChoices_TagName} = "OL2" ] ; then 
  • trunk/libIGCM/AA_job

    r22 r34  
    180180 
    181181# --------------------------------------------------------------------== 
     182#D- Define REBUILD_DIR :  
     183#D- where we store files needing rebuild process 
     184#D-   
     185# --------------------------------------------------------------------== 
     186if [ ${config_Post_RebuildFromArchive} = true ]; then 
     187    REBUILD_DIR=${R_SAVE}/TMP 
     188    IGCM_sys_MkdirArchive ${REBUILD_DIR} 
     189else 
     190    REBUILD_DIR=\${RUN_DIR} 
     191fi 
     192 
     193# --------------------------------------------------------------------== 
    182194#D- Initialize each components taking part 
    183195#D- into simulation configuration : 
  • trunk/libIGCM/AA_monitoring

    r18 r34  
    5353 
    5454#=========================================== 
    55 cd ${RUN_DIR_PATH} 
     55 
     56RUN_DIR=${RUN_DIR_PATH}/MONITORING_${YEARS} 
     57IGCM_sys_MkdirWork ${RUN_DIR} 
     58IGCM_sys_Cd ${RUN_DIR} 
    5659 
    5760if [ ${StandAlone} = true ] ; then 
  • trunk/libIGCM/AA_rebuild

    r26 r34  
    2727#-Q- sx8mercure #PBS -S /usr/bin/ksh         # shell de soumission 
    2828#-Q- sx8mercure #PBS -l memsz_job=1gb        # Limite memoire a 1 Go 
    29 #-Q- sx8mercure #PBS -l cputim_job=4:00:00   # Limite temps a 1 heures 
     29#-Q- sx8mercure #PBS -l cputim_job=24:00:00   # Limite temps a 1 heures 
    3030#-Q- sx8mercure #PBS -q scalaire 
    3131#-Q- default #!/bin/ksh 
     
    6767#D- Default : value from AA_job if any 
    6868libIGCM=${libIGCM:=/home/rech/ces/rces452/libIGCM} 
    69  
    70 #D- TEMPORARY Flag to determine atmospheric resolution 
    71 #D- Default : value from atmospheric driver if any 
    72 RESOL_ATM=${RESOL_ATM:=LMD144142} 
    73  
    74 #D- TEMPORARY Flag to determine ocean resolution 
    75 #D- Default : value from ocean driver if any 
    76 RESOL_OCE=${RESOL_OCE:=ORCA2} 
    77  
    78 #D- TEMPORARY Flag to determine ice resolution 
    79 #D- Default : value from ice driver if any 
    80 RESOL_ICE=${RESOL_ICE:=ORCA2} 
    81  
    82 #D- Flag to determine surface resolution 
    83 #D- Default : value from surface driver if any 
    84 RESOL_SRF=${RESOL_SRF:=LMD144142} 
    8569 
    8670######################################################################## 
     
    127111echo 
    128112 
     113if [ ${RebuildFromArchive} = true ] ; then 
     114    RUN_DIR=${RUN_DIR_PATH} 
     115else 
     116    RUN_DIR=${REBUILD_DIR} 
     117fi 
    129118IGCM_sys_Cd ${RUN_DIR} 
    130 ListAllRebuildDir=$( ls -d ${RUN_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${PeriodDateBegin} ) 
     119ListAllRebuildDir=$( ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${PeriodDateBegin} ) 
    131120 
    132121for directory in ${ListAllRebuildDir} ; do 
    133122    # 
    134     IGCM_sys_Cd ${directory} 
     123    if [ ${RebuildFromArchive} = true ] ; then 
     124        IGCM_sys_Get_Dir ${directory} ${RUN_DIR} 
     125    fi 
     126    IGCM_sys_Cd ${RUN_DIR}/$( basename ${directory} ) 
    135127    # -------------------------------------------------------------------- 
    136128    # Function define in rebuild.ksh has not been closed yet. Do it now 
    137129    # -------------------------------------------------------------------- 
    138     echo IGCM_debug_PopStack "IGCM_post_Submit" >> ${directory}/rebuild.ksh 
    139     echo }                                      >> ${directory}/rebuild.ksh 
     130    echo IGCM_debug_PopStack "IGCM_post_Submit" >> rebuild.ksh 
     131    echo }                                      >> rebuild.ksh 
    140132 
    141133    # -------------------------------------------------------------------- 
    142134    # Source function include in the REBUILD ksh and rebuild 
    143135    # -------------------------------------------------------------------- 
    144     . ${directory}/rebuild.ksh 
     136    . ${RUN_DIR}/$( basename ${directory} )/rebuild.ksh 
    145137    IGCM_FlushRebuild 
    146138    # 
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r22 r34  
    605605                    else 
    606606                        IGCM_debug_Print 2 "Preparing offline rebuild for ${file_in}" 
    607                         IGCM_sys_Mkdir ${RUN_DIR}/REBUILD_${PeriodDateBegin} 
     607                        [ ! -d ${RUN_DIR}/REBUILD_${PeriodDateBegin} ] && IGCM_sys_Mkdir ${RUN_DIR}/REBUILD_${PeriodDateBegin} 
    608608                        IGCM_sys_Mv ${generic_file_name}_????.nc ${RUN_DIR}/REBUILD_${PeriodDateBegin} 
    609609                        # Prepare headers for the shell dedicated to offline rebuild 
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r28 r34  
    122122    # 
    123123    IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Post RebuildFrequency 
     124    # 
     125    IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Post RebuildFromArchive 
    124126    # 
    125127 
  • trunk/libIGCM/libIGCM_post/libIGCM_post.ksh

    r30 r34  
    283283        done 
    284284    done 
     285 
    285286    IGCM_debug_Print 1 "POST-TREATEMENT flag value : ${POST}" 
    286     [ ${POST} = true ] || [ ${RebuildFrequency} = true ] && IGCM_post_Submit 
     287    # 
     288    if [ ${SimulationLengthInDays} -ge ${ExperienceLengthInDays} ] ; then 
     289        TimeSeriesFrequency=true 
     290    fi 
     291    # 
     292    IGCM_post_Submit 
    287293 
    288294    IGCM_debug_PopStack "IGCM_post_Initialize" 
     
    293299    IGCM_debug_PushStack "IGCM_post_Submit" 
    294300 
    295     # Debug Print : 
    296     echo 
    297     IGCM_debug_Print 1 "IGCM_post_Submit :" 
    298     echo 
    299  
    300301    POST_DIR=${R_OUT_POST}/${config_UserChoices_TagName}/${config_UserChoices_JobName} 
    301     IGCM_debug_Print 1 "POST_DIR = ${POST_DIR}" 
     302 
     303    if [ ${POST} = true ]; then 
     304        echo 
     305        IGCM_debug_Print 1 "IGCM_post_Submit :" 
     306        echo 
     307        IGCM_debug_Print 1 "POST_DIR = ${POST_DIR}" 
     308    fi 
    302309 
    303310    #============ TIME SERIES POST-TREATMENT ===========# 
     
    380387 
    381388    #============== REBUILD POST-TREATMENT =============# 
     389 
     390    if ( [ ${config_Post_RebuildFromArchive} = true ] && [ ! X${config_Post_RebuildFrequency} = X${NULL_STR} ] && [ ! X${config_Post_RebuildFrequency} = XNONE ] ) ; then 
     391        IGCM_sys_Put_Dir REBUILD_${PeriodDateBegin} ${REBUILD_DIR} 
     392    fi 
     393    # 
    382394    if [ ${RebuildFrequency} = true ] ; then 
    383395        # 
     
    386398        # 
    387399        typeset listVarEnv 
    388         listVarEnv="MODIPSL,libIGCM,libIGCM_SX,SUBMIT_DIR,RUN_DIR,POST_DIR,DateBegin,PeriodDateBegin,PeriodDateEnd,NbRebuildDir,StandAlone,RESOL_ATM,RESOL_OCE,RESOL_ICE,RESOL_SRF" 
     400        listVarEnv="MODIPSL,libIGCM,libIGCM_SX,SUBMIT_DIR,REBUILD_DIR,RebuildFromArchive,POST_DIR,DateBegin,PeriodDateBegin,PeriodDateEnd,NbRebuildDir,StandAlone,RESOL_ATM,RESOL_OCE,RESOL_ICE,RESOL_SRF" 
    389401        IGCM_sys_RshPost <<-EOF 
    390402        export MODIPSL=${MODIPSL} 
     
    392404        export libIGCM=${libIGCM_POST} 
    393405        export SUBMIT_DIR=${SUBMIT_DIR} 
    394         export RUN_DIR=${RUN_DIR} 
     406        export RebuildFromArchive=${config_Post_RebuildFromArchive} 
     407        export REBUILD_DIR=${REBUILD_DIR} 
    395408        export POST_DIR=${POST_DIR} 
    396409        export DateBegin=${DateBegin} 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_brodie.ksh

    r17 r34  
    653653 
    654654#D-#================================================== 
     655#D-function IGCM_sys_Put_Dir 
     656#D-* Purpose: Copy a complete directory on $(ARCHIVE) 
     657#D-* Examples: 
     658#D- 
     659function IGCM_sys_Put_Dir { 
     660    IGCM_debug_PushStack "IGCM_sys_Put_Dir" $@ 
     661    if ( $DEBUG_sys ) ; then 
     662        echo "IGCM_sys_Put_Dir :" $@ 
     663    fi 
     664    if [ $DRYRUN = 0 ]; then 
     665        if [ ! -d ${1} ] ; then 
     666            echo "WARNING : IGCM_sys_Put_Dir ${1} DOES NOT EXIST ." 
     667            IGCM_debug_PopStack "IGCM_sys_Put_Dir" 
     668            return 
     669        fi 
     670 
     671        typeset RET 
     672 
     673        # Only if we use rsync 
     674        #IGCM_sys_TestDirArchive $( dirname $2 ) 
     675        # 
     676        #USUAL WAY 
     677        rcp -r $1 gaya:$2 > out_rsync 2>&1 
     678        RET=$? 
     679 
     680        if [ ${RET} -gt 0 ] ; then 
     681            echo "IGCM_sys_Put_Dir : error." 
     682            cat out_rsync 
     683            IGCM_debug_Exit "IGCM_sys_Put_Dir" 
     684        fi 
     685    else 
     686        echo "DRYRUN mode = " $DRYRUN >> stack 
     687    fi 
     688    IGCM_debug_PopStack "IGCM_sys_Put_Dir" 
     689} 
     690 
     691#D-#================================================== 
     692#D-function IGCM_sys_Get_Dir 
     693#D-* Purpose: Copy a complete directory from $(ARCHIVE) 
     694#D-* Examples: 
     695#D- 
     696function IGCM_sys_Get_Dir { 
     697    IGCM_debug_PushStack "IGCM_sys_Get_Dir" $@ 
     698    if ( $DEBUG_sys ) ; then 
     699        echo "IGCM_sys_Get_Dir :" $@ 
     700    fi 
     701    if [ $DRYRUN = 0 ]; then 
     702        if [ ! -d ${1} ] ; then 
     703            echo "WARNING : IGCM_sys_Get_Dir ${1} DOES NOT EXIST ." 
     704            IGCM_debug_PopStack "IGCM_sys_Get_Dir" 
     705            return 
     706        fi 
     707 
     708        typeset RET 
     709 
     710        #USUAL WAY 
     711        rcp -rp gaya:$1 $2 > out_rsync 2>&1 
     712        RET=$? 
     713 
     714        if [ ${RET} -gt 0 ] ; then 
     715            echo "IGCM_sys_Get_Dir : error." 
     716            cat out_rsync 
     717            IGCM_debug_Exit "IGCM_sys_Get_Dir" 
     718        fi 
     719    else 
     720        echo "DRYRUN mode = " $DRYRUN >> stack 
     721    fi 
     722    IGCM_debug_PopStack "IGCM_sys_Get_Dir" 
     723} 
     724 
     725#D-#================================================== 
    655726#D-function IGCM_sys_Put_Rest 
    656727#D-* Purpose: Put computied restarts on $(ARCHIVE). 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercure.ksh

    r31 r34  
    588588 
    589589#D-#================================================== 
     590#D-function IGCM_sys_Put_Dir 
     591#D-* Purpose: Copy a complete directory on $(ARCHIVE) 
     592#D-* Examples: 
     593#D- 
     594function IGCM_sys_Put_Dir { 
     595    IGCM_debug_PushStack "IGCM_sys_Put_Dir" $@ 
     596    if ( $DEBUG_sys ) ; then 
     597        echo "IGCM_sys_Put_Dir :" $@ 
     598    fi 
     599    if [ $DRYRUN = 0 ]; then 
     600        if [ ! -d ${1} ] ; then 
     601            echo "WARNING : IGCM_sys_Put_Dir ${1} DOES NOT EXIST ." 
     602            IGCM_debug_PopStack "IGCM_sys_Put_Dir" 
     603            return 
     604        fi 
     605 
     606        typeset RET 
     607 
     608        # Only if we use rsync 
     609        #IGCM_sys_TestDirArchive $( dirname $2 ) 
     610        # 
     611        #USUAL WAY 
     612        \cp -r $1 $2 > out_rsync 2>&1 
     613        RET=$? 
     614 
     615        if [ ${RET} -gt 0 ] ; then 
     616            echo "IGCM_sys_Put_Dir : error." 
     617            cat out_rsync 
     618            IGCM_debug_Exit "IGCM_sys_Put_Dir" 
     619        fi 
     620    else 
     621        echo "DRYRUN mode = " $DRYRUN >> stack 
     622    fi 
     623    IGCM_debug_PopStack "IGCM_sys_Put_Dir" 
     624} 
     625 
     626#D-#================================================== 
     627#D-function IGCM_sys_Get_Dir 
     628#D-* Purpose: Copy a complete directory from $(ARCHIVE) 
     629#D-* Examples: 
     630#D- 
     631function IGCM_sys_Get_Dir { 
     632    IGCM_debug_PushStack "IGCM_sys_Get_Dir" $@ 
     633    if ( $DEBUG_sys ) ; then 
     634        echo "IGCM_sys_Get_Dir :" $@ 
     635    fi 
     636    if [ $DRYRUN = 0 ]; then 
     637        if [ ! -d ${1} ] ; then 
     638            echo "WARNING : IGCM_sys_Get_Dir ${1} DOES NOT EXIST ." 
     639            IGCM_debug_PopStack "IGCM_sys_Get_Dir" 
     640            return 
     641        fi 
     642 
     643        typeset RET 
     644 
     645        # Only if we use rsync 
     646        #IGCM_sys_TestDirArchive $( dirname $2 ) 
     647        # 
     648        #USUAL WAY 
     649        \cp -r $1 $2 > out_rsync 2>&1 
     650        RET=$? 
     651 
     652        if [ ${RET} -gt 0 ] ; then 
     653            echo "IGCM_sys_Get_Dir : error." 
     654            cat out_rsync 
     655            IGCM_debug_Exit "IGCM_sys_Get_Dir" 
     656        fi 
     657    else 
     658        echo "DRYRUN mode = " $DRYRUN >> stack 
     659    fi 
     660    IGCM_debug_PopStack "IGCM_sys_Get_Dir" 
     661} 
     662 
     663#D-#================================================== 
    590664#D-function IGCM_sys_Put_Rest 
    591665#D-* Purpose: Put computied restarts on $(ARCHIVE). 
Note: See TracChangeset for help on using the changeset viewer.