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

Last change on this file since 1704 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
RevLine 
[1436]1#! /bin/bash
2
[1434]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
[1436]10#PBS -v  step=1
[1434]11
[1436]12#### NB: "qsub -v step=XX launch" overrides value above
13
[1434]14#### PREAMBLE
15ulimit -s unlimited
16
17#### STEP 1
[1436]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  #
[1552]29  $WHERE_MPI/mpirun gcm.e > log_gcm
[1436]30  #
31  cd $PBS_O_WORKDIR/prep
32  echo 1 | create_readmeteo.exe
33  readmeteo.exe < readmeteo.def
34fi
[1434]35
[1436]36##### STEP 2
37if [[ ${step} -le 2 ]] ; then
38  cd $PBS_O_WORKDIR/geogrid
[1439]39  \rm geo_em.*
[1436]40  geogrid.exe
41  #
42  cd $PBS_O_WORKDIR/metgrid
[1439]43  \rm met_em.*
[1436]44  metgrid.exe
45fi
[1434]46
[1436]47##### STEP 3
48if [[ ${step} -le 3 ]] ; then
49  cd $PBS_O_WORKDIR/
[1439]50  \rm wrfi* wrfb*
[1436]51  real.exe
52fi
[1434]53
[1436]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
[1473]60  cp -rfL  $PBS_O_WORKDIR/*.def           $PBS_O_WORKDIR/$PBS_JOBNAME/
[1448]61  cp -rfL  $PBS_O_WORKDIR/wrf.exe*        $PBS_O_WORKDIR/$PBS_JOBNAME/
[1436]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 ./
[1552]68  $WHERE_MPI/mpirun wrf.exe
[1436]69fi
Note: See TracBrowser for help on using the repository browser.