Ignore:
Timestamp:
Oct 2, 2023, 2:30:47 PM (16 months ago)
Author:
jbclement
Message:

PEM:
Initialization of the PEM in 1D through the subroutine "init_testphys1d_mod.F90" + Some adaptations of the Mars PCM in 1D + Update of "launch_pem.sh" in deftank.
JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/deftank/pem/launch_pem.sh

    r3050 r3065  
    8080if [ ! -d "diags" ]; then
    8181    mkdir diags
    82 fi
    83 if [ ! -d "profiles" ]; then
    84     mkdir profiles
    8582fi
    8683
     
    9895((iGCM = ($iPEM - 1)*$nGCM + 1))
    9996cp startfi.nc starts/
    100 for file in profile_*; do
    101     cp $file profiles/${file}_0
    102 done
     97if [ -f "start.nc" ]; then
     98    cp start.nc starts/
     99fi
    103100
    104101# Create a temporary file to manage years of the chained simulation
     
    138135            cp restart.nc starts/restart${iGCM}.nc
    139136            mv restart.nc start.nc
    140         fi
    141         if [ -f "restart1D.txt" ]; then
     137        elif [ -f "restart1D.txt" ]; then
    142138            cp restart1D.txt starts/restart1D${iGCM}.txt
    143139            mv restart1D.txt start1D.txt
    144         fi
    145         if ls profile_out_* 1> /dev/null 2>&1; then
    146             for file in profile_out_*; do
    147                 cp $file profiles/${file/_out/}_${iGCM}
    148                 mv $file ${file/_out/}
    149             done
    150140        fi
    151141        ((iGCM++))
     
    171161    if [ -f "start.nc" ]; then
    172162        cp start.nc start_evol.nc
    173     fi
    174     #if [ -f "start1D.txt" ]; then
    175     #    cp start1D.txt start1D.txt
    176     #fi
     163    elif [ -f "start1D.txt" ]; then
     164        cp start1D.txt start1D_evol.txt
     165    fi
    177166    ./$exePEM > out_runPEM${iPEM} 2>&1
    178167    if [ ! -f "restartfi_evol.nc" ]; then # Check if run ended abnormally
     
    183172    mv out_runPEM${iPEM} out_PEM/run${iPEM}
    184173    mv diagfi.nc diags/diagfi_PEM${iPEM}.nc
     174    cp restartfi_PEM.nc starts/startfi_PEM${iPEM}.nc
     175    mv restartfi_PEM.nc startfi_PEM.nc
    185176    cp restartfi_evol.nc starts/startfi_postPEM${iPEM}.nc
    186177    mv restartfi_evol.nc startfi.nc
    187178    if [ -f "restart_evol.nc" ]; then
    188         cp restart_evol.nc starts/restart${iGCM}.nc
     179        cp restart_evol.nc starts/restart_postPEM${iPEM}.nc
    189180        mv restart_evol.nc start.nc
    190     fi
    191     cp restartfi_PEM.nc starts/startfi_PEM${iPEM}.nc
    192     mv restartfi_PEM.nc startfi_PEM.nc
    193     if ls profile_out_* 1> /dev/null 2>&1; then
    194         for file in profile_out_*; do
    195             cp $file profiles/${file/_out/}PEM_${iPEM}
    196             mv $file ${file/_out/}
    197         done
     181    elif [ -f "restart1D_evol.txt" ]; then
     182        cp restart1D_evol.txt starts/restart1D_postPEM${iPEM}.txt
     183        mv restart1D_evol.txt start1D.txt
    198184    fi
    199185    ((iPEM++))
Note: See TracChangeset for help on using the changeset viewer.