source: lmdz_wrf/trunk/tools/blank_WRF.bash @ 211

Last change on this file since 211 was 29, checked in by lfita, 11 years ago

Adding a series of different files to make automatic the running of simulations:

  • content.txt: file describing the content of the folder

.BASH_

  • blank_WRF.bash: Shell script to prepare WRF folders to run all the WRF framework
  • LMDZ_launch.bash: Shell to run a LMDZ simulation
  • prepare_compilation.bash: Shell to prepare a series of folders to run an experiment
  • WRF_launch.bash: Shell to run a WRF simulation
  • WRF+LMDZ_launch.bash: Shell to run a LMDZ+WRF simulation

.TEMPLATE

  • config.def.template: template file of the LMDZ 'config.def' file
  • namelist.input.template: template of the WRF 'namelist.input'
  • run.def.template: template file of the LMDZ 'run.def' file
  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2## g.e. # ./blank_WRF.bash /d4/lflmd/DATA/WRF/WRFV3.3.1 /d4/lflmd/etudes/AquaPlanet/test_eraint
3if test $1 = '-h'; then
4  echo "**************************************"
5  echo "*** Shell to prepare WRF structure ***"
6  echo "***  from the scratch in a folder  ***"
7  echo "**************************************"
8  echo "blank_WRF.bash [WRFfold](folder with serial/dmpar WRFV3 and WPS compilation folders) [WORKfold](working directory)"
9else
10  rootsh=`pwd`
11  WRFfold=$1
12  WORKfold=$2
13
14  # ungrib
15  ##
16  odir=${WORKfold}/ungrib
17  mkdir -p ${odir}
18  links='ungrib.exe Variable_Tables'
19  for link in ${links}; do
20    rm ${odir}/${link} >& /dev/null
21    ln -s ${WRFfold}/serial/WPS/ungrib/${link} ${odir}
22  done
23  mkdir ${odir}/GribDir
24  ln -s ${WRFfold}/serial/WPS/link_grib.csh ${odir}
25
26  # metgrid
27  ##
28  odir=${WORKfold}/metgrid
29  mkdir -p ${odir}
30  links='metgrid.exe METGRID.TBL.ARW'
31  for link in ${links}; do
32    rm ${odir}/${link} >& /dev/null
33    if test ${link:0:3} = 'MET'; then
34      rm ${odir}/METGRID.TBL >& /dev/null
35      ln -s ${WRFfold}/serial/WPS/metgrid/${link} ${odir}/METGRID.TBL
36    else
37      ln -s ${WRFfold}/serial/WPS/metgrid/${link} ${odir}
38    fi
39  done
40
41  # real
42  ##
43  odir=${WORKfold}/run
44  mkdir -p ${odir}
45  rm ${odir}/real.exe >& /dev/null
46  ln -s ${WRFfold}/serial/WRFV3/main/real.exe ${odir}
47
48  # wrf
49  ##
50  odir=${WORKfold}/run
51  links='wrf.exe CAM co2_trans ETA .TBL .tbl .formatted RRTM tr'
52  for link in ${links}; do
53    rm ${odir}/*${link}* >& /dev/null
54    if test ${link} = 'wrf.exe'; then
55      ln -s ${WRFfold}/serial/WRFV3/main/*${link}* ${odir}/wrf.serial.exe
56      ln -s ${WRFfold}/dmpar/WRFV3/main/*${link}* ${odir}/wrf.dmpar.exe
57    else
58      ln -s ${WRFfold}/serial/WRFV3/run/*${link}* ${odir}
59    fi
60  done
61fi
62
63echo "export LD_LIBRARY_PATH=${HOME}/bin/gcc_netcdf-4.3.0/lib:\${LD_LIBRARY_PATH}"
Note: See TracBrowser for help on using the repository browser.