source: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/launch @ 2236

Last change on this file since 2236 was 1552, checked in by aslmd, 9 years ago

MESORUN folder: self-consistent test case. a script to create a quick mini startbase. changed 35 levels to 29 for input GCM. changed default to clim. changed date to month 4 (day 193 already in start_archive).

File size: 1.9 KB
Line 
1#! /bin/bash
2
3#PBS -S  /bin/bash
4#PBS -j  oe
5#PBS -q  week
6#PBS -N  run
7#PBS -l  nodes=1:ppn=16
8#PBS -l  mem=64gb
9#PBS -l  vmem=64gb
10#PBS -v  step=1
11
12#### NB: "qsub -v step=XX launch" overrides value above
13
14#### PREAMBLE
15ulimit -s unlimited
16
17#### STEP 1
18if [[ ${step} -le 1 ]] ; then
19  cd $PBS_O_WORKDIR/gcm
20  #
21  year=$(more namelist.input | grep start_year | awk '{print $3}' | sed s+','+''+g)
22  month=$(more namelist.input | grep start_month | awk '{print $3}' | sed s+','+''+g)
23  day=$(more namelist.input | grep start_day | awk '{print $3}' | sed s+','+''+g)
24  hour=$(more namelist.input | grep start_hour | awk '{print $3}' | sed s+','+''+g)
25  wrf_date=${year}'-'${month}'-'${day}'_00:00:00'
26  daygcm=$(more calendar | grep ${wrf_date} | awk '{print $2}')
27  echo ${daygcm} | ./launch_gcm
28  #
29  $WHERE_MPI/mpirun gcm.e > log_gcm
30  #
31  cd $PBS_O_WORKDIR/prep
32  echo 1 | create_readmeteo.exe
33  readmeteo.exe < readmeteo.def
34fi
35
36##### STEP 2
37if [[ ${step} -le 2 ]] ; then
38  cd $PBS_O_WORKDIR/geogrid
39  \rm geo_em.*
40  geogrid.exe
41  #
42  cd $PBS_O_WORKDIR/metgrid
43  \rm met_em.*
44  metgrid.exe
45fi
46
47##### STEP 3
48if [[ ${step} -le 3 ]] ; then
49  cd $PBS_O_WORKDIR/
50  \rm wrfi* wrfb*
51  real.exe
52fi
53
54##### STEP 4
55if [[ ${step} -le 4 ]] ; then
56  rm -rf $PBS_O_WORKDIR/$PBS_JOBNAME
57  mkdir $PBS_O_WORKDIR/$PBS_JOBNAME
58  mv rsl.error.0000 $PBS_O_WORKDIR/$PBS_JOBNAME/real_rsl.error.0000
59  mv rsl.out.0000 $PBS_O_WORKDIR/$PBS_JOBNAME/real_rsl.out.0000
60  cp -rfL  $PBS_O_WORKDIR/*.def           $PBS_O_WORKDIR/$PBS_JOBNAME/
61  cp -rfL  $PBS_O_WORKDIR/wrf.exe*        $PBS_O_WORKDIR/$PBS_JOBNAME/
62  cp -rfL  $PBS_O_WORKDIR/namelist.input  $PBS_O_WORKDIR/$PBS_JOBNAME/
63  cp -rfL  $PBS_O_WORKDIR/namelist.wps    $PBS_O_WORKDIR/$PBS_JOBNAME/
64  cp -rfL  $PBS_O_WORKDIR/wrfi*           $PBS_O_WORKDIR/$PBS_JOBNAME/
65  cp -rfL  $PBS_O_WORKDIR/wrfb*           $PBS_O_WORKDIR/$PBS_JOBNAME/
66  cd $PBS_O_WORKDIR/$PBS_JOBNAME/
67  ln -sf $PBS_O_WORKDIR/data_physics ./
68  $WHERE_MPI/mpirun wrf.exe
69fi
Note: See TracBrowser for help on using the repository browser.