Changeset 3432 for trunk/LMDZ.COMMON


Ignore:
Timestamp:
Sep 20, 2024, 5:18:49 PM (2 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
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/arch/arch-gfortran.fcm

    r3298 r3432  
    1 %COMPILER            gfortran
    2 %LINK                gfortran
     1%COMPILER            mpif90
     2%LINK                mpif90
    33%AR                  ar
    44%MAKE                make
     
    88%FPP_DEF             NC_DOUBLE
    99%BASE_FFLAGS         -c -fdefault-real-8 -fdefault-double-8 -ffree-line-length-none -fno-align-commons -fallow-argument-mismatch
    10 %PROD_FFLAGS         -O3
    11 %DEV_FFLAGS          -O
    12 %DEBUG_FFLAGS        -ffpe-trap=invalid,zero,overflow -fbounds-check -g3 -O0 -fstack-protector-all -finit-real=snan -fbacktrace
     10%PROD_FFLAGS         -O2
     11%DEV_FFLAGS          -O -Wall -fbounds-check
     12%DEBUG_FFLAGS        -fcheck=all -ffree-line-length-0 -Wall -ffpe-trap=invalid,zero,overflow -fbounds-check -g3 -O0 -fstack-protector-all -finit-real=nan -fbacktrace
    1313%C_COMPILER          gcc
    14 %C_OPTIM             -O3
    15 %MPI_FFLAGS
     14%C_OPTIM             -O2
     15%MPI_FFLAGS          -I/usr/lib/x86_64-linux-gnu/openmpi/include
    1616%OMP_FFLAGS         
    17 %BASE_LD     
    18 %MPI_LD
     17%BASE_LD            
     18%MPI_LD              -lmpi
    1919%OMP_LD             
  • trunk/LMDZ.COMMON/arch/arch-gfortran.path

    r3298 r3432  
    11ROOT=$PWD
     2NETCDF="$HOME/netcdf4hdf5"
    23
    34NETCDF_LIBDIR="-L$NETCDF/lib"
  • 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.