Changes between Version 1 and Version 2 of WikiCompilation


Ignore:
Timestamp:
Jul 9, 2014, 3:34:35 PM (10 years ago)
Author:
lfita
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiCompilation

    v1 v2  
    22
    331.- Extraction of the source code:
    4   $ svn co http://svn.lmd.jussieu.fr/LMDZ_WRF LMDZ_WRF
     4  {{{$ svn co http://svn.lmd.jussieu.fr/LMDZ_WRF LMDZ_WRF}}}
    55
    6 1.- Copy (not int the repository folder...) folder 'WRFV3' to the desired spatial resolution (F77 legacy). As example one for 80x90x39
    7   $ cp -R WRFV3 ${WORKDIR}/WRFV3_80x90x39
     61.- Copy (not int the repository folder...) folder `WRFV3` to the desired spatial resolution (F77 legacy). As example one for 80x90x39
     7  {{{$ cp -R WRFV3 ${WORKDIR}/WRFV3_80x90x39}}}
    88
    9 1.- Go to the ${WORKDIR} and compile there
    10   $ cd ${WORKDIR}/WRFV3_80x90x39
     91.- Go to the `${WORKDIR}` and compile there
     10  {{{$ cd ${WORKDIR}/WRFV3_80x90x39}}}
    1111
    12 1.- Define domain size for LMDZ editing file lmdz/dimensions.h (see documentation for more details)
    13   $ cat lmdz/dimensions.h
     121.- Define domain size for LMDZ editing file `lmdz/dimensions.h` (see documentation for more details)
     13  {{{$ cat lmdz/dimensions.h
    1414       INTEGER iim,jjm,llm,ndm,wiim,wjjm,wbdym
    1515
    16        PARAMETER (iim= 1, jjm=7031, llm=38,ndm=1,wiim=79,wjjm=89,wbdym=5)
     16       PARAMETER (iim= 1, jjm=7031, llm=38,ndm=1,wiim=79,wjjm=89,wbdym=5)}}}
    1717
    18     jjm = (dimx-1) * (dimy -1)
    19     llm = (dimz - 1)
    20     wiim = dimx - 1
    21     wjjm = dimy - 1
    22     wbdym = 5 (up to now, mandatory to run WRF with 5 grid points in the sponge zone)
     18    jjm = (dimx-1) * (dimy -1) [[br]]
     19    llm = (dimz - 1) [[br]]
     20    wiim = dimx - 1 [[br]]
     21    wjjm = dimy - 1 [[br]]
     22    wbdym = 5 (up to now, mandatory to run WRF with 5 grid points in the sponge zone) [[br]]
    2323
    24 1. run script 'tools/prepare_compilation.bash' ('-h', for help. copy netCDF libraries and other staff not automatized)
    25   $ ./prepare_compilation.bash [WRF_LMDZsrc] [NETCDFhome] ${WORKDIR}/WRFV3_80x90x39
     241. run script `tools/prepare_compilation.bash` ('-h', for help. copy netCDF libraries and other staff not automatized)
     25  {{{$ ./prepare_compilation.bash [WRF_LMDZsrc] [NETCDFhome] ${WORKDIR}/WRFV3_80x90x39}}}
    2626
    27271. prepare compilation (ready for 'lmd' machines in serial) if not, edit
    28   1. $ ./configure
    29   1. add pre-compiler flag' -DLMDZ after -DNETCDF (inside configure.wrf)
    30   1. modify 'lmdz/Makefile with that values from the 'configure.wrf'
     28  1. `$ ./configure `
     29  1. add pre-compiler flag `-DLMDZ` after `-DNETCDF` (inside `configure.wrf`)
     30  1. modify `lmdz/Makefile` with that values from the `configure.wrf`
     31
    31321. prepare compilation modifying Registry files (already done, have a look just in case):
    32   1. $ ls -lrta Registry/Registry.EM
    33     Registry/Registry.EM -> Registry.EM.LMDZ
    34   1. $ ls -lrta Registry/registry.dimspec -> registry.dimspec.lmdz
     33  1. `$ ls -lrta Registry/Registry.EM`
     34    {{{Registry/Registry.EM -> Registry.EM.LMDZ}}}
     35  1. $ `ls -lrta Registry/registry.dimspec`
     36    {{{Registry/registry.dimspec -> registry.dimspec.lmdz}}}
    3537
    36381. Compile as usual
    37   $ compile em_real >& compile.log
     39  {{{$ compile em_real >& compile.log}}}
    3840
    39411. Compile manually a lmdz subroutine (not working, not  knowing why). Example with gfortran serial in lmdz machines
    40   $ cd lmdz
     42  {{{$ cd lmdz
    4143  $ gfortran -O3 -ftree-vectorize -ftree-loop-linear -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4   -fconvert=big-endian -frecord-marker=4 -O3 -ftree-vectorize -ftree-loop-linear -funroll-loops  -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -g -O0 -fbacktrace -Wall -fbounds-check -c -L/u/lflmd/bin/gcc_netcdf-4.3.0/lib  -lnetcdf -lnetcdff  -I/u/lflmd/bin/gcc_netcdf-4.3.0/include lmdz_wrf_variables_mod.f90
    42   $ cd ..
     44  $ cd ..}}}
    4345
    44 1. run script for second time 'tools/prepare_compilation.bash'
    45   $ ./prepare_compilation.bash [WRF_LMDZsrc] [NETCDFhome] ${WORKDIR}/WRFV3_80x90x39
     461. run script for second time `tools/prepare_compilation.bash`
     47  {{{$ ./prepare_compilation.bash [WRF_LMDZsrc] [NETCDFhome] ${WORKDIR}/WRFV3_80x90x39}}}
    4648
    47491. Recompile as usual
    48   $ compile em_real >& compile.log
     50  {{{$ compile em_real >& compile.log}}}
    4951
    50521. Checking compilation (empty outputs)
    51   $ cat -n compile.log | grep Error
    52   $ cat -n compile.log | grep Erreur (just in case you are in a French speaking computer)
     53  * `$ cat -n compile.log | grep Error`
     54  $ `cat -n compile.log | grep Erreur` (just in case you are in a French speaking computer)
    5355
    54561. Running simulation
    55   1. Run all the steps 'WPS' and 'real.exe' as usual
    56   1. folder 'WRFV3/run' is not completed (no binaries in repository!), thus get a copy of the right WRF version and use the original source
    57   1. Edit and modify 'namelist.input' and all the LMDZ *def files provided in 'run' folder: 'config.def', 'gcm.def', 'physiq.def', 'run.def', 'traceur.def'
     57  1. Run all the steps `WPS` and `real.exe` as usual
     58  1. folder `WRFV3/run` is not completed (no binaries in repository!), thus get a copy of the right WRF version and use the original source
     59  1. Edit and modify `namelist.input` and all the LMDZ *def files provided in `WRF/run` folder: `config.def`, `gcm.def`, `physiq.def`, `run.def`, `traceur.def`
    5860
    59611. You're done, Have fun!