source: trunk/LMDZ.COMMON/libf/evolution/deftank/PEMrun.job @ 3977

Last change on this file since 3977 was 3977, checked in by jbclement, 4 days ago

PEM:

  • All operations computed by the PEM on the PCM data (averages, minima) are now performed by XIOS with two dedicated file. One is for daily operation outputs ("Xoutdaily4pem*.nc") and the other for yearly operation outputs ("Xoutyearly4pem*.nc").
  • Deletion of the reshaping tool "reshape_XIOS_output" used to convert XIOS outputs onto the PCM grid. Thus, the PEM is now able to read directly the format of XIOS outputs.
  • Addition of subroutines to convert data between a lon x lat array and a vector.

JBC

  • Property svn:executable set to *
File size: 2.2 KB
Line 
1#!/bin/bash
2### Partition to use
3#SBATCH --account=cin0391
4#SBATCH --constraint=GENOA
5### Number of nodes/cores to use
6#SBATCH --nodes=1
7#SBATCH --ntasks-per-node=1
8#SBATCH --cpus-per-task=1
9#SBATCH --threads-per-core=1 # --hint=nomultithread
10### Job information
11#SBATCH --job-name=jobPEM1
12#SBATCH --output=jobPEM_%j.out
13#SBATCH --time=24:00:00
14#SBATCH --mem=64G
15
16########################################################################
17# Modify here the parameters depending on your setup
18####################################################
19# Path to the arch.env to source:
20source ../trunk/LMDZ.COMMON/arch.env
21
22# Name of executable for the PEM:
23exePEM="pem_64x48x32_phymars_seq.e"
24
25# Argument for the PEM execution ("--auto-exit" for SLURM and PBS/TORQUE | "" when the script is not run as a job):
26arg_pem="--auto-exit"
27########################################################################
28
29
30ulimit -s unlimited
31
32# Running the PEM
33read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < info_PEM.txt
34echo "Run \"PEM $iPEM\" is starting."
35cp run_PEM.def run.def
36eval "./$exePEM $arg_pem > run.log 2>&1"
37if [ ! -f "restartfi.nc" ] || ! (tail -n 100 run.log | grep -iq "so far, so good!"); then # Check if it ended abnormally
38    echo "Error: the run \"PEM $iPEM\" crashed!"
39    exit 1
40fi
41
42# Copy data files and prepare the next run
43mv run.log logs/runPEM${iPEM}.log
44if [ -f "diagpem.nc" ]; then
45    mv diagpem.nc diags/diagpem${iPEM}.nc
46fi
47if [ -f "diagsoilpem.nc" ]; then
48    mv diagsoilpem.nc diags/diagsoilpem${iPEM}.nc
49fi
50cp restartpem.nc starts/restartpem${iPEM}.nc
51mv restartpem.nc startpem.nc
52cp restartfi.nc starts/restartfi_postPEM${iPEM}.nc
53mv restartfi.nc startfi.nc
54if [ -f "restart.nc" ]; then
55    cp restart.nc starts/restart_postPEM${iPEM}.nc
56    mv restart.nc start.nc
57elif [ -f "restart1D.txt" ]; then
58    cp restart1D.txt starts/restart1D_postPEM${iPEM}.txt
59    mv restart1D.txt start1D.txt
60fi
61
62# Launch the next cycle
63#if [ "$(awk 'END{print $NF}' info_PEM.txt)" -eq 7 ]; then
64#    read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < info_PEM.txt
65#    ./launchPEM.sh cont # Continue the PEM run if it stopped because of job time limit
66#else
67    ./launchPEM.sh new
68#fi
Note: See TracBrowser for help on using the repository browser.