Changeset 3046 for trunk


Ignore:
Timestamp:
Sep 21, 2023, 10:30:56 AM (21 months ago)
Author:
jbclement
Message:

Mars PEM:
Improvements of scripts to launch the chained simulations of GCM and PEM runs.
JBC

Location:
trunk/LMDZ.MARS
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/changelog.txt

    r3045 r3046  
    41994199
    42004200== 21/09/2023 == JBC
     4201Mars PCM 1D:
    42014202Addition of the pressure profile to be able to run chained simulations in 1D. Like this, the surface pressure can be got from one run to the next.
    42024203Rework of "write_profile.F90" + correction of arguments in its call in "testphys1d.F": 'qsurf' was wrongly given!
     4204Mars PEM:
     4205Improvements of scripts to launch the chained simulations of GCM and PEM runs.
  • trunk/LMDZ.MARS/deftank/pem/exeGCM.sh

    r3038 r3046  
    11#!/bin/bash
    22#SBATCH --account=cin0391
    3 #SBATCH --job-name=GCMrun
     3#SBATCH --job-name=runGCM1
    44#SBATCH --constraint=GENOA
    55### GENOA nodes accommodate 96 cores
     
    1212#SBATCH --threads-per-core=1
    1313###SBATCH --exclusive
    14 #SBATCH --output=gcm_run_%A.out
     14#SBATCH --output=run_gcm_%A.out
    1515#SBATCH --time=10:00:00
    1616
  • trunk/LMDZ.MARS/deftank/pem/launch_pem.sh

    r3038 r3046  
    55
    66echo "The launching script is starting!"
    7 echo "The output file is "loglaunch.txt"."
     7echo "The output file is \"loglaunch.txt\"."
    88if [ "$1" = "bg" ]; then
    99    date
     
    4242address=`whoami`
    4343if [ ! -f "exeGCM.sh" ]; then
    44     echo "Error: file "exeGCM.sh" does not exist in $dir!"
    45     exit 0
     44    echo "Error: file \"exeGCM.sh\" does not exist in $dir!"
     45    exit 1
    4646fi
    4747if [ ! -f "run_PEM.def" ]; then
    48     echo "Error: file "run_PEM.def" does not exist in $dir!"
    49     exit 0
     48    echo "Error: file \"run_PEM.def\" does not exist in $dir!"
     49    exit 1
    5050fi
    5151if [ ! -f "run_GCM.def" ]; then
    52     echo "Error: file "run_GCM.def" does not exist in $dir!"
    53     exit 0
     52    echo "Error: file \"run_GCM.def\" does not exist in $dir!"
     53    exit 1
    5454fi
    5555if [ ! -f "diagfi_PEM.def" ]; then
    56     echo "Error: file "diagfi_PEM.def" does not exist in $dir!"
    57     exit 0
     56    echo "Error: file \"diagfi_PEM.def\" does not exist in $dir!"
     57    exit 1
    5858fi
    5959if [ ! -f "diagfi_GCM.def" ]; then
    60     echo "Error: file "diagfi_GCM.def" does not exist in $dir!"
    61     exit 0
     60    echo "Error: file \"diagfi_GCM.def\" does not exist in $dir!"
     61    exit 1
    6262fi
    6363if [ ! -f "context_lmdz_physics.xml" ]; then
    64     echo "Error: file "context_lmdz_physics.xml" does not exist in $dir!"
    65     exit 0
     64    echo "Error: file \"context_lmdz_physics.xml\" does not exist in $dir!"
     65    exit 1
    6666fi
    6767if [ ! -f "field_def_physics_mars.xml" ]; then
    68     echo "Error: file "field_def_physics_mars.xml" does not exist in $dir!"
    69     exit 0
     68    echo "Error: file \"field_def_physics_mars.xml\" does not exist in $dir!"
     69    exit 1
    7070fi
    7171if [ ! -f "file_def_physics_mars.xml" ]; then
    72     echo "Error: file "file_def_physics_mars.xml" does not exist in $dir!"
    73     exit 0
     72    echo "Error: file \"file_def_physics_mars.xml\" does not exist in $dir!"
     73    exit 1
    7474fi
    7575if [ ! -f "iodef.xml" ]; then
    76     echo "Error: file "iodef.xml" does not exist in $dir!"
    77     exit 0
     76    echo "Error: file \"iodef.xml\" does not exist in $dir!"
     77    exit 1
    7878fi
    7979if [ ! -d "out_GCM" ]; then
     
    117117    #--- Loop to run GCM year by year
    118118    cp run_GCM.def run.def
    119     cp diagfi_GCM.def diagfi.def
     119    rm diagfi.def
     120    if [ ! -f "diagfi_GCM.def" ]; then
     121        cp diagfi_GCM.def diagfi.def
     122    fi
    120123    for ((i = 1; i <= $nGCM; i++)); do
    121124        echo "Run GCM $iGCM: call $i/$nGCM..."
     125        sed -i "s/#SBATCH --job-name=runGCM.*/#SBATCH --job-name=runGCM${iGCM}/" exeGCM.sh
    122126        sed -i "s/out_runGCM[0-9]\+/out_runGCM${iGCM}/" exeGCM.sh
    123127        sbatch -W exeGCM.sh
    124128        if [ ! -f "restartfi.nc" ]; then # Check if run ended abnormally
    125129            echo "Error: the run GCM $iGCM has crashed!"
    126             exit 0
     130            exit 1
    127131        fi
    128132        # Copy data files and prepare the next run
     
    164168    echo "Run PEM $iPEM..."
    165169    cp run_PEM.def run.def
    166     cp diagfi_PEM.def diagfi.def
     170    rm diagfi.def
     171    if [ ! -f "diagfi_PEM.def" ]; then
     172        cp diagfi_PEM.def diagfi.def
     173    fi
    167174    mv startfi.nc startfi_evol.nc
    168175    ./$exePEM > out_runPEM${iPEM} 2>&1
    169176    if [ ! -f "restartfi_evol.nc" ]; then # Check if run ended abnormally
    170177        echo "Error: the run PEM $iPEM has crashed!"
    171         exit 0
     178        exit 1
    172179    fi
    173180    # Copy data files and prepare the next run
     
    176183    cp restartfi_evol.nc starts/startfi_postPEM${iPEM}.nc
    177184    mv restartfi_evol.nc startfi.nc
     185    ./modify_startfi_iniLs.sh
    178186    if [ -f "restart_evol.nc" ]; then
    179187        cp restart_evol.nc starts/restart${iGCM}.nc
  • trunk/LMDZ.MARS/deftank/pem/modify_startfi_orbit.sh

    r3038 r3046  
    5454mv $name_file.temp $name_file
    5555
    56 echo "In $name_file:"
     56echo "In \"$name_file\":"
    5757echo "New obliquit     = $new_obl"
    5858echo "New eccentricity = $new_ecc -> new periheli = $periheli"
Note: See TracChangeset for help on using the changeset viewer.