Changeset 3649 for trunk/LMDZ.COMMON


Ignore:
Timestamp:
Feb 26, 2025, 9:58:28 AM (4 months ago)
Author:
jbclement
Message:

PEM:
Correction and simplification of the numbering of jobs/runs in the launching script.
JBC

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r3639 r3649  
    606606== 21/02/2025 == JBC
    607607Unset inherited SLURM memory env variables to prevent conflicts in chained job re-launch (it happenned on MCMeSU).
     608
     609== 26/02/2025 == JBC
     610Correction and simplification of the numbering of jobs/runs in the launching script.
  • TabularUnified trunk/LMDZ.COMMON/libf/evolution/deftank/PCMrun.job

    r3639 r3649  
    5858fi
    5959k=0
    60 if [ $(echo "$k < 1" | bc -l) -eq 1 ]; then # Only the last 2 years are taken for the PEM
    61     mv Xdiurnalave.nc diags/data2reshape${iPCM}.nc
    62 else
    63     cp Xdiurnalave.nc diags/data2reshape${iPCM}.nc
    64     mv Xdiurnalave.nc data2reshape_Y${k}.nc
     60if [ $(echo "$k > 0" | bc) -eq 1 ]; then # Only the last 2 years are taken for the PEM
     61    cp Xdiurnalave.nc data2reshape_Y${k}.nc
    6562fi
     63mv Xdiurnalave.nc diags/data2reshape${iPCM}.nc
    6664cp restartfi.nc starts/restartfi${iPCM}.nc
    6765mv restartfi.nc startfi.nc
  • TabularUnified trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh

    r3634 r3649  
    172172    fi
    173173    if [ $(echo "$i_myear < $n_myear" | bc -l) -eq 1 ]; then
    174         echo "Run \"PCM $iPCM\": call $ii/$3..."
     174        echo "Run \"PCM $iPCM\" ($ii/$3)..."
    175175        if [ $1 -eq 0 ]; then # Mode: processing scripts
    176             sed -i "s/^k=[0-9]\+$/k=$(echo "3 - $nPCM_ini" | bc)/" PCMrun.job
     176            sed -i "s/^k=[0-9]\+$/k=$(echo "$ii - $3 + 2" | bc)/" PCMrun.job
    177177            ./PCMrun.job
    178178            if [ $? -ne 0 ]; then
     
    181181        else # Mode: submitting jobs
    182182            cp PCMrun.job PCMrun${iPCM}.job
    183             sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPCM}/" PCMrun${iPCM}.job
    184             sed -i "s/^k=[0-9]\+$/k=$(echo "3 - $nPCM_ini" | bc)/" PCMrun${iPCM}.job
     183            sed -i -E "s/($name_job[^0-9]*)[0-9]+([^0-9]*)$/\1${iPCM}\2/" PCMrun${iPCM}.job
     184            sed -i "s/^k=[0-9]\+$/k=$(echo "$ii - $3 + 2" | bc)/" PCMrun${iPCM}.job
    185185            jobID=$(eval "$submit_job PCMrun${iPCM}.job")
    186186            # Create a file to cancel the dependent jobs of the cycle
     
    199199    for ((i = $ii; i <= $3; i++)); do
    200200        if [ $(echo "$i_myear < $n_myear" | bc -l) -eq 1 ]; then
    201             echo "Run \"PCM $iPCM\": call $i/$3..."
     201            echo "Run \"PCM $iPCM\" ($i/$3)..."
    202202            if [ $1 -eq 0 ]; then # Mode: processing scripts
    203                 sed -i "s/^k=[0-9]\+$/k=$(echo "$i + 2 - $nPCM_ini" | bc)/" PCMrun.job
     203                sed -i "s/^k=[0-9]\+$/k=$(echo "$i - $3 + 2" | bc)/" PCMrun.job
    204204                ./PCMrun.job
    205205                if [ $? -ne 0 ]; then
     
    208208            else # Mode: submitting jobs
    209209                cp PCMrun.job PCMrun${iPCM}.job
    210                 sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPCM}/" PCMrun${iPCM}.job
    211                 sed -i "s/^k=[0-9]\+$/k=$(echo "$i + 2 - $nPCM_ini" | bc)/" PCMrun${iPCM}.job
     210                sed -i -E "s/($name_job[^0-9]*)[0-9]+([^0-9]*)$/\1${iPCM}\2/" PCMrun${iPCM}.job
     211                sed -i "s/^k=[0-9]\+$/k=$(echo "$i - $3 + 2" | bc)/" PCMrun${iPCM}.job
    212212                jobID=$(eval "$submit_dependjob=afterok:${jobID} PCMrun${iPCM}.job")
    213213                echo $kill_job $jobID >> kill_launchPEM.sh
     
    234234            fi
    235235        else # Mode: submitting jobs
    236             sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPEM}/" PEMrun.job
     236            sed -i -E "s/($name_job[^0-9]*)[0-9]+([^0-9]*)$/\1${iPEM}\2/" PEMrun.job
    237237            jobID=$(eval "$submit_job PEMrun.job")
    238238            # Create a file to cancel the dependent jobs of the cycle
     
    264264            fi
    265265        else # Mode: submitting jobs
    266             sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPEM}/" PEMrun.job
     266            sed -i -E "s/($name_job[^0-9]*)[0-9]+([^0-9]*)$/\1${iPEM}\2/" PEMrun.job
    267267            jobID=$(eval "$submit_dependjob=afterok:${jobID} PEMrun.job")
    268268            echo $kill_job $jobID >> kill_launchPEM.sh
  • TabularUnified trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3638 r3649  
    299299logical :: num_str
    300300
    301 write(*,*) '  *    .          .   +     .    *        .. +      .    .       .      '
     301write(*,*) '  *    .          .   +     .    *        .  +      .    .       .      '
    302302write(*,*) '           +         _______  ________  ____    ____      *           + '
    303303write(*,*) ' +   .        *     |_   __ \|_   __  ||_   \  /   _|          .       *'
     
    305305write(*,*) '       .              |  ___/  |  _| _   | |\  /| |      .        .     '
    306306write(*,*) '.  *          *      _| |_    _| |__/ | _| |_\/_| |_                  * '
    307 write(*,*) '                    |_____|  |________||_____||_____|   +     .         '
    308 write(*,*) '  .      *          .   *      ..   +       *          .        +      .'
     307write(*,*) '            +       |_____|  |________||_____||_____|   +     .         '
     308write(*,*) '  .      *          .   *       .   +       *          .        +      .'
    309309
    310310! Elapsed time with system clock
  • TabularUnified trunk/LMDZ.COMMON/libf/evolution/reshape_XIOS_output.F90

    r3634 r3649  
    44!
    55! Purpose: Read XIOS files, and convert them into the correct PCM grid
    6 !          XIOS  longitudes start at -180 but stop before -180 (not duplicated)
     6!          XIOS longitudes start at -180 but stop before -180 (not duplicated)
    77!          We basically add the last point, and complete the XIOS file. Looped
    88!          over the two PCM runs
Note: See TracChangeset for help on using the changeset viewer.