Ignore:
Timestamp:
Dec 9, 2024, 12:35:05 PM (2 weeks ago)
Author:
jbclement
Message:

PEM:
Fixing Norbert Schorghofer's subroutine which modified soil temperatures and was unwanted in the PEM loop.
JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh

    r3537 r3538  
    310310        # PCM relaunch during the initialization cycle
    311311        iPEM=1
    312         cleanfiles diags/diagpem .nc $iPEM
    313         cleanfiles diags/diagsoilpem .nc $iPEM
    314         cleanfiles "out_PEM/run" "" $iPEM
    315         cleanfiles starts/restart1D_postPEM .txt $iPEM
    316         cleanfiles starts/restart_postPEM .nc $iPEM
    317         cleanfiles starts/restartfi_postPEM .nc $iPEM
    318         cleanfiles starts/restartpem .nc $iPEM
     312        cleanfiles diags/diagpem .nc $(($iPEM - 1))
     313        cleanfiles diags/diagsoilpem .nc $(($iPEM - 1))
     314        cleanfiles "out_PEM/run" "" $(($iPEM - 1))
     315        cleanfiles starts/restart1D_postPEM .txt $(($iPEM - 1))
     316        cleanfiles starts/restart_postPEM .nc $(($iPEM - 1))
     317        cleanfiles starts/restartfi_postPEM .nc $(($iPEM - 1))
     318        cleanfiles starts/restartpem .nc $(($iPEM - 1))
    319319        i_myear=$irelaunch
    320320        sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt
     
    334334        iPEM=$(echo "($iPCM - $nPCM_ini)/$nPCM + 1" | bc)
    335335        il=$(echo "($irelaunch - $nPCM_ini + 1)%$nPCM + 1" | bc)
    336         cleanfiles diags/diagpem .nc $iPEM
    337         cleanfiles diags/diagsoilpem .nc $iPEM
    338         cleanfiles "out_PEM/run" "" $iPEM
    339         cleanfiles starts/restart1D_postPEM .txt $iPEM
    340         cleanfiles starts/restart_postPEM .nc $iPEM
    341         cleanfiles starts/restartfi_postPEM .nc $iPEM
    342         cleanfiles starts/restartpem .nc $iPEM
    343         cp starts/restartpem${iPEM}.nc startpem.nc
     336        cleanfiles diags/diagpem .nc $(($iPEM - 1))
     337        cleanfiles diags/diagsoilpem .nc $(($iPEM - 1))
     338        cleanfiles "out_PEM/run" "" $(($iPEM - 1))
     339        cleanfiles starts/restart1D_postPEM .txt $(($iPEM - 1))
     340        cleanfiles starts/restart_postPEM .nc $(($iPEM - 1))
     341        cleanfiles starts/restartfi_postPEM .nc $(($iPEM - 1))
     342        cleanfiles starts/restartpem .nc $(($iPEM - 1))
     343        cp starts/restartpem$(($iPEM - 1)).nc startpem.nc
    344344        if [ $il -eq $(($nPCM - 1)) ]; then # Second to last PCM run
    345345            i_myear=$(($(awk "NR==$iPEM {print \$1}" "info_PEM.txt") + $il))
Note: See TracChangeset for help on using the changeset viewer.