Ignore:
Timestamp:
06/05/12 18:58:34 (12 years ago)
Author:
sdipsl
Message:
  • Encapsulate hindcast/forecast related tasks into new functions
  • to be called by ins_job

IGCM_ensemble_CastInit
IGCM_ensemble_CastPeriodicStarts
IGCM_ensemble_CastNonPeriodicStarts

  • internal

IGCM_ensemble_CastFilesUpdate
IGCM_ensemble_CastDirectoryName
IGCM_ensemble_CastPerturbFile

File:
1 edited

Legend:

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

    r678 r679  
    44# Author: Sonia Labetoulle 
    55# Contact: Sonia.Labetoulle__at__locean-ipsl.upmc.fr 
    6 # $Revision$ Revision of last commit 
    7 # $Author$ Author of last commit 
    8 # $Date$ Date of last commit 
     6# $Revision::                                          $ Revision of last commit 
     7# $Author::                                            $ Author of last commit 
     8# $Date::                                              $ Date of last commit 
    99# IPSL (2012) 
    1010#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC 
     
    1212#************************************************************** 
    1313 
    14 function IGCM_ensemble_FilesUpdate 
     14function IGCM_ensemble_CastInit 
    1515{ 
    16   IGCM_debug_PushStack "IGCM_ensemble_FilesUpdate" 
     16  IGCM_debug_PushStack "IGCM_ensemble_CastInit" 
     17 
     18  set -A Alpha      A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 
     19  set -A AlphaMonth a b c d e f g h i j k l 
     20 
     21  IGCM_sys_Mkdir ${RUN_DIR} 
     22 
     23  IGCM_sys_Cp ${SUBMIT_DIR}/config.card   ${RUN_DIR} 
     24  IGCM_sys_Cp ${SUBMIT_DIR}/ensemble.card ${RUN_DIR} 
     25  IGCM_sys_Cp ${SUBMIT_DIR}/Job_*         ${RUN_DIR} 
     26  IGCM_sys_Cp ${SUBMIT_DIR}/run.card.init ${RUN_DIR} 
     27 
     28  if [ -f  ${SUBMIT_DIR}/CreatedDir.txt ] ; then 
     29    IGCM_sys_Cp ${SUBMIT_DIR}/CreatedDir.txt ${RUN_DIR} 
     30  fi 
     31  if [ -f  ${SUBMIT_DIR}/Qsub.txt ] ; then 
     32    IGCM_sys_Cp ${SUBMIT_DIR}/Qsub.txt ${RUN_DIR} 
     33  fi 
     34 
     35  IGCM_card_DefineVariableFromOption ${FileName} Ens_PERTURB NAME 
     36  IGCM_card_DefineVariableFromOption ${FileName} Ens_PERTURB DEBUT_INIT 
     37  IGCM_card_DefineVariableFromOption ${FileName} Ens_PERTURB FIN_INIT 
     38  IGCM_card_DefineVariableFromOption ${FileName} Ens_PERTURB PERIODICITE 
     39  IGCM_card_DefineArrayFromOption    ${FileName} Ens_PERTURB NONPERIODIC 
     40  IGCM_card_DefineVariableFromOption ${FileName} Ens_PERTURB DUREE 
     41  IGCM_card_DefineArrayFromOption    ${FileName} Ens_PERTURB DUREE_NONPERIODIC 
     42  IGCM_card_DefineVariableFromOption ${FileName} Ens_PERTURB MEMBER 
     43  IGCM_card_DefineArrayFromOption    ${FileName} Ens_PERTURB PERTURB_BIN 
     44  IGCM_card_DefineVariableFromOption ${FileName} Ens_PERTURB INITFROM 
     45  IGCM_card_DefineVariableFromOption ${FileName} Ens_PERTURB INITPATH 
     46  IGCM_card_DefineVariableFromOption config.card UserChoices TagName 
     47  IGCM_card_DefineVariableFromOption config.card UserChoices CalendarType 
     48  IGCM_card_DefineArrayFromSection   config.card ListOfComponents 
     49 
     50  IGCM_debug_Print 1 "NAME              = ${ensemble_Ens_PERTURB_NAME}" 
     51  IGCM_debug_Print 1 "DEBUT_INIT        = ${ensemble_Ens_PERTURB_DEBUT_INIT}" 
     52  IGCM_debug_Print 1 "FIN_INIT          = ${ensemble_Ens_PERTURB_FIN_INIT}" 
     53  IGCM_debug_Print 1 "PERIODICITE       = ${ensemble_Ens_PERTURB_PERIODICITE}" 
     54  IGCM_debug_Print 1 "NONPERIODIC       = ${ensemble_Ens_PERTURB_NONPERIODIC[*]}" 
     55  IGCM_debug_Print 1 "DUREE             = ${ensemble_Ens_PERTURB_DUREE}" 
     56  IGCM_debug_Print 1 "DUREE_NONPERIODIC = ${ensemble_Ens_PERTURB_DUREE_NONPERIODIC[*]}" 
     57  IGCM_debug_Print 1 "MEMBER            = ${ensemble_Ens_PERTURB_MEMBER}" 
     58  IGCM_debug_Print 1 "PERTURB_BIN       = ${ensemble_Ens_PERTURB_PERTURB_BIN[*]}" 
     59  IGCM_debug_Print 1 "INITFROM          = ${ensemble_Ens_PERTURB_INITFROM}" 
     60  IGCM_debug_Print 1 "INITFROM          = ${ensemble_Ens_PERTURB_INITPATH}" 
     61  IGCM_debug_Print 1 "TagName           = ${config_UserChoices_TagName}" 
     62  IGCM_debug_Print 1 "CalendarType      = ${config_UserChoices_CalendarType}" 
     63  IGCM_debug_Print 1 "ListOfComponents  = ${config_ListOfComponents[*]}" 
     64 
     65  PerturbExe=${ensemble_Ens_PERTURB_PERTURB_BIN[0]} 
     66  PerturbComp=${ensemble_Ens_PERTURB_PERTURB_BIN[1]} 
     67  PerturbFile=${ensemble_Ens_PERTURB_PERTURB_BIN[2]} 
     68  PerturbVar=${ensemble_Ens_PERTURB_PERTURB_BIN[3]} 
     69  PerturbAmp=${ensemble_Ens_PERTURB_PERTURB_BIN[4]} 
     70 
     71  IGCM_debug_Print 1 "PerturbExe  = ${PerturbExe}" 
     72  IGCM_debug_Print 1 "PerturbFile = ${PerturbFile}" 
     73  IGCM_debug_Print 1 "PerturbComp = ${PerturbComp}" 
     74  IGCM_debug_Print 1 "PerturbVar  = ${PerturbVar}" 
     75  IGCM_debug_Print 1 "PerturbAmp  = ${PerturbAmp}" 
     76 
     77  IGCM_debug_PopStack "IGCM_ensemble_CastInit" 
     78} 
     79 
     80function IGCM_ensemble_CastPeriodicStarts 
     81{ 
     82  IGCM_debug_PushStack "IGCM_ensemble_CastPeriodicStarts" 
     83 
     84  echo "Manage periodic starts" 
     85 
     86#.. Manage periodic starts .. 
     87#   ====================== 
     88 
     89# ... Determine number of year(s) in PERIODICITE ... 
     90  case ${ensemble_Ens_PERTURB_PERIODICITE} in 
     91  0) 
     92    IGCM_debug_Print 1 "No periodic start" 
     93    ;; 
     94  *Y|*y) 
     95    PeriodLengthInYears=$( echo ${ensemble_Ens_PERTURB_PERIODICITE} | sed -e 's/[yY]//' );; 
     96  *M|*m) 
     97    PeriodLengthInMonths=$( echo ${ensemble_Ens_PERTURB_PERIODICITE} | sed -e 's/[mM]//' );; 
     98  *) 
     99    IGCM_debug_Exit "IGCM_config_Analyse_PeriodLength " \ 
     100      ${ensemble_Ens_PERTURB_PERIODICITE} \ 
     101      " invalid PERIODICITE : choose in *Y." 
     102    IGCM_debug_Verif_Exit ;; 
     103  esac 
     104# ... Determine number of year(s) in DUREE ... 
     105  case ${ensemble_Ens_PERTURB_DUREE} in 
     106  *Y|*y) 
     107    DureeLengthInYears=$( echo ${ensemble_Ens_PERTURB_DUREE} | sed -e 's/[yY]//' ) ;; 
     108  *M|*m) 
     109    DureeLengthInMonths=$( echo ${ensemble_Ens_PERTURB_DUREE} | sed -e 's/[mM]//' ) ;; 
     110  *) 
     111    IGCM_debug_Exit "IGCM_config_Analyse_PeriodLength " \ 
     112      ${ensemble_Ens_PERTURB_DUREE} \ 
     113      " invalid DUREE : choose in *Y." 
     114    IGCM_debug_Verif_Exit ;; 
     115  esac 
     116 
     117# ... Loop over DateBegin ... 
     118  eval DateBegin=\${ensemble_Ens_PERTURB_DEBUT_INIT} 
     119 
     120  while [ ${DateBegin} -le ${ensemble_Ens_PERTURB_FIN_INIT}  ] ; do 
     121    IGCM_date_GetYearMonth ${DateBegin} year month 
     122 
     123  # - Determine number of day(s) in PERIODICITE 
     124    PeriodLengthInDays=0 
     125    case ${ensemble_Ens_PERTURB_PERIODICITE} in 
     126    *Y|*y) 
     127      i=0 
     128      until [ $i -ge ${PeriodLengthInYears} ] ; do 
     129        (( PeriodLengthInDays = PeriodLengthInDays + $( IGCM_date_DaysInYear $(( year + i )) ) )) 
     130        (( i = i + 1 )) 
     131      done 
     132      ;; 
     133    *M|*m) 
     134      i=0 
     135      year_wrk=$year 
     136      month_wrk=$month 
     137      until [ $i -ge ${PeriodLengthInMonths} ] ; do 
     138        (( PeriodLengthInDays = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year_wrk $month_wrk ) )) 
     139        if [ $month_wrk -lt 12 ] ; then 
     140          (( month_wrk = month_wrk + 1 )) 
     141        else 
     142          (( year_wrk  = year_wrk + 1 )) 
     143          (( month_wrk = 1 )) 
     144        fi 
     145        (( i = i + 1 )) 
     146      done 
     147      ;; 
     148    esac 
     149  # - Determine number of day(s) in DUREE 
     150    DureeLengthInDays=0 
     151    case ${ensemble_Ens_PERTURB_DUREE} in 
     152    *Y|*y) 
     153      i=0 
     154      until [ $i -ge ${DureeLengthInYears} ] ; do 
     155        (( DureeLengthInDays = DureeLengthInDays + $( IGCM_date_DaysInYear $(( year + i )) ) )) 
     156        (( i = i + 1 )) 
     157      done 
     158      ;; 
     159    *M|*m) 
     160      i=0 
     161      year_wrk=$year 
     162      month_wrk=$month 
     163      until [ $i -ge ${DureeLengthInMonths} ] ; do 
     164        (( DureeLengthInDays = DureeLengthInDays + $( IGCM_date_DaysInMonth $year_wrk $month_wrk ) )) 
     165        if [ $month_wrk -lt 12 ] ; then 
     166          (( month_wrk = month_wrk + 1 )) 
     167        else 
     168          (( year_wrk  = year_wrk + 1 )) 
     169          (( month_wrk = 1 )) 
     170        fi 
     171        (( i = i + 1 )) 
     172      done 
     173      ;; 
     174    esac 
     175 
     176    (( DureeLengthInDays = DureeLengthInDays - 1 )) 
     177 
     178  # - Determine DateEnd 
     179    (( DateEnd = $( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${DureeLengthInDays} ) )) 
     180 
     181  # - Build directory name 
     182    IGCM_ensemble_CastDirectoryName ${ensemble_Ens_PERTURB_NAME} ${ensemble_Ens_PERTURB_PERIODICITE} $year $month $StartDir 
     183 
     184  # - Determine RestartDate 
     185    (( Offset = -1 )) 
     186    (( RestartDate = $( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${Offset} ) )) 
     187 
     188    IGCM_debug_Print 2 "${DateBegin} => ${DateEnd} : ${StartDir}" 
     189    echo "${DateBegin} ${DateEnd} ${StartDir}" >> CreatedDir.txt 
     190 
     191  # - Create directory for current DateBegin 
     192    if [ ! -d  ${StartDir} ] ; then 
     193      IGCM_sys_Mkdir ${SUBMIT_DIR}/${StartDir} 
     194      IGCM_sys_Cd ${SUBMIT_DIR}/${StartDir} 
     195      ln -s ../../.resol . 
     196      ln -s ../../.libmpi . 
     197      IGCM_sys_Cd ${RUN_DIR} 
     198    fi 
     199 
     200  # - Create directory in which to store new restart files 
     201    RestartDir=$ARCHIVE/IGCM_IN/${config_UserChoices_TagName}/${StartDir} 
     202    if [ ! -d  ${RestartDir} ] ; then 
     203      IGCM_sys_MkdirArchive ${RestartDir} 
     204    fi 
     205 
     206  # - Loop over members 
     207    i=0 
     208    while [ $i -lt ${ensemble_Ens_PERTURB_MEMBER} ] ; do 
     209      MemberDir="${StartDir}${Alpha[$i]}" 
     210      IGCM_debug_Print 3 "${MemberDir}" 
     211 
     212      JobName="Job_${MemberDir}" 
     213 
     214      pwd 
     215      ls 
     216 
     217    # * Create directory if it doesn't exist and copy/link files 
     218      if [ ! -d  ${SUBMIT_DIR}/${StartDir}/${MemberDir} ] ; then 
     219        IGCM_sys_Mkdir ${SUBMIT_DIR}/${StartDir}/${MemberDir} 
     220#      IGCM_sys_Cp -r COMP/ PARAM/ ${StartDir}/${MemberDir} 
     221        IGCM_sys_Cd ${SUBMIT_DIR}/${StartDir}/${MemberDir} 
     222        ln -s ../../COMP 
     223        ln -s ../../PARAM 
     224        ln -s ../../POST 
     225        IGCM_sys_Cd ${RUN_DIR} 
     226        IGCM_sys_Cp config.card run.card.init ${SUBMIT_DIR}/${StartDir}/${MemberDir} 
     227        IGCM_sys_Cp Job_${ensemble_Ens_PERTURB_NAME} ${SUBMIT_DIR}/${StartDir}/${MemberDir}/${JobName} 
     228 
     229        echo "cd ${StartDir}/${MemberDir}/ ; ccc_msub ${JobName} ;" >> Qsub.txt 
     230 
     231        echo "sed -e 's/PeriodNb=.*/PeriodNb=48/' ${JobName} > ${JobName}.tmp ; " >> Qsub.txt 
     232        echo "mv ${JobName}.tmp ${JobName} ; cd - ;" >> Qsub.txt 
     233      fi 
     234 
     235    # * Update files : config.card, Job_, COMP/comp.card 
     236      IGCM_ensemble_CastFilesUpdate ${DateBegin} ${DateEnd} ${RestartDate} 
     237 
     238    # * Apply noise on restart file 
     239      IGCM_ensemble_CastPerturbFile 
     240 
     241      (( i = i + 1 )) 
     242    done 
     243 
     244  # - Next DateBegin 
     245    echo "$DateBegin  $PeriodLengthInDays" 
     246    case ${ensemble_Ens_PERTURB_PERIODICITE} in 
     247    *Y|*y|*M|*m) 
     248      (( DateBegin = $( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${PeriodLengthInDays} ) )) 
     249      ;; 
     250    esac 
     251    echo "New DateBegin = $DateBegin" 
     252    echo "========================================================================" 
     253  done 
     254  IGCM_debug_PopStack "IGCM_ensemble_CastPeriodicStarts" 
     255} 
     256 
     257 
     258 
     259 
     260 
     261 
     262 
     263 
     264 
     265 
     266 
     267 
     268 
     269function IGCM_ensemble_CastNonPeriodicStarts 
     270{ 
     271  IGCM_debug_PushStack "IGCM_ensemble_CastNonPeriodicStarts" 
     272 
     273  #.. Manage non periodic starts => Loop over DateBegin .. 
     274  #   ========================== 
     275 
     276  echo "Manage non periodic starts" 
     277 
     278  DateNum=0 
     279# ... Loop over ensemble_Ens_PERTURB_NONPERIODIC ... 
     280  echo ">${DateNum}<" 
     281  echo ">${#ensemble_Ens_PERTURB_NONPERIODIC[*]}<" 
     282  while [ $DateNum -lt ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} ] ; do 
     283    DateBegin=${ensemble_Ens_PERTURB_NONPERIODIC[$DateNum]} 
     284    Duree=${ensemble_Ens_PERTURB_DUREE_NONPERIODIC[$DateNum]} 
     285    echo ">${DateBegin}<" 
     286    echo ">${Duree}<" 
     287  # - Determine number of year(s) in DUREE_NONPERIODIC 
     288    case ${Duree} in 
     289    0) 
     290      IGCM_debug_Print 1 "No non-periodic start" 
     291      exit 
     292      ;; 
     293    *Y|*y) 
     294      DureeLengthInYears=$( echo ${Duree} | sed -e 's/[yY]//' ) 
     295      ;; 
     296    *M|*m) 
     297      DureeLengthInMonths=$( echo ${Duree} | sed -e 's/[mM]//' ) 
     298      ;; 
     299    *) 
     300      IGCM_debug_Exit "IGCM_config_Analyse_PeriodLength " ${Duree} " invalid DUREE : choose in *Y." 
     301      IGCM_debug_Verif_Exit ;; 
     302    esac 
     303  # - Determine number of day(s) in DUREE_NONPERIODIC 
     304    IGCM_date_GetYearMonth ${DateBegin} year month 
     305    DureeLengthInDays=0 
     306    case ${Duree} in 
     307    *Y|*y) 
     308      i=0 
     309      until [ $i -ge ${DureeLengthInYears} ] ; do 
     310        (( DureeLengthInDays = DureeLengthInDays + $( IGCM_date_DaysInYear $(( year + i )) ) )) 
     311        (( i = i + 1 )) 
     312      done 
     313      ;; 
     314    *M|*m) 
     315      i=0 
     316      until [ $i -ge ${DureeLengthInMonths} ] ; do 
     317        (( DureeLengthInDays = DureeLengthInDays + $( IGCM_date_DaysInMonth $year $(( month + i )) ) )) 
     318        (( i = i + 1 )) 
     319      done 
     320      ;; 
     321    esac 
     322    (( DureeLengthInDays = DureeLengthInDays - 1 )) 
     323 
     324  # - Build directory name 
     325    echo "========================================================================" 
     326    echo "ensemble_Ens_PERTURB_NAME = ${ensemble_Ens_PERTURB_NAME}" 
     327    IGCM_ensemble_CastDirectoryName ${ensemble_Ens_PERTURB_NAME} ${Duree} $year $month $StartDir 
     328 
     329  # - Determine DateEnd 
     330    (( DateEnd = $( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${DureeLengthInDays} ) )) 
     331    echo ">${DateEnd}<" 
     332 
     333    echo "tout va bien 1" 
     334 
     335  # - Determine RestartDate 
     336    (( Offset = -1 )) 
     337    (( RestartDate = $( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${Offset} ) )) 
     338 
     339    IGCM_debug_Print 2 "${DateBegin} => ${DateEnd} : ${StartDir}" 
     340 
     341  # -  Does $StartDir already exist ? 
     342    #echo "tout va bien 2" ${StartDir} 
     343    if [ ! -d ${SUBMIT_DIR}/${StartDir} ] ; then 
     344      echo "create dir" 
     345      IGCM_sys_Mkdir ${SUBMIT_DIR}/${StartDir} 
     346      IGCM_sys_Cd ${SUBMIT_DIR}/${StartDir} 
     347      ln -s ../../.resol . 
     348      ln -s ../../.libmpi . 
     349      IGCM_sys_Cd ${RUN_DIR} 
     350      echo "${DateBegin} ${DateEnd} ${StartDir}" >> CreatedDir.txt 
     351    fi 
     352    PeriodDateEnd=$( grep -m1 ${StartDir} CreatedDir.txt | cut -f2 -d\  ) 
     353 
     354  # - Create directory in which to store new restart files if it does'nt already exist 
     355    RestartDir=$DMFDIR/IGCM_IN/${config_UserChoices_TagName}/${StartDir} 
     356    if [ ! -d  ${RestartDir} ] ; then 
     357      IGCM_sys_MkdirArchive ${RestartDir} 
     358    fi 
     359 
     360  # - Loop over members 
     361    i=0 
     362    while [ $i -lt ${ensemble_Ens_PERTURB_MEMBER} ] ; do 
     363      MemberDir="${StartDir}${Alpha[$i]}" 
     364      IGCM_debug_Print 3 "${MemberDir}" 
     365 
     366      JobName="Job_${MemberDir}" 
     367 
     368    # * Create directory if it doesn't exist and copy files 
     369      if [ ! -d  ${SUBMIT_DIR}/${StartDir}/${MemberDir} ] ; then 
     370        IGCM_sys_Mkdir ${SUBMIT_DIR}/${StartDir}/${MemberDir} 
     371        #IGCM_sys_Cp -r COMP/ PARAM/ ${StartDir}/${MemberDir} 
     372        IGCM_sys_Cd ${SUBMIT_DIR}/${StartDir}/${MemberDir} 
     373        ln -s ../../COMP 
     374        ln -s ../../PARAM 
     375        ln -s ../../POST 
     376        IGCM_sys_Cd ${RUN_DIR} 
     377        IGCM_sys_Cp config.card run.card.init ${SUBMIT_DIR}/${StartDir}/${MemberDir} 
     378        IGCM_sys_Cp Job_${ensemble_Ens_PERTURB_NAME} ${SUBMIT_DIR}/${StartDir}/${MemberDir}/Job_${MemberDir} 
     379 
     380        echo "cd ${StartDir}/${MemberDir}/ ; ccc_msub ${JobName} ;" >> Qsub.txt 
     381 
     382        echo "sed -e 's/PeriodNb=.*/PeriodNb=48/' ${JobName} > ${JobName}.tmp ; " >> Qsub.txt 
     383        echo "mv ${JobName}.tmp ${JobName} ; cd - ;" >> Qsub.txt 
     384      fi 
     385 
     386    # * Update files : config.card, Job_, COMP/comp.card 
     387      echo "${PeriodDateEnd} ? ${DateEnd}" 
     388      if [ ${PeriodDateEnd} -gt ${DateEnd} ] ; then 
     389        DateEnd=${PeriodDateEnd} 
     390      fi 
     391      IGCM_ensemble_CastFilesUpdate ${DateBegin} ${DateEnd} ${RestartDate} 
     392 
     393    # * Apply noise on restart file 
     394      IGCM_ensemble_CastPerturbFile 
     395      (( i = i + 1 )) 
     396    done 
     397 
     398    (( DateNum = DateNum + 1 )) 
     399  done 
     400  IGCM_debug_PopStack "IGCM_ensemble_CastNonPeriodicStarts" 
     401} 
     402 
     403function IGCM_ensemble_CastFilesUpdate 
     404{ 
     405  IGCM_debug_PushStack "IGCM_ensemble_CastFilesUpdate" 
    17406 
    18407#  set -vx 
     
    20409  # Debug Print : 
    21410  echo 
    22   IGCM_debug_Print 1 "IGCM_ensemble_FilesUpdate :" 
     411  IGCM_debug_Print 1 "IGCM_ensemble_CastFilesUpdate :" 
    23412  echo 
    24413 
     
    50439  IGCM_sys_Mv Job_${MemberDir}.tmp ${SUBMIT_DIR}/${StartDir}/${MemberDir}/Job_${MemberDir} 
    51440 
    52   IGCM_debug_PopStack "IGCM_ensemble_FilesUpdate" 
     441  IGCM_debug_PopStack "IGCM_ensemble_CastFilesUpdate" 
    53442} 
    54443 
    55 function IGCM_ensemble_DirectoryName 
     444function IGCM_ensemble_CastDirectoryName 
    56445{ 
    57   IGCM_debug_PushStack "IGCM_ensemble_DirectoryName" 
     446  IGCM_debug_PushStack "IGCM_ensemble_CastDirectoryName" 
    58447 
    59448  #.. Debug Print .. 
    60449  echo 
    61   IGCM_debug_Print 1 "IGCM_ensemble_DirectoryName :" 
     450  IGCM_debug_Print 1 "IGCM_ensemble_CastDirectoryName :" 
    62451  echo 
    63452 
     
    74463  case ${Duree} in 
    75464    *Y|*y) 
    76       siecle="$( echo $year | cut -c1-2 )"  
     465      siecle="$( echo $year | cut -c1-2 )" 
    77466      siecle=$( (( $siecle - 18 )) ) 
    78467      StartYear="${siecle}$( echo $year | cut -c3-4 )" 
     
    81470    *M|*m) 
    82471      echo $month 
    83       siecle="$( echo $year | cut -c1-2 )"  
     472      siecle="$( echo $year | cut -c1-2 )" 
    84473      siecle=$( (( $siecle - 18 )) ) 
    85474      StartYear="${siecle}$( echo $year | cut -c3-4 )" 
     
    89478  esac 
    90479 
    91   IGCM_debug_PopStack "IGCM_ensemble_DirectoryName" 
     480  IGCM_debug_PopStack "IGCM_ensemble_CastDirectoryName" 
    92481} 
    93482 
    94 function IGCM_ensemble_PerturbFile 
     483function IGCM_ensemble_CastPerturbFile 
    95484{ 
    96   IGCM_debug_PushStack "IGCM_ensemble_PerturbFile" 
     485  IGCM_debug_PushStack "IGCM_ensemble_CastPerturbFile" 
    97486 
    98487  #.. Debug Print .. 
    99488  echo 
    100   IGCM_debug_Print 1 "IGCM_ensemble_PerturbFile :" 
     489  IGCM_debug_Print 1 "IGCM_ensemble_CastPerturbFile :" 
    101490  echo 
    102491 
     
    149538  IGCM_card_WriteOption ${SUBMIT_DIR}/${StartDir}/${MemberDir}/config.card ${PerturbComp} RestartPath    ${RestartDir}/ 
    150539 
    151   IGCM_debug_PopStack "IGCM_ensemble_PerturbFile" 
     540  IGCM_debug_PopStack "IGCM_ensemble_CastPerturbFile" 
    152541} 
Note: See TracChangeset for help on using the changeset viewer.