New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13119 – NEMO

Changeset 13119


Ignore:
Timestamp:
2020-06-17T12:50:09+02:00 (4 years ago)
Author:
smasson
Message:

r12931_sette_ticket2366: update input tarfiles, see #2366

Location:
utils/CI/r12931_sette_ticket2366
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • utils/CI/r12931_sette_ticket2366/input_AGRIF.cfg

    r9776 r13119  
    1 ORCA2_ICE_v4.0.tar ORCA2_ICE_v4.0 
    2 AGRIF_DEMO_v4.0.tar AGRIF_DEMO_v4.0 
     1ORCA2_ICE_v4.x.tar.gz ORCA2_ICE_v4.x 
     2AGRIF_DEMO_v4.x.tar.gz AGRIF_DEMO_v4.x 
  • utils/CI/r12931_sette_ticket2366/input_ICE_AGRIF.cfg

    r10517 r13119  
    1 ICE_AGRIF_v4.0.tar ICE_AGRIF_v4.0 
     1ICE_AGRIF_v4.x.tar.gz ICE_AGRIF_v4.x 
  • utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_OBS.cfg

    r9663 r13119  
    1 ORCA2_ICE_v4.0.tar ORCA2_ICE_v4.0 
     1ORCA2_ICE_v4.x.tar.gz ORCA2_ICE_v4.x 
  • utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_PISCES.cfg

    r9663 r13119  
    1 ORCA2_ICE_v4.0.tar  ORCA2_ICE_v4.0 
     1ORCA2_ICE_v4.x.tar.gz ORCA2_ICE_v4.x 
  • utils/CI/r12931_sette_ticket2366/input_ORCA2_OFF_PISCES.cfg

    r9904 r13119  
    1 ORCA2_OFF_v4.0.tar ORCA2_OFF_v4.0 
     1ORCA2_OFF_v4.x.tar.gz ORCA2_OFF_v4.x 
  • utils/CI/r12931_sette_ticket2366/input_SAS.cfg

    r9579 r13119  
    1 ORCA2_ICE_v4.0.tar ORCA2_ICE_v4.0 
    2 INPUTS_SAS_v4.0.tar SAS 
     1ORCA2_ICE_v4.x.tar.gz ORCA2_ICE_v4.x 
     2INPUTS_SAS_v4.x.tar.gz SAS_v4.x 
  • utils/CI/r12931_sette_ticket2366/prepare_job.sh

    r12798 r13119  
    122122# loop on tarfiles 
    123123# read file name and directory 
    124 while read tar_file dir_conf_forc  
    125 do 
    126       echo looking for tarfile ${tar_file} and directory ${FORCING_DIR}/${dir_conf_forc} ; echo looking for tarfile ${tar_file} and directory ${FORCING_DIR}/${dir_conf_forc} >> ${SETTE_DIR}/output.sette 
    127       if [ -f ${FORCING_DIR}/${tar_file} ] && [ -d ${FORCING_DIR}/${dir_conf_forc} ] ; then 
    128 # Tarfile and input dir ar there, only check the links 
    129          echo "Tarfile and input dir ar there, only check the links" >> ${SETTE_DIR}/output.sette 
    130 # extract tarfile 
    131       else  
    132  
    133 if [ ! -f ${FORCING_DIR}/${tar_file} ] ; then   
    134      echo "tarfile  ${FORCING_DIR}/${tar_file} cannot be found we stop " ; exit 2 ; fi  
    135  
    136 echo "mkdir ${FORCING_DIR}/${dir_conf_forc}" >> ${SETTE_DIR}/output.sette 
    137          mkdir ${FORCING_DIR}/${dir_conf_forc}   
    138          cd    ${FORCING_DIR}/${dir_conf_forc} 
    139 echo " extract from tarfile ${FORCING_DIR}/${tar_file} in  ${FORCING_DIR}/${dir_conf_forc}" >> ${SETTE_DIR}/output.sette 
    140          tar xvof ${FORCING_DIR}/${tar_file} ; gunzip -f `find . -name "*.gz"`  
    141       fi 
    142 # Tarfile and input dir ar there, only check the links 
    143       cd ${FORCING_DIR}/${dir_conf_forc} 
    144       for fida in * 
    145          do 
     124   while read tar_file dir_conf_forc  
     125   do 
     126       echo looking for tarfile ${tar_file} and directory ${FORCING_DIR}/${dir_conf_forc} 
     127       echo looking for tarfile ${tar_file} and directory ${FORCING_DIR}/${dir_conf_forc} >> ${SETTE_DIR}/output.sette 
     128       if [ -d ${FORCING_DIR}/${dir_conf_forc} ] ; then 
     129      # input dir ar there, only check the links 
     130           echo "input dir ar there, only check the links" >> ${SETTE_DIR}/output.sette 
     131      # extract tarfile 
     132       else        
     133      if [ ! -f ${FORCING_DIR}/${tar_file} ] ; then   
     134          echo "tarfile  ${FORCING_DIR}/${tar_file} cannot be found we stop " ; exit 2 ; fi  
     135 
     136      echo " extract from tarfile ${FORCING_DIR}/${tar_file} in  ${FORCING_DIR}/${dir_conf_forc}" >> ${SETTE_DIR}/output.sette 
     137 
     138      istgz=$( echo ${FORCING_DIR}/${tar_file} | grep -c "gz$" ) 
     139      if [ $istgz -eq 1 ] 
     140      then 
     141          withdir=$( tar tfz ${FORCING_DIR}/${tar_file} | head -n 1  | grep -c "${dir_conf_forc}/$" ) 
     142      else 
     143          withdir=$( tar tf  ${FORCING_DIR}/${tar_file} | head -n 1  | grep -c "${dir_conf_forc}/$" ) 
     144      fi 
     145      if [ $withdir -eq 0 ] 
     146      then 
     147          mkdir ${FORCING_DIR}/${dir_conf_forc}   
     148          cd    ${FORCING_DIR}/${dir_conf_forc} 
     149      else 
     150          cd    ${FORCING_DIR} 
     151      fi 
     152      if [ $istgz -eq 1 ] 
     153      then 
     154          tar xvfz ${FORCING_DIR}/${tar_file} 
     155      else 
     156               tar xvf ${FORCING_DIR}/${tar_file} 
     157          [ $( ls -1 *gz 2>/dev/null | wc -l ) -gt 0 ] && gunzip -f *gz 
     158      fi 
     159       fi 
     160       # Tarfile and input dir ar there, only check the links 
     161       cd ${FORCING_DIR}/${dir_conf_forc} 
     162       for fida in * 
     163       do 
    146164           [ -f ${EXE_DIR}/${fida} ] || ln -s ${FORCING_DIR}/${dir_conf_forc}/${fida} ${EXE_DIR}/${fida} 
    147          done 
    148     done < ${SETTE_DIR}/$INPUTARFILE 
    149  
     165       done 
     166   done < ${SETTE_DIR}/$INPUTARFILE 
     167    
    150168else 
    151   echo "no input file to be searched " 
     169    echo "no input file to be searched " 
    152170fi 
    153171################################################################ 
Note: See TracChangeset for help on using the changeset viewer.