Ignore:
Timestamp:
Sep 20, 2024, 5:18:49 PM (3 months ago)
Author:
jbclement
Message:

PEM:
Small corrections for the launching script (run numbers must be integer) and the PEM stopping criteria algorithm related to r3430.
JBC

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

Legend:

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

    r3430 r3432  
    427427- Update and corrections for the layering algorithm: there is now only one subsurface stratum.
    428428- Improvement of the launching script in the case of the 1D PEM: it ends automatically after PCM/PEM run crash.
     429
     430== 20/09/2024 == JBC
     431Small corrections for the launching script (run numbers must be integer) and the PEM stopping criteria algorithm related to r3430.
  • trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh

    r3430 r3432  
    173173        echo "Run PCM $iPCM: call $ii/$2..."
    174174        if [ $1 -eq 1 ]; then # 1D model
    175             sed -i "s/^k=[0-9]\+$/k=$(echo "3 - $nPCM_ini" | bc -l)/" PCMrun.job
     175            sed -i "s/^k=[0-9]\+$/k=$(echo "3 - $nPCM_ini" | bc)/" PCMrun.job
    176176            ./PCMrun.job
    177177            if [ $? -ne 0 ]; then
     
    181181            cp PCMrun.job PCMrun${iPCM}.job
    182182            sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPCM}/" PCMrun${iPCM}.job
    183             sed -i "s/^k=[0-9]\+$/k=$(echo "3 - $nPCM_ini" | bc -l)/" PCMrun${iPCM}.job
     183            sed -i "s/^k=[0-9]\+$/k=$(echo "3 - $nPCM_ini" | bc)/" PCMrun${iPCM}.job
    184184            jobID=$(eval "$submit_job PCMrun${iPCM}.job")
    185185            # Create a file to cancel the dependent jobs of the cycle
     
    198198            echo "Run PCM $iPCM: call $i/$2..."
    199199            if [ $1 -eq 1 ]; then # 1D model
    200                 sed -i "s/^k=[0-9]\+$/k=$(echo "$i + 2 - $nPCM_ini" | bc -l)/" PCMrun.job
     200                sed -i "s/^k=[0-9]\+$/k=$(echo "$i + 2 - $nPCM_ini" | bc)/" PCMrun.job
    201201                ./PCMrun.job
    202202                if [ $? -ne 0 ]; then
     
    206206                cp PCMrun.job PCMrun${iPCM}.job
    207207                sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPCM}/" PCMrun${iPCM}.job
    208                 sed -i "s/^k=[0-9]\+$/k=$(echo "$i + 2 - $nPCM_ini" | bc -l)/" PCMrun${iPCM}.job
     208                sed -i "s/^k=[0-9]\+$/k=$(echo "$i + 2 - $nPCM_ini" | bc)/" PCMrun${iPCM}.job
    209209                jobID=$(eval "$submit_dependjob=afterok:${jobID} PCMrun${iPCM}.job")
    210210                echo $kill_job $jobID >> kill_launchPEM.sh
     
    363363# arg1: model dimension
    364364relaunchPEM() {
    365     iPEM=$(($irelaunch + 1))
    366     iPCM=$(($nPCM_ini + $nPCM*($irelaunch - 1) + 1))
     365    iPEM=$(echo "$irelaunch + 1" | bc)
     366    iPCM=$(echo "$nPCM_ini + $nPCM*($irelaunch - 1) + 1" | bc)
    367367    i_myear=$(awk "NR==$(($iPEM + 1)) {print \$1}" "info_PEM.txt")
    368368    sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3430 r3432  
    10051005    call system_clock(c2)
    10061006    if (stopPEM <= 0 .and. timewall .and. real((c2 - c1)/cr) >= timelimit - antetime) stopPEM = 7
    1007     if (stopPEM <= 0) then
     1007    if (stopPEM > 0) then
    10081008        select case (stopPEM)
    10091009            case(1)
  • trunk/LMDZ.COMMON/libf/evolution/stopping_crit_mod.F90

    r3430 r3432  
    4242
    4343!=======================================================================
    44 if (stopPEM < 0) return
     44if (stopPEM > 0) return
    4545
    4646! Computation of the present surface of h2o ice still sublimating
     
    106106
    107107!=======================================================================
    108 if (stopPEM < 0) return
     108if (stopPEM > 0) return
    109109
    110110! Computation of the present surface of co2 ice still sublimating
Note: See TracChangeset for help on using the changeset viewer.