source: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN_generic/install.sh

Last change on this file was 2275, checked in by aslmd, 5 years ago

MESOSCALE-GENERIC
A new simple method to compile


  1. Compile physics as library
  2. Tweak configure.wrf
  3. Compile WRF with physics lib

A standalone folder with
install.sh and working test case
is provided in the case of
LES+generic with ifort on ciclad


Other configurations can easily be added
(and shall be committed)

  • adapt install.sh
  • create xxx.configure (WRF configure options)
  • create xxx.patch (tweaking of configure.wrf)
  • create xxx.compile (makemeso inputs)

TBD: merge install.sh and makemeso
into a simpler makemeso 2.0

  • Property svn:executable set to *
File size: 3.0 KB
RevLine 
[2275]1#! /bin/bash
2
3## INSTALLER: MESOSCALE + PHYSTD as LIB
4## A. Spiga -- 03/2020
5
6############
7## SETTINGS
8############
9kind=lesmpifort_64
10
11#############
12## LOCATIONS
13#############
14here=$PWD
15mm=$here/code/MESOSCALE/LMD_MM_MARS
16fd=$mm/generic_lmd_new_les_mpifort_64/WRFV2
17src=$mm/SRC/
18mod=$src/DEV/simpler_compile_LES_phys/
19
20#############################
21## RECORD WHAT IS BEING DONE
22#############################
23exec 1> install.log
24exec 2> install.loge
25
26#################
27## DOWNLOAD CODE
28#################
29## for physics, both GENERIC/MARS *and* COMMON are needed
30\rm -rf $here/code
31svn co -N http://svn.lmd.jussieu.fr/Planeto/trunk code
32cd $here/code
33svn update LMDZ.COMMON
34svn update LMDZ.GENERIC
35svn update LMDZ.MARS
36svn update MESOSCALE
37svn info
38
39###################################
40## COMPILE PHYSICS AS SEPARATE LIB
41###################################
42## this is without IOIPSL
43## to compile with IOIPSL (e.g. for testing)
44## ... use --revision=2576
45## ... in install_ioipsl_ciclad.bash: svn co --revision=2576 http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl
46## ... ./makelmdz_fcm -t 1 -p std -b 38x36 -full -s 1 -d 25 -arch CICLADifort -cpp MESOSCALE gcm -j 8 -libphy
47## ... then use specific configure.wrf
48cd $here/code/LMDZ.COMMON
49./makelmdz_fcm -t 1 -p std -b 38x36 -full -s 1 -d 25 -arch CICLADifort -cpp MESOSCALE gcm -io noioipsl -j 8 -libphy
50
51############################################
52## DOWNLOAD WRF AND CREATE MODIFIED VERSION
53############################################
54cd $src/LES/
55./LMD_LES_MARS_install
56
57##########################################
58## CREATE THE SPECIFIC FOLDER FOR COMPILE
59##########################################
60## only use of makemeso to install the folder
61## -- configure.wrf is created but this is overridden below
62## -- makemeso is not compiling (this script is sort of makemeso 2.0)
63cd $mm
64./makemeso -c les -p generic_lmd_new -d < $here/${kind}.compile
65
66###########################################################################
67## COPY WHAT IS NECESSARY TO HAVE CONSISTENCY BETWEEN physics AND dynamics
68###########################################################################
69cp $mod/external/io_grib_share/wrf_io_flags.h $fd/external/io_grib_share/wrf_io_flags.h
70cp $mod/external/RSL_LITE/module_dm.F $fd/external/RSL_LITE/module_dm.F
71
72###############################################################
73## PATCH THE configure.wrf FOR INTERFACE AND COMPILE THE MODEL
74###############################################################
75# TODO: link to env variable in the patch instead of absolute links
76cd $fd
77./configure < $here/${kind}.configure
78patch -b < $here/${kind}.patch
79./compile em_les > log_compile 2> log_error
80cd $here
81
82########################################
83## GET THE STATIC DATA NECESSARY TO RUN
84########################################
85# NB: the latest / is important
86wget -r --no-parent -nH --cut-dirs=3  https://www.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/
87rm -rf robots.txt
88### one file is missing from the LMDZ repo, get from HITRAN directly
89cd datagcm/continuum_data/
90wget https://www.hitran.org/data/CIA/N2-N2_2011.cia
91cd ../../
Note: See TracBrowser for help on using the repository browser.