Changeset 1057


Ignore:
Timestamp:
09/23/14 11:16:24 (10 years ago)
Author:
sdipsl
Message:
  • refactor archive and storage path definition. They can be defined using UserChoices? from config.card. Very easy now to decide where to store everything. There is a single place to look at : IGCM_sys_defineArchives. see #221
  • clean up IGCM_debug_PushStack arguments
Location:
trunk/libIGCM
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r1056 r1057  
    8181      # TEST simulations will not be packed and will stay on SCRATCHDIR filesystem 
    8282      IGCM_debug_Print 1 "SpaceName=TEST. OVERRULE PackFrequency to NONE" 
    83       IGCM_debug_Print 1 "SpaceName=TEST. OVERRULE destination path directories" 
    8483      config_Post_PackFrequency=NONE 
    85       IGCM_sys_ChangeArchive 
    8684    else 
    8785      # Default to RebuildFrequency if nothing has been set up related to PackFrequency 
     
    9290    config_Post_PackFrequency=NONE 
    9391  fi 
     92 
     93  #==================================================== 
     94  # Define ARCHIVE : Dedicated to large files 
     95  # Define STORAGE : Dedicated to small/medium files 
     96  # Define R_OUT   : Output tree located on ARCHIVE 
     97  # Define R_FIG   : Output tree located on STORAGE hosting figures (monitoring and atlas, and/or small files) 
     98  # Define R_BUF   : USELESS and DEPRECATED output tree. 
     99  IGCM_sys_defineArchives 
    94100 
    95101  #==================================================== 
  • trunk/libIGCM/libIGCM_post/libIGCM_post.ksh

    r1043 r1057  
    640640function IGCM_post_CheckModuloFrequency 
    641641{ 
    642   IGCM_debug_PushStack "IGCM_post_CheckModuloFrequency" $* 
     642  IGCM_debug_PushStack "IGCM_post_CheckModuloFrequency" $@ 
    643643 
    644644  # Used by IGCM_config_Check 
     
    764764function IGCM_post_ModuloRuntimeFrequency 
    765765{ 
    766   IGCM_debug_PushStack "IGCM_post_ModuloRuntimeFrequency" $* 
     766  IGCM_debug_PushStack "IGCM_post_ModuloRuntimeFrequency" $@ 
    767767 
    768768  # Used by IGCM_post_Configure 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh

    r1055 r1057  
    125125 
    126126#==================================================== 
    127 #- ARCHIVE (dedicated to large files) 
    128 typeset ARCHIVE=$(echo ${HOME} | sed -e "s,/.*home/,/arch/home/,") 
    129  
    130 #==================================================== 
    131 #- STORAGE (dedicated to small/medium files) 
    132 typeset STORAGE=${WORKDIR} 
    133  
    134 #==================================================== 
    135 #- R_OUT 
    136 typeset R_OUT=${ARCHIVE}/IGCM_OUT 
    137  
    138 #==================================================== 
    139 #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    140 typeset R_FIG=${ARCHIVE}/IGCM_OUT 
    141  
    142 #==================================================== 
    143 #- R_BUF (ONLY FOR double copy an scratch) 
    144 typeset -r R_BUF=${WORKDIR}/IGCM_OUT 
    145  
    146 #==================================================== 
    147127#- RUN_DIR_PATH : Temporary working directory (=> TMP) 
    148128typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${TMPDIR}} 
     
    157137 
    158138#==================================================== 
    159 #- set PackDefault true on curie 
     139#- set PackDefault true on ada 
    160140PackDefault=true 
    161141 
     
    174154 
    175155#D-#================================================== 
    176 #D-function IGCM_sys_ChangeArchive 
    177 #D-* Purpose: if SpaceName=TEST everything is stored on SCRATCHDIR 
    178 #D-* Examples: 
    179 #D- 
    180 function IGCM_sys_ChangeArchive { 
    181   IGCM_debug_PushStack "IGCM_sys_ChangeArchive" 
    182  
    183   R_OUT=${WORKDIR}/IGCM_OUT 
    184   R_FIG=${WORKDIR}/IGCM_OUT 
    185  
    186   IGCM_debug_Print 1 "R_OUT   has been redefined = ${R_OUT}" 
    187   IGCM_debug_Print 1 "R_FIG   has been redefined = ${R_FIG}" 
    188  
    189   IGCM_debug_PopStack "IGCM_sys_ChangeArchive" 
     156#D-function IGCM_sys_defineArchives 
     157#D-* Purpose: 
     158#D-* Define ARCHIVE : Dedicated to large files 
     159#D-* Define STORAGE : Dedicated to small/medium files 
     160#D-* Define R_OUT   : Output tree located on ARCHIVE 
     161#D-* Define R_FIG   : Output tree located on STORAGE hosting figures (monitoring and atlas, and/or small files) 
     162#D-* Define R_BUF   : Output tree located on SCRATCHDIR hosting files waiting for rebuild or pack processes 
     163#D-* if SpaceName=TEST everything is stored on WORKDIR 
     164#D-* Examples: 
     165#D- 
     166function IGCM_sys_defineArchives { 
     167  IGCM_debug_PushStack "IGCM_sys_defineArchives" 
     168 
     169  if [ ! X${config_UserChoices_Archive} = X ]; then 
     170    #==================================================== 
     171    #- ARCHIVE (dedicated to large files) 
     172    typeset ARCHIVE=${config_UserChoices_Archive} 
     173  else 
     174    #==================================================== 
     175    #- ARCHIVE (dedicated to large files) 
     176    typeset ARCHIVE=$(echo ${HOME} | sed -e "s,/.*home/,/arch/home/,") 
     177  fi 
     178 
     179  if [ ! X${config_UserChoices_Storage} = X ]; then 
     180    #==================================================== 
     181    #- STORAGE (dedicated to small/medium files) 
     182    typeset STORAGE=${config_UserChoices_Storage} 
     183  else 
     184    #==================================================== 
     185    #- STORAGE (dedicated to small/medium files) 
     186    typeset STORAGE=${WORKDIR} 
     187  fi 
     188 
     189  if [ X${config_UserChoices_SpaceName} = XTEST ]; then 
     190    #==================================================== 
     191    #- R_OUT 
     192    typeset R_OUT=${WORKDIR}/IGCM_OUT 
     193 
     194    #==================================================== 
     195    #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
     196    typeset R_FIG=${WORKDIR}/IGCM_OUT 
     197 
     198    IGCM_debug_Print 1 "SpaceName=TEST ==> OVERRULE destination path directories" 
     199 
     200  else 
     201    #==================================================== 
     202    #- R_OUT 
     203    typeset R_OUT=${ARCHIVE}/IGCM_OUT 
     204 
     205    #==================================================== 
     206    #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
     207    typeset R_FIG=${ARCHIVE}/IGCM_OUT 
     208  fi 
     209 
     210  #==================================================== 
     211  #- R_BUF (ONLY FOR double copy an scratch) 
     212  typeset -r R_BUF=${WORKDIR}/IGCM_OUT 
     213 
     214  IGCM_debug_Print 1 "R_OUT has been defined = ${R_OUT}" 
     215  IGCM_debug_Print 1 "R_BUF has been defined = ${R_BUF}" 
     216  IGCM_debug_Print 1 "R_FIG has been defined = ${R_FIG}" 
     217 
     218  IGCM_debug_PopStack "IGCM_sys_defineArchives" 
    190219} 
    191220 
     
    443472#D- 
    444473function IGCM_sys_Chmod { 
    445   IGCM_debug_PushStack "IGCM_sys_Chmod" -- $@ 
     474  IGCM_debug_PushStack "IGCM_sys_Chmod" $@ 
    446475  if ( $DEBUG_sys ) ; then 
    447476    echo "IGCM_sys_Chmod :" $@ 
     
    953982#D- 
    954983function IGCM_sys_Rm { 
    955   IGCM_debug_PushStack "IGCM_sys_Rm" -- $@ 
     984  IGCM_debug_PushStack "IGCM_sys_Rm" $@ 
    956985  if ( $DEBUG_sys ) ; then 
    957986    echo "IGCM_sys_Rm :" $@ 
     
    9811010#D- 
    9821011function IGCM_sys_RmRunDir { 
    983   IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@ 
     1012  IGCM_debug_PushStack "IGCM_sys_RmRunDir" $@ 
    9841013  if ( $DEBUG_sys ) ; then 
    9851014    echo "IGCM_sys_RmRunDir :" $@ 
     
    17261755#D- 
    17271756function IGCM_sys_rebuild { 
    1728   IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@ 
     1757  IGCM_debug_PushStack "IGCM_sys_rebuild" $@ 
    17291758  if ( $DEBUG_sys ) ; then 
    17301759    echo "IGCM_sys_rebuild :" $@ 
     
    17701799#D- 
    17711800function IGCM_sys_rebuild_station { 
    1772   IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 
     1801  IGCM_debug_PushStack "IGCM_sys_rebuild_station" $@ 
    17731802  typeset i list_opt file_in file_out prefix_invert list_invert 
    17741803  if ( $DEBUG_sys ) ; then 
     
    21812210#D- 
    21822211function IGCM_sys_ncap2 { 
    2183   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ 
     2212  IGCM_debug_PushStack "IGCM_sys_ncap2" $@ 
    21842213  if ( $DEBUG_sys ) ; then 
    21852214    echo "IGCM_sys_ncap2 :" $@ 
     
    22232252#D- 
    22242253function IGCM_sys_ncatted { 
    2225   IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@ 
     2254  IGCM_debug_PushStack "IGCM_sys_ncatted" $@ 
    22262255  if ( $DEBUG_sys ) ; then 
    22272256    echo "IGCM_sys_ncatted :" $@ 
     
    22652294#D- 
    22662295function IGCM_sys_ncbo { 
    2267   IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@ 
     2296  IGCM_debug_PushStack "IGCM_sys_ncbo" $@ 
    22682297  if ( $DEBUG_sys ) ; then 
    22692298    echo "IGCM_sys_ncbo :" $@ 
     
    23072336#D- 
    23082337function IGCM_sys_ncdiff { 
    2309   IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@ 
     2338  IGCM_debug_PushStack "IGCM_sys_ncdiff" $@ 
    23102339  if ( $DEBUG_sys ) ; then 
    23112340    echo "IGCM_sys_ncdiff :" $@ 
     
    23492378#D- 
    23502379function IGCM_sys_ncea { 
    2351   IGCM_debug_PushStack "IGCM_sys_ncea" -- $@ 
     2380  IGCM_debug_PushStack "IGCM_sys_ncea" $@ 
    23522381  if ( $DEBUG_sys ) ; then 
    23532382    echo "IGCM_sys_ncea :" $@ 
     
    23912420#D- 
    23922421function IGCM_sys_ncecat { 
    2393   IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@ 
     2422  IGCM_debug_PushStack "IGCM_sys_ncecat" $@ 
    23942423  if ( $DEBUG_sys ) ; then 
    23952424    echo "IGCM_sys_ncecat :" $@ 
     
    24332462#D- 
    24342463function IGCM_sys_ncflint { 
    2435   IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@ 
     2464  IGCM_debug_PushStack "IGCM_sys_ncflint" $@ 
    24362465  if ( $DEBUG_sys ) ; then 
    24372466    echo "IGCM_sys_ncflint :" $@ 
     
    24752504#D- 
    24762505function IGCM_sys_ncks { 
    2477   IGCM_debug_PushStack "IGCM_sys_ncks" -- $@ 
     2506  IGCM_debug_PushStack "IGCM_sys_ncks" $@ 
    24782507  if ( $DEBUG_sys ) ; then 
    24792508    echo "IGCM_sys_ncks :" $@ 
     
    25172546#D- 
    25182547function IGCM_sys_ncpdq { 
    2519   IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@ 
     2548  IGCM_debug_PushStack "IGCM_sys_ncpdq" $@ 
    25202549  if ( $DEBUG_sys ) ; then 
    25212550    echo "IGCM_sys_ncpdq :" $@ 
     
    25592588#D- 
    25602589function IGCM_sys_ncra { 
    2561   IGCM_debug_PushStack "IGCM_sys_ncra" -- $@ 
     2590  IGCM_debug_PushStack "IGCM_sys_ncra" $@ 
    25622591  if ( $DEBUG_sys ) ; then 
    25632592    echo "IGCM_sys_ncra :" $@ 
     
    26012630#D- 
    26022631function IGCM_sys_ncrcat { 
    2603   IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@ 
     2632  IGCM_debug_PushStack "IGCM_sys_ncrcat" $@ 
    26042633  if ( $DEBUG_sys ) ; then 
    26052634    echo "IGCM_sys_ncrcat :" $@ 
     
    26532682#D- 
    26542683function IGCM_sys_ncrename { 
    2655   IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@ 
     2684  IGCM_debug_PushStack "IGCM_sys_ncrename" $@ 
    26562685  if ( $DEBUG_sys ) ; then 
    26572686    echo "IGCM_sys_ncrename :" $@ 
     
    26952724#D- 
    26962725function IGCM_sys_ncwa { 
    2697   IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@ 
     2726  IGCM_debug_PushStack "IGCM_sys_ncwa" $@ 
    26982727  if ( $DEBUG_sys ) ; then 
    26992728    echo "IGCM_sys_ncwa :" $@ 
     
    27402769#D- 
    27412770function IGCM_sys_cdo { 
    2742   IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 
     2771  IGCM_debug_PushStack "IGCM_sys_cdo" $@ 
    27432772  if ( $DEBUG_sys ) ; then 
    27442773    echo "IGCM_sys_cdo :" $@ 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh

    r1056 r1057  
    159159 
    160160#==================================================== 
    161 #- ARCHIVE (dedicated to large files) 
    162 typeset ARCHIVE=${CCCSTOREDIR} 
    163  
    164 #==================================================== 
    165 #- STORAGE (dedicated to small/medium files) 
    166 typeset STORAGE=${CCCWORKDIR} 
    167  
    168 #==================================================== 
    169 #- R_OUT 
    170 typeset R_OUT=${ARCHIVE}/IGCM_OUT 
    171  
    172 #==================================================== 
    173 #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    174 typeset R_FIG=${STORAGE}/IGCM_OUT 
    175  
    176 #==================================================== 
    177 #- R_BUF (ONLY FOR double copy an scratch) 
    178 typeset -r R_BUF=${SCRATCHDIR}/IGCM_OUT 
    179  
    180 #==================================================== 
    181161#- RUN_DIR_PATH : Temporary working directory (=> TMP) 
    182162typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCHDIR}/RUN_DIR/${BRIDGE_MSUB_JOBID}_${$}} 
     
    208188 
    209189#D-#================================================== 
    210 #D-function IGCM_sys_ChangeArchive 
    211 #D-* Purpose: if SpaceName=TEST everything is stored on SCRATCHDIR 
    212 #D-* Examples: 
    213 #D- 
    214 function IGCM_sys_ChangeArchive { 
    215   IGCM_debug_PushStack "IGCM_sys_ChangeArchive" 
    216  
    217   R_OUT=${SCRATCHDIR}/IGCM_OUT 
    218   R_FIG=${SCRATCHDIR}/IGCM_OUT 
    219  
    220   IGCM_debug_Print 1 "R_OUT   has been redefined = ${R_OUT}" 
    221   IGCM_debug_Print 1 "R_FIG   has been redefined = ${R_FIG}" 
    222  
    223   IGCM_debug_PopStack "IGCM_sys_ChangeArchive" 
     190#D-function IGCM_sys_defineArchives 
     191#D-* Purpose: 
     192#D-* Define ARCHIVE : Dedicated to large files 
     193#D-* Define STORAGE : Dedicated to small/medium files 
     194#D-* Define R_OUT   : Output tree located on ARCHIVE 
     195#D-* Define R_FIG   : Output tree located on STORAGE hosting figures (monitoring and atlas, and/or small files) 
     196#D-* Define R_BUF   : Output tree located on SCRATCHDIR hosting files waiting for rebuild or pack processes 
     197#D-* if SpaceName=TEST everything is stored on SCRATCHDIR 
     198#D-* Examples: 
     199#D- 
     200function IGCM_sys_defineArchives { 
     201  IGCM_debug_PushStack "IGCM_sys_defineArchives" 
     202 
     203  if [ ! X${config_UserChoices_Archive} = X ]; then 
     204    #==================================================== 
     205    #- ARCHIVE (dedicated to large files) 
     206    typeset ARCHIVE=${config_UserChoices_Archive} 
     207  else 
     208    #==================================================== 
     209    #- ARCHIVE (dedicated to large files) 
     210    typeset ARCHIVE=${CCCSTOREDIR} 
     211  fi 
     212 
     213  if [ ! X${config_UserChoices_Storage} = X ]; then 
     214    #==================================================== 
     215    #- STORAGE (dedicated to small/medium files) 
     216    typeset STORAGE=${config_UserChoices_Storage} 
     217  else 
     218    #==================================================== 
     219    #- STORAGE (dedicated to small/medium files) 
     220    typeset STORAGE=${CCCWORKDIR} 
     221  fi 
     222 
     223  if [ X${config_UserChoices_SpaceName} = XTEST ]; then 
     224    #==================================================== 
     225    #- R_OUT 
     226    typeset R_OUT=${SCRATCHDIR}/IGCM_OUT 
     227 
     228    #==================================================== 
     229    #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
     230    typeset R_FIG=${SCRATCHDIR}/IGCM_OUT 
     231 
     232    IGCM_debug_Print 1 "SpaceName=TEST ==> OVERRULE destination path directories" 
     233 
     234  else 
     235    #==================================================== 
     236    #- R_OUT 
     237    typeset R_OUT=${ARCHIVE}/IGCM_OUT 
     238 
     239    #==================================================== 
     240    #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
     241    typeset R_FIG=${STORAGE}/IGCM_OUT 
     242  fi 
     243 
     244  #==================================================== 
     245  #- R_BUF (ONLY FOR double copy an scratch) 
     246  typeset -r R_BUF=${SCRATCHDIR}/IGCM_OUT 
     247 
     248  IGCM_debug_Print 1 "R_OUT has been defined = ${R_OUT}" 
     249  IGCM_debug_Print 1 "R_BUF has been defined = ${R_BUF}" 
     250  IGCM_debug_Print 1 "R_FIG has been defined = ${R_FIG}" 
     251 
     252  IGCM_debug_PopStack "IGCM_sys_defineArchives" 
    224253} 
    225254 
     
    488517#D- 
    489518function IGCM_sys_Chmod { 
    490   IGCM_debug_PushStack "IGCM_sys_Chmod" -- $@ 
     519  IGCM_debug_PushStack "IGCM_sys_Chmod" $@ 
    491520  if ( $DEBUG_sys ) ; then 
    492521    echo "IGCM_sys_Chmod :" $@ 
     
    903932#D- 
    904933function IGCM_sys_Rm { 
    905   IGCM_debug_PushStack "IGCM_sys_Rm" -- $@ 
     934  IGCM_debug_PushStack "IGCM_sys_Rm" $@ 
    906935  if ( $DEBUG_sys ) ; then 
    907936    echo "IGCM_sys_Rm :" $@ 
     
    931960#D- 
    932961function IGCM_sys_RmRunDir { 
    933   IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@ 
     962  IGCM_debug_PushStack "IGCM_sys_RmRunDir" $@ 
    934963  if ( $DEBUG_sys ) ; then 
    935964    echo "IGCM_sys_RmRunDir :" $@ 
     
    18861915#D- 
    18871916function IGCM_sys_rebuild { 
    1888   IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@ 
     1917  IGCM_debug_PushStack "IGCM_sys_rebuild" $@ 
    18891918  if ( $DEBUG_sys ) ; then 
    18901919    echo "IGCM_sys_rebuild :" $@ 
     
    19301959#D- 
    19311960function IGCM_sys_rebuild_station { 
    1932   IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 
     1961  IGCM_debug_PushStack "IGCM_sys_rebuild_station" $@ 
    19331962  typeset i list_opt file_in file_out prefix_invert list_invert 
    19341963  if ( $DEBUG_sys ) ; then 
     
    25692598#D- 
    25702599function IGCM_sys_ncap2 { 
    2571   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ 
     2600  IGCM_debug_PushStack "IGCM_sys_ncap2" $@ 
    25722601  if ( $DEBUG_sys ) ; then 
    25732602    echo "IGCM_sys_ncap2 :" $@ 
     
    26112640#D- 
    26122641function IGCM_sys_ncatted { 
    2613   IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@ 
     2642  IGCM_debug_PushStack "IGCM_sys_ncatted" $@ 
    26142643  if ( $DEBUG_sys ) ; then 
    26152644    echo "IGCM_sys_ncatted :" $@ 
     
    26532682#D- 
    26542683function IGCM_sys_ncbo { 
    2655   IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@ 
     2684  IGCM_debug_PushStack "IGCM_sys_ncbo" $@ 
    26562685  if ( $DEBUG_sys ) ; then 
    26572686    echo "IGCM_sys_ncbo :" $@ 
     
    26952724#D- 
    26962725function IGCM_sys_ncdiff { 
    2697   IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@ 
     2726  IGCM_debug_PushStack "IGCM_sys_ncdiff" $@ 
    26982727  if ( $DEBUG_sys ) ; then 
    26992728    echo "IGCM_sys_ncdiff :" $@ 
     
    27372766#D- 
    27382767function IGCM_sys_ncea { 
    2739   IGCM_debug_PushStack "IGCM_sys_ncea" -- $@ 
     2768  IGCM_debug_PushStack "IGCM_sys_ncea" $@ 
    27402769  if ( $DEBUG_sys ) ; then 
    27412770    echo "IGCM_sys_ncea :" $@ 
     
    27792808#D- 
    27802809function IGCM_sys_ncecat { 
    2781   IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@ 
     2810  IGCM_debug_PushStack "IGCM_sys_ncecat" $@ 
    27822811  if ( $DEBUG_sys ) ; then 
    27832812    echo "IGCM_sys_ncecat :" $@ 
     
    28212850#D- 
    28222851function IGCM_sys_ncflint { 
    2823   IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@ 
     2852  IGCM_debug_PushStack "IGCM_sys_ncflint" $@ 
    28242853  if ( $DEBUG_sys ) ; then 
    28252854    echo "IGCM_sys_ncflint :" $@ 
     
    28632892#D- 
    28642893function IGCM_sys_ncks { 
    2865   IGCM_debug_PushStack "IGCM_sys_ncks" -- $@ 
     2894  IGCM_debug_PushStack "IGCM_sys_ncks" $@ 
    28662895  if ( $DEBUG_sys ) ; then 
    28672896    echo "IGCM_sys_ncks :" $@ 
     
    29052934#D- 
    29062935function IGCM_sys_ncpdq { 
    2907   IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@ 
     2936  IGCM_debug_PushStack "IGCM_sys_ncpdq" $@ 
    29082937  if ( $DEBUG_sys ) ; then 
    29092938    echo "IGCM_sys_ncpdq :" $@ 
     
    29472976#D- 
    29482977function IGCM_sys_ncra { 
    2949   IGCM_debug_PushStack "IGCM_sys_ncra" -- $@ 
     2978  IGCM_debug_PushStack "IGCM_sys_ncra" $@ 
    29502979  if ( $DEBUG_sys ) ; then 
    29512980    echo "IGCM_sys_ncra :" $@ 
     
    29893018#D- 
    29903019function IGCM_sys_ncrcat { 
    2991   IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@ 
     3020  IGCM_debug_PushStack "IGCM_sys_ncrcat" $@ 
    29923021  if ( $DEBUG_sys ) ; then 
    29933022    echo "IGCM_sys_ncrcat :" $@ 
     
    30413070#D- 
    30423071function IGCM_sys_ncrename { 
    3043   IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@ 
     3072  IGCM_debug_PushStack "IGCM_sys_ncrename" $@ 
    30443073  if ( $DEBUG_sys ) ; then 
    30453074    echo "IGCM_sys_ncrename :" $@ 
     
    30833112#D- 
    30843113function IGCM_sys_ncwa { 
    3085   IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@ 
     3114  IGCM_debug_PushStack "IGCM_sys_ncwa" $@ 
    30863115  if ( $DEBUG_sys ) ; then 
    30873116    echo "IGCM_sys_ncwa :" $@ 
     
    31283157#D- 
    31293158function IGCM_sys_cdo { 
    3130   IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 
     3159  IGCM_debug_PushStack "IGCM_sys_cdo" $@ 
    31313160  if ( $DEBUG_sys ) ; then 
    31323161    echo "IGCM_sys_cdo :" $@ 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh

    r1046 r1057  
    117117 
    118118#==================================================== 
    119 #- ARCHIVE 
    120 typeset ARCHIVE=${ARCHIVE:=/home/${LOGIN}} 
    121  
    122 #==================================================== 
    123 #- STORAGE (dedicated to small/medium files) 
    124 typeset STORAGE=${ARCHIVE} 
    125  
    126 #==================================================== 
    127 #- R_OUT 
    128 typeset R_OUT=${ARCHIVE}/IGCM_OUT 
    129  
    130 #==================================================== 
    131 #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    132 typeset R_FIG=${STORAGE}/IGCM_OUT 
    133  
    134 #==================================================== 
    135 #- R_BUF (ONLY FOR double copy an scratch) 
    136 typeset -r R_BUF=${STORAGE}/IGCM_OUT 
    137  
    138 #==================================================== 
    139119#- RUN_DIR_PATH : Temporary working directory (=> TMP) 
    140120typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${STORAGE}/RUN_DIR/tmp$$} 
     
    162142 
    163143#D-#================================================== 
    164 #D-function IGCM_sys_ChangeArchive 
    165 #D-* Purpose: Just a dummy call on this machine 
    166 #D-* Examples: 
    167 #D- 
    168 function IGCM_sys_ChangeArchive { 
    169   IGCM_debug_Print 1 " dummy function : IGCM_sys_ChangeArchive " 
     144#D-function IGCM_sys_defineArchives 
     145#D-* Purpose: 
     146#D-* Define ARCHIVE : Dedicated to large files 
     147#D-* Define STORAGE : Dedicated to small/medium files 
     148#D-* Define R_OUT   : Output tree located on ARCHIVE 
     149#D-* Define R_FIG   : Output tree located on STORAGE hosting figures (monitoring and atlas, and/or small files) 
     150#D-* Define R_BUF   : Output tree located on STORAGE hosting files waiting for rebuild or pack processes 
     151#D-* if SpaceName=TEST nothing special will hapen 
     152#D-* Examples: 
     153#D- 
     154function IGCM_sys_defineArchives { 
     155  IGCM_debug_PushStack "IGCM_sys_defineArchives" 
     156 
     157  if [ ! X${config_UserChoices_Archive} = X ]; then 
     158    #==================================================== 
     159    #- ARCHIVE (dedicated to large files) 
     160    typeset ARCHIVE=${config_UserChoices_Archive} 
     161  else 
     162    #==================================================== 
     163    #- ARCHIVE (dedicated to large files) 
     164    typeset ARCHIVE=${ARCHIVE:=/home/${LOGIN}} 
     165  fi 
     166 
     167  if [ ! X${config_UserChoices_Storage} = X ]; then 
     168    #==================================================== 
     169    #- STORAGE (dedicated to small/medium files) 
     170    typeset STORAGE=${config_UserChoices_Storage} 
     171  else 
     172    #==================================================== 
     173    #- STORAGE (dedicated to small/medium files) 
     174    typeset STORAGE=${ARCHIVE} 
     175  fi 
     176 
     177  # ON OBELIX NO SPECIAL CASE WHEN X${config_UserChoices_SpaceName} = XTEST 
     178 
     179  #==================================================== 
     180  #- R_OUT 
     181  typeset R_OUT=${ARCHIVE}/IGCM_OUT 
     182 
     183  #==================================================== 
     184  #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
     185  typeset R_FIG=${STORAGE}/IGCM_OUT 
     186 
     187  #==================================================== 
     188  #- R_BUF (ONLY FOR double copy an scratch) 
     189  typeset -r R_BUF=${STORAGE}/IGCM_OUT 
     190 
     191  IGCM_debug_Print 1 "R_OUT has been defined = ${R_OUT}" 
     192  IGCM_debug_Print 1 "R_BUF has been defined = ${R_BUF}" 
     193  IGCM_debug_Print 1 "R_FIG has been defined = ${R_FIG}" 
     194 
     195  IGCM_debug_PopStack "IGCM_sys_defineArchives" 
    170196} 
    171197 
     
    363389#D- 
    364390function IGCM_sys_Chmod { 
    365   IGCM_debug_PushStack "IGCM_sys_Chmod" -- $@ 
     391  IGCM_debug_PushStack "IGCM_sys_Chmod" $@ 
    366392  if ( $DEBUG_sys ) ; then 
    367393    echo "IGCM_sys_Chmod :" $@ 
     
    764790#D- 
    765791function IGCM_sys_Rm { 
    766   IGCM_debug_PushStack "IGCM_sys_Rm" -- $@ 
     792  IGCM_debug_PushStack "IGCM_sys_Rm" $@ 
    767793  if ( $DEBUG_sys ) ; then 
    768794    echo "IGCM_sys_Rm :" $@ 
     
    792818#D- 
    793819function IGCM_sys_RmRunDir { 
    794   IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@ 
     820  IGCM_debug_PushStack "IGCM_sys_RmRunDir" $@ 
    795821  if ( $DEBUG_sys ) ; then 
    796822    echo "IGCM_sys_RmRunDir :" $@ 
     
    14081434#D- 
    14091435function IGCM_sys_rebuild { 
    1410   IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@ 
     1436  IGCM_debug_PushStack "IGCM_sys_rebuild" $@ 
    14111437  if ( $DEBUG_sys ) ; then 
    14121438    echo "IGCM_sys_rebuild :" $@ 
     
    14521478#D- 
    14531479function IGCM_sys_rebuild_station { 
    1454   IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 
     1480  IGCM_debug_PushStack "IGCM_sys_rebuild_station" $@ 
    14551481  typeset i list_opt file_in file_out prefix_invert list_invert 
    14561482  if ( $DEBUG_sys ) ; then 
     
    19311957#D- 
    19321958function IGCM_sys_ncap2 { 
    1933   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ 
     1959  IGCM_debug_PushStack "IGCM_sys_ncap2" $@ 
    19341960  if ( $DEBUG_sys ) ; then 
    19351961    echo "IGCM_sys_ncap2 :" $@ 
     
    19731999#D- 
    19742000function IGCM_sys_ncatted { 
    1975   IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@ 
     2001  IGCM_debug_PushStack "IGCM_sys_ncatted" $@ 
    19762002  if ( $DEBUG_sys ) ; then 
    19772003    echo "IGCM_sys_ncatted :" $@ 
     
    20152041#D- 
    20162042function IGCM_sys_ncbo { 
    2017   IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@ 
     2043  IGCM_debug_PushStack "IGCM_sys_ncbo" $@ 
    20182044  if ( $DEBUG_sys ) ; then 
    20192045    echo "IGCM_sys_ncbo :" $@ 
     
    20572083#D- 
    20582084function IGCM_sys_ncdiff { 
    2059   IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@ 
     2085  IGCM_debug_PushStack "IGCM_sys_ncdiff" $@ 
    20602086  if ( $DEBUG_sys ) ; then 
    20612087    echo "IGCM_sys_ncdiff :" $@ 
     
    20992125#D- 
    21002126function IGCM_sys_ncea { 
    2101   IGCM_debug_PushStack "IGCM_sys_ncea" -- $@ 
     2127  IGCM_debug_PushStack "IGCM_sys_ncea" $@ 
    21022128  if ( $DEBUG_sys ) ; then 
    21032129    echo "IGCM_sys_ncea :" $@ 
     
    21412167#D- 
    21422168function IGCM_sys_ncecat { 
    2143   IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@ 
     2169  IGCM_debug_PushStack "IGCM_sys_ncecat" $@ 
    21442170  if ( $DEBUG_sys ) ; then 
    21452171    echo "IGCM_sys_ncecat :" $@ 
     
    21832209#D- 
    21842210function IGCM_sys_ncflint { 
    2185   IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@ 
     2211  IGCM_debug_PushStack "IGCM_sys_ncflint" $@ 
    21862212  if ( $DEBUG_sys ) ; then 
    21872213    echo "IGCM_sys_ncflint :" $@ 
     
    22252251#D- 
    22262252function IGCM_sys_ncks { 
    2227   IGCM_debug_PushStack "IGCM_sys_ncks" -- $@ 
     2253  IGCM_debug_PushStack "IGCM_sys_ncks" $@ 
    22282254  if ( $DEBUG_sys ) ; then 
    22292255    echo "IGCM_sys_ncks :" $@ 
     
    22672293#D- 
    22682294function IGCM_sys_ncpdq { 
    2269   IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@ 
     2295  IGCM_debug_PushStack "IGCM_sys_ncpdq" $@ 
    22702296  if ( $DEBUG_sys ) ; then 
    22712297    echo "IGCM_sys_ncpdq :" $@ 
     
    23092335#D- 
    23102336function IGCM_sys_ncra { 
    2311   IGCM_debug_PushStack "IGCM_sys_ncra" -- $@ 
     2337  IGCM_debug_PushStack "IGCM_sys_ncra" $@ 
    23122338  if ( $DEBUG_sys ) ; then 
    23132339    echo "IGCM_sys_ncra :" $@ 
     
    23512377#D- 
    23522378function IGCM_sys_ncrcat { 
    2353   IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@ 
     2379  IGCM_debug_PushStack "IGCM_sys_ncrcat" $@ 
    23542380  if ( $DEBUG_sys ) ; then 
    23552381    echo "IGCM_sys_ncrcat :" $@ 
     
    24032429#D- 
    24042430function IGCM_sys_ncrename { 
    2405   IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@ 
     2431  IGCM_debug_PushStack "IGCM_sys_ncrename" $@ 
    24062432  if ( $DEBUG_sys ) ; then 
    24072433    echo "IGCM_sys_ncrename :" $@ 
     
    24452471#D- 
    24462472function IGCM_sys_ncwa { 
    2447   IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@ 
     2473  IGCM_debug_PushStack "IGCM_sys_ncwa" $@ 
    24482474  if ( $DEBUG_sys ) ; then 
    24492475    echo "IGCM_sys_ncwa :" $@ 
     
    24902516#D- 
    24912517function IGCM_sys_cdo { 
    2492   IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 
     2518  IGCM_debug_PushStack "IGCM_sys_cdo" $@ 
    24932519  if ( $DEBUG_sys ) ; then 
    24942520    echo "IGCM_sys_cdo :" $@ 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh

    r1046 r1057  
    121121 
    122122#==================================================== 
    123 #- ARCHIVE 
    124 typeset ARCHIVE=$( echo ${HOME} | sed -e "s/gpfs1/gpfs3/" ) 
    125  
    126 #==================================================== 
    127 #- STORAGE (dedicated to small/medium files) 
    128 typeset STORAGE=${ARCHIVE} 
    129  
    130 #==================================================== 
    131 #- R_OUT 
    132 typeset R_OUT=${ARCHIVE}/IGCM_OUT 
    133  
    134 #==================================================== 
    135 #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    136 typeset R_FIG=${WORKDIR}/IGCM_OUT 
    137  
    138 #==================================================== 
    139 #- R_BUF (ONLY FOR double copy an scratch) 
    140 typeset -r R_BUF=${WORKDIR}/IGCM_OUT 
    141  
    142 #==================================================== 
    143123#- RUN_DIR_PATH : Temporary working directory (=> TMP) 
    144124typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${ARCHIVE}/RUN/${LOADL_STEP_ID}} 
     
    170150 
    171151#D-#================================================== 
    172 #D-function IGCM_sys_ChangeArchive 
    173 #D-* Purpose: Just a dummy call on this machine 
    174 #D-* Examples: 
    175 #D- 
    176 function IGCM_sys_ChangeArchive { 
    177   IGCM_debug_Print 1 " dummy function : IGCM_sys_ChangeArchive " 
     152#D-function IGCM_sys_defineArchives 
     153#D-* Purpose: 
     154#D-* Define ARCHIVE : Dedicated to large files 
     155#D-* Define STORAGE : Dedicated to small/medium files 
     156#D-* Define R_OUT   : Output tree located on ARCHIVE 
     157#D-* Define R_FIG   : Output tree located on STORAGE hosting figures (monitoring and atlas, and/or small files) 
     158#D-* Define R_BUF   : Output tree located on STORAGE hosting files waiting for rebuild or pack processes 
     159#D-* if SpaceName=TEST nothing special will hapen 
     160#D-* Examples: 
     161#D- 
     162function IGCM_sys_defineArchives { 
     163  IGCM_debug_PushStack "IGCM_sys_defineArchives" 
     164 
     165  if [ ! X${config_UserChoices_Archive} = X ]; then 
     166    #==================================================== 
     167    #- ARCHIVE (dedicated to large files) 
     168    typeset ARCHIVE=${config_UserChoices_Archive} 
     169  else 
     170    #==================================================== 
     171    #- ARCHIVE (dedicated to large files) 
     172    typeset ARCHIVE=$( echo ${HOME} | sed -e "s/gpfs1/gpfs3/" ) 
     173  fi 
     174 
     175  if [ ! X${config_UserChoices_Storage} = X ]; then 
     176    #==================================================== 
     177    #- STORAGE (dedicated to small/medium files) 
     178    typeset STORAGE=${config_UserChoices_Storage} 
     179  else 
     180    #==================================================== 
     181    #- STORAGE (dedicated to small/medium files) 
     182    typeset STORAGE=${ARCHIVE} 
     183  fi 
     184 
     185  # ON OBELIX NO SPECIAL CASE WHEN X${config_UserChoices_SpaceName} = XTEST 
     186 
     187  #==================================================== 
     188  #- R_OUT 
     189  typeset R_OUT=${ARCHIVE}/IGCM_OUT 
     190 
     191  #==================================================== 
     192  #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
     193  typeset R_FIG=${WORKDIR}/IGCM_OUT 
     194 
     195  #==================================================== 
     196  #- R_BUF (ONLY FOR double copy an scratch) 
     197  typeset -r R_BUF=${WORKDIR}/IGCM_OUT 
     198 
     199  IGCM_debug_Print 1 "R_OUT has been defined = ${R_OUT}" 
     200  IGCM_debug_Print 1 "R_BUF has been defined = ${R_BUF}" 
     201  IGCM_debug_Print 1 "R_FIG has been defined = ${R_FIG}" 
     202 
     203  IGCM_debug_PopStack "IGCM_sys_defineArchives" 
    178204} 
    179205 
     
    378404#D- 
    379405function IGCM_sys_Chmod { 
    380   IGCM_debug_PushStack "IGCM_sys_Chmod" -- $@ 
     406  IGCM_debug_PushStack "IGCM_sys_Chmod" $@ 
    381407  if ( $DEBUG_sys ) ; then 
    382408    echo "IGCM_sys_Chmod :" $@ 
     
    814840#D- 
    815841function IGCM_sys_Rm { 
    816   IGCM_debug_PushStack "IGCM_sys_Rm" -- $@ 
     842  IGCM_debug_PushStack "IGCM_sys_Rm" $@ 
    817843  if ( $DEBUG_sys ) ; then 
    818844    echo "IGCM_sys_Rm :" $@ 
     
    842868#D- 
    843869function IGCM_sys_RmRunDir { 
    844   IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@ 
     870  IGCM_debug_PushStack "IGCM_sys_RmRunDir" $@ 
    845871  if ( $DEBUG_sys ) ; then 
    846872    echo "IGCM_sys_RmRunDir :" $@ 
     
    14501476#D- 
    14511477function IGCM_sys_rebuild { 
    1452   IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@ 
     1478  IGCM_debug_PushStack "IGCM_sys_rebuild" $@ 
    14531479  if ( $DEBUG_sys ) ; then 
    14541480    echo "IGCM_sys_rebuild :" $@ 
     
    14941520#D- 
    14951521function IGCM_sys_rebuild_station { 
    1496   IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 
     1522  IGCM_debug_PushStack "IGCM_sys_rebuild_station" $@ 
    14971523  typeset i list_opt file_in file_out prefix_invert list_invert 
    14981524  if ( $DEBUG_sys ) ; then 
     
    18791905#D- 
    18801906function IGCM_sys_ncap2 { 
    1881   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ 
     1907  IGCM_debug_PushStack "IGCM_sys_ncap2" $@ 
    18821908  if ( $DEBUG_sys ) ; then 
    18831909    echo "IGCM_sys_ncap2 :" $@ 
     
    19211947#D- 
    19221948function IGCM_sys_ncatted { 
    1923   IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@ 
     1949  IGCM_debug_PushStack "IGCM_sys_ncatted" $@ 
    19241950  if ( $DEBUG_sys ) ; then 
    19251951    echo "IGCM_sys_ncatted :" $@ 
     
    19631989#D- 
    19641990function IGCM_sys_ncbo { 
    1965   IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@ 
     1991  IGCM_debug_PushStack "IGCM_sys_ncbo" $@ 
    19661992  if ( $DEBUG_sys ) ; then 
    19671993    echo "IGCM_sys_ncbo :" $@ 
     
    20052031#D- 
    20062032function IGCM_sys_ncdiff { 
    2007   IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@ 
     2033  IGCM_debug_PushStack "IGCM_sys_ncdiff" $@ 
    20082034  if ( $DEBUG_sys ) ; then 
    20092035    echo "IGCM_sys_ncdiff :" $@ 
     
    20472073#D- 
    20482074function IGCM_sys_ncea { 
    2049   IGCM_debug_PushStack "IGCM_sys_ncea" -- $@ 
     2075  IGCM_debug_PushStack "IGCM_sys_ncea" $@ 
    20502076  if ( $DEBUG_sys ) ; then 
    20512077    echo "IGCM_sys_ncea :" $@ 
     
    20892115#D- 
    20902116function IGCM_sys_ncecat { 
    2091   IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@ 
     2117  IGCM_debug_PushStack "IGCM_sys_ncecat" $@ 
    20922118  if ( $DEBUG_sys ) ; then 
    20932119    echo "IGCM_sys_ncecat :" $@ 
     
    21312157#D- 
    21322158function IGCM_sys_ncflint { 
    2133   IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@ 
     2159  IGCM_debug_PushStack "IGCM_sys_ncflint" $@ 
    21342160  if ( $DEBUG_sys ) ; then 
    21352161    echo "IGCM_sys_ncflint :" $@ 
     
    21732199#D- 
    21742200function IGCM_sys_ncks { 
    2175   IGCM_debug_PushStack "IGCM_sys_ncks" -- $@ 
     2201  IGCM_debug_PushStack "IGCM_sys_ncks" $@ 
    21762202  if ( $DEBUG_sys ) ; then 
    21772203    echo "IGCM_sys_ncks :" $@ 
     
    22152241#D- 
    22162242function IGCM_sys_ncpdq { 
    2217   IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@ 
     2243  IGCM_debug_PushStack "IGCM_sys_ncpdq" $@ 
    22182244  if ( $DEBUG_sys ) ; then 
    22192245    echo "IGCM_sys_ncpdq :" $@ 
     
    22572283#D- 
    22582284function IGCM_sys_ncra { 
    2259   IGCM_debug_PushStack "IGCM_sys_ncra" -- $@ 
     2285  IGCM_debug_PushStack "IGCM_sys_ncra" $@ 
    22602286  if ( $DEBUG_sys ) ; then 
    22612287    echo "IGCM_sys_ncra :" $@ 
     
    22992325#D- 
    23002326function IGCM_sys_ncrcat { 
    2301   IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@ 
     2327  IGCM_debug_PushStack "IGCM_sys_ncrcat" $@ 
    23022328  if ( $DEBUG_sys ) ; then 
    23032329    echo "IGCM_sys_ncrcat :" $@ 
     
    23512377#D- 
    23522378function IGCM_sys_ncrename { 
    2353   IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@ 
     2379  IGCM_debug_PushStack "IGCM_sys_ncrename" $@ 
    23542380  if ( $DEBUG_sys ) ; then 
    23552381    echo "IGCM_sys_ncrename :" $@ 
     
    23932419#D- 
    23942420function IGCM_sys_ncwa { 
    2395   IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@ 
     2421  IGCM_debug_PushStack "IGCM_sys_ncwa" $@ 
    23962422  if ( $DEBUG_sys ) ; then 
    23972423    echo "IGCM_sys_ncwa :" $@ 
     
    24382464#D- 
    24392465function IGCM_sys_cdo { 
    2440   IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 
     2466  IGCM_debug_PushStack "IGCM_sys_cdo" $@ 
    24412467  if ( $DEBUG_sys ) ; then 
    24422468    echo "IGCM_sys_cdo :" $@ 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh

    r1046 r1057  
    123123 
    124124#==================================================== 
    125 #- ARCHIVE 
    126 typeset ARCHIVE=${ARCHIVE:=/home/scratch01/${LOGIN}} 
    127  
    128 #==================================================== 
    129 #- STORAGE (dedicated to small/medium files) 
    130 typeset STORAGE=${ARCHIVE} 
    131  
    132 #==================================================== 
    133 #- R_OUT 
    134 typeset R_OUT=${ARCHIVE}/IGCM_OUT 
    135  
    136 #==================================================== 
    137 #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    138 typeset R_FIG=${STORAGE}/IGCM_OUT 
    139  
    140 #==================================================== 
    141 #- R_BUF (ONLY FOR double copy an scratch) 
    142 typeset -r R_BUF=${STORAGE}/IGCM_OUT 
    143  
    144 #==================================================== 
    145125#- RUN_DIR_PATH : Temporary working directory (=> TMP) 
    146126if [ X${PBS_JOBID} != X ] ; then 
     
    172152 
    173153#D-#================================================== 
    174 #D-function IGCM_sys_ChangeArchive 
    175 #D-* Purpose: Just a dummy call on this machine 
    176 #D-* Examples: 
    177 #D- 
    178 function IGCM_sys_ChangeArchive { 
    179   IGCM_debug_Print 1 " dummy function : IGCM_sys_ChangeArchive " 
     154#D-function IGCM_sys_defineArchives 
     155#D-* Purpose: 
     156#D-* Define ARCHIVE : Dedicated to large files 
     157#D-* Define STORAGE : Dedicated to small/medium files 
     158#D-* Define R_OUT   : Output tree located on ARCHIVE 
     159#D-* Define R_FIG   : Output tree located on STORAGE hosting figures (monitoring and atlas, and/or small files) 
     160#D-* Define R_BUF   : Output tree located on STORAGE hosting files waiting for rebuild or pack processes 
     161#D-* if SpaceName=TEST nothing special will hapen 
     162#D-* Examples: 
     163#D- 
     164function IGCM_sys_defineArchives { 
     165  IGCM_debug_PushStack "IGCM_sys_defineArchives" 
     166 
     167  if [ ! X${config_UserChoices_Archive} = X ]; then 
     168    #==================================================== 
     169    #- ARCHIVE (dedicated to large files) 
     170    typeset ARCHIVE=${config_UserChoices_Archive} 
     171  else 
     172    #==================================================== 
     173    #- ARCHIVE (dedicated to large files) 
     174    typeset ARCHIVE=${ARCHIVE:=/home/scratch01/${LOGIN}} 
     175  fi 
     176 
     177  if [ ! X${config_UserChoices_Storage} = X ]; then 
     178    #==================================================== 
     179    #- STORAGE (dedicated to small/medium files) 
     180    typeset STORAGE=${config_UserChoices_Storage} 
     181  else 
     182    #==================================================== 
     183    #- STORAGE (dedicated to small/medium files) 
     184    typeset STORAGE=${ARCHIVE} 
     185  fi 
     186 
     187  # ON OBELIX NO SPECIAL CASE WHEN X${config_UserChoices_SpaceName} = XTEST 
     188 
     189  #==================================================== 
     190  #- R_OUT 
     191  typeset R_OUT=${ARCHIVE}/IGCM_OUT 
     192 
     193  #==================================================== 
     194  #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
     195  typeset R_FIG=${STORAGE}/IGCM_OUT 
     196 
     197  #==================================================== 
     198  #- R_BUF (ONLY FOR double copy an scratch) 
     199  typeset -r R_BUF=${STORAGE}/IGCM_OUT 
     200 
     201  IGCM_debug_Print 1 "R_OUT has been defined = ${R_OUT}" 
     202  IGCM_debug_Print 1 "R_BUF has been defined = ${R_BUF}" 
     203  IGCM_debug_Print 1 "R_FIG has been defined = ${R_FIG}" 
     204 
     205  IGCM_debug_PopStack "IGCM_sys_defineArchives" 
    180206} 
    181207 
     
    377403#D- 
    378404function IGCM_sys_Chmod { 
    379   IGCM_debug_PushStack "IGCM_sys_Chmod" -- $@ 
     405  IGCM_debug_PushStack "IGCM_sys_Chmod" $@ 
    380406  if ( $DEBUG_sys ) ; then 
    381407    echo "IGCM_sys_Chmod :" $@ 
     
    790816#D- 
    791817function IGCM_sys_Rm { 
    792   IGCM_debug_PushStack "IGCM_sys_Rm" -- $@ 
     818  IGCM_debug_PushStack "IGCM_sys_Rm" $@ 
    793819  if ( $DEBUG_sys ) ; then 
    794820    echo "IGCM_sys_Rm :" $@ 
     
    818844#D- 
    819845function IGCM_sys_RmRunDir { 
    820   IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@ 
     846  IGCM_debug_PushStack "IGCM_sys_RmRunDir" $@ 
    821847  if ( $DEBUG_sys ) ; then 
    822848    echo "IGCM_sys_RmRunDir :" $@ 
     
    14321458#D- 
    14331459function IGCM_sys_rebuild { 
    1434   IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@ 
     1460  IGCM_debug_PushStack "IGCM_sys_rebuild" $@ 
    14351461  if ( $DEBUG_sys ) ; then 
    14361462    echo "IGCM_sys_rebuild :" $@ 
     
    14761502#D- 
    14771503function IGCM_sys_rebuild_station { 
    1478   IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 
     1504  IGCM_debug_PushStack "IGCM_sys_rebuild_station" $@ 
    14791505  typeset i list_opt file_in file_out prefix_invert list_invert 
    14801506  if ( $DEBUG_sys ) ; then 
     
    19591985#D- 
    19601986function IGCM_sys_ncap2 { 
    1961   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ 
     1987  IGCM_debug_PushStack "IGCM_sys_ncap2" $@ 
    19621988  if ( $DEBUG_sys ) ; then 
    19631989    echo "IGCM_sys_ncap2 :" $@ 
     
    20012027#D- 
    20022028function IGCM_sys_ncatted { 
    2003   IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@ 
     2029  IGCM_debug_PushStack "IGCM_sys_ncatted" $@ 
    20042030  if ( $DEBUG_sys ) ; then 
    20052031    echo "IGCM_sys_ncatted :" $@ 
     
    20432069#D- 
    20442070function IGCM_sys_ncbo { 
    2045   IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@ 
     2071  IGCM_debug_PushStack "IGCM_sys_ncbo" $@ 
    20462072  if ( $DEBUG_sys ) ; then 
    20472073    echo "IGCM_sys_ncbo :" $@ 
     
    20852111#D- 
    20862112function IGCM_sys_ncdiff { 
    2087   IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@ 
     2113  IGCM_debug_PushStack "IGCM_sys_ncdiff" $@ 
    20882114  if ( $DEBUG_sys ) ; then 
    20892115    echo "IGCM_sys_ncdiff :" $@ 
     
    21272153#D- 
    21282154function IGCM_sys_ncea { 
    2129   IGCM_debug_PushStack "IGCM_sys_ncea" -- $@ 
     2155  IGCM_debug_PushStack "IGCM_sys_ncea" $@ 
    21302156  if ( $DEBUG_sys ) ; then 
    21312157    echo "IGCM_sys_ncea :" $@ 
     
    21692195#D- 
    21702196function IGCM_sys_ncecat { 
    2171   IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@ 
     2197  IGCM_debug_PushStack "IGCM_sys_ncecat" $@ 
    21722198  if ( $DEBUG_sys ) ; then 
    21732199    echo "IGCM_sys_ncecat :" $@ 
     
    22112237#D- 
    22122238function IGCM_sys_ncflint { 
    2213   IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@ 
     2239  IGCM_debug_PushStack "IGCM_sys_ncflint" $@ 
    22142240  if ( $DEBUG_sys ) ; then 
    22152241    echo "IGCM_sys_ncflint :" $@ 
     
    22532279#D- 
    22542280function IGCM_sys_ncks { 
    2255   IGCM_debug_PushStack "IGCM_sys_ncks" -- $@ 
     2281  IGCM_debug_PushStack "IGCM_sys_ncks" $@ 
    22562282  if ( $DEBUG_sys ) ; then 
    22572283    echo "IGCM_sys_ncks :" $@ 
     
    22952321#D- 
    22962322function IGCM_sys_ncpdq { 
    2297   IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@ 
     2323  IGCM_debug_PushStack "IGCM_sys_ncpdq" $@ 
    22982324  if ( $DEBUG_sys ) ; then 
    22992325    echo "IGCM_sys_ncpdq :" $@ 
     
    23372363#D- 
    23382364function IGCM_sys_ncra { 
    2339   IGCM_debug_PushStack "IGCM_sys_ncra" -- $@ 
     2365  IGCM_debug_PushStack "IGCM_sys_ncra" $@ 
    23402366  if ( $DEBUG_sys ) ; then 
    23412367    echo "IGCM_sys_ncra :" $@ 
     
    23792405#D- 
    23802406function IGCM_sys_ncrcat { 
    2381   IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@ 
     2407  IGCM_debug_PushStack "IGCM_sys_ncrcat" $@ 
    23822408  if ( $DEBUG_sys ) ; then 
    23832409    echo "IGCM_sys_ncrcat :" $@ 
     
    24312457#D- 
    24322458function IGCM_sys_ncrename { 
    2433   IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@ 
     2459  IGCM_debug_PushStack "IGCM_sys_ncrename" $@ 
    24342460  if ( $DEBUG_sys ) ; then 
    24352461    echo "IGCM_sys_ncrename :" $@ 
     
    24732499#D- 
    24742500function IGCM_sys_ncwa { 
    2475   IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@ 
     2501  IGCM_debug_PushStack "IGCM_sys_ncwa" $@ 
    24762502  if ( $DEBUG_sys ) ; then 
    24772503    echo "IGCM_sys_ncwa :" $@ 
     
    25182544#D- 
    25192545function IGCM_sys_cdo { 
    2520   IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 
     2546  IGCM_debug_PushStack "IGCM_sys_cdo" $@ 
    25212547  if ( $DEBUG_sys ) ; then 
    25222548    echo "IGCM_sys_cdo :" $@ 
Note: See TracChangeset for help on using the changeset viewer.